|
@@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.tofly.common.oauth.util.SecurityUtils;
|
|
|
import com.tofly.workflow.baseconf.entity.TfTaskP;
|
|
|
import com.tofly.workflow.baseconf.service.TfTaskPService;
|
|
|
+import com.tofly.workflow.buss.entity.TfContractW;
|
|
|
+import com.tofly.workflow.buss.entity.TfDesignBudgetW;
|
|
|
import com.tofly.workflow.common.FlowConstant;
|
|
|
import com.tofly.workflow.process.entity.TfNowHandleL;
|
|
|
import com.tofly.workflow.process.entity.TfProcessL;
|
|
@@ -213,7 +215,57 @@ public class TfProcessLServiceImpl extends ServiceImpl<TfProcessLMapper, TfProce
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- return vo;
|
|
|
+ List<ProcessNodeVo> nodes = vo.getNodes();
|
|
|
+ if (CollUtil.isEmpty(nodes)) {
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+ if (!nodes.get(0).getPageCode().equals("contractCheck_addProject")
|
|
|
+ && !nodes.get(0).getPageCode().equals("designBudget_addBudget")) {
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+ if (nodes.get(0).getPageCode().equals("contractCheck_addProject")
|
|
|
+ && CollUtil.isEmpty((List<TfContractW>) nodes.get(0).getDataMap())) {
|
|
|
+ List<ProcessNodeVo> midNodes = new ArrayList<>();
|
|
|
+ nodes.forEach(node -> {
|
|
|
+ if (StringUtils.isNotEmpty(node.getPageCode())
|
|
|
+ && node.getPageCode().equals("contractCheck_addProject")
|
|
|
+ && node.getIsValid() != null
|
|
|
+ && node.getIsValid() == (short) 0) {
|
|
|
+ midNodes.add(node);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (CollUtil.isNotEmpty(midNodes)) {
|
|
|
+ ProcessNodeVo resNode = midNodes.get(0);
|
|
|
+ resNode.setId(null);
|
|
|
+ resNode.setIsValid((short) 1);
|
|
|
+ resNode.setIsValidName("有效");
|
|
|
+ nodes.set(0, resNode);
|
|
|
+ }
|
|
|
+ vo.setNodes(nodes);
|
|
|
+ return vo;
|
|
|
+ } else if (nodes.get(0).getPageCode().equals("designBudget_addBudget")
|
|
|
+ && CollUtil.isEmpty((List<TfDesignBudgetW>) nodes.get(0).getDataMap())) {
|
|
|
+ List<ProcessNodeVo> midNodes = new ArrayList<>();
|
|
|
+ nodes.forEach(node -> {
|
|
|
+ if (StringUtils.isNotEmpty(node.getPageCode())
|
|
|
+ && node.getPageCode().equals("designBudget_addBudget")
|
|
|
+ && node.getIsValid() != null
|
|
|
+ && node.getIsValid() == (short) 0) {
|
|
|
+ midNodes.add(node);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (CollUtil.isNotEmpty(midNodes)) {
|
|
|
+ ProcessNodeVo resNode = midNodes.get(0);
|
|
|
+ resNode.setId(null);
|
|
|
+ resNode.setIsValid((short) 1);
|
|
|
+ resNode.setIsValidName("有效");
|
|
|
+ nodes.set(0, resNode);
|
|
|
+ }
|
|
|
+ vo.setNodes(nodes);
|
|
|
+ return vo;
|
|
|
+ } else {
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|