|
@@ -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));
|
|
|
}
|
|
|
|
|
|
|