|
|
@@ -2779,24 +2779,8 @@ public class IotStaticController {
|
|
|
BigDecimal dailyWaterInjection = yearReport.getDailyWaterInjection();
|
|
|
|
|
|
if (CollUtil.isNotEmpty(projectTeamPair)) {
|
|
|
- projectTeamPair.forEach((projectDeptId, teamDeptIds) -> {
|
|
|
- if (teamDeptIds.contains(yearReport.getDeptId())) {
|
|
|
- // 项目部 年累计注气量
|
|
|
- /* if (projectYearGasInjectionPair.containsKey(projectDeptId)) {
|
|
|
- BigDecimal tempGasInjection = projectYearGasInjectionPair.get(projectDeptId);
|
|
|
- BigDecimal subtotal = tempGasInjection.add(dailyGasInjection);
|
|
|
- projectYearGasInjectionPair.put(projectDeptId, subtotal);
|
|
|
- } else {
|
|
|
- projectYearGasInjectionPair.put(projectDeptId, dailyGasInjection);
|
|
|
- } */
|
|
|
- // 项目部 年累计注水量
|
|
|
- /* if (projectYearWaterInjectionPair.containsKey(projectDeptId)) {
|
|
|
- BigDecimal tempWaterInjection = projectYearWaterInjectionPair.get(projectDeptId);
|
|
|
- BigDecimal subtotal = tempWaterInjection.add(dailyWaterInjection);
|
|
|
- projectYearWaterInjectionPair.put(projectDeptId, subtotal);
|
|
|
- } else {
|
|
|
- projectYearWaterInjectionPair.put(projectDeptId, dailyWaterInjection);
|
|
|
- } */
|
|
|
+ /* projectTeamPair.forEach((projectDeptId, teamDeptIds) -> {
|
|
|
+ if (teamDeptIds.contains(deptId)) {
|
|
|
// 各项目部年度 运行时效(按小时统计的设备利用率)
|
|
|
// 按小时数 统计设备利用率
|
|
|
BigDecimal gasInjectionTime = ObjUtil.defaultIfNull(yearReport.getDailyInjectGasTime(), BigDecimal.ZERO);
|
|
|
@@ -2811,8 +2795,27 @@ public class IotStaticController {
|
|
|
projectYearWorkTimePair.merge(projectDeptId, workTime, BigDecimal::add);
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ }); */
|
|
|
+
|
|
|
+ // 设置各项目部 按照时间统计的 设备利用率
|
|
|
+ // 各项目部年度 运行时效(按小时统计的设备利用率)
|
|
|
+ // 按小时数 统计设备利用率
|
|
|
+ BigDecimal gasInjectionTime = ObjUtil.defaultIfNull(yearReport.getDailyInjectGasTime(), BigDecimal.ZERO);
|
|
|
+ BigDecimal waterInjectionTime = ObjUtil.defaultIfNull(yearReport.getDailyInjectWaterTime(), BigDecimal.ZERO);
|
|
|
+ // 取 注气时间 注水时间 的较大者
|
|
|
+ BigDecimal workTime = gasInjectionTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
+ ? gasInjectionTime
|
|
|
+ : waterInjectionTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
+ ? waterInjectionTime
|
|
|
+ : BigDecimal.ZERO;
|
|
|
+ if (workTime.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ Long projectDeptId = teamProjectIdPair.get(deptId);
|
|
|
+ if (ObjUtil.isNotEmpty(projectDeptId) && projectTeamPair.containsKey(projectDeptId)) {
|
|
|
+ projectYearWorkTimePair.merge(projectDeptId, workTime, BigDecimal::add);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
// 年累计的工作量 注气 注水 运行时效 不考虑队伍是否包含主设备
|
|
|
if (teamIdProjectIdPair.containsKey(deptId)) {
|
|
|
Long projectDeptId = teamIdProjectIdPair.get(deptId);
|
|
|
@@ -2832,19 +2835,6 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
projectYearWaterInjectionPair.put(projectDeptId, dailyWaterInjection);
|
|
|
}
|
|
|
- // 各项目部年度 运行时效(按小时统计的设备利用率)
|
|
|
- // 按小时数 统计设备利用率
|
|
|
- BigDecimal gasInjectionTime = ObjUtil.defaultIfNull(yearReport.getDailyInjectGasTime(), BigDecimal.ZERO);
|
|
|
- BigDecimal waterInjectionTime = ObjUtil.defaultIfNull(yearReport.getDailyInjectWaterTime(), BigDecimal.ZERO);
|
|
|
- // 取 注气时间 注水时间 的较大者
|
|
|
- BigDecimal workTime = gasInjectionTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
- ? gasInjectionTime
|
|
|
- : waterInjectionTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
- ? waterInjectionTime
|
|
|
- : BigDecimal.ZERO;
|
|
|
- if (workTime.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- projectYearWorkTimePair.merge(projectDeptId, workTime, BigDecimal::add);
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
}
|