Browse Source

newLaunch

fanxp 1 year ago
parent
commit
13209f58a0

+ 1 - 1
src/main/java/com/xjrsoft/module/system/service/impl/LoginServiceImpl.java

@@ -244,7 +244,7 @@ public class LoginServiceImpl implements ILoginService {
                 Department department = departmentService.getById(post.getDeptId());
                 tokenSession.set(GlobalConstant.LOGIN_USER_DEPT_INFO_KEY, department);
                 loginUser.setDepartmentId(department.getId());
-            } else {
+            } else if (departmentList.size() > 0) {
                 Department department = departmentList.get(0);
                 tokenSession.set(GlobalConstant.LOGIN_USER_DEPT_INFO_KEY, department);
                 loginUser.setDepartmentId(department.getId());

+ 6 - 2
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -1192,11 +1192,16 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
             List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
 
-            List<LaunchAndApproveVo> result = isPrevChooseApprove(workflowSchemaConfig, list, variableMap);
+//            List<LaunchAndApproveVo> result = isPrevChooseApprove(workflowSchemaConfig, list, variableMap);
 
             //如果不需要指定审批人 默认走自动同意规则
             invokeAutoAgree(processInstance.getId(), workflowSchema.getId(), workflowSchemaConfig, list);
 
+            // 重新获取任务节点,判断是否需要指定下一审批人
+            list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
+
+            List<LaunchAndApproveVo> result = isPrevChooseApprove(workflowSchemaConfig, list, variableMap);
+
             updateFileInfo(dto.getFileFolderIds(), processInstance.getId());
 
             //保存 流程 表单 关联 数据
@@ -1206,7 +1211,6 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
             formRelationService.saveBatch(relations);
 
-
             for (Session session : sessionList) {
                 session.getConnection().setAutoCommit(Boolean.FALSE);
                 session.commit();

+ 1 - 1
src/test/java/com/xjrsoft/xjrsoftboot/bcrypt.java

@@ -7,7 +7,7 @@ public class bcrypt {
 
     @Test
     public void TestBcrypt(){
-        String pwd = "admin";
+        String pwd = "Aa123456.";
         String pw_hash = BCrypt.hashpw(pwd, BCrypt.gensalt());
         System.out.println(pw_hash);