3254194295 hai 7 meses
pai
achega
d48a1e23cc

+ 1 - 0
platform-activiti/src/main/java/com/platform/activiti/dao/entity/ActAuditRequest.java

@@ -12,6 +12,7 @@ import java.io.Serializable;
  */
 @Data
 public class ActAuditRequest implements Serializable {
+    private String projectName;//项目名称
 
     private static final long serialVersionUID = 1L;
     /**

+ 15 - 10
platform-service/src/main/java/com/platform/service/customize/BaseFormCheckServiceAbstract.java

@@ -171,17 +171,22 @@ public abstract class BaseFormCheckServiceAbstract implements BaseFormCheckServi
         UserInfo user = SecurityUtils.getUserInfo();
         if (doAudit(actAuditRequest)) {
             if (!doCheckLast(actAuditRequest)) {
-                // 分配下一个节点的审批人信息
-                Model model = repositoryService.createModelQuery().modelKey(actAuditRequest.getAuditModelKey()).singleResult();
-                List<ActivitiUserModel> list = activitiUserModelService.getModelByModelId(model.getId());
-                if (CollectionUtil.isEmpty(list)) {
-                    throw new BusinessException("审批节点未设置,请先设置");
+                //若ProjectName含有包含‘龚文林’或者projectName==null,才分配下一个节点,否则结束审批
+                if (actAuditRequest.getProjectName()==null||actAuditRequest.getProjectName().contains("龚文林")) {
+                    // 分配下一个节点的审批人信息
+                    Model model = repositoryService.createModelQuery().modelKey(actAuditRequest.getAuditModelKey()).singleResult();
+                    List<ActivitiUserModel> list = activitiUserModelService.getModelByModelId(model.getId());
+                    if (CollectionUtil.isEmpty(list)) {
+                        throw new BusinessException("审批节点未设置,请先设置");
+                    }
+                    Map<String, String> maps = new HashMap<>();
+                    maps.put("userId", user.getUserId());
+                    Task nextTask = taskService.createTaskQuery().processInstanceId(actAuditRequest.getProcessInstanceId()).orderByTaskCreateTime().desc().singleResult();
+                    insertNecessaryValue(maps, actAuditRequest.getId());
+                    modifyTaskAssign(model.getId(), maps, nextTask, list);
+                }else {
+                    doFinish(actAuditRequest);
                 }
-                Map<String, String> maps = new HashMap<>();
-                maps.put("userId", user.getUserId());
-                Task nextTask = taskService.createTaskQuery().processInstanceId(actAuditRequest.getProcessInstanceId()).orderByTaskCreateTime().desc().singleResult();
-                insertNecessaryValue(maps,actAuditRequest.getId());
-                modifyTaskAssign(model.getId(), maps, nextTask, list);
             } else {
                 doFinish(actAuditRequest);
             }