ys321973351 1 year ago
parent
commit
84b1ecc34a

+ 20 - 4
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/controller/ItdmRunFlowPathController.java

@@ -26,6 +26,8 @@ import org.jeecg.modules.flowpath.service.IItdmRunFlowPathStepService;
 import org.jeecg.modules.flowpath.vo.ItdmRunFlowPathInfoVO;
 import org.jeecg.modules.flowpath.vo.ItdmRunFlowPathStepVO;
 import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
+import org.jeecg.modules.weituo.service.IItdmWeituoInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
@@ -55,11 +57,12 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
 
     @Autowired
     private IItdmRunFlowPathStepService itdmRunFlowPathStepService;
-
-
     @Autowired
     private IItdmFlowPathStepService iItdmFlowPathStepService;
 
+    @Autowired
+    private IItdmWeituoInfoService iItdmWeituoInfoService;
+
 
     @Autowired
     private SysBaseApiImpl sysBaseApi;
@@ -165,6 +168,15 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
         List<ItdmRunFlowPathStep> list = itdmRunFlowPathStepService.
                 list(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class).eq(ItdmRunFlowPathStep::getRunFlowPath, id));
 
+        boolean x = iItdmFlowPathStepService.getBaseMapper().exists(Wrappers.lambdaQuery(ItdmFlowPathStep.class)
+
+                .eq(ItdmFlowPathStep::getId, itdmRunFlowPath.getDqSetp())
+                .eq(ItdmFlowPathStep::getSort, "1")
+
+        );
+        ItdmWeituoInfo weituoInfo = iItdmWeituoInfoService.getBaseMapper().selectOne(Wrappers.lambdaQuery(ItdmWeituoInfo.class).eq(
+                ItdmWeituoInfo::getWeituoNo, itdmRunFlowPath.getWeituoNo()
+        ));
 
         List<ItdmRunFlowPathStepVO> vos = new ArrayList<>();
         for (ItdmRunFlowPathStep i : list) {
@@ -173,10 +185,14 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
                     Arrays.stream(i.getUserIds().split(",")).collect(Collectors.toList()) :
                     new ArrayList<>();
             List<String> roleIds = sysBaseApi.getRoleIdsByUsername(user.getUsername());
+
+
             if (strings.contains(user.getUsername()) || roleIds.contains(i.getRoleId())) {
-                vos.add(FlowPathConvert.INSTANCE.to(i, true, i.getFlowPathSetp().equals(itdmRunFlowPath.getDqSetp())));
+
+
+                vos.add(FlowPathConvert.INSTANCE.to(i, true, i.getFlowPathSetp().equals(itdmRunFlowPath.getDqSetp()), x ? weituoInfo : null));
             } else {
-                vos.add(FlowPathConvert.INSTANCE.to(i, false, i.getFlowPathSetp().equals(itdmRunFlowPath.getDqSetp())));
+                vos.add(FlowPathConvert.INSTANCE.to(i, false, i.getFlowPathSetp().equals(itdmRunFlowPath.getDqSetp()), x ? weituoInfo : null));
             }
 
 

+ 12 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/convert/FlowPathConvert.java

@@ -4,6 +4,7 @@ import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
 import org.jeecg.modules.flowpath.entity.ItdmRunFlowPathStep;
 import org.jeecg.modules.flowpath.vo.ItdmBuohuiRunFlowPathStepVO;
 import org.jeecg.modules.flowpath.vo.ItdmRunFlowPathStepVO;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 import org.mapstruct.Mapper;
 import org.mapstruct.Mapping;
 import org.mapstruct.ReportingPolicy;
@@ -29,8 +30,18 @@ public interface FlowPathConvert {
     @Mapping(target = "roleId", source = "step.roleId")
     ItdmRunFlowPathStep to(ItdmFlowPathStep step, String saveData, String runFlowPath);
 
+    @Mapping(target = "id", source = "step.id")
+    @Mapping(target = "flowPath", source = "step.flowPath")
+    @Mapping(target = "flowPathSetp", source = "step.flowPathSetp")
+    @Mapping(target = "name", source = "step.name")
+    @Mapping(target = "fqUser", source = "step.fqUser")
+    @Mapping(target = "saveData", source = "step.saveData")
+    @Mapping(target = "isUpdate", source = "isUpdate")
+    @Mapping(target = "dangqian", source = "dangqian")
+    @Mapping(target = "itdmWeituoInfo", source = "itdmWeituoInfo")
+
+    ItdmRunFlowPathStepVO to(ItdmRunFlowPathStep step, Boolean isUpdate, Boolean dangqian, ItdmWeituoInfo itdmWeituoInfo);
 
-    ItdmRunFlowPathStepVO to(ItdmRunFlowPathStep step, Boolean isUpdate, Boolean dangqian);
 
 
     ItdmBuohuiRunFlowPathStepVO to(ItdmRunFlowPathStep step);

+ 2 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/vo/ItdmRunFlowPathStepVO.java

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecg.modules.weituo.entity.ItdmWeituoInfo;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -36,6 +37,7 @@ public class ItdmRunFlowPathStepVO {
 
     private  Boolean isUpdate;
 
+    private ItdmWeituoInfo itdmWeituoInfo;
 
     private Boolean dangqian;
 }