|
@@ -1,6 +1,7 @@
|
|
|
package cn.iocoder.yudao.module.iscs.service.sop;
|
|
package cn.iocoder.yudao.module.iscs.service.sop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.lang.Assert;
|
|
import cn.hutool.core.lang.Assert;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
@@ -20,10 +21,7 @@ import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.HashSet;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* SOP计划执行 Service 实现类
|
|
* SOP计划执行 Service 实现类
|
|
@@ -57,6 +55,16 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
|
|
|
// 插入
|
|
// 插入
|
|
|
sopExecutionPlanMapper.insert(sopExecutionPlan);
|
|
sopExecutionPlanMapper.insert(sopExecutionPlan);
|
|
|
|
|
|
|
|
|
|
+ // 进行值插入
|
|
|
|
|
+ SopExecutionPlanRespVO sopExecutionPlan1 = getSopExecutionPlan(sopExecutionPlan.getId());
|
|
|
|
|
+ if (!sopExecutionPlan1.getPreviewDataList().isEmpty()) {
|
|
|
|
|
+ sopExecutionPlanMapper.update(Wrappers.<SopExecutionPlanDO>lambdaUpdate()
|
|
|
|
|
+ .eq(SopExecutionPlanDO::getSopId, sopExecutionPlan.getId())
|
|
|
|
|
+ .set(SopExecutionPlanDO::getNextExecutDate, sopExecutionPlan1.getPreviewDataList().get(0).getPlanDay()));
|
|
|
|
|
+ /*if (sopExecutionPlan1.getPreviewDataList().get(0).getPlanDay().equals(DateUtil.format(new Date(), "yyyy-MM-dd"))) {
|
|
|
|
|
+ // 如果初始化的
|
|
|
|
|
+ }*/
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 返回
|
|
// 返回
|
|
|
return sopExecutionPlan.getId();
|
|
return sopExecutionPlan.getId();
|