Browse Source

pms 瑞鹰日报 兼容没有配置任务的情况

zhangcl 2 tuần trước cách đây
mục cha
commit
21dd554bac

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrydailyreport/IotRyDailyReportServiceImpl.java

@@ -88,7 +88,7 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
             deviceIds = task.getDeviceIds();
         } else {
             // 当前队伍没有关联任务 不生成日报
-            throw exception(IOT_PROJECT_TASK_NOT_RELATED);
+            // throw exception(IOT_PROJECT_TASK_NOT_RELATED);
         }
 
         // 当前井深 计算 日进尺 月进尺 年累计进尺
@@ -107,7 +107,7 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
 
         // 当天如果已经有此小队的记录 新增 当天如果没有此小队的日报记录 修改
         // deptId - taskId - createTime(yyyy-MM-dd) 确定唯一一条记录 不能使用 LocalDateTime.now() 来查询,应该使用 运行记录工单的创建日期查询
-        IotRyDailyReportDO existReport = iotRyDailyReportMapper.selectExistReport(createReqVO.getDeptId(), taskId, reportDate);
+        IotRyDailyReportDO existReport = iotRyDailyReportMapper.selectExistReport(createReqVO.getDeptId(), null, reportDate);
         if (ObjUtil.isEmpty(existReport)) {
             // reportDate 所代表日期前1天的7点
             LocalDateTime today7am = reportDate.withHour(7).withMinute(0).withSecond(0).withNano(0);