Explorar o código

pms 日报 兼容没有配置任务的情况 列表查询搬迁安装天数

zhangcl hai 2 semanas
pai
achega
6da5702580

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrhdailyreport/IotRhDailyReportController.java

@@ -206,7 +206,7 @@ public class IotRhDailyReportController {
             List<IotRhDailyReportDO> relocationDays = iotRhDailyReportService.relocationDays(null);
             if (CollUtil.isNotEmpty(relocationDays)) {
                 relocationDays.forEach(day -> {
-                    relocationDaysPair.put(day.getTaskId(), day.getRelocationDays());
+                    relocationDaysPair.put(day.getDeptId(), day.getRelocationDays());
                 });
             }
         });
@@ -221,7 +221,7 @@ public class IotRhDailyReportController {
             // 2.4 设计注气量
             findAndThen(taskExtPropertyPair, reportVO.getTaskId(), designInjection -> reportVO.setDesignInjection(designInjection));
             // 2.5 搬迁安装天数
-            findAndThen(relocationDaysPair, reportVO.getTaskId(), relocationDays -> reportVO.setRelocationDays(relocationDays));
+            findAndThen(relocationDaysPair, reportVO.getDeptId(), relocationDays -> reportVO.setRelocationDays(relocationDays));
             // 2.6 产能
             findAndThen(capacityPair.get(), reportVO.getDeptId(), capacity -> reportVO.setCapacity(capacity));
         });

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/iotprojecttask/IotRhDailyReportMapper.xml

@@ -101,7 +101,7 @@
     <select id="relocationDays" resultMap="BaseResultMap"
             parameterType="cn.iocoder.yudao.module.pms.controller.admin.iotrhdailyreport.vo.IotRhDailyReportPageReqVO">
         SELECT
-            task_id,
+            dept_id,
             DATEDIFF(
                     MIN(CASE WHEN construction_status = 3 THEN construction_start_date END),
                     MIN(CASE WHEN construction_status = 1 THEN construction_start_date END)
@@ -109,7 +109,7 @@
         FROM rq_iot_rh_daily_report
         WHERE construction_status IN (1, 3)
           AND deleted = 0
-        GROUP BY task_id;
+        GROUP BY dept_id;
     </select>
 
 </mapper>