| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.cars.response.CarsAlarmResultListResponse; |
| | | import com.doumee.core.haikang.model.cars.response.CarsDeviceDetaisResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | |
| | | public BoardCarsListVO platformJobCarsList(){ |
| | | BoardCarsListVO data = new BoardCarsListVO(); |
| | | List<CarsDeviceDetaisResponse> detaisResponses = HKCarOpenService.getAllCarsDetais(); |
| | | List<CarsAlarmResultListResponse> eventList = HKCarOpenService.getAlarmEvemtList(detaisResponses,new Date()); |
| | | data.setCarsList(detaisResponses); |
| | | if(data.getCarsList()!=null && data.getCarsList().size()>0){ |
| | | List<String> codes = new ArrayList<>(); |
| | |
| | | int online = 0; |
| | | for(CarsDeviceDetaisResponse model:detaisResponses){ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ONE) ||Constants.equalsInteger(model.getStatus(),Constants.TWO)){ |
| | | //如果是在线或者休眠,查询在途还是空闲 |
| | | //如果是在线或者休眠,查询在途还是空闲ty |
| | | codes.add(model.getPlateNum()); |
| | | }else |
| | | data.setOfflineNum(data.getOfflineNum()+1); |
| | |
| | | param.setPeriodType("day"); |
| | | BigDecimal total = new BigDecimal(0); |
| | | BaseResponse<EnergyTrendResponse> response = HKService.energyTrend(param); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null&& response.getData().getYvalues()!=null ){ |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) |
| | | && response.getData()!=null&& response.getData().getYvalues()!=null ){ |
| | | for (int i = 0; i < response.getData().getYvalues().get(0).getValue().length; i++) { |
| | | total = total.add(new BigDecimal(StringUtils.defaultString( response.getData().getYvalues().get(0).getValue()[i],"0"))); |
| | | } |