田源
2025-01-16 a13255b4129ee8a7a7b7e1ecd8e02dd2c78f7c17
Merge remote-tracking branch 'origin/master'
已修改17个文件
已添加3个文件
558 ■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSessionForLoginI.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/WebProcessCommandController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/WebProcessDaoI.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/WebProcessCommandServiceI.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLoginController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebFlowController.java 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLoginServiceI.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebFlowServiceI.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLoginServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmSessionForLoginImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebFlowServiceImpl.java 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSessionForLoginI.java
@@ -1,5 +1,6 @@
package com.vci.starter.web.interceptor;
import com.vci.corba.common.PLException;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.pagemodel.TokenVO;
@@ -60,8 +61,9 @@
    /**
     * é€€å‡ºç™»å½•
     * @param userToken ç”¨æˆ·çš„会话许可
     * @param userId ç”¨æˆ·id
     */
    void logout(String userToken);
    void logout(String userToken,String userId) throws PLException;
    /**
     * æ ¹æ®token获取用户在系统中还可以存在的时间
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/WebProcessCommandController.java
@@ -1,6 +1,6 @@
package com.vci.web.controller;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.corba.wf.data.TasksAssignedInfo;
import com.vci.pagemodel.ProcessUserVO;
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.pagemodel.BaseResult;
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/WebProcessDaoI.java
@@ -1,8 +1,8 @@
package com.vci.web.dao;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.corba.wf.WFServicePrx;
import com.vci.corba.wf.data.TasksAssignedInfo;
import com.vci.dto.ProcessTemplateVO;
import com.vci.model.WFProcessClassifyDO;
import com.vci.model.WFProcessTemplateDO;
@@ -298,7 +298,7 @@
     * èŽ·å–å¹³å°çš„æµç¨‹æœåŠ¡
     * @return
     */
    WorkflowServicePrx getWorkService() throws VciBaseException;
    WFServicePrx getWFService() throws VciBaseException;
    /**
     * ä»»åŠ¡ä¸Žæ•°æ®å…³è”çš„é“¾æŽ¥ç±»åž‹
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java
@@ -6,8 +6,9 @@
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.vci.corba.workflow.data.*;
import com.vci.corba.wf.WFServicePrx;
import com.vci.corba.wf.data.*;
import com.vci.corba.workflow.data.FlowApproveHistoryInfo;
import com.vci.dto.ProcessTemplateVO;
import com.vci.model.ProcessInstance;
import com.vci.model.ProcessTask;
@@ -19,7 +20,6 @@
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.util.BeanUtilForVCI;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.VciDateUtil;
@@ -80,7 +80,7 @@
    /**
     * å¹³å°çš„æµç¨‹æœåŠ¡
     */
    private WorkflowServicePrx workService = null;
    private WFServicePrx wfService = null;
    /**
     * å¹³å°è°ƒç”¨å®¢æˆ·ç«¯
@@ -107,7 +107,7 @@
     */
    private void getCategory() throws VciBaseException {
        try {
            ProcessCategoryInfo[] pcia = getWorkService().getProcessCategories("root");
            ProcessCategoryInfo[] pcia = getWFService().getProcessCategories("root");
            if(pcia!=null&&pcia.length>0){
                for(ProcessCategoryInfo pci : pcia){
                    categoryMap.put(pci.name.toLowerCase(), pci.id);
@@ -144,7 +144,7 @@
                throw new VciBaseException(msgCodePrefix + "typeNotExist", new String[]{type});
            }
            try {
                allFlowInType = getWorkService().getProcessDefinitions(typeOid);
                allFlowInType = getWFService().getProcessDefinitions(typeOid);
            } catch (PLException e) {
                throw WebUtil.getVciBaseException(e);
            }
@@ -153,14 +153,14 @@
            List<String> templateList = VciBaseUtil.str2List(filterTemplate);
            if(!CollectionUtils.isEmpty(templateList)){
                templateList.forEach(name->{
                    try {
                    /*try {*/
                        String nameUnRev = name;
                        String revision = "";
                        if(name.contains("-")){
                            nameUnRev = name.substring(0,name.lastIndexOf("-"));
                            revision = name.substring(name.lastIndexOf("-")+1);
                        }
                        ProcessDefinitionInfo[] definition = getWorkService().getProcessDefinitionByProcessDefinitionName(nameUnRev, "");
                        ProcessDefinitionInfo[] definition = null;//getWFService()().getProcessDefinitionByProcessDefinitionName(nameUnRev, "");
                        if(definition!=null){
                            if(StringUtils.isBlank(revision)) {
                                Collections.addAll(infoList, definition);
@@ -170,9 +170,9 @@
                                infoList.addAll(Arrays.stream(definition).filter(s -> finalRevision.equalsIgnoreCase(String.valueOf(s.version))).collect(Collectors.toList()));
                            }
                        }
                    } catch (PLException e) {
                    /*} catch (PLException e) {
                        throw WebUtil.getVciBaseException(e);
                    }
                    }*/
                });
            }
            allFlowInType = infoList.toArray(new ProcessDefinitionInfo[0]);
@@ -191,7 +191,7 @@
        WebUtil.alertNotNull(deployId,"流程部署主键");
        ProcessDefinitionInfo pdi = null;
        try {
            pdi = getWorkService().getProcessDefinitionByDeployId(deployId.trim());
            pdi = getWFService().getProcessDefinitionByDeployId(deployId.trim());
        } catch (PLException e) {
            throw new VciBaseException(msgCodePrefix + "deployIdNotExist", new String[]{deployId});
        }
@@ -255,7 +255,7 @@
    public String getFirstNodeName(String deployId) throws VciBaseException {
        WebUtil.alertNotNull(deployId,"部署主键");
        try {
            ProcessTaskInfo firstProcessTask = getWorkService().getFirstProcessTask(deployId);
            ProcessTaskInfo firstProcessTask = getWFService().getFirstProcessTask(deployId);
            if(firstProcessTask!=null){
                return firstProcessTask.taskName;
            }
@@ -291,7 +291,7 @@
    public String[] getAllProcessNodeNameByDeploy(String deploymentId) throws VciBaseException{
        String[] allTaskNames = null;
        try {
            allTaskNames = getWorkService().getAllTaskNames(deploymentId);
            allTaskNames = getWFService().getAllTaskNames(deploymentId);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -305,7 +305,7 @@
    @Override
    public String getJbpmDeploymentId(String processOid) throws VciBaseException{
        WebUtil.alertNotNull(processOid,"流程模板主键");
        return getWorkService().getDeploymentID(processOid);
        return null;//getWFService()().getDeploymentID(processOid);
    }
    /**
@@ -318,7 +318,7 @@
    public String getJbpmDeploymentIdByExecutionId(String executionId) throws VciBaseException{
        WebUtil.alertNotNull(executionId,"流程执行主键");
        try {
            return getWorkService().getDeploymentIdByExecutionId(executionId);
            return getWFService().getDeploymentIdByExecutionId(executionId);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -337,7 +337,7 @@
        ProcessNodeVO pn = new ProcessNodeVO();
        pn.setName(taskName);
        try {
            String[] nodePresideUsers = getWorkService().getCurCandidates(deploymentId, taskName, "", "");
            String[] nodePresideUsers = getWFService().getCurCandidates(deploymentId, taskName, "", "");
            if(nodePresideUsers!=null&& nodePresideUsers.length>0){
                for(String preUsers : nodePresideUsers){
                    //平台存储的方式是用户;角色;部门;自定义....
@@ -399,7 +399,7 @@
            return null;
        }
        //不能使用workitem去查询,因为可能任务还没到
        String users = getWorkService().getNextTaskAssigner(executionid, taskName);
        String users = getWFService().getNextTaskAssigner(executionid, taskName);
        List<ProcessUserVO> allProUser = new ArrayList<ProcessUserVO>();
        if(StringUtils.isNotEmpty(users)){
            String userIds = users.replace("user:", "");//现在只支持设置用户
@@ -602,16 +602,16 @@
    @Override
    public String getVariablesInProcess(String executionId,String key) throws VciBaseException{
        WebUtil.alertNotNull(executionId,"流程执行主键",key,"参数Key");
        UserEntityInfo ueo = new UserEntityInfo();
        SessionInfo si = WebUtil.getCurrentUserSessionInfo();
        ueo.modules = "流程";
        ueo.userName = si.getUserId();
//        UserEntityInfo ueo = new UserEntityInfo();
//        SessionInfo si = WebUtil.getCurrentUserSessionInfo();
//        ueo.modules = "流程";
//        ueo.userName = si.getUserId();
        while(StringUtils.countMatches(executionId,".")>1){
            //说明是子任务,用父任务获取一下变量
            executionId = executionId.substring(0,executionId.lastIndexOf("."));
        }
        try {
            return getWorkService().getProcessVariable(executionId, key, ueo);
            return getWFService().getProcessVariable(executionId, key);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -718,11 +718,7 @@
        WebUtil.alertNotNull(executionId,"流程执行主键");
        List<ProcessHistoryVO> hisList = new ArrayList<ProcessHistoryVO>();
        FlowApproveHistoryInfo[] historyActivitys = null;
        try {
            historyActivitys = getWorkService().getHistoryActivityByProInsIdbyPLM(executionId);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
        //需要去除未处理的重复项
        for (int i = 0; i < historyActivitys.length; i++) {
            FlowApproveHistoryInfo historyActivity = historyActivitys[i];
@@ -752,7 +748,11 @@
            //如果endTime为空表示是待办的,但是服务端的接口中有个问题是,会把会签或者子流程中已经处理的和未处理的混合在一起
            //直接从待办任务里去查询
        }
        /*try {
            historyActivitys = getWFService()().getHistoryActivityByProInsIdbyPLM(executionId);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }*/
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put("businesstype", "5");//本项目没有实际的意义
        conditionMap.put("lcstatus", "Executing");
@@ -806,7 +806,7 @@
            throws VciBaseException{
        WebUtil.alertNotNull(executionId,"流程执行主键",taskName,"流程任务名称");
        try {
            byte[] processChart =  getWorkService().getExecutionImageByExecutionId(executionId, taskName);
            byte[] processChart = null;//getWFService()().getExecutionImageByExecutionId(executionId, taskName);
            return processChart;
        } catch (Throwable e) {
            String msg = "有可能这个任务关联的流程已经结束或者被终止,不能再查看其流程图了";
@@ -820,7 +820,7 @@
            throws VciBaseException{
        WebUtil.alertNotNull(executionId,"流程实例主键");
        try {
            byte[] processChart =  getWorkService().getFlowImageByDeployID(executionId);
            byte[] processChart =  getWFService().getFlowImageByDeployID(executionId);
            return processChart;
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
@@ -836,7 +836,7 @@
    @Override
    public String[] getAllOutComes(String taskOid) throws VciBaseException{
        try {
            return getWorkService().getAllOutComes(taskOid);
            return getWFService().getAllOutComes(taskOid);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -854,7 +854,7 @@
        WebUtil.alertNotNull(executionid,"流程执行主键",taskName,"任务名称");
        String deployId = getJbpmDeploymentIdByExecutionId(executionid);
        try {
            return getWorkService().getNextTaskNameByJbpmId(deployId, taskName, outCome);
            return getWFService().getNextTaskNameByJbpmId(deployId, taskName, outCome);
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -865,11 +865,11 @@
     * @return
     */
    @Override
    public WorkflowServicePrx getWorkService() throws VciBaseException{
        if(workService == null){
            this.workService = platformClientUtil.getWorkflowService();
    public WFServicePrx getWFService() throws VciBaseException{
        if(wfService == null){
            this.wfService = platformClientUtil.getWFService();
        }
        return workService;
        return wfService;
    }
    @Override
@@ -910,11 +910,11 @@
        taskAss.endTime = VciDateUtil.getTime(endDate);
        taskAss.isTrue = isNowEnable?true:false;
        taskAss.fromUser =WebUtil.getCurrentUserSessionInfo().getUserId();
        try {
            getWorkService().saveOrUpdateTasksAssigned(taskAss, WebUtil.getUserEntityInfo("流程"));
        /*try {
            getWFService().saveOrUpdateTasksAssigned(taskAss, WebUtil.getUserEntityInfo("流程"));
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
        }*/
    }
    
    
@@ -925,7 +925,7 @@
        //平台不支持停用启用代理信息..可以查询出来再重新添加。
        try {
            UserEntityInfo  uei = WebUtil.getUserEntityInfo( "流程");
            getWorkService().deleteTasksAssignedByUserName(new String[]{uei.userName}, uei);
            getWFService().deleteTasksAssignedByUserName(new String[]{uei.userName});
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -935,7 +935,7 @@
    public TasksAssignedInfo getProxy() throws VciBaseException{
        TasksAssignedInfo assign = null;
        try {
            assign = getWorkService().getTasksAssignedByUserName("", WebUtil.getUserEntityInfo( "流程"));
            assign = getWFService().getTasksAssignedByUserName("");
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
@@ -956,11 +956,11 @@
            UserEntityInfo userEntityInfo = WebUtil.getUserEntityInfo("流程");
            String resetStatus = null;
            try{
                resetStatus = getWorkService().getProcessVariable(executionId, WFVariablesKeyConstant.RESET_STATUS, userEntityInfo);
                resetStatus = getWFService().getProcessVariable(executionId, WFVariablesKeyConstant.RESET_STATUS);
            }catch (Throwable e){
                logger.error("获取流程的变量出错",e);
            }
            getWorkService().endProcessInstanceByplatform(executionId,userEntityInfo);
            //getWFService().endProcessInstanceByplatform(executionId,userEntityInfo);
            //平台没有自动将业务数据恢复到之前的状态
            if(StringUtils.isNotBlank(resetStatus)){
                resetLcStatusForBusinessData(dataGrid.getData(),resetStatus);
@@ -1053,11 +1053,11 @@
    @Override
    public byte[] getProcessXmlContent(String jbpmDeploymentId) throws VciBaseException {
        WebUtil.alertNotNull("流程执行主键信息",jbpmDeploymentId);
        try {
            return getWorkService().getProcessResource(jbpmDeploymentId,".xml");
        } catch (PLException e) {
        /*try {*/
            return null;//getWFService().getProcessResource(jbpmDeploymentId,".xml");
        /*} catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
        }*/
    }
    /**
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/WebProcessCommandServiceI.java
@@ -1,6 +1,6 @@
package com.vci.web.service;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.corba.wf.data.TasksAssignedInfo;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.dto.ProcessStartConfigDTO;
import com.vci.pagemodel.ProcessUserVO;
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java
@@ -1533,7 +1533,8 @@
    @Transactional(rollbackFor = Exception.class)
    public boolean stopUsers(String[] ids, boolean flag) throws PLException {
        VciBaseUtil.alertNotNull(ids,"停用/启用的用户id列表");
        return platformClientUtil.getFrameworkService().stopUsers(ids, flag,null);
        return platformClientUtil.getFrameworkService().stopUsers(ids, flag,new UserEntityInfo(WebUtil.getCurrentUserId(),"用户管理"));
    }
    /**
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java
@@ -8,7 +8,7 @@
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.workflow.data.FlowInstanceInfo;
import com.vci.corba.workflow.data.MapTransfersInfo;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.corba.wf.data.TasksAssignedInfo;
import com.vci.dto.ProcessStartConfigDTO;
import com.vci.dto.ProcessTemplateVO;
import com.vci.dto.VciFileObjectDTO;
@@ -211,7 +211,7 @@
        noticeInfo.setProcessTemplateVO(template);
        BusAnnotationUtil.callForAnnotation(FlowNotifyWeb.class, FlowNotifyBefore.class,noticeInfo);
        String processInstanceId = "";
        try {
        /*try {
            if (config.isAutoSubmitFirst()) {
                processInstanceId =  processDao.getWorkService().startProcessAndExecuteFirstNode(template.getOid(),
                        flowInstanceInfo,
@@ -226,7 +226,7 @@
                        objectPropertyValues);
            }else{
                processInstanceId = processDao.getWorkService().startPocessByPLMv1(
                        /**
                        *//**
                         * String processDefinitionKey, æµç¨‹æ¨¡æ¿ä¸»é”®
                         * FlowInstanceInfo flowInstanceInfo, æµç¨‹å®žä¾‹
                         * String[] objId, æ•°æ®å¯¹è±¡id
@@ -238,7 +238,7 @@
                         * MapTransfersInfo[] mapTransfersInfos,  ç§»äº¤Info
                         * String[] objectProperty, ä¸šåŠ¡å±žæ€§
                         * String[][] objectPropertyValues ä¸šåŠ¡å±žæ€§å€¼
                         */
                         *//*
                        template.getOid(),
                        flowInstanceInfo,
                        objIds,
@@ -254,7 +254,7 @@
            }
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
        }*/
        if (StringUtils.isNotBlank(config.getStartStatus())) {
            try {
                lifeCycleService.transCboStatus(allCbo, config.getStartStatus());
@@ -505,7 +505,7 @@
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[0], e);
        }
        callBefore(workitemList,outCome,note,currentTime);
        try {
        /*try {
            if (jbpmTaskIds.length == 1) {
                processDao.getWorkService().completeTaskByPlatformv1(jbpmTaskIds[0], outCome, nextTaskName, note, getUserEntityInfo(), nextTaskUsers, objectPropertyKeys, objectPropertyValues);
            } else {
@@ -513,7 +513,7 @@
            }
        } catch (PLException e) {
            throw WebUtil.getVciBaseException(e);
        }
        }*/
        callAfter((String)workitemList.get(0).get("executionid"),null,workitemList,currentTime);
    }
@@ -541,7 +541,7 @@
        for (String taskOid : taskOidArray) {
            if (StringUtils.isNotBlank(taskOid)) {
                try {
                    processDao.getWorkService().transmitTask(taskOid, "user:" + userIds, getUserEntityInfo());
                    processDao.getWFService().transmitTask(taskOid, "user:" + userIds);
                } catch (PLException vciError) {
                    throw WebUtil.getVciBaseException(vciError);
                }
Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java
@@ -1,6 +1,7 @@
package com.vci.web.util;
import com.vci.client.common.providers.WebServiceProvider;
import com.vci.corba.aof.AOFServicePrx;
import com.vci.corba.bofactory.BOFactoryServicePrx;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.FrameworkServicePrx;
@@ -18,7 +19,7 @@
import com.vci.corba.portal.PortalServicePrx;
import com.vci.corba.query.ObjectQueryServicePrx;
import com.vci.corba.volume.VolumeServicePrx;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.vci.corba.wf.WFServicePrx;
import org.springframework.stereotype.Component;
/**
@@ -95,8 +96,8 @@
     * èŽ·å–æµç¨‹æœåŠ¡
     * @return æœåŠ¡çš„å¯¹è±¡
     */
    public WorkflowServicePrx getWorkflowService(){
        return WebServiceProvider.getWFService();
    public WFServicePrx getWFService(){
        return WebServiceProvider.getFlowService();
    }
    /**
@@ -237,4 +238,12 @@
    public BOFactoryServicePrx getBOFService() {
        return WebServiceProvider.getBOFService();
    }
    /**
     * èŽ·å–è¾…åŠ©å¯¹è±¡å·¥åŽ‚æœåŠ¡
     * @return
     */
    public AOFServicePrx getAOFService(){
        return WebServiceProvider.getAOFService();
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLoginController.java
@@ -1,6 +1,7 @@
package com.vci.web.controller;
import com.vci.bo.LoginResultBO;
import com.vci.corba.common.PLException;
import com.vci.dto.LoginUserDTO;
import com.vci.starter.web.annotation.controller.VciUnCheckRight;
import com.vci.starter.web.annotation.log.VciBusinessLog;
@@ -12,6 +13,7 @@
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.WebThreadLocalUtil;
import com.vci.web.service.OsLoginServiceI;
import com.zeroc.IceInternal.Ex;
import eu.bitwalker.useragentutils.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -179,8 +181,15 @@
    @ResponseBody
    public BaseResult logout(HttpServletRequest request){
        String userToken = request.getHeader(TokenKeyConstant.USER_TOKEN_KEY);
        try {
        loginService.logout(userToken);
        return BaseResult.success();
            return BaseResult.success("退出成功");
        } catch (Exception e) {
            e.printStackTrace();
            String errorLog = "登出时出现异常,原因:"+ VciBaseUtil.getExceptionMessage(e);
            logger.error(errorLog);
            return BaseResult.fail(errorLog);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebFlowController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
package com.vci.web.controller;
import com.vci.corba.wf.data.ProcessCategoryInfo;
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.WebFlowServiceI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * æµç¨‹æœåŠ¡æŽ§åˆ¶å™¨
 * @author ludc
 * @date 2025/1/14 21:37
 */
@VciBusinessLog(modelName="流程服务")
@RestController
@RequestMapping("/WebFlowController")
public class WebFlowController {
    /**
     * æ³¨å…¥æµç¨‹æœåŠ¡
     */
    @Autowired
    private WebFlowServiceI webFlowServiceI;
    /**
     * æ—¥å¿—
     */
    private Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * æµç¨‹åˆ†ç±»å…¨æŸ¥è¯¢
     * @param parentId çˆ¶id
     * @return åˆ—表的内容
     */
    @GetMapping( "/getProcessCategories")
    @VciBusinessLog(operateName = "流程分类全查询")
    public BaseResult<List<ProcessCategoryInfo>> getProcessCategories(String parentId){
        try {
            return BaseResult.dataList(webFlowServiceI.getProcessCategories(parentId));
        } catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "流程分类查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * æµç¨‹åˆ†ç±»åˆ†é¡µæŸ¥è¯¢
     * @param baseQueryObject
     * @return åˆ—表的内容
     */
    @GetMapping( "/getProcessCategoriesByPage")
    @VciBusinessLog(operateName = "流程分类分页查询")
    public BaseResult getProcessCategoriesByPage(BaseQueryObject baseQueryObject){
        try {
            return BaseResult.dataGrid(webFlowServiceI.getProcessCategoriesByPage(baseQueryObject));
        } catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "流程分类分页查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * æ·»åŠ æµç¨‹åˆ†ç±»
     * @param processCategoryInfo
     * @return
     */
    @PostMapping( "/saveProcessCategory")
    @VciBusinessLog(operateName = "添加流程分类")
    public BaseResult saveProcessCategory(@RequestBody ProcessCategoryInfo processCategoryInfo) {
        try {
            return BaseResult.success(webFlowServiceI.saveProcessCategory(processCategoryInfo));
        }catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "添加流程分类时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * ä¿®æ”¹æµç¨‹åˆ†ç±»
     * @param processCategoryInfo
     * @return
     */
    @PutMapping( "/updateProcessCategory")
    @VciBusinessLog(operateName = "修改流程分类")
    public BaseResult updateProcessCategory(@RequestBody ProcessCategoryInfo processCategoryInfo) {
        try {
            return webFlowServiceI.updateProcessCategory(processCategoryInfo) ? BaseResult.success("流程分类修改成功!"):BaseResult.fail("流程分类修改失败!");
        }catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "修改流程分类时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * åˆ é™¤æµç¨‹åˆ†ç±»
     * @param id
     * @return
     */
    @DeleteMapping( "/deleteProcessCategory")
    @VciBusinessLog(operateName = "删除流程分类")
    public BaseResult deleteProcessCategory(String id) {
        try {
            return webFlowServiceI.deleteProcessCategory(id) ? BaseResult.success("流程分类删除成功!"):BaseResult.fail("流程分类删除失败!");
        }catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "删除流程分类时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLoginServiceI.java
@@ -1,6 +1,7 @@
package com.vci.web.service;
import com.vci.bo.LoginResultBO;
import com.vci.corba.common.PLException;
import com.vci.dto.LoginUserDTO;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.RequestClientInfo;
@@ -26,5 +27,5 @@
     * @param userToken ç”¨æˆ·çš„许可码
     * @throws VciBaseException åˆ é™¤ä¼šè¯ä¿¡æ¯å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    void logout(String userToken) throws VciBaseException;
    void logout(String userToken) throws Exception;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java
@@ -177,7 +177,7 @@
     * @param pkComponent ç»„件的主键
     * @return æŒ‰é’®çš„信息
     */
    List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, RoleRightVO> roleRightMap);
    List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, List<RoleRightVO>> roleRightMap);
    /**
     * æŒ‰é’®çš„æ•°æ®å¯¹è±¡è½¬æ¢ä¸ºæ˜¾ç¤ºå¯¹è±¡
@@ -209,6 +209,6 @@
    //    UIContentVO UIContentDO2VO(PLPageLayoutDefination pageLayoutDefination, boolean queryDetail);
    UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, RoleRightVO> roleRightMap);
    UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, List<RoleRightVO>> roleRightMap);
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
@@ -213,7 +213,7 @@
     * @return
     * @throws PLException
     */
    Map<String,RoleRightVO> getRoleRightMap(String roleId) throws PLException;
    Map<String, List<RoleRightVO>> getRoleRightMap(String roleId) throws PLException;
    /**
     * UI授权
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebFlowServiceI.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.vci.web.service;
import com.vci.corba.wf.data.ProcessCategoryInfo;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.DataGrid;
import java.util.List;
/**
 * æµç¨‹æœåŠ¡
 * @author ludc
 * @date 2025/1/14 17:28
 */
public interface WebFlowServiceI {
    /**
     * æµç¨‹åˆ†ç±»å…¨æŸ¥è¯¢
     * @param parentId
     * @return
     * @throws Exception
     */
    List<ProcessCategoryInfo> getProcessCategories(String parentId) throws Exception;
    /**
     * æµç¨‹åˆ†ç±»åˆ†é¡µæŸ¥è¯¢
     * @param baseQueryObject
     * @return
     */
    DataGrid<ProcessCategoryInfo> getProcessCategoriesByPage(BaseQueryObject baseQueryObject) throws Exception;
    /**
     * ä¿å­˜æµç¨‹åˆ†ç±»
     * @param category
     * @return
     */
    String saveProcessCategory(ProcessCategoryInfo category) throws Exception;
    /**
     * ä¿®æ”¹æµç¨‹åˆ†ç±»
     * @param category
     * @return
     */
    boolean updateProcessCategory(ProcessCategoryInfo category) throws Exception;
    /**
     * åˆ é™¤æµç¨‹åˆ†ç±»
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteProcessCategory(String id) throws Exception;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLoginServiceImpl.java
@@ -181,16 +181,6 @@
            return loginResult;
        }
        //4、判断密码是否正确(平台的checkLogin方法好像有对密码进行比对的方法)
        /*if (checkPassword) {
            boolean passwordIsEqual = userQueryService.checkPasswordEqual(userDTO.getPassword(), user.getOid());
            if (!passwordIsEqual) {
                if (logger.isDebugEnabled()) {
                    logger.debug("{}密码不正确", user.getId());
                }
            }
        }*/
        //5、调用平台登录接口,进行登录
        MachineInfo machine = getMachieInfo(clientInfo);
        machine.country = clientInfo.getCountry();
@@ -313,7 +303,7 @@
     * @throws VciBaseException åˆ é™¤ä¼šè¯ä¿¡æ¯å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public void logout(String userToken) throws VciBaseException {
    public void logout(String userToken) throws Exception {
        VciBaseUtil.alertNotNull(userToken,"用户的会话许可");
        Map<String, Object> logoutpluginBeanMap =ApplicationContextProvider.getApplicationContext().getBeansWithAnnotation(VciLogoutPlugin.class);
        if(!CollectionUtils.isEmpty(logoutpluginBeanMap)){
@@ -337,7 +327,10 @@
        }
        //清除存当前登录的用户(总数-1)
        redisService.decreOnlineUser(VConstant.CURRENT_LOGGED_USERS_KEY);
        sessionForLogin.logout(userToken);
        sessionForLogin.logout(
                WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getToken()
                ,WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId()
        );
        if(!CollectionUtils.isEmpty(logoutpluginBeanMap)){
            logoutpluginBeanMap.forEach((k,v) -> {
                Method[] methods = v.getClass().getDeclaredMethods();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java
@@ -609,6 +609,7 @@
        menuVO.setName(funcInfo.name);
        menuVO.getMeta().put("keepAlive",true);
        menuVO.setSort((int) funcInfo.seq);
        menuVO.setRemark(funcInfo.desc);
        if(this.checkChildObject(menuVO.getId()) == 0){
            menuVO.setHasChildren(false);
        }else{
@@ -657,6 +658,7 @@
            functionVO.setName(menu.name);
            functionVO.getMeta().put("keepAlive",true);
            functionVO.setSort((int) menu.seq);
            functionVO.setRemark(menu.desc);
            functionVO.setChildren(findChildFunctionVO(menu.id,map));
            if(functionVO.getChildren().size() > 0){
                functionVO.setHasChildren(true);
@@ -685,6 +687,7 @@
                menuVO.setName(funcObj.name);
                menuVO.getMeta().put("keepAlive",true);
                menuVO.setSort((int) funcObj.seq);
                menuVO.setRemark(funcObj.desc);
                findChildAuthFunctionVO(menuVO, isAll);
                functionVO.getChildren().add(menuVO);
                functionVO.setHasChildren(true);
@@ -719,7 +722,7 @@
        /* if(resourceControlTypeEnum == null){
            resourceControlTypeEnum = ResourceControlTypeEnum.BS;
        }*/
        Map<String, RoleRightVO> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
        Map<String, List<RoleRightVO>> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
        for (PLUILayout allPLUILayout : platformClientUtil.getUIService().getAllPLUILayouts()) {
            if(treeQueryObject.getConditionMap().getOrDefault("type","").equals(allPLUILayout.plRelatedType)
                    && treeQueryObject.getConditionMap().getOrDefault("context","").equals(allPLUILayout.plCode)){
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmSessionForLoginImpl.java
@@ -195,12 +195,15 @@
    /**
     * é€€å‡ºç™»å½•
     *
     * æ¸…除用户session
     * @param userToken ç”¨æˆ·çš„会话许可
     */
    @Override
    public void logout(String userToken) {
    public void logout(String userToken,String userId) throws PLException {
        //TODO æ ¹æ®æƒ…况,单独处理
        redisService.deleteObject(CacheNameConstant.USERID_TOKEN_KEY + userId);
        redisService.deleteObject(TokenKeyConstant.TOKEN_KEY_PREFIX_IN_REDIS + userToken);
        platformClientUtil.getFrameworkService().logoff(userToken);
    }
    /**
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -894,7 +894,7 @@
     */
    @VciUnLog
    @Override
    public UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, RoleRightVO> roleRightMap){
    public UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, List<RoleRightVO>> roleRightMap){
        UIContentVO contentVO = new UIContentVO();
        if(pageLayoutDefination !=null){
            contentVO.setOid(pageLayoutDefination.plOId);
@@ -1014,7 +1014,7 @@
     * @param pkContent UI上下文的主键
     * @return ä¸Šä¸‹æ–‡
     */
    private List<UILayoutVO> listLayoutByContent(String pkContent,Map<String, RoleRightVO> roleRightMap){
    private List<UILayoutVO> listLayoutByContent(String pkContent,Map<String, List<RoleRightVO>> roleRightMap){
        try {
            List<PLTabPage> tabPageList = Arrays.stream(platformClientUtil.getUIService().getPLTabPagesByPageDefinationOId(pkContent)).collect(Collectors.toList());
            //过滤掉没有访问权限的UI
@@ -1030,7 +1030,7 @@
     * @param tabPageList
     * @param roleRightMap
     */
    private List<PLTabPage> filterTabPageByRoleRight(List<PLTabPage> tabPageList, Map<String, RoleRightVO> roleRightMap){
    private List<PLTabPage> filterTabPageByRoleRight(List<PLTabPage> tabPageList, Map<String, List<RoleRightVO>> roleRightMap){
        if(Func.isEmpty(roleRightMap) || Func.isEmpty(tabPageList)){
            return tabPageList;
        }
@@ -1060,7 +1060,7 @@
     * @param plPageDefinationList
     * @param roleRightMap
     */
    private List<PLPageDefination> filterPageDefByRoleRight(List<PLPageDefination> plPageDefinationList, Map<String, RoleRightVO> roleRightMap){
    private List<PLPageDefination> filterPageDefByRoleRight(List<PLPageDefination> plPageDefinationList, Map<String, List<RoleRightVO>> roleRightMap){
        if(Func.isEmpty(roleRightMap) || Func.isEmpty(plPageDefinationList)){
            return plPageDefinationList;
        }
@@ -1136,7 +1136,7 @@
     * @param pages åŒºåŸŸçš„æ•°æ®å¯¹è±¡
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail, Map<String, RoleRightVO> roleRightMap){
    private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail, Map<String, List<RoleRightVO>> roleRightMap){
        List<UILayoutVO> contentVOS = new ArrayList<>();
        Map<String, OsAttributeVO> attributeVOMap;
        if(pages != null && pages.size() > 0){
@@ -1174,7 +1174,7 @@
     * @return åŒºåŸŸçš„æ˜¾ç¤ºå¯¹è±¡
     */
    @VciUnLog
    private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
    private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, List<RoleRightVO>> roleRightMap){
        UILayoutVO layoutVO = new UILayoutVO();
        if(page !=null ){
            layoutVO.setOid(page.plOId);
@@ -1274,7 +1274,7 @@
     * @param pages æ•°æ®å¯¹è±¡
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
    private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, List<RoleRightVO>> roleRightMap){
        List<UIComponentVO> componentVOS = new ArrayList<>();
        pages.stream().forEach(page->{
            componentVOS.add(uiComponentDO2VO(page,queryDetail,attributeVOMap,roleRightMap));
@@ -1288,7 +1288,7 @@
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    @VciUnLog
    private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail, Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
    private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail, Map<String, OsAttributeVO> attributeVOMap, Map<String, List<RoleRightVO>> roleRightMap){
        UIComponentVO componentVO = new UIComponentVO();
        if(page !=null){
            componentVO.setOid(page.plOId);
@@ -1466,7 +1466,7 @@
     * @return æŒ‰é’®çš„信息
     */
    @Override
    public List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, RoleRightVO> roleRightMap){
    public List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, List<RoleRightVO>> roleRightMap){
        try {
            List<UIButtonDefineVO> buttonDefineVOS = buttonDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLTabButtonsByTableOId(pkComponent)).collect(Collectors.toSet())).stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList());
            if(Func.isEmpty(roleRightMap)){
@@ -1478,12 +1478,20 @@
            while (buttonDefineVO.hasNext()){
                UIButtonDefineVO buttonDefine = buttonDefineVO.next();
                if(roleRightMap.containsKey(buttonDefine.getPkComponent())) {
                    Long rightValue = roleRightMap.get(buttonDefine.getPkComponent()).getRightValue();
                    List<Long> rightValues = roleRightMap.get(buttonDefine.getPkComponent()).stream()
                            .map(e -> e.getRightValue()).collect(Collectors.toList());
                    int nodeValue = buttonDefine.getOrderNum();
                    if (nodeValue >= 0 && nodeValue <= 63) {
                        boolean authFlag = false;
                        //进行位与操作,如果相等则表示具有当前操作的权限
                        for (Long rightValue : rightValues) {
                        long preValue = (rightValue >> nodeValue) & 1;
                        if (preValue != 1) {
                            if (preValue == 1) {
                                authFlag = true;
                                break;
                            }
                        }
                        if(!authFlag){
                            buttonDefineVO.remove();
                        }
                    }
@@ -1642,7 +1650,7 @@
            throw WebUtil.getVciBaseException(vciError);
        }
        // 1、根据当前角色判断是管理人员还是普通用户(正常来说只有普通用户才会用到该查询接口)
        Map<String, RoleRightVO> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
        Map<String, List<RoleRightVO>> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
        // 2、按照当前登录用户查询权限(功能权限和UI授权的授权信息都是放在同一张表里的)
        // 3、找出当前要查询的UI上下文
        PLUILayout context = null;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -1696,7 +1696,7 @@
        String type = StringUtils.isBlank(conditionMap.get("type")) ? "" : conditionMap.get("type");
        String context = StringUtils.isBlank(conditionMap.get("context")) ? "" : conditionMap.get("context");
        boolean showCheckBox = Boolean.parseBoolean(conditionMap.get("showCheckBox"));
        Map<String,RoleRightVO> roleRightVOMap = new HashMap<>();
        Map<String, List<RoleRightVO>> roleRightVOMap = new HashMap<>();
        if(StringUtils.isNotBlank(roleId)){
            roleRightVOMap = this.getRoleRightMap(roleId);
        }
@@ -1734,7 +1734,7 @@
     * @throws PLException
     */
    @Override
    public Map<String,RoleRightVO> getRoleRightMap(String roleId) throws PLException {
    public Map<String, List<RoleRightVO>> getRoleRightMap(String roleId) throws PLException {
        RoleRightInfo[] rightInfos = null;
        String userName = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
        if(Func.isBlank(roleId)){
@@ -1743,7 +1743,9 @@
            rightInfos = platformClientUtil.getFrameworkService().getRoleRightList(roleId,userName);
        }
        List<RoleRightVO> roleRightVOList = roleRightDOO2VOS(Arrays.asList(rightInfos));
        Map<String,RoleRightVO> roleRightVOMap = roleRightVOList.stream().collect(Collectors.toMap(RoleRightVO::getFuncId,roleRightVO ->roleRightVO,(oldValue,newOldValue)->oldValue));
        //分组操作
        Map<String, List<RoleRightVO>> roleRightVOMap = roleRightVOList.stream().collect(Collectors.groupingBy(RoleRightVO::getFuncId,
                Collectors.mapping(e ->e, Collectors.toList())));
        return roleRightVOMap;
    }
@@ -2145,7 +2147,7 @@
     * @param contextList
     * @param isShowCheckBox
     */
    private void setChildNode(List<Tree> parentTree, List<PLUILayout>contextList,Map<String,RoleRightVO> roleRightVOMap, boolean isShowCheckBox){
    private void setChildNode(List<Tree> parentTree, List<PLUILayout>contextList,Map<String, List<RoleRightVO>> roleRightVOMap, boolean isShowCheckBox){
        Optional.ofNullable(parentTree).orElseGet(()->new ArrayList<>()).stream().forEach(pTree -> {
            Object funcObj = pTree.getData();
            List<Tree> chiledTreeList = new ArrayList<>();
@@ -2224,7 +2226,7 @@
                PLTabButton plTabButton = (PLTabButton) funcObj;
                String id = plTabButton.plTableOId;
                if(roleRightVOMap.containsKey(id)){
                    RoleRightVO roleRightVO = roleRightVOMap.get(id);
                    RoleRightVO roleRightVO = roleRightVOMap.get(id).get(0);
                    Long rightValue = roleRightVO.getRightValue();
                    int nodeValue = plTabButton.plSeq;
                    if (nodeValue >= 0 && nodeValue <= 63) {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebFlowServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,142 @@
package com.vci.web.service.impl;
import com.vci.corba.common.PLException;
import com.vci.corba.wf.data.ProcessCategoryInfo;
import com.vci.corba.wf.data.ProcessDefinitionInfo;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.util.Lcm.Func;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.dao.WebProcessDaoI;
import com.vci.web.service.WebFlowServiceI;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
 * æµç¨‹æœåŠ¡
 * @author ludc
 * @date 2025/1/14 17:28
 */
@Service
public class WebFlowServiceImpl implements WebFlowServiceI {
    /**
     * å¹³å°è°ƒç”¨å®¢æˆ·ç«¯
     */
    @Autowired
    private PlatformClientUtil platformClientUtil;
    @Autowired
    private WebProcessDaoI webProcessDaoI;
    /**
     * æµç¨‹åˆ†ç±»å…¨æŸ¥è¯¢
     * @param parentId
     * @return
     * @throws PLException
     */
    @Override
    public List<ProcessCategoryInfo> getProcessCategories(String parentId) throws PLException {
        VciBaseUtil.alertNotNull(parentId,"流程分类父主键");
        ProcessCategoryInfo[] processCategories = platformClientUtil.getWFService().getProcessCategories(parentId);
        List<ProcessCategoryInfo> processCategoryInfoList = Arrays.asList(processCategories).stream().sorted((Comparator.comparing(o -> o.id))).collect(Collectors.toList());
        return processCategoryInfoList;
    }
    /**
     * æµç¨‹åˆ†ç±»åˆ†é¡µæŸ¥è¯¢
     * @param baseQueryObject
     * @return
     */
    @Override
    public DataGrid<ProcessCategoryInfo> getProcessCategoriesByPage(BaseQueryObject baseQueryObject) throws PLException {
        String parentId = baseQueryObject.getConditionMap().get("parentId");
        VciBaseUtil.alertNotNull(parentId,"流程分类父主键");
        int page = baseQueryObject.getPage();
        int limit = baseQueryObject.getLimit();
        ProcessCategoryInfo[] processCategories = platformClientUtil.getWFService().getProcessCategoriesByPage(parentId,limit,page);
        List<ProcessCategoryInfo> processCategoryInfoList = Arrays.asList(processCategories).stream().sorted((Comparator.comparing(o -> o.id))).collect(Collectors.toList());
        DataGrid<ProcessCategoryInfo> dataGrid = new DataGrid<>();
        dataGrid.setData(processCategoryInfoList);
        dataGrid.setPage(page);
        dataGrid.setLimit(limit);
        //dataGrid.setTotal();
        return dataGrid;
    }
    /**
     * ä¿å­˜æµç¨‹åˆ†ç±»
     * @param category
     * @return è¿”回主键
     */
    @Override
    public String saveProcessCategory(ProcessCategoryInfo category) throws PLException {
        VciBaseUtil.alertNotNull(category,"流程分类对象",category.name,"流程分类名称");
        this.checkNameExisted(category);
        if(Func.isBlank(category.parentId)){
            category.parentId = "root";
        }
        long time = new Date().getTime();
        String userId = WebUtil.getCurrentUserId();
        category.createTime = time;
        category.modifyTime = time;
        category.creator = userId;
        category.modifer = userId;
        return platformClientUtil.getWFService().saveProcessCategory(category);
    }
    /**
     * ä¿®æ”¹æµç¨‹åˆ†ç±»
     * @param category
     * @return
     */
    @Override
    public boolean updateProcessCategory(ProcessCategoryInfo category) throws PLException {
        VciBaseUtil.alertNotNull(category,"流程分类对象",category.name,"流程分类名称");
        if(Func.isBlank(category.parentId)){
            category.parentId = "root";
        }
        this.checkNameExisted(category);
        category.modifyTime = new Date().getTime();
        category.modifer = WebUtil.getCurrentUserId();
        return platformClientUtil.getWFService().updateProcessCategory(category);
    }
    /**
     * åˆ é™¤æµç¨‹åˆ†ç±»
     * @param id
     * @return
     * @throws Exception
     */
    @Override
    public boolean deleteProcessCategory(String id) throws Exception {
        VciBaseUtil.alertNotNull(id,"待删除流程分类的主键");
        ProcessDefinitionInfo[] processDefinitions = platformClientUtil.getWFService().getProcessDefinitions(id);
        if(processDefinitions.length>0){
            new VciBaseException( "分类下有模板,请先删除模版!");
        }
        return platformClientUtil.getWFService().deleteProcessCategory(id);
    }
    /**
     * æ ¹æ®ä¸»é”®å’Œåç§°æŸ¥è¯¢æµç¨‹åˆ†ç±»æ˜¯å¦å­˜åœ¨
     * @param category
     * @return
     */
    private void checkNameExisted(ProcessCategoryInfo category) throws PLException{
        //判断是否存在相同名称的模板分类
        if(platformClientUtil.getWFService().existProcessCategory(category.id, category.name)){
            throw new VciBaseException("模板分类的名称不能重复!");
        }
    }
}