wang1
2023-06-16 8194d0ed1986d1c82f98c1ad1abfc0db1b460ede
主数据流程代码初次提交
已修改14个文件
已重命名1个文件
已添加3个文件
426 ■■■■■ 文件已修改
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
@@ -25,6 +25,7 @@
import com.vci.ubcs.flow.engine.entity.FlowProcess;
import com.vci.ubcs.flow.engine.utils.FlowCache;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
@@ -117,7 +118,7 @@
        HistoricProcessInstanceQuery historyQuery = historyService.createHistoricProcessInstanceQuery().startedBy(taskUser).orderByProcessInstanceStartTime().desc();
        if (bladeFlow.getCategory() != null) {
        if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
            historyQuery.processDefinitionCategory(bladeFlow.getCategory());
        }
        if (bladeFlow.getProcessDefinitionName() != null) {
@@ -142,7 +143,7 @@
            String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
            if (businessKey.length > 1) {
                flow.setBusinessTable(businessKey[0]);
                flow.setBusinessId(businessKey[1]);
                flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
            }
            flow.setHistoryActivityName(historicProcessInstance.getName());
            flow.setProcessInstanceId(historicProcessInstance.getId());
@@ -190,7 +191,7 @@
        HistoricTaskInstanceQuery doneQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(taskUser).finished()
            .includeProcessVariables().orderByHistoricTaskInstanceEndTime().desc();
        if (bladeFlow.getCategory() != null) {
        if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
            doneQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
        }
        if (bladeFlow.getProcessDefinitionName() != null) {
@@ -230,7 +231,7 @@
            if (Func.isNotEmpty(historicProcessInstance)) {
                String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
                flow.setBusinessTable(businessKey[0]);
                flow.setBusinessId(businessKey[1]);
                flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
                if (historicProcessInstance.getEndActivityId() != null) {
                    flow.setProcessIsFinished(FlowEngineConstant.STATUS_FINISHED);
                } else {
@@ -278,7 +279,8 @@
     * @param status    çŠ¶æ€
     */
    private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status) {
        if (bladeFlow.getCategory() != null) {
//        if (bladeFlow.getCategory() != null) {
        if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
            taskQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
        }
        if (bladeFlow.getProcessDefinitionName() != null) {
@@ -305,7 +307,7 @@
            if (Func.isNotEmpty(historicProcessInstance)) {
                String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
                flow.setBusinessTable(businessKey[0]);
                flow.setBusinessId(businessKey[1]);
                flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
            }
            FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId());
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowProcessTSController.java
ÎļþÃû´Ó Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/ProcessTSController.java ÐÞ¸Ä
@@ -29,7 +29,7 @@
@RestController
@RequestMapping("processTS")
@AllArgsConstructor
public class ProcessTSController {
public class FlowProcessTSController {
    private final FlowEngineService flowEngineService;
    private final ProcessTemplateService processTemplateService;
@@ -41,7 +41,7 @@
    @GetMapping("/tlist")
    public R<IPage<ProcessTemplate>> tlist(@RequestParam Map<String, Object> flow, Query query) {
        IPage<ProcessTemplate> pages = processTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(flow, ProcessTemplate.class)
            .select("id,model_key modelKey,model_name modelName,button_Type_Key buttonTypeKey,button_Type_value buttonTypeValue")
            .select("id,model_key modelKey,model_name modelName,button_Type_Key buttonTypeKey,button_Type_value buttonTypeValue,description")
            .orderByDesc("last_updated"));
        return R.data(pages);
    }
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowTaskUserController.java
@@ -8,6 +8,8 @@
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * æµç¨‹task审批控制
@@ -24,11 +26,12 @@
    /**
     * æµç¨‹task审批人员列表
     * ProcessTemplateTypeEnum
     * @return
     */
    @GetMapping("list")
    public R<FlowTaskUserC> list() {
        return R.data(taskUserService.getUser());
    public R<Object> list(String type,String templateId) {
        return R.data(taskUserService.getUser(type,templateId));
    }
    /**
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/VCIFlowController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.vci.ubcs.flow.engine.controller;
import com.vci.ubcs.flow.core.entity.BladeFlow;
import com.vci.ubcs.flow.engine.entity.FlowTaskUserC;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import com.vci.ubcs.flow.engine.service.VICFlowService;
import lombok.AllArgsConstructor;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * å®šåˆ¶æµç¨‹ã€å¯åŠ¨ã€è½¬å‘ã€å®ŒæˆæŽ§åˆ¶å™¨
 *
 * @author wang1
 */
@NonDS
@RestController
@RequestMapping("vciflow")
@AllArgsConstructor
public class VCIFlowController {
    private final VICFlowService vicFlowService;
    /**
     * å¯åЍ
     * @return
     */
    @PostMapping("start")
    public R<BladeFlow> list(@RequestBody FlowTaskUserC flowTaskUserC) {
        return vicFlowService.startProcess(flowTaskUserC);
    }
    /**
     * æµç¨‹é¢„测
     */
    @PostMapping("a")
    public R<BladeFlow> a(@RequestBody FlowTaskUserC flowTaskUserC) {
        return vicFlowService.startProcess(flowTaskUserC);
    }
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUser.java
@@ -37,6 +37,7 @@
    private String id;
    private String name;//保存的这个收藏名称
    private String modelKey;
    private String modelName;
    private String classifyId;
    private String templateId;
    private String taskId;//流程taskid
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/entity/FlowTaskUserC.java
@@ -34,10 +34,17 @@
    private String createdBy;
    private String name;//保存的这个收藏名称
    private String modelKey;
    private String modelName;
    private String processName;
    private String processDesc;
    private String topName;
    private String classifyId;
    private String templateId;
    private String taskId;//阶段id,就是流程taskid
    private String taskName;//阶段名称
    private List<FlowTaskUser> flowTaskUsers;//每个节点收藏人
    private List<ProcessStageAttr> processStageAttr;//流程阶段保存的属性
    private List<String> ids;//流程发起中传递过来的数据id
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowEngineService.java
@@ -173,4 +173,6 @@
     */
    List<Map<String,String>> getNodeByFlowableKey(String key);
    String getTaskIdString();
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/FlowTaskUserService.java
@@ -35,9 +35,10 @@
    /**
     * æŸ¥è¯¢å½“前登陆人对这个流程的taskUser
     * @param type ProcessTemplateTypeEnum
     * @return
     */
    FlowTaskUserC getUser();
    Object getUser(String type,String templateId);
    /**
     * æ–°å¢ž/修改流程节点审核人配置、并且修改流程xml部署文件
@@ -51,4 +52,12 @@
     * @param name
     */
    void deleteUser(String name);
    /**
     * é€šè¿‡æ¨¡æ¿id和模型key查询审批人
     * @param templateId
     * @param modelKey
     * @return
     */
    List<FlowTaskUser> getTaskUserByTemplateAndModelKey(String templateId,String modelKey);
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/VICFlowService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill åº„骞 (smallchill@163.com)
 */
package com.vci.ubcs.flow.engine.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vci.ubcs.flow.core.entity.BladeFlow;
import com.vci.ubcs.flow.engine.entity.FlowTaskUser;
import com.vci.ubcs.flow.engine.entity.FlowTaskUserC;
import org.springblade.core.tool.api.R;
/**
 * FlowService
 *
 * @author wang1
 */
public interface VICFlowService{
    /**
     * å¯åŠ¨æµç¨‹
     * @return
     */
    R<BladeFlow> startProcess(FlowTaskUserC flowTaskUserC);
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowEngineServiceImpl.java
@@ -93,6 +93,8 @@
    private static final String USR_TASK = "userTask";
    private static final String IMAGE_NAME = "image";
    private static final String XML_NAME = "xml";
    private static final String TASKID = "taskId";
    private static final String TASKNAME = "taskName";
    private static final Integer INT_1024 = 1024;
    private static final BpmnJsonConverter BPMN_JSON_CONVERTER = new BpmnJsonConverter();
    private static final BpmnXMLConverter BPMN_XML_CONVERTER = new BpmnXMLConverter();
@@ -508,16 +510,19 @@
            for (FlowElement flowElement : process.getFlowElements()) {
                if (flowElement instanceof UserTask) {
                    Map<String,String> mi = new HashMap<>();
                    mi.put("taskId",flowElement.getId());
                    mi.put("taskName",flowElement.getName());
                    mi.put(TASKID,flowElement.getId());
                    mi.put(TASKNAME,flowElement.getName());
                    ll.add(mi);
                }
            }
        }
        return ll;
    }
    @Override
    public String getTaskIdString(){
        return TASKID;
    }
    /**
     * æ˜¯å¦å·²å®Œç»“
     *
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/FlowTaskUserServiceImpl.java
@@ -28,6 +28,7 @@
import com.vci.ubcs.flow.engine.entity.*;
import com.vci.ubcs.flow.engine.mapper.FlowMapper;
import com.vci.ubcs.flow.engine.mapper.FlowTaskUserMapper;
import com.vci.ubcs.flow.engine.mapper.ProcessTemplateMapper;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import com.vci.ubcs.flow.engine.utils.FlowCache;
@@ -92,23 +93,62 @@
    private FlowEngineService flowEngineService;
    private FlowTaskUserMapper flowTaskUserMapper;
    private ProcessTemplateMapper processTemplateMapper;
    /**
     * æŸ¥è¯¢å½“前登陆人对这个流程的taskUser
     * @param type ProcessTemplateTypeEnum
     * @return
     */
    @Override
    public FlowTaskUserC getUser(){
        QueryWrapper<FlowTaskUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("CREATED_BY", AuthUtil.getUserId());
        List<FlowTaskUser> flowTaskUsers = baseMapper.selectList(queryWrapper);
        FlowTaskUserC flowTaskUserCR = new FlowTaskUserC();
        if(flowTaskUsers.size()==0){
            return flowTaskUserCR;
    public Object getUser(String type,String templateId){
        Map kv = new HashMap();
        //根据type查询top流程数据
        Map<String, Object> m = new HashMap<>();
        m.put("button_type_key", type);
        m.put("template_id", templateId);
        List<ProcessTemplate> processTemplates = processTemplateMapper.selectByMap(m);
         if(processTemplates.size()==0){
            throw new ServiceException("主题库定义-模板管理-流程模板,没有绑定流程!");
        }
        flowTaskUserCR.setName(flowTaskUsers.get(0).getName());//收藏名称
        flowTaskUserCR.setFlowTaskUsers(flowTaskUsers);
        return flowTaskUserCR;
        ProcessTemplate processTemplate = processTemplates.get(0);
        kv.put("flow",processTemplate);
        //top收藏部分数据
        QueryWrapper<FlowTaskUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("CREATED_BY", TaskUtil.getTaskUser());
        List<FlowTaskUser> flowTaskUsers = baseMapper.selectList(queryWrapper);
        List<FlowTaskUserC> cl = new ArrayList<>();
        Map<String,List<FlowTaskUser>> nameMap = new HashMap<>();
        for(FlowTaskUser flowTaskUser:flowTaskUsers){
            String name = flowTaskUser.getName();//收藏名称
            List<FlowTaskUser> flowTaskUserListo = null;
            if(nameMap.get(name)==null){
                flowTaskUserListo = new ArrayList<>();
            }else {
                flowTaskUserListo = nameMap.get(name);
            }
            flowTaskUserListo.add(flowTaskUser);
            nameMap.put(name,flowTaskUserListo);
        }
        for (String name:nameMap.keySet()){
            FlowTaskUserC flowTaskUserCR = new FlowTaskUserC();
            flowTaskUserCR.setName(name);//收藏名称
            flowTaskUserCR.setModelKey(nameMap.get(name).get(0).getModelKey());
            flowTaskUserCR.setModelName(nameMap.get(name).get(0).getModelName());
            flowTaskUserCR.setFlowTaskUsers(nameMap.get(name));
            cl.add(flowTaskUserCR);
        }
        kv.put("collect",cl);
        //数据节点数据
        List<Map<String,String>> tl = flowEngineService.getNodeByFlowableKey(processTemplate.getModelKey());
        kv.put("user",tl);
        return kv;
    }
    @Override
@@ -117,17 +157,20 @@
        String name = flowTaskUserC.getName();//收藏名称
        //新增情况下验证收藏名称不重复
        if(flowTaskUsers.get(0).getId()!=null) {
            Map<String, Object> m = new HashMap<>();
            m.put("name", name);
            QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class)
                .select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated");
            if(flowTaskUserMapper.selectCount(q)>0){
                throw new ServiceException("收藏名称已经存在!");
            }
        Map<String, Object> m = new HashMap<>();
        m.put("name", name);
        m.put("created_by", TaskUtil.getTaskUser());
        QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class)
            .select("1");
        if(flowTaskUserMapper.selectCount(q)>0){
            throw new ServiceException("收藏名称已经存在!");
        }
        for (FlowTaskUser flowTaskUseri:flowTaskUsers){
            flowTaskUseri.setName(name);
            flowTaskUseri.setCreatedBy(TaskUtil.getTaskUser());
            flowTaskUseri.setTemplateId(flowTaskUserC.getTemplateId());
            flowTaskUseri.setModelKey(flowTaskUserC.getModelKey());
        }
        //新增、修改
        this.saveOrUpdateBatch(flowTaskUsers);
@@ -139,8 +182,14 @@
    public void deleteUser(String name){
        Map<String, Object> m = new HashMap<>();
        m.put("name", name);
        m.put("created_by", AuthUtil.getUserId());
        m.put("created_by", TaskUtil.getTaskUser());
        baseMapper.deleteByMap(m);
    }
    public List<FlowTaskUser> getTaskUserByTemplateAndModelKey(String templateId,String modelKey){
        Map<String, Object> m = new HashMap<>();
        m.put("template_id", templateId);
        m.put("model_key", modelKey);
        return baseMapper.selectByMap(m);
    }
}
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,145 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill åº„骞 (smallchill@163.com)
 */
package com.vci.ubcs.flow.engine.service.impl;
import com.vci.ubcs.flow.core.constant.ProcessConstant;
import com.vci.ubcs.flow.core.entity.BladeFlow;
import com.vci.ubcs.flow.core.utils.TaskUtil;
import com.vci.ubcs.flow.engine.entity.*;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import com.vci.ubcs.flow.engine.service.VICFlowService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.*;
import org.flowable.engine.*;
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.task.api.Task;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
import org.springframework.stereotype.Service;
import java.util.*;
/**
 * å·¥ä½œæµæœåŠ¡å®žçŽ°ç±»
 *
 * @author Chill
 */
@Slf4j
@Service
@AllArgsConstructor
public class VCIFlowserviceImpl implements VICFlowService {
    private final RuntimeService runtimeService;
    private final IdentityService identityService;
    private final RepositoryService repositoryService;
    private final TaskService taskService;
    private final FlowTaskUserService flowTaskUserService;
    private final FlowEngineService flowEngineService;
    private final HistoryService historyService;
    @Override
    public R<BladeFlow> startProcess(FlowTaskUserC flowTaskUserC){
        String modelKey = flowTaskUserC.getModelKey();
        String templateId = flowTaskUserC.getTemplateId();
        Kv kv = Kv.create()
            .set(ProcessConstant.TASK_VARIABLE_CREATE_USER, AuthUtil.getUserName());
        // è®¾ç½®æµç¨‹å¯åŠ¨ç”¨æˆ·
        identityService.setAuthenticatedUserId(TaskUtil.getTaskUser());
        // å¼€å¯æµç¨‹
        //查询最新的流程部署id
        ProcessDefinition latesDefinition = repositoryService.createProcessDefinitionQuery().latestVersion().processDefinitionKey(modelKey).singleResult();
        String processDefinitionId = latesDefinition.getId();
        //查询每一步审核人
        List<FlowTaskUser> taskUsers = flowTaskUserService.getTaskUserByTemplateAndModelKey(templateId,modelKey);
        Set<String> taskIdSet = new HashSet<>();
        for (FlowTaskUser taskUser:taskUsers){
            kv.put(taskUser.getTaskId(),TaskUtil.getTaskUser(taskUser.getUserId()));
            taskIdSet.add(taskUser.getTaskId());
        }
        //对比配置的审核人员和流程中节点是否一致,可能存在流程节点变更了,多了或者少了节点,但是配置审核人员的节点没有变
        List<Map<String,String>> processTasks = flowEngineService.getNodeByFlowableKey(modelKey);
        for (Map<String,String> mi:processTasks){
            String taskId = mi.get(flowEngineService.getTaskIdString());
            if(!taskIdSet.contains(taskId)){
                throw new ServiceException("流程已重新部署,节点已改变,请设置审核人员!");
            }
        }
        if(taskIdSet.size()!=processTasks.size()){
            throw new ServiceException("流程已重新部署,节点已改变,请设置审核人员!");
        }
        //流程中文件、变量等
        //do..
        ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinitionId, modelKey, kv);
        // ç»„装流程通用类
        BladeFlow flow = new BladeFlow();
        flow.setProcessInstanceId(processInstance.getId());
        nextFlowNode("next","039ac1d8-0c1e-11ee-bebb-5c3a4570456d");
        return R.data(flow);
    }
    /**
     * èŽ·å–ä»»åŠ¡èŠ‚ç‚¹
     *
     * @param node   æŸ¥è¯¢èŠ‚ç‚¹é€‰æ‹©
     * @param processInstanceId æµç¨‹å®žä¾‹id
     */
    public void nextFlowNode(String node, String processInstanceId) {
        Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).active().singleResult();
        ExecutionEntity ee = (ExecutionEntity) runtimeService.createExecutionQuery()
            .executionId(task.getExecutionId()).singleResult();
        // å½“前审批节点
        String crruentActivityId = ee.getActivityId();
        BpmnModel bpmnModel = repositoryService.getBpmnModel(task.getProcessDefinitionId());
        FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(crruentActivityId);
        // è¾“出连线
        List<SequenceFlow> outFlows = flowNode.getOutgoingFlows();
        for (SequenceFlow sequenceFlow : outFlows) {
            //当前审批节点
            if ("now".equals(node)) {
                FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();
                System.out.println("当前节点: id=" + sourceFlowElement.getId() + ",name=" + sourceFlowElement.getName());
            } else if ("next".equals(node)) {
                // ä¸‹ä¸€ä¸ªå®¡æ‰¹èŠ‚ç‚¹
                FlowElement targetFlow = sequenceFlow.getTargetFlowElement();
                if (targetFlow instanceof UserTask) {
                    System.out.println("下一节点: id=" + targetFlow.getId() + ",name=" + targetFlow.getName());
                }
                // å¦‚果下个审批节点为结束节点
                if (targetFlow instanceof EndEvent) {
                    System.out.println("下一节点为结束节点:id=" + targetFlow.getId() + ",name=" + targetFlow.getName());
                }
            }
        }
    }
}
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/ProcessTemplateTypeEnum.java
@@ -20,12 +20,12 @@
    /**
     * åœç”¨
     */
    ENABLE("ENABLE","停用"),
    ENABLE("ENABLE","启用"),
    /**
     * å¯ç”¨
     */
    DISABLE("DISABLE","启用");
    DISABLE("DISABLE","停用");
    /**
     * æžšä¸¾çš„值
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/controller/UserController.java
@@ -142,6 +142,12 @@
        return R.data(UserWrapper.build().pageVO(pages));
    }
    @GetMapping("/allPage")
    public R<List<UserVO>> allPage(User user,Long deptId) {
        List<User> userss = userService.selectAllUser(user,deptId);
        return R.data(UserWrapper.build().listVO(userss));
    }
    /**
     * æ–°å¢žæˆ–修改
     */
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/mapper/UserMapper.java
@@ -43,6 +43,8 @@
     */
    List<User> selectUserPage(IPage<User> page, @Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
    List<User> selectUserPage(@Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
    /**
     * èŽ·å–ç”¨æˆ·
     *
@@ -50,7 +52,7 @@
     * @param account
     * @return
     */
    User getUser(String tenantId, String account);
    User getUser(String tenantId, String account,String name);
    /**
     * èŽ·å–å¯¼å‡ºç”¨æˆ·æ•°æ®
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
@@ -84,6 +84,15 @@
     * è‡ªå®šä¹‰åˆ†é¡µ
     *
     * @param user
     * @param deptId
     * @return
     */
    List<User> selectAllUser(User user, Long deptId);
    /**
     * è‡ªå®šä¹‰åˆ†é¡µ
     *
     * @param user
     * @param query
     * @return
     */
@@ -107,6 +116,15 @@
    UserInfo userInfo(String tenantId, String account);
    /**
     * ç”¨æˆ·ä¿¡æ¯,为啥不删了上边那个方法呢,因为我不敢,牵扯有点多
     *
     * @param tenantId
     * @param account
     * @return
     */
    UserInfo userInfo(String tenantId, String account,String name);
    /**
     * ç”¨æˆ·ä¿¡æ¯
     *
     * @param tenantId
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
@@ -162,6 +162,13 @@
    }
    @Override
    public List<User> selectAllUser(User user, Long deptId){
        List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
        List<User> users = baseMapper.selectUserPage(user, deptIdList, (AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : AuthUtil.getTenantId()));
        return users;
    }
    @Override
    public IPage<UserVO> selectUserSearch(UserVO user, Query query) {
        LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda();
        String tenantId = AuthUtil.getTenantId();
@@ -206,13 +213,20 @@
    @Override
    public UserInfo userInfo(String tenantId, String account) {
        User user = baseMapper.getUser(tenantId, account);
        User user = baseMapper.getUser(tenantId, account,null);
        return buildUserInfo(user);
    }
    @Override
    public UserInfo userInfo(String tenantId, String account,String name) {
        User user = baseMapper.getUser(tenantId, account,name);
        UserInfo userInfo = buildUserInfo(user);
        return null;
    }
    @Override
    public UserInfo userInfo(String tenantId, String account, UserEnum userEnum) {
        User user = baseMapper.getUser(tenantId, account);
        User user = baseMapper.getUser(tenantId, account,null);
        return buildUserInfo(user, userEnum);
    }
Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml
@@ -77,7 +77,11 @@
            LEFT JOIN PL_SYS_USER_PWDSTRATEGY plup on plup.USER_ID=pou.ID
            LEFT JOIN PL_SYS_PWDSTRATEGY pss on pss.ID=plup.PWDSTRATEGY_ID
        WHERE
            tenant_id = #{param1} and account = #{param2} and is_deleted = 0
            tenant_id = #{param1} and account = #{param2}
            <if test="param3!=null and param3 != ''">
                and name = #{param3}
            </if>
          and is_deleted = 0
    </select>
    <select id="exportUser" resultType="com.vci.ubcs.system.user.excel.UserExcel">