Эх сурвалжийг харах

修改最近执行日期的额修改逻辑

车车 2 сар өмнө
parent
commit
68c3d2b317

+ 6 - 9
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/service/sop/SopExecutionPlanServiceImpl.java

@@ -402,15 +402,12 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
 
 
                 // 生成完成之后更新isc_sop_execution_plan中的next_execut_date
                 // 生成完成之后更新isc_sop_execution_plan中的next_execut_date
                 SopExecutionPlanRespVO sopExecutionPlan = getSopExecutionPlan(executionPlanRespVO.getId());
                 SopExecutionPlanRespVO sopExecutionPlan = getSopExecutionPlan(executionPlanRespVO.getId());
-                if (sopExecutionPlan.getPreviewDataList() != null
-                        && !sopExecutionPlan.getPreviewDataList().isEmpty()
-                        // 应为第一条是今天的数据,所以大于等于2才有后面需要执行的数据
-                        && sopExecutionPlan.getPreviewDataList().size() >= 2) {
-                        update(Wrappers.<SopExecutionPlanDO>lambdaUpdate()
-                                .eq(SopExecutionPlanDO::getId, executionPlanRespVO.getId())
-                                .set(SopExecutionPlanDO::getLastExecutDate, yyyymmdd)
-                                .set(SopExecutionPlanDO::getNextExecutDate, sopExecutionPlan.getPreviewDataList().get(1).getPlanDay()));
-                }
+                update(Wrappers.<SopExecutionPlanDO>lambdaUpdate()
+                        .eq(SopExecutionPlanDO::getId, executionPlanRespVO.getId())
+                        .set(sopExecutionPlan.getPreviewDataList() != null && !sopExecutionPlan.getPreviewDataList().isEmpty()
+                                        // 应为第一条是今天的数据,所以大于等于2才有后面需要执行的数据
+                                        && sopExecutionPlan.getPreviewDataList().size() >= 2, SopExecutionPlanDO::getLastExecutDate, yyyymmdd)
+                        .set(SopExecutionPlanDO::getNextExecutDate, sopExecutionPlan.getPreviewDataList().get(1).getPlanDay()));
 
 
                 // 发送消息
                 // 发送消息
                 // 定义匹配输入格式的解析器
                 // 定义匹配输入格式的解析器