|
@@ -12,6 +12,7 @@ import com.persagy.apm.energy.report.common.utils.DataUtils;
|
|
|
import com.persagy.apm.energy.report.common.utils.DateUtils;
|
|
|
import com.persagy.apm.energy.report.common.utils.SpringContextHolder;
|
|
|
import com.persagy.apm.energy.report.common.vo.PlatformAreaInfoVO;
|
|
|
+import com.persagy.apm.energy.report.common.vo.WorkOrderVO;
|
|
|
import com.persagy.apm.energy.report.emsweather.service.EMSWeatherWebService;
|
|
|
import com.persagy.apm.energy.report.environment.model.dto.BatchQueryEnvListByParamDTO;
|
|
|
import com.persagy.apm.energy.report.environment.service.IEnvironmentWebService;
|
|
@@ -325,23 +326,30 @@ public class CommonServiceImpl implements CommonService {
|
|
|
}
|
|
|
hotelProjectEnergyWorkerOrderInfo.setInitiativeCount(initiativeCount);
|
|
|
List<String> workOrderIdList = new ArrayList<>();
|
|
|
+ List<WorkOrderVO> workOrderVOList = new ArrayList<>();
|
|
|
for (WorkOrder workOrder : energySaveRealFinishTimeWorkList) {
|
|
|
workOrderIdList.add(workOrder.getOrderId());
|
|
|
+ WorkOrderVO vo = new WorkOrderVO();
|
|
|
+ vo.setOrderId(workOrder.getOrderId());
|
|
|
+ vo.setOrderName(workOrder.getWoName());
|
|
|
+ if (!StringUtils.isEmpty(workOrder.getRealFinishTime())) {
|
|
|
+ vo.setRealFinishTime(DateUtils.str2Date(workOrder.getRealFinishTime(), DateUtils.SDFSECOND));
|
|
|
+ }
|
|
|
+ workOrderVOList.add(vo);
|
|
|
}
|
|
|
// {工单id:工单节能量}
|
|
|
Map<String, Double> workId_energyMap = iEquipRunManagerService.getEnergySaveWorderMap(workOrderIdList);
|
|
|
Map<String, Integer> sortMap = new HashMap<>();
|
|
|
sortMap.put("realFinishTime", -1);
|
|
|
- DataUtils.sort(energySaveRealFinishTimeWorkList, sortMap);
|
|
|
+ DataUtils.sort(workOrderVOList, sortMap);
|
|
|
List<HotelProjectEnergyWorkOrderItem> hotelProjectEnergyWorkOrderItemList = new ArrayList<>();
|
|
|
Double totalEnergySave = null;
|
|
|
- for (WorkOrder workOrder : energySaveRealFinishTimeWorkList) {
|
|
|
+ for (WorkOrderVO workOrder : workOrderVOList) {
|
|
|
HotelProjectEnergyWorkOrderItem hotelProjectEnergyWorkOrderItem = new HotelProjectEnergyWorkOrderItem();
|
|
|
- hotelProjectEnergyWorkOrderItem.setWorkName(workOrder.getWoName());
|
|
|
+ hotelProjectEnergyWorkOrderItem.setWorkName(workOrder.getOrderName());
|
|
|
String completeTimeStr = "";
|
|
|
if (!StringUtils.isEmpty(workOrder.getRealFinishTime())) {
|
|
|
- Date completeTime = DateUtils.str2Date(workOrder.getRealFinishTime(), DateUtils.SDFSECOND);
|
|
|
- completeTimeStr = DateUtils.date2Str(completeTime, DateUtils.SDF_DOT_DAY);
|
|
|
+ completeTimeStr = DateUtils.date2Str(workOrder.getRealFinishTime(), DateUtils.SDF_DOT_DAY);
|
|
|
}
|
|
|
hotelProjectEnergyWorkOrderItem.setCompletedTime(completeTimeStr);
|
|
|
hotelProjectEnergyWorkOrderItem.setEnergySaved(workId_energyMap.get(workOrder.getOrderId()));
|
|
@@ -354,7 +362,7 @@ public class CommonServiceImpl implements CommonService {
|
|
|
hotelProjectEnergyWorkerOrderInfo.setProjectName(null == reportProjectInfo ? "" : reportProjectInfo.getProjectName());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
-
|
|
|
+ log.error("获取HotelProjectEnergyWorkerOrderInfo的数据失败:", e);
|
|
|
}
|
|
|
return hotelProjectEnergyWorkerOrderInfo;
|
|
|
}
|