瀏覽代碼

嘉溢流程代码调整

sangwenwei 7 月之前
父節點
當前提交
edb3707736
共有 16 個文件被更改,包括 370 次插入31 次删除
  1. 5 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java
  2. 8 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java
  3. 2 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/bid/service/TenderBidService.java
  4. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/DriveApplyService.java
  5. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/monthly/service/MonthlyService.java
  6. 1 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/tender/service/TenderService.java
  7. 101 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/EvectionListener.java
  8. 9 3
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/FinanceListener.java
  9. 2 20
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectArchiveListener.java
  10. 97 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyUseSealListener.java
  11. 102 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/PurchaseApplyListener.java
  12. 4 3
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/UseCarListener.java
  13. 5 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java
  14. 2 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  15. 26 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  16. 4 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

+ 5 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java

@@ -183,6 +183,11 @@ public class UserApiFallbackFactory implements FallbackFactory <IUserApi> {
                 return null;
             }
 
+            @Override
+            public List<UserDTO> getMangeLeaderByUserId(String id) {
+                return null;
+            }
+
         };
     }
 }

+ 8 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java

@@ -268,6 +268,14 @@ public interface IUserApi {
      */
     @GetMapping(value = BASE_URL + "/getJyUserList")
     String getJyUserList();
+
+    /**
+     * 获取分管领导信息
+     * @param id
+     * @return
+     */
+    @PostMapping(value = BASE_URL + "/getMangeLeaderByUserId")
+    List<UserDTO> getMangeLeaderByUserId(@RequestParam(value = "id")String id);
 }
 
 

+ 2 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/bid/service/TenderBidService.java

