|
|
@@ -1,7 +1,7 @@
|
|
|
package cn.iocoder.yudao.module.iscs.service.sop;
|
|
|
|
|
|
|
|
|
-import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.lang.Assert;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.*;
|
|
|
@@ -11,14 +11,10 @@ import cn.iocoder.yudao.module.iscs.utils.SuperDateUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import jakarta.annotation.Resource;
|
|
|
-import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
-import javax.xml.crypto.Data;
|
|
|
-import java.time.LocalDate;
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -166,7 +162,8 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
|
|
|
@Override
|
|
|
public SopExecutionPlanRespVO selectSopExecutionPlanBySopId(Long sopId) {
|
|
|
SopExecutionPlanDO sopExecutionPlanDO = getOne(Wrappers.<SopExecutionPlanDO>lambdaQuery()
|
|
|
- .eq(SopExecutionPlanDO::getId, sopId));
|
|
|
+ .eq(SopExecutionPlanDO::getSopId, sopId));
|
|
|
+ Assert.isFalse(sopExecutionPlanDO == null, "该sop尚未创建执行计划!");
|
|
|
SopExecutionPlanRespVO bean = BeanUtils.toBean(sopExecutionPlanDO, SopExecutionPlanRespVO.class);
|
|
|
// sop数据
|
|
|
SopRespVO sopDetailById = sopService.getSopDetailById(bean.getSopId());
|
|
|
@@ -221,7 +218,7 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
|
|
|
String yyyymmdd = SuperDateUtils.getYYYYMMDD();
|
|
|
List<String> adjacentDatesByWeekday = SuperDateUtils.getAdjacentDatesByWeekday(
|
|
|
yyyymmdd,
|
|
|
- null,
|
|
|
+ bean.getEndValue(),
|
|
|
bean.getFrequency(),
|
|
|
bean.getTimePoint(),
|
|
|
10);
|