Ver código fonte

绩效考核 还没做完

ys321973351 1 ano atrás
pai
commit
99edeac0f4

+ 8 - 3
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/service/impl/ItdmRunFlowPathStepServiceImpl.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.flowpath.service.impl;
 
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.flowpath.convert.FlowPathConvert;
 import org.jeecg.modules.flowpath.dto.ItdmRejectDQRunFlowPath;
@@ -27,7 +28,7 @@ import java.util.stream.Collectors;
 /**
  * @Description: 运行流程步骤表
  * @Author: jeecg-boot
- * @Date:   2023-07-20
+ * @Date: 2023-07-20
  * @Version: V1.0
  */
 @Service
@@ -70,7 +71,11 @@ public class ItdmRunFlowPathStepServiceImpl extends ServiceImpl<ItdmRunFlowPathS
                 .eq(ItdmRunFlowPathStep::getSort, Integer.parseInt(select.getSort()) + 1)
 
         );
-        ItdmRunFlowPath itdmRunFlowPath = new ItdmRunFlowPath();
+        ItdmRunFlowPath itdmRunFlowPath = this.itdmRunFlowPathMapper.selectById(select.getRunFlowPath());
+        if (!itdmRunFlowPath.getDqSetp().equals(select.getFlowPathSetp())) {
+            throw new JeecgBootException("当前节点不是在进行中");
+        }
+
         itdmRunFlowPath.setId(select.getRunFlowPath());
         itdmRunFlowPath.setDqSetp(nextstep.getFlowPathSetp());
         itdmRunFlowPathMapper.updateById(itdmRunFlowPath);
@@ -92,7 +97,7 @@ public class ItdmRunFlowPathStepServiceImpl extends ServiceImpl<ItdmRunFlowPathS
 
         ItdmRunFlowPathStep prvestep = this.baseMapper.selectOne(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
                 .eq(ItdmRunFlowPathStep::getRunFlowPath, select.getRunFlowPath())
-                .eq(ItdmRunFlowPathStep::getSort, Integer.parseInt(select.getSort()) -1)
+                .eq(ItdmRunFlowPathStep::getSort, Integer.parseInt(select.getSort()) - 1)
 
         );