@@ -162,7 +162,7 @@ public class TenderBidService {
         //抄送部门主任,分管领导,办公室
         ArrayList<UserDTO> userDTOS = new ArrayList<>();
 
-        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室(嘉溢)");
+        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室主任");
         List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
         listByPostId.stream().forEach(item->{
             userDTOS.add(item);
@@ -277,7 +277,7 @@ public class TenderBidService {
         //抄送部门主任,分管领导,办公室
         ArrayList<UserDTO> userDTOS = new ArrayList<>();
 
-        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室(嘉溢)");
+        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室主任");
         List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
         listByPostId.stream().forEach(item->{
             userDTOS.add(item);

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/DriveApplyService.java

@@ -288,7 +288,7 @@ public class DriveApplyService {
                 driveApplyDTO.setUseDate(dates);
             }
             // 查询附件信息
-            List<WorkAttachmentInfo> files = driveApplyMapper.findDtos(id);
+            List<WorkAttachmentInfo> files = driveApplyMapper.findDtos(driveApplyDTO.getId());
             if (CollectionUtils.isNotEmpty(files)) {
                 for (WorkAttachmentInfo i : files) {
                     i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/monthly/service/MonthlyService.java

@@ -369,7 +369,7 @@ public class MonthlyService {
         SpringUtil.getBean(IFlowableApi.class).remove(monthlyDTO.getId());
         //给办公室和部门主任抄送
         ArrayList<UserDTO> userDTOS = new ArrayList<>();
-        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室(嘉溢)");
+        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室主任");
         List<UserDTO> officeId = SpringUtil.getBean(IUserApi.class).findListByOfficeId(userDTO.getOfficeDTO().getId());
         List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
         for (UserDTO dto : officeId) {

+ 1 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/tender/service/TenderService.java

@@ -387,7 +387,7 @@ public class TenderService {
         //抄送部门主任,分管领导,办公室
         ArrayList<UserDTO> userDTOS = new ArrayList<>();
 
-        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室(嘉溢)");
+        PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("办公室主任");
         List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
         listByPostId.stream().forEach(item->{
             userDTOS.add(item);

+ 101 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/EvectionListener.java

@@ -0,0 +1,101 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.extension.domain.FlowCopy;
+import com.jeeplus.extension.service.FlowCopyService;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IPostApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+@Component("EvectionListener")
+public class EvectionListener implements ExecutionListener {
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
+                //获取到岗位为考勤管理员的人员信息
+                ArrayList<UserDTO> userDTOS = new ArrayList<>();
+                PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("考勤管理员");
+                List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
+                userDTOS.addAll(listByPostId);
+
+                String finalTitleName = titleName;
+                userDTOS.stream().forEach(item->{
+                    FlowCopy flowCopy = new FlowCopy();
+                    flowCopy.setProcDefId(task.getProcDefId());
+//                        flowCopy.setProcDefId(task.getProcDefId());
+                    flowCopy.setProcInsName(finalTitleName);
+                    flowCopy.setProcInsId(task.getProcInstId());
+                    flowCopy.setUserId(item.getId());
+                    SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+
+                });
+
+
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+
+    }
+}

+ 9 - 3
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/FinanceListener.java

@@ -1,12 +1,17 @@
 package com.jeeplus.modules.flowable.listener;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.jeeplus.extension.domain.FlowCopy;
 import com.jeeplus.extension.service.FlowCopyService;
+import com.jeeplus.flowable.common.handler.CollectionUtils;
 import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.flowable.utils.StringUtils;
+import com.jeeplus.sys.domain.User;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.feign.IPostApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.PostDTO;
@@ -71,10 +76,11 @@ public class FinanceListener implements ExecutionListener {
                 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
                 UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
-                //获取到岗位为财务和出纳的人员信息
+                //获取到岗位为分管领导和总经理的人员信息
                 ArrayList<UserDTO> userDTOS = new ArrayList<>();
-
-
+                //将项目信息抄送给分管领导
+                List<UserDTO> user = SpringUtil.getBean(IUserApi.class).getMangeLeaderByUserId(userDTO.getId());
+                userDTOS.addAll(user);
                 PostDTO postDTOByName1 = SpringUtil.getBean(IPostApi.class).getPostDTOByName("总经理");
                 List<UserDTO> listByPostId1 = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName1.getId());
                 userDTOS.addAll(listByPostId1);

+ 2 - 20
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyProjectArchiveListener.java

@@ -100,26 +100,8 @@ public class JyProjectArchiveListener implements ExecutionListener {
                     }
                 }
                 //将项目信息抄送给分管领导
-                for (UserDTO dto : allUserInfo) {
-                    //分管领导
-                    if (StringUtils.isNotBlank(dto.getManageOfficeIds())){
-                        String manageOfficeIds = dto.getManageOfficeIds();
-                        if (manageOfficeIds.contains(",")){
-                            String[] split = manageOfficeIds.split(",");
-                            //获取分管领导所分管的部门
-                            for (String s : split) {
-                                //判断分管部门与项目创建人所在的部门是否一致
-                                if (s.equals(userDTO.getOfficeDTO().getId())) {
-                                    list.add(dto);
-                                }
-                            }
-                        }else {
-                            if (manageOfficeIds.equals(userDTO.getOfficeDTO().getId())) {
-                                list.add(dto);
-                            }
-                        }
-                    }
-                }
+                List<UserDTO> user1 = SpringUtil.getBean(IUserApi.class).getMangeLeaderByUserId(userDTO.getId());
+                list.addAll(user1);
                 //将集合中的人员发送抄送信息
                 for (UserDTO user : list) {
                     FlowCopy flowCopy = new FlowCopy();

+ 97 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/JyUseSealListener.java

@@ -0,0 +1,97 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.extension.domain.FlowCopy;
+import com.jeeplus.extension.service.FlowCopyService;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IPostApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Component("JyUseSealListener")
+public class JyUseSealListener implements ExecutionListener {
+
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
+                //获取到岗位为办公室下的人员信息
+                PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("印章管理员");
+                List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
+                String finalTitleName = titleName;
+                listByPostId.stream().forEach(item->{
+                    FlowCopy flowCopy = new FlowCopy();
+                    flowCopy.setProcDefId(task.getProcDefId());
+//                        flowCopy.setProcDefId(task.getProcDefId());
+                    flowCopy.setProcInsName(finalTitleName);
+                    flowCopy.setProcInsId(task.getProcInstId());
+                    flowCopy.setUserId(item.getId());
+                    SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+
+                });
+
+
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+    }
+}

+ 102 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/PurchaseApplyListener.java

@@ -0,0 +1,102 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.extension.domain.FlowCopy;
+import com.jeeplus.extension.service.FlowCopyService;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IPostApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+@Component("PurchaseApplyListener")
+public class PurchaseApplyListener implements ExecutionListener {
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
+                //获取到岗位为物品管理员的人员信息
+                ArrayList<UserDTO> userDTOS = new ArrayList<>();
+
+
+                PostDTO postDTOByName1 = SpringUtil.getBean(IPostApi.class).getPostDTOByName("物品管理员");
+                List<UserDTO> listByPostId1 = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName1.getId());
+                userDTOS.addAll(listByPostId1);
+                String finalTitleName = titleName;
+                userDTOS.stream().forEach(item->{
+                    FlowCopy flowCopy = new FlowCopy();
+                    flowCopy.setProcDefId(task.getProcDefId());
+//                        flowCopy.setProcDefId(task.getProcDefId());
+                    flowCopy.setProcInsName(finalTitleName);
+                    flowCopy.setProcInsId(task.getProcInstId());
+                    flowCopy.setUserId(item.getId());
+                    SpringUtil.getBean(FlowCopyService.class).save(flowCopy);
+
+                });
+
+
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+
+    }
+}

+ 4 - 3
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/UseCarListener.java

@@ -71,10 +71,11 @@ public class UseCarListener implements ExecutionListener {
                 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
                 UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(flow.getAssigneeId());
-                //获取到岗位为总经理的人员信息
+                //获取到岗位为总经理和驾驶员的人员信息
                 ArrayList<UserDTO> userDTOS = new ArrayList<>();
-
-
+                PostDTO postDTOByName = SpringUtil.getBean(IPostApi.class).getPostDTOByName("驾驶员");
+                List<UserDTO> listByPostId = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName.getId());
+                userDTOS.addAll(listByPostId);
                 PostDTO postDTOByName1 = SpringUtil.getBean(IPostApi.class).getPostDTOByName("总经理");
                 List<UserDTO> listByPostId1 = SpringUtil.getBean(IUserApi.class).findListByPostId(postDTOByName1.getId());
                 userDTOS.addAll(listByPostId1);

+ 5 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java

@@ -211,4 +211,9 @@ public class UserApiImpl implements IUserApi {
         return s;
     }
 
+    @Override
+    public List<UserDTO> getMangeLeaderByUserId(String id) {
+        return userService.getMangeLeaderByUserId(id);
+    }
+
 }

+ 2 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -258,4 +258,6 @@ public interface UserMapper extends BaseMapper <User> {
      * @param userId
      */
     void insertUserManageOffice(@Param("officeId") String officeId,@Param("userId") String userId);
+
+    List<UserDTO> getMangeLeaderByUserId(@Param("id") String id);
 }

+ 26 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -587,4 +587,30 @@ select DISTINCT a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO
 		insert sys_user_manage_office(user_id, office_id) VALUES (#{userId}, #{officeId})
 	</insert>
 
+    <select id="getMangeLeaderByUserId" resultType="com.jeeplus.sys.service.dto.UserDTO">
+        select DISTINCT a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.login_name as "loginName",
+		a.password,
+		a.no,
+		a.name,
+		a.email, a.phone,
+		a.mobile,
+		a.login_ip as "loginIp", a.login_date as "loginDate",
+		a.remarks,
+		a.login_flag, a.photo, a.qr_code, a.sign,
+		a.create_by_id as "createBy.id", a.create_time, a.update_by_id as "updateBy.id",
+		a.update_time
+		from sys_user a
+		left join sys_user_post sup on a.id = sup.user_id
+		left join sys_post sp on sp.id = sup.post_id
+		where
+		sp.CODE = 'fzjl'
+        AND a.id IN (
+        SELECT
+            user_id
+        FROM
+            sys_user_manage_office
+        WHERE
+            office_id = ( SELECT office_id FROM sys_user WHERE id = #{id} ))
+    </select>
+
 </mapper>

+ 4 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -645,4 +645,8 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     public void updateLoginFlag1(String id) {
         userMapper.updateLoginFlag1(id);
     }
+
+    public List<UserDTO> getMangeLeaderByUserId(String id) {
+        return userMapper.getMangeLeaderByUserId(id);
+    }
 }