|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static void main(String[] args) { | 
|---|
|  |  |  | getAllCarsDetais(); | 
|---|
|  |  |  | //      getAllCarsDetais(); | 
|---|
|  |  |  | CarsAlarmListRequest param = new CarsAlarmListRequest(); | 
|---|
|  |  |  | param.setStartTime(DateUtil.getPlusTime2(DateUtil.getStartOfDay(new Date()))); | 
|---|
|  |  |  | param.setEndTime(DateUtil.getPlusTime2(DateUtil.getEndOfDay(new Date()))); | 
|---|
|  |  |  | param.setPageNo(1); | 
|---|
|  |  |  | param.setPageSize(100); | 
|---|
|  |  |  | param.setDeviceCode("15954209015"); | 
|---|
|  |  |  | BaseCarsPageResponse<CarsAlarmListResponse>  data = getAlarmList(param); | 
|---|
|  |  |  | System.out.println(JSONObject.toJSONString(data)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static List<CarsDeviceDetaisResponse> getAllCarsDetais() { | 
|---|
|  |  |  | 
|---|
|  |  |  | List<String> cars = new ArrayList<>(); | 
|---|
|  |  |  | List<String> codes = new ArrayList<>(); | 
|---|
|  |  |  | for(CarsDeviceResponse model :data.getResults()){ | 
|---|
|  |  |  | //            System.out.println("=================车牌号:"+model.getPlateNum()); | 
|---|
|  |  |  | System.out.println(model.getTerminalID()+"=================车牌号:"+model.getPlateNum()); | 
|---|
|  |  |  | cars.add(model.getPlateNum()); | 
|---|
|  |  |  | codes.add(model.getTerminalID()); | 
|---|
|  |  |  | CarsDeviceDetaisResponse t = new CarsDeviceDetaisResponse(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | for(CarsDeviceDetaisResponse m  : list){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | System.out.println("=================车牌号:"+m.getPlateNum()+" 状态:【"+m.getStatus()+"】"+" 位置:【"+m.getLongitude()+","+m.getLatitude()+"】"); | 
|---|
|  |  |  | System.out.println("=================车牌号:"+m.getPlateNum()+" 状态:【"+m.getTerminalID()+"】"+" 位置:【"+m.getLongitude()+","+m.getLatitude()+"】"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return list; | 
|---|
|  |  |  | } | 
|---|