|
@@ -1285,15 +1285,18 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
// 找出日报列表中 状态为 施工 施工准备 驻地待命的 记录
|
|
// 找出日报列表中 状态为 施工 施工准备 驻地待命的 记录
|
|
|
|
|
+ // 待命队伍 = 队伍总数 - 施工队伍 - 准备队伍
|
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
|
dailyReports.forEach(report -> {
|
|
dailyReports.forEach(report -> {
|
|
|
if (teamProjectIdPair.containsKey(report.getDeptId()) && deviceDeptIds.contains(report.getDeptId())) {
|
|
if (teamProjectIdPair.containsKey(report.getDeptId()) && deviceDeptIds.contains(report.getDeptId())) {
|
|
|
// 找到队伍所属的上级项目部
|
|
// 找到队伍所属的上级项目部
|
|
|
Long projectDeptId = teamProjectIdPair.get(report.getDeptId());
|
|
Long projectDeptId = teamProjectIdPair.get(report.getDeptId());
|
|
|
// 动迁 准备 完工 都算作 准备
|
|
// 动迁 准备 完工 都算作 准备
|
|
|
- // 施工状态 观察使用 待维修 待保养
|
|
|
|
|
- if ("sg".equals(report.getConstructionStatus()) || "gcsy".equals(report.getConstructionStatus())
|
|
|
|
|
- || "dwx".equals(report.getConstructionStatus()) || "dby".equals(report.getConstructionStatus())) {
|
|
|
|
|
|
|
+ // 施工sg 观察使用gcsy 待维修dwx 待保养dby
|
|
|
|
|
+ // 20260624 修改为 注水 或 注气量 >0 的日报队伍数量
|
|
|
|
|
+ BigDecimal tempGasInjection = report.getDailyGasInjection();
|
|
|
|
|
+ BigDecimal tempWaterInjection = report.getDailyWaterInjection();
|
|
|
|
|
+ if (tempGasInjection.compareTo(BigDecimal.ZERO) > 0 || tempWaterInjection.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
if (sgTeamCountPair.containsKey(projectDeptId)) {
|
|
if (sgTeamCountPair.containsKey(projectDeptId)) {
|
|
|
Integer tempCount = sgTeamCountPair.get(projectDeptId);
|
|
Integer tempCount = sgTeamCountPair.get(projectDeptId);
|
|
|
sgTeamCountPair.put(projectDeptId, ++tempCount);
|
|
sgTeamCountPair.put(projectDeptId, ++tempCount);
|
|
@@ -1310,7 +1313,7 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
zbTeamCountPair.put(projectDeptId, 1);
|
|
zbTeamCountPair.put(projectDeptId, 1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // 待命
|
|
|
|
|
|
|
+ // 待命 = 队伍总数 - 施工队伍 - 准备队伍
|
|
|
if ("zddm".equals(report.getConstructionStatus()) || "xcdm".equals(report.getConstructionStatus())
|
|
if ("zddm".equals(report.getConstructionStatus()) || "xcdm".equals(report.getConstructionStatus())
|
|
|
|| "dm".equals(report.getConstructionStatus()) || "wxz".equals(report.getConstructionStatus()) || "xz".equals(report.getConstructionStatus())) {
|
|
|| "dm".equals(report.getConstructionStatus()) || "wxz".equals(report.getConstructionStatus()) || "xz".equals(report.getConstructionStatus())) {
|
|
|
if (zddmTeamCountPair.containsKey(projectDeptId)) {
|
|
if (zddmTeamCountPair.containsKey(projectDeptId)) {
|
|
@@ -1515,21 +1518,19 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
statistics.setTransitTime(cumulativeTransitTimePair.get(deptId));
|
|
statistics.setTransitTime(cumulativeTransitTimePair.get(deptId));
|
|
|
statistics.setNonProductiveTime(cumulativeNonProductionPair.get(deptId));
|
|
statistics.setNonProductiveTime(cumulativeNonProductionPair.get(deptId));
|
|
|
// 队伍数量
|
|
// 队伍数量
|
|
|
- if (CollUtil.isNotEmpty(teamCountPair)) {
|
|
|
|
|
- statistics.setTeamCount(teamCountPair.get(deptId));
|
|
|
|
|
- }
|
|
|
|
|
- // 施工队伍 数量
|
|
|
|
|
- if (CollUtil.isNotEmpty(sgTeamCountPair)) {
|
|
|
|
|
- statistics.setSgTeamCount(sgTeamCountPair.get(deptId));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Integer teamCount = teamCountPair.getOrDefault(deptId, 0);
|
|
|
|
|
+ // 施工队伍数量
|
|
|
|
|
+ Integer sgTeamCount = sgTeamCountPair.getOrDefault(deptId, 0);
|
|
|
// 施工准备队伍数量
|
|
// 施工准备队伍数量
|
|
|
- if (CollUtil.isNotEmpty(zbTeamCountPair)) {
|
|
|
|
|
- statistics.setZbTeamCount(zbTeamCountPair.get(deptId));
|
|
|
|
|
- }
|
|
|
|
|
- // 驻地待命 队伍数量
|
|
|
|
|
- if (CollUtil.isNotEmpty(zddmTeamCountPair)) {
|
|
|
|
|
- statistics.setZddmTeamCount(zddmTeamCountPair.get(deptId));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Integer zbTeamCount = zbTeamCountPair.getOrDefault(deptId, 0);
|
|
|
|
|
+
|
|
|
|
|
+ statistics.setTeamCount(teamCount);
|
|
|
|
|
+ statistics.setSgTeamCount(sgTeamCount);
|
|
|
|
|
+ statistics.setZbTeamCount(zbTeamCount);
|
|
|
|
|
+
|
|
|
|
|
+ // 驻地待命 队伍数量 = 队伍总数 - 施工队伍 - 准备队伍
|
|
|
|
|
+ Integer dmTeamCount = Math.max(teamCount - sgTeamCount - zbTeamCount, 0);
|
|
|
|
|
+ statistics.setZddmTeamCount(dmTeamCount);
|
|
|
result.add(statistics);
|
|
result.add(statistics);
|
|
|
});
|
|
});
|
|
|
return result;
|
|
return result;
|