|
@@ -1,17 +1,22 @@
|
|
|
package cn.iocoder.yudao.module.iscs.service.sop;
|
|
package cn.iocoder.yudao.module.iscs.service.sop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
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;
|
|
|
import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopExecutionPlanPageReqVO;
|
|
import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopExecutionPlanPageReqVO;
|
|
|
|
|
+import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopExecutionPlanRespVO;
|
|
|
import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopExecutionPlanSaveReqVO;
|
|
import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopExecutionPlanSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.iscs.dal.dataobject.sop.SopExecutionPlanDO;
|
|
import cn.iocoder.yudao.module.iscs.dal.dataobject.sop.SopExecutionPlanDO;
|
|
|
import cn.iocoder.yudao.module.iscs.dal.mysql.sop.SopExecutionPlanMapper;
|
|
import cn.iocoder.yudao.module.iscs.dal.mysql.sop.SopExecutionPlanMapper;
|
|
|
|
|
+import cn.iocoder.yudao.module.iscs.utils.SuperDateUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
|
|
+import javax.xml.crypto.Data;
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -28,16 +33,6 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Long createSopExecutionPlan(SopExecutionPlanSaveReqVO createReqVO) {
|
|
public Long createSopExecutionPlan(SopExecutionPlanSaveReqVO createReqVO) {
|
|
|
- // 分类处理
|
|
|
|
|
- if (createReqVO.getFrequencyUnit().equals(0)) {
|
|
|
|
|
- // 处理年的数据
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
// 插入
|
|
// 插入
|
|
|
SopExecutionPlanDO sopExecutionPlan = BeanUtils.toBean(createReqVO, SopExecutionPlanDO.class);
|
|
SopExecutionPlanDO sopExecutionPlan = BeanUtils.toBean(createReqVO, SopExecutionPlanDO.class);
|
|
@@ -69,8 +64,22 @@ public class SopExecutionPlanServiceImpl extends ServiceImpl<SopExecutionPlanMap
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public SopExecutionPlanDO getSopExecutionPlan(Long id) {
|
|
|
|
|
- return sopExecutionPlanMapper.selectById(id);
|
|
|
|
|
|
|
+ public SopExecutionPlanRespVO getSopExecutionPlan(Long id) {
|
|
|
|
|
+ SopExecutionPlanDO sopExecutionPlanDO = sopExecutionPlanMapper.selectById(id);
|
|
|
|
|
+ SopExecutionPlanRespVO bean = BeanUtils.toBean(sopExecutionPlanDO, SopExecutionPlanRespVO.class);
|
|
|
|
|
+ Date date = new Date();
|
|
|
|
|
+ // 分类处理
|
|
|
|
|
+ /*if (createReqVO.getFrequencyUnit().equals(0)) {
|
|
|
|
|
+ // 处理年的数据
|
|
|
|
|
+ String yyyymmdd = DateUtil.format(date, "yyyy-MM-dd");
|
|
|
|
|
+ List<String> adjacentDatesYearDay = SuperDateUtils.getAdjacentDatesYearDay(
|
|
|
|
|
+ SuperDateUtils.getYYYYMMDD(),
|
|
|
|
|
+ createReqVO.getEndTime(),
|
|
|
|
|
+ createReqVO.getFrequency(),
|
|
|
|
|
+ createReqVO.getTimePoint(),
|
|
|
|
|
+ 10);
|
|
|
|
|
+ }*/
|
|
|
|
|
+ return bean;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|