Преглед на файлове

pms 瑞恒日报汇总 队伍数量统计 逻辑调整

zhangcl преди 3 дни
родител
ревизия
a8f22675cc

+ 10 - 5
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrhdailyreport/IotRhDailyReportServiceImpl.java

@@ -1287,11 +1287,13 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
                     // 找出日报列表中 状态为 施工 施工准备 驻地待命的 记录
                     if (CollUtil.isNotEmpty(dailyReports)) {
                         dailyReports.forEach(report -> {
-                            if (teamProjectIdPair.containsKey(report.getDeptId())) {
+                            if (teamProjectIdPair.containsKey(report.getDeptId()) && deviceDeptIds.contains(report.getDeptId())) {
                                 // 找到队伍所属的上级项目部
                                 Long projectDeptId = teamProjectIdPair.get(report.getDeptId());
-                                // 施工状态
-                                if ("sg".equals(report.getConstructionStatus())) {
+                                // 动迁 准备 完工 都算作 准备
+                                // 施工状态  观察使用 待维修 待保养
+                                if ("sg".equals(report.getConstructionStatus()) || "gcsy".equals(report.getConstructionStatus())
+                                        || "dwx".equals(report.getConstructionStatus()) || "dby".equals(report.getConstructionStatus())) {
                                     if (sgTeamCountPair.containsKey(projectDeptId)) {
                                         Integer tempCount = sgTeamCountPair.get(projectDeptId);
                                         sgTeamCountPair.put(projectDeptId, ++tempCount);
@@ -1299,7 +1301,8 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
                                         sgTeamCountPair.put(projectDeptId, 1);
                                     }
                                 }
-                                if ("zb".equals(report.getConstructionStatus())) {
+                                // 准备
+                                if ("zb".equals(report.getConstructionStatus()) || "dq".equals(report.getConstructionStatus()) || "wg".equals(report.getConstructionStatus())) {
                                     if (zbTeamCountPair.containsKey(projectDeptId)) {
                                         Integer tempCount = zbTeamCountPair.get(projectDeptId);
                                         zbTeamCountPair.put(projectDeptId, ++tempCount);
@@ -1307,7 +1310,9 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
                                         zbTeamCountPair.put(projectDeptId, 1);
                                     }
                                 }
-                                if ("zddm".equals(report.getConstructionStatus())) {
+                                // 待命
+                                if ("zddm".equals(report.getConstructionStatus()) || "xcdm".equals(report.getConstructionStatus())
+                                        || "dm".equals(report.getConstructionStatus()) || "wxz".equals(report.getConstructionStatus())  || "xz".equals(report.getConstructionStatus())) {
                                     if (zddmTeamCountPair.containsKey(projectDeptId)) {
                                         Integer tempCount = zddmTeamCountPair.get(projectDeptId);
                                         zddmTeamCountPair.put(projectDeptId, ++tempCount);