yuxc
2024-06-19 663878fdcd0d44c105888014f4cdf7fc926f609f
1、去掉client包的相关更改。
2、修改登录鉴权修改。
已修改38个文件
已添加1个文件
2159 ■■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/autoconfigure/SpringMVCConfig.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSecurityInterceptor.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/controller/AuditTaskController.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebDataRightController.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/WebProcessDaoI.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeBreakCodeDaoImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeEnumDaoImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeRuleDaoImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/VciFileObjectDaoImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/OsMapToObjFunction.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/WorkFlowEndedNotice.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/pageModel/BatchCBO.java 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBaseServiceI.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLifeCycleServiceI.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebBoServiceI.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebLoServiceI.java 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LoginServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsEnumServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLifeCycleServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmOperationServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java 450 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebActionServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java 359 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java 222 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebSecretServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/RightControlUtil.java 267 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/WebUtil.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/autoconfigure/SpringMVCConfig.java
@@ -114,6 +114,15 @@
    }
    /**
     * å®‰å…¨ç›¸å…³çš„æ‹¦æˆªå™¨
     * @return å®‰å…¨ç›¸å…³çš„æ‹¦æˆªå™¨
     */
    @Bean
    public VciSecurityInterceptor vciSecurityInterceptor(){
        return new VciSecurityInterceptor();
    }
    /**
     * å¢žåŠ PUT和DELETE的支持
     * @return è¿‡æ»¤å™¨
     */
@@ -270,14 +279,6 @@
        return new VciLocaleInterceptor();
    }
    /**
     * å®‰å…¨ç›¸å…³çš„æ‹¦æˆªå™¨
     * @return å®‰å…¨ç›¸å…³çš„æ‹¦æˆªå™¨
     */
    @Bean
    public VciSecurityInterceptor vciSecurityInterceptor(){
        return new VciSecurityInterceptor();
    }
    /**
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/interceptor/VciSecurityInterceptor.java
@@ -7,6 +7,7 @@
import com.vci.starter.web.enumpck.ResultCodeEnum;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.util.ApplicationContextProvider;
import com.vci.starter.web.util.LangBaseUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.util.WebThreadLocalUtil;
@@ -14,10 +15,15 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -30,6 +36,7 @@
 * @author weidy
 * @date 2019/11/7 2:32 PM
 */
//@Configuration
public class VciSecurityInterceptor implements HandlerInterceptor {
    /**
@@ -46,8 +53,8 @@
    /**
     * ä¼šè¯ï¼Œæƒé™ï¼Œtoken的接口
     */
    @Autowired(required = false)
    private VciSessionForLoginI sessionForLoginI;
    @Autowired
    private VciSessionForLoginI vciSessionForLoginI;
    /**
     * æ‰§è¡Œæ‹¦æˆª
@@ -119,7 +126,7 @@
                return false;
            }else{
                if(!unCheckUrls.contains(url)){
                    if(sessionForLoginI == null){
                    if(vciSessionForLoginI == null){
                        //说明没办法校验
                        String msg = "请求路径"+ url +"没权限访问";
                        if(logger.isErrorEnabled()) {
@@ -129,11 +136,11 @@
                        return false;
                    }else{
                        //初始化平台的token
                        sessionForLoginI.initInvocationInfo(sessionInfo);
                        vciSessionForLoginI.initInvocationInfo(sessionInfo);
                        String systemPrivateToken = request.getHeader(TokenKeyConstant.SYSTEM_PRIVATE_KEY);
                        try {
                            if (sessionForLoginI.checkRequestRights(request, systemPrivateToken, sessionInfo, handler)) {
                            if (vciSessionForLoginI.checkRequestRights(request, systemPrivateToken, sessionInfo, handler)) {
                                updateRequestTime(url,userToken);
                            }else{
                                return false;
@@ -159,7 +166,11 @@
        SessionInfo sessionInfo = null;
        if(StringUtils.isNotBlank(userToken)){
            try{
                sessionInfo = sessionForLoginI.getSessionInfoByToken(userToken);
                if(vciSessionForLoginI == null){
                    vciSessionForLoginI = ApplicationContextProvider.getBean(VciSessionForLoginI.class);
                }
                sessionInfo = vciSessionForLoginI.getSessionInfoByToken(userToken);
            }catch (Throwable e){
                logger.error("获取token出错",e);
            }
@@ -207,8 +218,8 @@
        while(url1.startsWith("/")){
            url1 = url1.substring(1);
        }
        if(sessionForLoginI != null && !unStorageRequestTimeUrls.contains(url1)){
            sessionForLoginI.updateRequestTime(userToken);
        if(vciSessionForLoginI != null && !unStorageRequestTimeUrls.contains(url1)){
            vciSessionForLoginI.updateRequestTime(userToken);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java
@@ -1,11 +1,13 @@
package com.vci.frameworkcore.compatibility.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI;
import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus;
import com.vci.frameworkcore.model.OrgDeptForPlatform1;
import com.vci.frameworkcore.model.SmRoleForPlatform1;
import com.vci.frameworkcore.pagemodel.OrgDepartmentVO;
import com.vci.frameworkcore.pagemodel.SmRoleVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.revision.bo.TreeWrapperOptions;
import com.vci.starter.revision.service.RevisionModelUtil;
import com.vci.starter.web.constant.QueryOptionConstant;
@@ -285,12 +287,12 @@
            if(!CollectionUtils.isEmpty(deptVOs)){
                deptVOList.addAll(deptVOs);
                String sql = "select pluseruid,pldeptuid from pluserdept where pluseruid in (" + WebUtil.toInSql(userOids.toArray(new String[0])) + ")";
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, null);
                List<BusinessObject> cbos = boService.queryBySql(sql, null);
                if(!CollectionUtils.isEmpty(cbos)){
                    cbos.stream().forEach(cbo->{
                        String userOid = cbo.getAttributeValue("pluseruid");
                        String userOid = ObjectTool.getBOAttributeValue(cbo,"pluseruid");
                        List<String> deptOids = userDeptOidMap.getOrDefault(userOid,new ArrayList<>());
                        deptOids.add(cbo.getAttributeValue("pldeptuid"));
                        deptOids.add(ObjectTool.getBOAttributeValue(cbo,"pldeptuid"));
                        userDeptOidMap.put(userOid,deptOids);
                    });
                }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -3,6 +3,8 @@
import com.alibaba.fastjson.JSONObject;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.data.FunctionInfo;
import com.vci.corba.framework.data.RoleRightInfo;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum;
@@ -10,6 +12,7 @@
import com.vci.frameworkcore.model.SmRoleForPlatform1;
import com.vci.frameworkcore.pagemodel.MenuVO;
import com.vci.frameworkcore.pagemodel.SmFunctionVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.*;
@@ -18,6 +21,7 @@
import com.vci.web.service.UIEngineServiceI;
import com.vci.web.service.WebBoServiceI;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.RightControlUtil;
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -74,6 +78,8 @@
    @Autowired
    private PlatformClientUtil platformClientUtil;
    @Autowired
    RightControlUtil rightControlUtil;
    /**
     * æŸ¥è¯¢æ‰€æœ‰çš„功能
     *
@@ -208,12 +214,21 @@
    @Override
    public List<MenuVO> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException {
        SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException();
        if(resourceControlTypeEnum == null){
            resourceControlTypeEnum = ResourceControlTypeEnum.BS;
        String parentId;
        if (rightControlUtil.isAdminOrDeveloperOrRoot(sessionInfo.getUserId())) {
            // ç³»ç»Ÿèœå•
            parentId = "systemManagmentNode" ;
        } else if (rightControlUtil.isThreeAdminCurUser()) {
            parentId = "systemManagmentNode" ;
        } else {
            parentId = "modelManagmentNode" ;
        }
        FunctionInfo[] menus = platformClientUtil.getFrameworkService().getModuleListByParentId("modelManagmentNode", true);
        RoleRightInfo[] userRoleRights = rightControlUtil.getRoleRightByUserName(sessionInfo.getUserId());
        Map<String, List<FunctionInfo>> map = rightControlUtil.getAllChildrenFunctionsByUserName(
                parentId, sessionInfo.getUserId(), userRoleRights);
        List<MenuVO> functionVOList = new ArrayList<>();
        for (FunctionInfo menu : menus) {
        for (FunctionInfo menu : map.get(parentId)) {
            if(!menu.isValid){
                continue;
            }
@@ -512,12 +527,12 @@
            if(!CollectionUtils.isEmpty(functionVOS)){
                functionVOList.addAll(functionVOS);
                String sql = "select plfuncoid,plroleoid from plroleright where plroleoid in (" + WebUtil.toInSql(roleOids.toArray(new String[0])) + ")";
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, null);
                List<BusinessObject> cbos = boService.queryBySql(sql, null);
                if(!CollectionUtils.isEmpty(cbos)){
                    cbos.stream().forEach(cbo->{
                        String roleOid = cbo.getAttributeValue("plroleoid");
                        String roleOid = ObjectTool.getBOAttributeValue(cbo,"plroleoid");
                        List<String> functionOids = roleFunctionOidMap.getOrDefault(roleOid,new ArrayList<>());
                        functionOids.add(cbo.getAttributeValue("plfuncoid"));
                        functionOids.add(ObjectTool.getBOAttributeValue(cbo,"plfuncoid"));
                        roleFunctionOidMap.put(roleOid,functionOids);
                    });
                }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java
@@ -1,11 +1,13 @@
package com.vci.frameworkcore.compatibility.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI;
import com.vci.frameworkcore.constant.FrameWorkBtmTypeConstant;
import com.vci.frameworkcore.enumpck.RoleClassifyEnum;
import com.vci.frameworkcore.enumpck.RoleControlAreaEnum;
import com.vci.frameworkcore.model.SmRoleForPlatform1;
import com.vci.frameworkcore.pagemodel.SmRoleVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
@@ -250,12 +252,12 @@
            if(!CollectionUtils.isEmpty(roleVOS)){
                roleVOList.addAll(roleVOS);
                String sql = "select pluseruid,plroleuid from pluserrole where pluseruid in (" + WebUtil.toInSql(userOids.toArray(new String[0])) + ")";
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, null);
                List<BusinessObject> cbos = boService.queryBySql(sql, null);
                if(!CollectionUtils.isEmpty(cbos)){
                    cbos.stream().forEach(cbo->{
                        String userOid = cbo.getAttributeValue("pluseruid");
                        String userOid = ObjectTool.getBOAttributeValue(cbo,"pluseruid");
                        List<String> roleOids = userRoleOidMap.getOrDefault(userOid,new ArrayList<>());
                        roleOids.add(cbo.getAttributeValue("plroleuid"));
                        roleOids.add(ObjectTool.getBOAttributeValue(cbo,"plroleuid"));
                        userRoleOidMap.put(userOid,roleOids);
                    });
                }
@@ -415,12 +417,12 @@
            if(!CollectionUtils.isEmpty(roleVOS)){
                roleVOList.addAll(roleVOS);
                String sql = "select plroleoid,plfuncoid from plroleright where plfuncoid in (" + WebUtil.toInSql(userOids.toArray(new String[0])) + ")";
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, null);
                List<BusinessObject> cbos = boService.queryBySql(sql, null);
                if(!CollectionUtils.isEmpty(cbos)){
                    cbos.stream().forEach(cbo->{
                        String funcOid = cbo.getAttributeValue("plfuncoid");
                        String funcOid = ObjectTool.getBOAttributeValue(cbo,"plfuncoid");
                        List<String> roleOids = funcRoleOidMap.getOrDefault(funcOid,new ArrayList<>());
                        roleOids.add(cbo.getAttributeValue("plroleoid"));
                        roleOids.add(ObjectTool.getBOAttributeValue(cbo,"plroleoid"));
                        funcRoleOidMap.put(funcOid,roleOids);
                    });
                }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
@@ -3,9 +3,11 @@
import com.vci.common.util.ThreeDES;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.data.UserInfo;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO;
import com.vci.frameworkcore.pagemodel.SmUserVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.enumpck.BooleanEnum;
import com.vci.starter.web.enumpck.UserSecretEnum;
import com.vci.starter.web.exception.VciBaseException;
@@ -32,7 +34,7 @@
import java.util.stream.Collectors;
import static com.vci.frameworkcore.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST;
import static com.vci.web.util.WebUtil.arryAndSqlToClientBusinessObject;
import static com.vci.web.util.WebUtil.arryAndSqlToBusinessObject;
/**
 * ç”¨æˆ·çš„æŸ¥è¯¢ç›¸å…³çš„æœåŠ¡ï¼Œå¯ä»¥å…¼å®¹è€å¹³å°å’Œè€çš„pdm
@@ -148,7 +150,7 @@
        try{
            String[][] sqlQueryResult = platformClientUtil.getBOFService().getSqlQueryResult(sql + fromSql, null);
            if(sqlQueryResult.length>0){
                com.vci.client.bof.ClientBusinessObject cbo = arryAndSqlToClientBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]);
                BusinessObject cbo = arryAndSqlToBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]);
                return cbo2VO(cbo);
            }
        }catch (Exception e){
@@ -176,7 +178,7 @@
                    + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
                    " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " +
                    queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
            List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
            List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
            if(!CollectionUtils.isEmpty(dataList)){
                dataList.stream().forEach(cbo->{
                    userVOList.add(cbo2VO(cbo));
@@ -285,7 +287,7 @@
                + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
                " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + (QUERY_FIELD_ROLE.equalsIgnoreCase(queryField)?roleSql:"") +
                queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
        List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
        List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
        if(!CollectionUtils.isEmpty(dataList)){
            dataList.stream().forEach(cbo->{
                userVOList.add(cbo2VO(cbo));
@@ -299,7 +301,7 @@
     * @param cbo ä¸šåŠ¡æ•°æ®
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    private SmUserVO cbo2VO(com.vci.client.bof.ClientBusinessObject cbo){
    private SmUserVO cbo2VO(BusinessObject cbo){
        SmUserDO userDO = new SmUserDO();
        SmUserVO userVO = new SmUserVO();
        WebUtil.copyValueToObjectFromCbos(cbo,userDO);
@@ -353,7 +355,7 @@
                }
            }
        }
        List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null);
        List<BusinessObject> dataList = boService.queryBySql((isPage?("select " + pageSelectList.stream().collect(Collectors.joining(","))+ " from (select A.*,rownum RN from ( "):"") + sql + fromSql + (isPage?pageSubfix:""), null);
        if(!CollectionUtils.isEmpty(dataList)){
            dataList.stream().forEach(cbo->{
                userVOList.add(cbo2VO(cbo));
@@ -669,13 +671,13 @@
                + " left join pluserdept up on " + queryWrapper.getTableNick() + ".pluid = up.pluseruid left join pldept pkDepartment on  up.pldeptuid = pkDepartment.pluid " +
                " left join PLUSERPASSWORDSTRATEGY pkUserPassword on  " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " +
                queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):"");
        List<com.vci.client.bof.ClientBusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
        List<BusinessObject> dataList = boService.queryBySql(sql + fromSql, null);
        List<Tree> treeList = new ArrayList<>();
        if(!CollectionUtils.isEmpty(dataList)){
            dataList.stream().forEach(cbo->{
                Tree tree = new Tree();
                tree.setOid(cbo.getOid());
                tree.setText(cbo.getId() + " " + cbo.getName());
                tree.setOid(cbo.oid);
                tree.setText(cbo.id + " " + cbo.name);
                Map<String,String> attributeMap = new HashMap<>();
                WebUtil.copyValueToCboFromMap(cbo,attributeMap);
                tree.setAttributes(attributeMap);
@@ -699,15 +701,15 @@
        String sql = " select plpassword from pluser where pluid = :userOid";
        Map<String,String> conditionMap = new HashMap<>();
        conditionMap.put("userOid",userOid.trim());
        List<com.vci.client.bof.ClientBusinessObject> clientBusinessObjectList = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(clientBusinessObjectList)){
        List<BusinessObject> BusinessObjectList = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(BusinessObjectList)){
            return  false;
        }
        ThreeDES des = new ThreeDES();// å®žä¾‹åŒ–一个对�?
        des.getKey("daliantan0v0");// ç”Ÿæˆå¯†åŒ™
        md5Password = des.getEncString(md5Password);
        if(md5Password.equals(clientBusinessObjectList.get(0).getAttributeValue("plpassword"))){
        if(md5Password.equals(ObjectTool.getNewBOAttributeValue(BusinessObjectList.get(0),"plpassword"))){
            return true;
        }
        return false;
@@ -742,7 +744,7 @@
    public SmPasswordStrategyVO getPasswordStrategyVOByOid(String oid){
        VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class);
        queryWrapperForDO.eq("oid",oid.trim());
        List<com.vci.client.bof.ClientBusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " +
        List<BusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " +
                queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() +
                (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null);
        if(!CollectionUtils.isEmpty(cboList)){
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/controller/AuditTaskController.java
@@ -1,9 +1,10 @@
package com.vci.plugins.controller;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientBusinessObjectOperation;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.query.data.KV;
import com.vci.omd.utils.ObjectTool;
import com.vci.plugins.dto.AuditTaskDTO;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.VciBaseUtil;
@@ -46,8 +47,8 @@
    @PostMapping("/create")
    public BaseResult createByPrincipal(@RequestBody AuditTaskDTO auditTaskDTO) {
        VciBaseUtil.alertNotNull(auditTaskDTO.getProcessreviewoid(), "工艺评审主键", auditTaskDTO.getPrincipal(), "负责人");
        ClientBusinessObjectOperation operation = new ClientBusinessObjectOperation();
        List<ClientBusinessObject> createList = new ArrayList<>();
//        BusinessObjectOperation operation = new BusinessObjectOperation();
        List<BusinessObject> createList = new ArrayList<>();
        List<String> principalList = VciBaseUtil.str2List(auditTaskDTO.getPrincipal());
        List<List<String>> oracleIn = WebUtil.switchListForOracleIn(principalList);
        try {
@@ -65,17 +66,18 @@
                            "where us.pluid in " + principalStr;
                    KV[][] kvs = platformClientUtil.getQueryService().queryBySql(sql);
                    for (int index = 0; index < kvs.length; index++) {
                        ClientBusinessObject cbo = operation.initBusinessObject("audittask");
                        BusinessObject cbo = platformClientUtil.getBOFService().initBusinessObject("audittask");
                        copyAttribute(cbo, auditTaskDTO);
                        cbo.setAttributeValue("principal", "PLUSERNAME".equals(kvs[index][0].key.toUpperCase(Locale.ROOT)) ? kvs[index][0].value : kvs[index][1].value);
                        cbo.setAttributeValue("departmentname","PLNAME".equals(kvs[index][0].key.toUpperCase(Locale.ROOT)) ? kvs[index][0].value : kvs[index][1].value);
                        ObjectTool.setBOAttributeValue(cbo, "principal", "PLUSERNAME".equals(kvs[index][0].key.toUpperCase(Locale.ROOT)) ? kvs[index][0].value : kvs[index][1].value);
                        ObjectTool.setBOAttributeValue(cbo,"departmentname","PLNAME".equals(kvs[index][0].key.toUpperCase(Locale.ROOT)) ? kvs[index][0].value : kvs[index][1].value);
                        createList.add(cbo);
                    }
                } catch ( PLException vciError) {
                    vciError.printStackTrace();
                }
            });
            operation.batchSaveCreateBuinessObject(createList.toArray(new ClientBusinessObject[0]));
            platformClientUtil.getBOFService().batchCreateBusinessObject(createList.toArray(new BusinessObject[0]),false,false);
        } catch ( PLException vciError) {
            vciError.printStackTrace();
            return BaseResult.fail("创建评审任务失败");
@@ -89,7 +91,7 @@
     * @param cbo          è¯„审任务业务类型对象
     * @param auditTaskDTO è¯„审任务页面传输对象
     */
    private void copyAttribute(ClientBusinessObject cbo, AuditTaskDTO auditTaskDTO) {
    private void copyAttribute(BusinessObject cbo, AuditTaskDTO auditTaskDTO) {
        setAttribute(cbo, "assigner", StringUtils.isBlank(auditTaskDTO.getAssigner())? WebUtil.getCurrentUserId(): auditTaskDTO.getAssigner());
        setAttribute(cbo, "principal", auditTaskDTO.getPrincipal());
        setAttribute(cbo, "departmentName", auditTaskDTO.getDepartmentname());
@@ -107,13 +109,9 @@
     * @param attributeName  å­—段名
     * @param attributeValue å­—段值
     */
    private void setAttribute(ClientBusinessObject cbo, String attributeName, String attributeValue) {
        try {
            if (StringUtils.isNotBlank(attributeValue)) {
                cbo.setAttributeValue(attributeName, attributeValue);
            }
        } catch (PLException vciError) {
            vciError.printStackTrace();
    private void setAttribute(BusinessObject cbo, String attributeName, String attributeValue) {
        if (StringUtils.isNotBlank(attributeValue)) {
            ObjectTool.setBOAttributeValue(cbo, attributeName, attributeValue);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
@@ -35,7 +35,6 @@
    * @param treeQueryObject æ ‘查询对象
    * @return  æ ‘节点,出现错误会在异常处理器中统一返回Json
    */
    @VciUnCheckRight
    @GetMapping("/treeMyMenu")
    public List<MenuVO> treeMyMenu(TreeQueryObject treeQueryObject) throws PLException {
        return functionQueryService.treeCurrentUserMenu(treeQueryObject, ResourceControlTypeEnum.BS);
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebDataRightController.java
@@ -1,12 +1,6 @@
package com.vci.web.controller;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.uif.actions.client.DataRightUtil;
import com.vci.client.uif.engine.common.DefaultTableNode;
import com.vci.client.uif.engine.common.IDataNode;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.starter.web.enumpck.DataSecretEnum;
import com.vci.starter.web.enumpck.UserSecretEnum;
import com.vci.starter.web.pagemodel.BaseResult;
@@ -83,7 +77,7 @@
                //先判断密级
                //weidy修改,换成从线程里获取当前用户信息
                SessionInfo si = WebUtil.getCurrentUserSessionInfo();
                DataRightUtil dataRightUtil = new DataRightUtil(new HashMap());
//                DataRightUtil dataRightUtil = new DataRightUtil(new HashMap());
                StringBuilder sb = new StringBuilder();
                  return BaseResult.fail("");
            }
@@ -97,8 +91,9 @@
     * @throws PLException ç¼ºå°‘的时候会抛出异常
     */
    protected Object getSelectedObject(BaseModelDTO boData) throws PLException {
        IDataNode selectedObject = new DefaultTableNode();
        ClientBusinessObject cbo = new ClientBusinessObject();
        //此方法没有被引用,且IDataNode对象没有
//        IDataNode selectedObject = new DefaultTableNode();
        BusinessObject cbo = new BusinessObject();
        if(StringUtils.isBlank(boData.getOid())){
            throw new PLException("没有获取到数据的主键",new String[0]);
        }
@@ -111,12 +106,13 @@
        if(StringUtils.isBlank(boData.getBtmname())){
            throw new PLException("没有获取到数据的业务类型",new String[0]);
        }
        cbo.setOid(boData.getOid());
        cbo.setRevisionid(boData.getRevisionOid());
        cbo.setNameoid(boData.getNameOid());
        cbo.setBtmName(boData.getBtmname());
        selectedObject.setMasterObject(cbo);
        return selectedObject;
        cbo.oid = boData.getOid();
        cbo.revisionid = boData.getRevisionOid();
        cbo.nameoid = boData.getNameOid();
        cbo.btName = boData.getBtmname();
//        selectedObject.setMasterObject(cbo);
//        return selectedObject;
        return null;
    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/WebProcessDaoI.java
@@ -1,6 +1,6 @@
package com.vci.web.dao;
import com.vci.client.bof.ClientLinkObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.starter.web.exception.VciBaseException;
@@ -240,7 +240,7 @@
     * @return
     * @throws VciBaseException
     */
    List<ClientLinkObject> getDataCloInTask(String taskOid, String executionId) throws VciBaseException;
    List<LinkObject> getDataCloInTask(String taskOid, String executionId) throws VciBaseException;
    /**
     * èŽ·å–æµç¨‹ä¸­åŒ…å«çš„æ‰€æœ‰æ•°æ®
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeBreakCodeDaoImpl.java
@@ -1,5 +1,6 @@
package com.vci.web.dao.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.PageHelper;
@@ -172,14 +173,14 @@
        VciBaseUtil.alertNotNull(ruleOid,"规则分类",serialAccord,"流水依据");
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put("pkcoderule",ruleOid);
        List<com.vci.client.bof.ClientBusinessObject> queryList = this.boService.queryCBO("codebreakcode", conditionMap);
        List<BusinessObject> queryList = this.boService.queryCBO("codebreakcode", conditionMap);
        if (CollectionUtils.isEmpty(queryList)){
            throw new VciBaseException("规则分类[{0}]在系统中不存在",new String[]{ruleOid});
        }
        conditionMap.clear();
        String oid = "";
        for (com.vci.client.bof.ClientBusinessObject object : queryList) {
            oid += object.getOid() + ",";
        for (BusinessObject object : queryList) {
            oid += object.oid + ",";
        }
        oid = "(" + oid.substring(0,oid.length() -1) + ")";
        conditionMap.put("oid", QueryOptionConstant.IN + oid);
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeEnumDaoImpl.java
@@ -1,6 +1,6 @@
package com.vci.web.dao.impl;
import com.vci.client.omd.provider.BtmProvider;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.PageHelper;
@@ -203,15 +203,17 @@
        //先查询明细,明细应该不会有1000条
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put("ruleOid",ruleOid);
        String sql = " select a.oid as oid from " + BtmProvider.getInstance().getBTTableName(BtmIdConstant.OS_CODE_ENUM_BTM_TYPE) + " a left join  "
                + BtmProvider.getInstance().getBTTableName(BtmIdConstant.OS_CODE_RULE_ELEMENT_BTM_TYPE) + " b on a.pkCodeRuleElement = b.oid where b.pkCodeRule = :ruleOid";
        List<com.vci.client.bof.ClientBusinessObject> enumCbos = boService.queryBySql(sql, conditionMap);
        //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//        String sql = " select a.oid as oid from " +  BtmProvider.getInstance().getBTTableName(BtmIdConstant.OS_CODE_ENUM_BTM_TYPE) + " a left join  "
//                + BtmProvider.getInstance().getBTTableName(BtmIdConstant.OS_CODE_RULE_ELEMENT_BTM_TYPE) + " b on a.pkCodeRuleElement = b.oid where b.pkCodeRule = :ruleOid";
        String sql = "";
        List<BusinessObject> enumCbos = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(enumCbos)){
            return  new ArrayList<OsCodeEnumDO>();
        }
        List<String> oidList = new ArrayList<String>();
        for(com.vci.client.bof.ClientBusinessObject cbo : enumCbos){
            oidList.add(cbo.getOid());
        for(BusinessObject cbo : enumCbos){
            oidList.add(cbo.oid);
        }
        return boService.selectByOidCollection(oidList,OsCodeEnumDO.class);
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeRuleDaoImpl.java
@@ -1,5 +1,6 @@
package com.vci.web.dao.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.PageHelper;
import com.vci.starter.web.util.VciBaseUtil;
@@ -163,7 +164,7 @@
     */
    @Override
    public long batchUpdateLcStatus(Collection<String> oids, String lcStatus) {
        List<com.vci.client.bof.ClientBusinessObject> cbos = boService.selectCBOByOidCollection(oids, "oscoderule");
        List<BusinessObject> cbos = boService.selectCBOByOidCollection(oids, "oscoderule");
        if(CollectionUtils.isEmpty(cbos)){
            return 0;
        }
@@ -179,11 +180,11 @@
     */
    @Override
    public int updateLcStatus(String oid, String lcStatus) {
        com.vci.client.bof.ClientBusinessObject cbo = boService.selectCBOByOid(oid, "oscoderule");
        if(cbo == null || StringUtils.isBlank(cbo.getOid())){
        BusinessObject cbo = boService.selectCBOByOid(oid, "oscoderule");
        if(cbo == null || StringUtils.isBlank(cbo.oid)){
            return 0;
        }
        lifeCycleService.transStatus(cbo.getBusinessObject(),lcStatus);
        lifeCycleService.transStatus(cbo,lcStatus);
        return 1;
    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/VciFileObjectDaoImpl.java
@@ -1,6 +1,8 @@
package com.vci.web.dao.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.file.constant.VciFileBtmTypeConstant;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.starter.web.wrapper.VciQueryWrapperForDO;
@@ -239,10 +241,10 @@
    public String selectSecret(String ownbizOid, String ownbizBtm) {
        if(StringUtils.isNotBlank(ownbizOid) && StringUtils.isNotBlank(ownbizBtm)){
            //校验数据的密级
            com.vci.client.bof.ClientBusinessObject cbo = boService.selectCBOByOid(ownbizOid, ownbizBtm);
            if(cbo !=null && StringUtils.isNotBlank(cbo.getOid())){
            BusinessObject cbo = boService.selectCBOByOid(ownbizOid, ownbizBtm);
            if(cbo !=null && StringUtils.isNotBlank(cbo.oid)){
                //有可能是先上传文件,所以我们这个不判断是否存在
                return  cbo.getAttributeValue("secretgrade");
                return  ObjectTool.getBOAttributeValue(cbo,"secretgrade");
            }
        }
        return null;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java
@@ -1,14 +1,16 @@
package com.vci.web.dao.impl;
import com.vci.client.bof.ClientLinkObject;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
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.WorkflowService;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.vci.corba.workflow.data.*;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.frameworkcore.pagemodel.SmUserVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
@@ -606,7 +608,7 @@
     * @throws VciBaseException
     */
    @Override
    public List<ClientLinkObject> getDataCloInTask(String taskOid, String executionid) throws VciBaseException {
    public List<LinkObject> getDataCloInTask(String taskOid, String executionid) throws VciBaseException {
        Map<String,String> conditionMap = new HashMap<String, String>();
        if(StringUtils.isNotBlank(taskOid)) {
            conditionMap.put("f_oid", taskOid.trim());
@@ -619,18 +621,18 @@
    }
    
    private DataGrid getData(String linkType,Map<String,String> conditionMap,String referColumns) throws VciBaseException{
        List<ClientLinkObject> clos = loService.queryCLO(taskDataLink, conditionMap);
        List<LinkObject> clos = loService.queryCLO(taskDataLink, conditionMap);
        Map<String,List<String>> btmOidMap = new HashMap<String, List<String>>();
        if(clos!=null&&clos.size()>0){
            for(ClientLinkObject clo : clos){
            for(LinkObject clo : clos){
                List<String> oids = null;
                String btm = clo.getToBTMName().toLowerCase();
                String btm = clo.toBTName.toLowerCase();
                if(btmOidMap.containsKey(btm)){
                    oids = btmOidMap.get(btm);
                }else{
                    oids = new ArrayList<String>();
                }
                oids.add(clo.getToOid());
                oids.add(clo.toOid);
                btmOidMap.put(btm, oids);
            }
        }
@@ -648,7 +650,7 @@
                }else {
                    caluesList.add("*");
                }
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btm, conditionMap,null,caluesList);
                List<BusinessObject> cbos = boService.queryCBO(btm, conditionMap,null,caluesList);
                data.addAll(boService.cbos2Map(cbos));
            }
        }
@@ -726,21 +728,21 @@
        PageHelper pageHelper = new PageHelper(-1);
        pageHelper.setSort("endTime");
        pageHelper.setOrder(pageHelper.asc);
        List<com.vci.client.bof.ClientBusinessObject> undoTaskCbos= boService.queryCBO(workitemBtmType, conditionMap);
        List<BusinessObject> undoTaskCbos= boService.queryCBO(workitemBtmType, conditionMap);
        if(undoTaskCbos != null && undoTaskCbos.size() > 0) {
            for(com.vci.client.bof.ClientBusinessObject cbo : undoTaskCbos) {
            for(BusinessObject cbo : undoTaskCbos) {
                ProcessHistoryVO his = new ProcessHistoryVO();
                String taskName = cbo.getName();
                String taskName = cbo.name;
                if(StringUtils.contains(taskName,"-")) {
                    taskName = taskName.substring(taskName.lastIndexOf("-") + 1);
                }
                his.setTaskName(taskName);
                his.setCreateTime(String.valueOf(cbo.getCreateTime()));
                String userIdString = cbo.getAttributeValue("principal");
                his.setCreateTime(String.valueOf(cbo.createTime));
                String userIdString = ObjectTool.getBOAttributeValue(cbo,"principal");
                if(StringUtils.contains(userIdString,":")) {
                    userIdString = userIdString.substring(userIdString.indexOf(":") + 1);
                }
                his.setAssignee(cbo.getAttributeValue("principal"));
                his.setAssignee(ObjectTool.getBOAttributeValue(cbo,"principal"));
                String userShowInfoString = "";
                SmUserVO user = userQueryService.getUserByUserId(userIdString);
                if(user != null){
@@ -749,7 +751,7 @@
                    userShowInfoString = userIdString;
                }
                his.setAssigneeName(userShowInfoString);
                his.setExecutionId(cbo.getAttributeValue("executionid"));
                his.setExecutionId(ObjectTool.getBOAttributeValue(cbo,"executionid"));
                
                hisList.add(his);
            }
@@ -936,19 +938,19 @@
                oidList.add(oid);
            }
            //转换成500长度的
            List<com.vci.client.bof.ClientBusinessObject> cboList = new ArrayList<com.vci.client.bof.ClientBusinessObject>();
            List<BusinessObject> cboList = new ArrayList<BusinessObject>();
            if(oidList.size()>500){
                List<List<String>> oidListForIn = WebUtil.switchListForOracleIn(oidList);
                for(List<String> oidListForInRecord : oidListForIn){
                    Map<String,String> conditionMap = new HashMap<String, String>();
                    conditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oidListForInRecord.toArray(new String[0])) + ")" );
                    List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap);
                    List<BusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap);
                    cboList.addAll(tempCbos);
                }
            }else{
                Map<String,String> conditionMap = new HashMap<String, String>();
                conditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oidList.toArray(new String[0])) + ")" );
                List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap);
                List<BusinessObject> tempCbos = boService.queryCBO(btmType,conditionMap);
                cboList.addAll(tempCbos);
            }
            //找到这个业务类型的起始状态
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/OsMapToObjFunction.java
@@ -1,5 +1,7 @@
package com.vci.web.other;
import com.vci.corba.omd.data.BusinessObject;
/**
 * å¯¹è±¡æœåŠ¡ä¸­ï¼Œmap转成VO的对象
 * @author weidy
@@ -13,5 +15,5 @@
     * @param data æ•°æ®çš„æ˜ å°„
     * @param obj å¯¹è±¡
     */
    void convert(com.vci.client.bof.ClientBusinessObject data, T obj);
    void convert(BusinessObject data, T obj);
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/WorkFlowEndedNotice.java
@@ -1,12 +1,13 @@
package com.vci.web.other;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientBusinessObjectOperation;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.omd.utils.ObjectTool;
import com.vci.web.annotation.FlowNotifyBefore;
import com.vci.web.annotation.FlowNotifyWeb;
import com.vci.web.bo.FlowNoticeInfo;
import com.vci.web.service.WebBoServiceI;
import com.vci.web.util.PlatformClientUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -30,6 +31,10 @@
    @Autowired
    private WebBoServiceI boService;
    @Autowired
    private PlatformClientUtil platformClientUtil;
    @FlowNotifyBefore
    public void callBefore(FlowNoticeInfo noticeInfo) {
        try {
@@ -43,32 +48,32 @@
                }
                String sql = "SELECT T_OID,T_BTWNAME FROM PLATFORMLT_INPUT WHERE F_OID = '" + wfOid + "'";
                ClientBusinessObjectOperation operation = new ClientBusinessObjectOperation();
                List<com.vci.client.bof.ClientBusinessObject> queryResult = boService.queryBySql(sql, new HashMap<>());
                List<BusinessObject> queryResult = boService.queryBySql(sql, new HashMap<>());
                if (queryResult.size() == 0) {
                    logger.info("没有找到业务数据");
                    return;
                }
                String btmName = queryResult.get(0).getAttributeValue("t_btwname");
                String oid = queryResult.get(0).getAttributeValue("t_oid");
                String btmName = ObjectTool.getBOAttributeValue(queryResult.get(0),"t_btwname");
                String oid = ObjectTool.getBOAttributeValue(queryResult.get(0),"t_oid");
                String querySql = "select cac.oid from PLATFORMBTM_CODEALLCODE cac\n" +
                        " left join PLATFORMBTM_" + btmName + " wp on cac.CREATECODEOID = wp.OID\n" +
                        " where wp.OID = '" + oid + "'";
                Map<String, String> conditionMap = new HashMap<>();
                conditionMap.put("oid", oid);
                List<com.vci.client.bof.ClientBusinessObject> codeResult = boService.queryCBO(btmName, conditionMap);
                List<BusinessObject> codeResult = boService.queryCBO(btmName, conditionMap);
                conditionMap.clear();
                conditionMap.put("createCodeOid", codeResult.get(0).getAttributeValue("oid"));
                List<com.vci.client.bof.ClientBusinessObject> allCodeList = boService.queryCBO("codeAllCode", conditionMap);
                conditionMap.put("createCodeOid", ObjectTool.getBOAttributeValue(queryResult.get(0),"oid"));
                List<BusinessObject> allCodeList = boService.queryCBO("codeAllCode", conditionMap);
                if (allCodeList.size() == 0) {
                    logger.info("没有找到编码");
                    return;
                }
                for (com.vci.client.bof.ClientBusinessObject codeAllCode : allCodeList) {
                    codeAllCode.setLcStatus("Editing");
                    codeAllCode.setAttributeValue("lcstatus", "Editing");
                for (BusinessObject codeAllCode : allCodeList) {
                    codeAllCode.lcStatus = "Editing";
                    ObjectTool.setBOAttributeValue(codeAllCode,"lcstatus", "Editing");
                }
                operation.batchUpdateBuinessObject(allCodeList.toArray(new ClientBusinessObject[0]));
                platformClientUtil.getBOFService().batchUpdateBusinessObject(allCodeList.toArray(new BusinessObject[0]));
                logger.info("编码生命周期恢复完成");
            }
        } catch (PLException e) {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/pageModel/BatchCBO.java
@@ -1,8 +1,8 @@
package com.vci.web.pageModel;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import org.springframework.util.CollectionUtils;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
@@ -17,42 +17,42 @@
    /**
     * ç©ºçš„业务类型数组
     */
    private ClientBusinessObject[] nullCboArray = new ClientBusinessObject[0];
    private BusinessObject[] nullCboArray = new BusinessObject[0];
    /**
     * ç©ºçš„链接类型数组
     */
    private ClientLinkObject[] nullCloArray = new ClientLinkObject[0];
    private LinkObject[] nullCloArray = new LinkObject[0];
    /**
     * åˆ›å»ºçš„业务类型
     */
    private Set<ClientBusinessObject> createCbos = new HashSet<ClientBusinessObject>();
    private Set<BusinessObject> createCbos = new HashSet<BusinessObject>();
    /**
     * åˆ›å»ºçš„链接类型
     */
    private Set<ClientLinkObject> createClos = new HashSet<ClientLinkObject>();
    private Set<LinkObject> createClos = new HashSet<LinkObject>();
    /**
     * æ›´æ–°çš„业务类型
     */
    private Set<ClientBusinessObject> updateCbos = new HashSet<ClientBusinessObject>();
    private Set<BusinessObject> updateCbos = new HashSet<BusinessObject>();
    /**
     * æ›´æ–°çš„链接类型
     */
    private Set<ClientLinkObject> updateClos = new HashSet<ClientLinkObject>();
    private Set<LinkObject> updateClos = new HashSet<LinkObject>();
    /**
     * åˆ é™¤ä¸šåŠ¡ç±»åž‹
     */
    private Set<ClientBusinessObject> deleteCbos = new HashSet<ClientBusinessObject>();
    private Set<BusinessObject> deleteCbos = new HashSet<BusinessObject>();
    /**
     * åˆ é™¤çš„链接类型
     */
    private Set<ClientLinkObject> deleteClos = new HashSet<ClientLinkObject>();
    private Set<LinkObject> deleteClos = new HashSet<LinkObject>();
    /**
     * æ¥æºæ•°æ®é›†åˆ
@@ -91,119 +91,119 @@
        }
    }
    
    public void addCreateCbo(ClientBusinessObject cbo){
    public void addCreateCbo(BusinessObject cbo){
        this.createCbos.add(cbo);
    }
    
    public void addCreateClo(ClientLinkObject clo){
    public void addCreateClo(LinkObject clo){
        this.createClos.add(clo);
    }
    
    public void addUpdateCbo(ClientBusinessObject cbo){
    public void addUpdateCbo(BusinessObject cbo){
        this.updateCbos.add(cbo);
    }
    
    public void addUpdateClo(ClientLinkObject clo){
    public void addUpdateClo(LinkObject clo){
        this.updateClos.add(clo);
    }
    
    public void addDeleteCbo(ClientBusinessObject cbo){
    public void addDeleteCbo(BusinessObject cbo){
        this.deleteCbos.add(cbo);
    }
    
    public void addDeleteClo(ClientLinkObject clo){
    public void addDeleteClo(LinkObject clo){
        this.deleteClos.add(clo);
    }
    
    
    public ClientBusinessObject[] getCreateCboArray(){
    public BusinessObject[] getCreateCboArray(){
        if( this.createCbos == null){
            this.createCbos = new HashSet<ClientBusinessObject>();
            this.createCbos = new HashSet<BusinessObject>();
        }
        return this.createCbos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.getCreateTime() - o2.getCreateTime()))).collect(Collectors.toList()).toArray(nullCboArray);
        return this.createCbos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.createTime - o2.createTime))).collect(Collectors.toList()).toArray(nullCboArray);
    }
    
    public ClientLinkObject[] getCreateCloArray(){
    public LinkObject[] getCreateCloArray(){
        if( this.createClos == null){
            this.createClos = new HashSet<ClientLinkObject>();
            this.createClos = new HashSet<LinkObject>();
        }
        return this.createClos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.getCreateTime() - o2.getCreateTime()))).collect(Collectors.toList()).toArray(nullCloArray);
        return this.createClos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.createTime - o2.createTime))).collect(Collectors.toList()).toArray(nullCloArray);
    }
    
    public ClientBusinessObject[] getUpdateCboArray(){
    public BusinessObject[] getUpdateCboArray(){
        if( this.updateCbos == null){
            this.updateCbos = new HashSet<ClientBusinessObject>();
            this.updateCbos = new HashSet<BusinessObject>();
        }
        return this.updateCbos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.getCreateTime() - o2.getCreateTime()))).collect(Collectors.toList()).toArray(nullCboArray);
        return this.updateCbos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.createTime - o2.createTime))).collect(Collectors.toList()).toArray(nullCboArray);
    }
    
    public ClientLinkObject[] getUpdateCloArray(){
    public LinkObject[] getUpdateCloArray(){
        if( this.updateClos == null){
            this.updateClos = new HashSet<ClientLinkObject>();
            this.updateClos = new HashSet<LinkObject>();
        }
        return this.updateClos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.getCreateTime() - o2.getCreateTime()))).collect(Collectors.toList()).toArray(nullCloArray);
        return this.updateClos.stream().sorted(((o1, o2) -> Math.toIntExact(o1.createTime - o2.createTime))).collect(Collectors.toList()).toArray(nullCloArray);
    }
    public ClientBusinessObject[] getDeleteCboArray(){
    public BusinessObject[] getDeleteCboArray(){
        if( this.deleteCbos == null){
            this.deleteCbos = new HashSet<ClientBusinessObject>();
            this.deleteCbos = new HashSet<BusinessObject>();
        }
        return this.deleteCbos.toArray(nullCboArray);
    }
    
    public ClientLinkObject[] getDeleteCloArray(){
    public LinkObject[] getDeleteCloArray(){
        if( this.deleteClos == null){
            this.deleteClos = new HashSet<ClientLinkObject>();
            this.deleteClos = new HashSet<LinkObject>();
        }
        return this.deleteClos.toArray(nullCloArray);
    }
    public Set<ClientBusinessObject> getCreateCbos() {
    public Set<BusinessObject> getCreateCbos() {
        return createCbos;
    }
    public void setCreateCbos(Set<ClientBusinessObject> createCbos) {
    public void setCreateCbos(Set<BusinessObject> createCbos) {
        this.createCbos = createCbos;
    }
    public Set<ClientLinkObject> getCreateClos() {
    public Set<LinkObject> getCreateClos() {
        return createClos;
    }
    public void setCreateClos(Set<ClientLinkObject> createClos) {
    public void setCreateClos(Set<LinkObject> createClos) {
        this.createClos = createClos;
    }
    public Set<ClientBusinessObject> getUpdateCbos() {
    public Set<BusinessObject> getUpdateCbos() {
        return updateCbos;
    }
    public void setUpdateCbos(Set<ClientBusinessObject> updateCbos) {
    public void setUpdateCbos(Set<BusinessObject> updateCbos) {
        this.updateCbos = updateCbos;
    }
    public Set<ClientLinkObject> getUpdateClos() {
    public Set<LinkObject> getUpdateClos() {
        return updateClos;
    }
    public void setUpdateClos(Set<ClientLinkObject> updateClos) {
    public void setUpdateClos(Set<LinkObject> updateClos) {
        this.updateClos = updateClos;
    }
    public Set<ClientBusinessObject> getDeleteCbos() {
    public Set<BusinessObject> getDeleteCbos() {
        return deleteCbos;
    }
    public void setDeleteCbos(Set<ClientBusinessObject> deleteCbos) {
    public void setDeleteCbos(Set<BusinessObject> deleteCbos) {
        this.deleteCbos = deleteCbos;
    }
    public Set<ClientLinkObject> getDeleteClos() {
    public Set<LinkObject> getDeleteClos() {
        return deleteClos;
    }
    public void setDeleteClos(Set<ClientLinkObject> deleteClos) {
    public void setDeleteClos(Set<LinkObject> deleteClos) {
        this.deleteClos = deleteClos;
    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBaseServiceI.java
@@ -1,5 +1,6 @@
package com.vci.web.service;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
@@ -68,7 +69,7 @@
        String sql = (StringUtils.isNotBlank(pageSql)?" select oid,ts,creator,createTime,modifier,modifyTime,name,label,description  from (select A.* , rownum RN from (":"")
                + baseSql+ pageSql ;
        WebBoServiceI boService = ApplicationContextProvider.getApplicationContext().getBean(WebBoServiceI.class);
        List<com.vci.client.bof.ClientBusinessObject> dataMap = boService.queryBySql(sql, null);
        List<BusinessObject> dataMap = boService.queryBySql(sql, null);
        DataGrid<T> dataGrid = new DataGrid<>();
        if(!CollectionUtils.isEmpty(dataMap)){
            List<T> dataList = new ArrayList<>();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLifeCycleServiceI.java
@@ -1,5 +1,6 @@
package com.vci.web.service;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.lcm.LifeCycle;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
@@ -59,7 +60,7 @@
     * @param targetStatus  ç›®æ ‡çŠ¶æ€ï¼Œä¸åŒºåˆ†å¤§å°å†™
     * @throws VciBaseException è½¬æ¢ç”Ÿå‘½å‘¨æœŸå‡ºé”™çš„æ—¶å€™æŠ›å‡ºå¼‚常
     */
    void transCboStatus(List<com.vci.client.bof.ClientBusinessObject> cboList, String targetStatus) throws VciBaseException;
    void transCboStatus(List<BusinessObject> cboList, String targetStatus) throws VciBaseException;
    /**
     * é€šè¿‡ç¼–号获取生命周期状态对象,
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIDataServiceI.java
@@ -1,7 +1,9 @@
package com.vci.web.service;
import com.vci.client.bof.RevisionValueObject;
import com.vci.client.bof.VersionValueObject;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.omd.data.RevisionDataInfo;
import com.vci.corba.omd.data.VersionDataInfo;
import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.model.BaseModel;
@@ -69,7 +71,7 @@
     * @return æ‰§è¡Œçš„结果
     * @throws VciBaseException æ‰§è¡Œå‡ºé”™çš„会抛出异常,或者事件直接返回了异常
     */
    BaseResult callPostEvent(Collection<com.vci.client.bof.ClientBusinessObject> cbos, Collection<com.vci.client.bof.ClientLinkObject> clos, String postEvent, VciChangeDocumentTypeEnum businessType) throws VciBaseException;
    BaseResult callPostEvent(Collection<BusinessObject> cbos, Collection<LinkObject> clos, String postEvent, VciChangeDocumentTypeEnum businessType) throws VciBaseException;
    /**
     * è¡¨å•数据转换为基础对象
@@ -112,7 +114,7 @@
     * @param cbo ä¸šåŠ¡æ•°æ®å¯¹è±¡
     * @return åŸºç¡€å¯¹è±¡
     */
    BaseModel cbo2BaseModel(com.vci.client.bof.ClientBusinessObject cbo);
    BaseModel cbo2BaseModel(BusinessObject cbo);
    /**
     * ä¸šåŠ¡æ•°æ®è¡¨å•å¯¹è±¡è½¬æ¢ä¸ºåŸºç¡€çš„å±žæ€§
@@ -134,7 +136,7 @@
     * @param baseModel åŸºç¡€å¯¹è±¡
     * @return ç‰ˆæœ¬çš„对象
     */
    RevisionValueObject getNextRevision(OsBtmTypeVO btmTypeVO, BaseModel baseModel);
    RevisionDataInfo getNextRevision(OsBtmTypeVO btmTypeVO, BaseModel baseModel);
    /**
     * èŽ·å–ä¸‹ä¸€ä¸ªç‰ˆæ¬¡çš„å·
@@ -142,7 +144,7 @@
     * @param baseModel åŸºç¡€å¯¹è±¡
     * @return ç‰ˆæœ¬çš„值对象
     */
    VersionValueObject getNextVersion(OsBtmTypeVO btmTypeVO, BaseModel baseModel);
    VersionDataInfo getNextVersion(OsBtmTypeVO btmTypeVO, BaseModel baseModel);
    /**
     * èŽ·å–ç¬¬ä¸€ä¸ªç‰ˆæ¬¡
@@ -206,7 +208,7 @@
     * @param cbo ä¸šåŠ¡ç±»åž‹çš„å¯¹è±¡
     * @param editFlag æ˜¯å¦ä¸ºç¼–辑
     */
    void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, com.vci.client.bof.ClientBusinessObject cbo, boolean editFlag);
    void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, BusinessObject cbo, boolean editFlag);
    /**
     * é“¾æŽ¥ç±»åž‹çš„编辑数据
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebBoServiceI.java
@@ -1,8 +1,9 @@
package com.vci.web.service;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.common.qt.object.Condition;
import com.vci.common.qt.object.QueryTemplate;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
@@ -40,7 +41,7 @@
     * @return
     * @throws VciBaseException
     */
     ClientBusinessObject createCBOByBtmName(String btmName) throws VciBaseException;
     BusinessObject createCBOByBtmName(String btmName) throws VciBaseException;
    
    /**
     * æ ¹æ®æŸ¥è¯¢æ¡ä»¶æ¥æŸ¥è¯¢ä¸šåŠ¡ç±»åž‹ä¸‹çš„æ•°æ®
@@ -49,7 +50,7 @@
     * @return
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBO(String btmType, Map<String, String> conditionMap) throws VciBaseException;
     List<BusinessObject> queryCBO(String btmType, Map<String, String> conditionMap) throws VciBaseException;
    
    /**
     * æ”¯æŒæŽ’序和分页的查询业务类型下的数据
@@ -59,7 +60,7 @@
     * @return 
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBO(String btmType, Map<String, String> conditionMap, PageHelper ph) throws VciBaseException;
     List<BusinessObject> queryCBO(String btmType, Map<String, String> conditionMap, PageHelper ph) throws VciBaseException;
    
    /**
     * æ”¯æŒè‡ªå®šä¹‰æŸ¥è¯¢å­—段(包括参照、枚举和生命周期)
@@ -70,7 +71,7 @@
     * @return
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBO(String btmType, Map<String, String> conditionMap, PageHelper ph, List<String> clauseList) throws VciBaseException;
     List<BusinessObject> queryCBO(String btmType, Map<String, String> conditionMap, PageHelper ph, List<String> clauseList) throws VciBaseException;
    /**
     * æ‹·è´åˆ†é¡µå’ŒæŽ’序的设置到查询模板
@@ -86,7 +87,7 @@
     * @param enumAttrName æžšä¸¾çš„名称
     * @throws VciBaseException æŸ¥è¯¢æžšä¸¾å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    void queryEnumText(com.vci.client.bof.ClientBusinessObject cbo, com.vci.client.bof.ClientLinkObject clo, List<String> enumAttrName) throws VciBaseException;
    void queryEnumText(BusinessObject cbo, LinkObject clo, List<String> enumAttrName) throws VciBaseException;
    /**
     * ç»™é“¾æŽ¥ç±»åž‹è®¾ç½®å±žæ€§
@@ -94,7 +95,7 @@
     * @param attributeName å±žæ€§çš„名称
     * @param attributeValue å±žæ€§çš„值
     */
     void setAttributeValueForClo(com.vci.client.bof.ClientLinkObject clo, String attributeName, String attributeValue);
     void setAttributeValueForClo(LinkObject clo, String attributeName, String attributeValue);
    /**
     * ä½¿ç”¨æŸ¥è¯¢æ–¹æ¡ˆæ¥æŸ¥è¯¢æ•°æ®ï¼Œè¿”回CBO
@@ -104,7 +105,7 @@
     * @return
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException;
     List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException;
    
    /**
     * ä½¿ç”¨æŸ¥è¯¢æ–¹æ¡ˆæ¥æŸ¥è¯¢æ•°æ®ï¼Œè¿”回CBO,支持分页
@@ -115,7 +116,7 @@
     * @return
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException;
     List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException;
    /**
     * ä½¿ç”¨åå­—获取查询模板
@@ -136,7 +137,7 @@
     * @return
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException;
     List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException;
    
    /**
     * æŸ¥è¯¢æ•°é‡
@@ -182,7 +183,7 @@
     * @return CBO
     * @throws VciBaseException
     */
     List<com.vci.client.bof.ClientBusinessObject> queryBySql(String sql, Map<String, String> conditionMap) throws VciBaseException;
     List<BusinessObject> queryBySql(String sql, Map<String, String> conditionMap) throws VciBaseException;
    /**
     * åªç”¨sql语句查询,这个和queryBySql区别是,特殊的sql(如包含有函数的)可以用这个方法,但是有sql注入风险
@@ -190,7 +191,7 @@
     * @return CBO
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™æ´»æŠ›å‡ºå¼‚常
     */
    List<com.vci.client.bof.ClientBusinessObject> queryByOnlySql(String sql) throws VciBaseException;
    List<BusinessObject> queryByOnlySql(String sql) throws VciBaseException;
    /**
     * åªç”¨sql语句查询,这个和queryBySqlForMap区别是,特殊的sql(如包含有函数的)可以用这个方法,但是有sql注入风险
@@ -474,36 +475,36 @@
     DataGrid queryGridClassByScheme(String queryScheme, Class c, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException;
    
    /**
     * ClientBusinessObject è½¬ä¸ºHashMap
     * BusinessObject è½¬ä¸ºHashMap
     * @param cbos CBOS
     * @return map
     * @throws VciBaseException
     */
     List<Map> cbos2Map(List<ClientBusinessObject> cbos) throws VciBaseException;
     List<Map> cbos2Map(List<BusinessObject> cbos) throws VciBaseException;
    
    /**
     * ClientBusinessObject è½¬ä¸ºHashMap
     * BusinessObject è½¬ä¸ºHashMap
     * @param cbo
     * @return
     * @throws VciBaseException
     */
     Map cbo2Map(com.vci.client.bof.ClientBusinessObject cbo) throws VciBaseException;
     Map cbo2Map(BusinessObject cbo) throws VciBaseException;
    
    /**
     * map转为clientBusinessObject
     * map转为BusinessObject
     * @param map 
     * @return
     * @throws VciBaseException
     */
     List<ClientBusinessObject> map2Cbos(List<Map> map) throws VciBaseException;
     List<BusinessObject> map2Cbos(List<Map> map) throws VciBaseException;
    
    /**
     * map转为clientBusinessObject
     * map转为BusinessObject
     * @param map
     * @return
     * @throws VciBaseException
     */
     ClientBusinessObject map2Cbo(Map map) throws VciBaseException;
     BusinessObject map2Cbo(Map map) throws VciBaseException;
    
    /**
     * æ‰¹é‡ä¿å­˜ä¸šåŠ¡ç±»åž‹å’Œé“¾æŽ¥ç±»åž‹çš„ä¿¡æ¯
@@ -572,7 +573,7 @@
     * @return cbo
     * @throws VciBaseException å‚数为空,数据不存在会抛出异常
     */
    ClientBusinessObject selectCBOByOid(String oid,String btmName) throws VciBaseException;
    BusinessObject selectCBOByOid(String oid,String btmName) throws VciBaseException;
    
    /**
     * ä½¿ç”¨ä¸»é”®é›†åˆèŽ·å–å¯¹è±¡
@@ -590,7 +591,7 @@
     * @return ä¸šåŠ¡æ•°æ®çš„é›†åˆ
     * @throws VciBaseException å‚数为空,查询出错会抛出异常
     */
    List<ClientBusinessObject> selectCBOByOidCollection(Collection<String> oidCollection,String btmName) throws VciBaseException;
    List<BusinessObject> selectCBOByOidCollection(Collection<String> oidCollection,String btmName) throws VciBaseException;
    /**
     * ä½¿ç”¨æ–°çš„æŸ¥è¯¢å°è£…器来查询
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebLoServiceI.java
@@ -1,8 +1,7 @@
package com.vci.web.service;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.bof.ClientLinkObjectOperation;
import com.vci.corba.omd.data.AttributeValue;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
@@ -16,12 +15,6 @@
public interface WebLoServiceI {
    /**
     * èŽ·å–å¹³å°çš„é“¾æŽ¥ç±»åž‹çš„æ“ä½œç±»
     * @return
     * @throws VciBaseException
     */
     ClientLinkObjectOperation getLoOption() throws VciBaseException;
    /**
     * æ ¹æ®æŸ¥è¯¢æ¡ä»¶æ¥æŸ¥è¯¢é“¾æŽ¥ç±»åž‹
@@ -30,7 +23,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientLinkObject>  queryCLO(String linkType, Map<String, String> conditionMap) throws VciBaseException;
     List<LinkObject>  queryCLO(String linkType, Map<String, String> conditionMap) throws VciBaseException;
    /**
     * æ ¹æ®æŸ¥è¯¢æ¡ä»¶æ¥æŸ¥è¯¢é“¾æŽ¥ç±»åž‹
@@ -40,7 +33,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientBusinessObject> queryLinkCbo(String linkType, String toBtmname, Map<String, String> conditionMap) throws VciBaseException;
     List<BusinessObject> queryLinkCbo(String linkType, String toBtmname, Map<String, String> conditionMap) throws VciBaseException;
    /**
     * æŸ¥è¯¢é“¾æŽ¥ç±»åž‹
@@ -51,7 +44,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientLinkObject> queryCLO(String linkType, String toBtmName, int level, Map<String, String> conditionMap) throws VciBaseException;
     List<LinkObject> queryCLO(String linkType, String toBtmName, int level, Map<String, String> conditionMap) throws VciBaseException;
    /**
     * æŸ¥è¯¢to端的业务类型
@@ -62,7 +55,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientBusinessObject> queryLinkCbo(String linkType, String toBtmname, int level, Map<String, String> conditionMap) throws VciBaseException;
     List<BusinessObject> queryLinkCbo(String linkType, String toBtmname, int level, Map<String, String> conditionMap) throws VciBaseException;
    /**
     * æŸ¥è¯¢é“¾æŽ¥ç±»åž‹
@@ -74,7 +67,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientLinkObject> queryCLO(String linkType, String toBtmName,
     List<LinkObject> queryCLO(String linkType, String toBtmName,
                                     int level, boolean isDirection, Map<String, String> conditionMap)
            throws VciBaseException;
@@ -89,7 +82,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientLinkObject> queryCLO(String linkType, String toBtmName,
     List<LinkObject> queryCLO(String linkType, String toBtmName,
                                     int level, boolean isDirection, Map<String, String> conditionMap, PageHelper ph)
            throws VciBaseException;
@@ -103,7 +96,7 @@
     * @return
     * @throws VciBaseException
     */
     List<ClientBusinessObject> queryLinkCbo(String linkType, String toBtmname,
     List<BusinessObject> queryLinkCbo(String linkType, String toBtmname,
                                             int level, boolean isDirection, Map<String, String> conditionMap)
            throws VciBaseException;
@@ -114,7 +107,7 @@
     * @return
     * @throws VciBaseException
     */
     Map<String,com.vci.client.bof.ClientBusinessObject> queryLinkedCbo(LinkObject[] lo, boolean isDirection) throws VciBaseException;
     Map<String,BusinessObject> queryLinkedCbo(LinkObject[] lo, boolean isDirection) throws VciBaseException;
    /**
     *查询链接类型某端的业务类型
@@ -123,16 +116,16 @@
     * @return
     * @throws VciBaseException
     */
     Map<String,com.vci.client.bof.ClientBusinessObject> queryLinkedCbo(List los, boolean isDirection) throws VciBaseException;
     Map<String,BusinessObject> queryLinkedCbo(List los, boolean isDirection) throws VciBaseException;
    /**
     *查询链接类型某端的业务类型
     * @param clo é“¾æŽ¥ç±»åž‹å¯¹è±¡
     * @param isDirection æ˜¯å¦åå‘
     * @return
     * @throws VciBaseException
     */
     Map<String,com.vci.client.bof.ClientBusinessObject> queryLinkedCbo(ClientLinkObject[] clo, boolean isDirection) throws VciBaseException;
//    /**
//     *查询链接类型某端的业务类型
//     * @param clo é“¾æŽ¥ç±»åž‹å¯¹è±¡
//     * @param isDirection æ˜¯å¦åå‘
//     * @return
//     * @throws VciBaseException
//     */
//     Map<String,BusinessObject> queryLinkedCbo(LinkObject[] clo, boolean isDirection) throws VciBaseException;
    /**
     * æŸ¥è¯¢é“¾æŽ¥ç±»åž‹æŸç«¯çš„业务类型
@@ -142,7 +135,7 @@
     * @return
     * @throws VciBaseException
     */
     Map<String, com.vci.client.bof.ClientBusinessObject> queryLinkedCbo(ClientLinkObject[] clol,
     Map<String, BusinessObject> queryLinkedCbo(LinkObject[] clol,
                                                      boolean isDirection, List<String> queryColumn) throws VciBaseException;
    /**
@@ -153,40 +146,40 @@
     * @return
     * @throws VciBaseException
     */
     Map<String, ClientBusinessObject> queryLinkedCbo(List los,
     Map<String, BusinessObject> queryLinkedCbo(List los,
                                                      boolean isDirection, List<String> queryColumn) throws VciBaseException;
    
     /**
     * ClientLinkObject è½¬ä¸ºHashMap
     * LinkObject è½¬ä¸ºHashMap
     * @param clos clos
     * @return map
     * @throws VciBaseException
     */
     List<Map> clos2Map(List<ClientLinkObject> clos) throws VciBaseException;
     List<Map> clos2Map(List<LinkObject> clos) throws VciBaseException;
    
    /**
     * ClientLinkObject è½¬ä¸ºHashMap
     * LinkObject è½¬ä¸ºHashMap
     * @param clo
     * @return
     * @throws VciBaseException
     */
     Map clo2Map(ClientLinkObject clo) throws VciBaseException;
     Map clo2Map(LinkObject clo) throws VciBaseException;
    
    /**
     * map转为ClientLinkObject
     * map转为LinkObject
     * @param map 
     * @return
     * @throws VciBaseException
     */
     List<ClientLinkObject> map2Clos(List<Map> map) throws VciBaseException;
     List<LinkObject> map2Clos(List<Map> map) throws VciBaseException;
    
    /**
     * map转为ClientLinkObject
     * map转为LinkObject
     * @param map
     * @return
     * @throws VciBaseException
     */
     ClientLinkObject map2Clo(Map map) throws VciBaseException;
     LinkObject map2Clo(Map map) throws VciBaseException;
    /**
     * ä¿å­˜é“¾æŽ¥ç±»åž‹å¯¹è±¡
@@ -194,7 +187,7 @@
     * @return
     * @throws VciBaseException
     */
    List<ClientLinkObject> saveClientLinkObjects(List<ClientLinkObject> clos) throws VciBaseException;
    List<LinkObject> saveLinkObjects(List<LinkObject> clos) throws VciBaseException;
    /**
     * åˆ›å»ºè¿žæŽ¥ç±»åž‹
@@ -202,7 +195,7 @@
     * @return
     * @throws VciBaseException
     */
    ClientLinkObject createClientLinkObject(String loName) throws VciBaseException;
    LinkObject createLinkObject(String loName) throws VciBaseException;
    /**
     * æ‹·è´é“¾æŽ¥ç±»åž‹
@@ -210,21 +203,21 @@
     * @return
     * @throws VciBaseException
     */
    ClientLinkObject cloneClientLinkObject(ClientLinkObject clo) throws VciBaseException;
    LinkObject cloneLinkObject(LinkObject clo) throws VciBaseException;
    /**
     * åˆ é™¤é“¾æŽ¥ç±»åž‹
     * @param clos é“¾æŽ¥ç±»åž‹çš„内容
     * @throws VciBaseException
     */
    void deleteClientLinkObjects(List<ClientLinkObject> clos) throws VciBaseException;
    void deleteLinkObjects(List<LinkObject> clos) throws VciBaseException;
    /**
     * æ›´æ–°é“¾æŽ¥ç±»åž‹
     * @param clos é“¾æŽ¥ç±»åž‹çš„对象
     * @throws VciBaseException æ‰§è¡Œå‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    void updateClientLinkObject(List<ClientLinkObject> clos) throws VciBaseException;
    void updateLinkObject(List<LinkObject> clos) throws VciBaseException;
    /**
     * æŸ¥è¯¢é“¾æŽ¥ç±»åž‹å’Œä¸šåŠ¡ç±»åž‹
@@ -272,8 +265,8 @@
     * @param attributeName å±žæ€§åç§°
     * @param attributeValue å±žæ€§çš„值
     */
    public default void setAttribute(com.vci.client.bof.ClientLinkObject clo,String attributeName,String attributeValue){
        com.vci.corba.omd.data.AttributeValue[] attrValues =clo.getLinkObject().newAttrValList;
    public default void setAttribute(LinkObject clo,String attributeName,String attributeValue){
        com.vci.corba.omd.data.AttributeValue[] attrValues =clo.newAttrValList;
        ArrayList<com.vci.corba.omd.data.AttributeValue> attrValList = new ArrayList();
        com.vci.corba.omd.data.AttributeValue attrVal;
        int i;
@@ -306,6 +299,6 @@
            attrValList.add(attrVal);
        }
        clo.getLinkObject().newAttrValList = (com.vci.corba.omd.data.AttributeValue[])attrValList.toArray(new com.vci.corba.omd.data.AttributeValue[attrValList.size()]);
        clo.newAttrValList = attrValList.toArray(new AttributeValue[attrValList.size()]);
    };
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LoginServiceImpl.java
@@ -12,6 +12,8 @@
import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum;
import com.vci.frameworkcore.pagemodel.SmFunctionVO;
import com.vci.frameworkcore.pagemodel.SmUserVO;
import com.vci.frameworkcore.properties.VciSecurityManageProperties;
import com.vci.starter.web.annotation.bus.VciLoginAfter;
@@ -40,6 +42,7 @@
import javax.annotation.Resource;
import java.lang.reflect.Method;
import java.util.Date;
import java.util.List;
import java.util.Map;
import static com.vci.frameworkcore.constant.FrameWorkBusLangCodeConstant.*;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
@@ -24,7 +24,8 @@
import java.util.*;
import java.util.stream.Collectors;
import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*;
//import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*;
import static com.vci.omd.constants.AttributeConstants.*;
/**
 * å±žæ€§æ± æœåŠ¡  --已经调用了平台的服务,因此不在提供Dao层
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsEnumServiceImpl.java
@@ -1,8 +1,10 @@
package com.vci.web.service.impl;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.etm.EnumItem;
import com.vci.corba.omd.etm.EnumType;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.enumpck.UserSecretEnum;
import com.vci.starter.web.exception.VciBaseException;
@@ -323,8 +325,8 @@
    @Override
    public List<KeyValue> getDataEnum(String oid, String btmname) {
        VciBaseUtil.alertNotNull(oid,"业务数据的主键",btmname,"业务类型");
        com.vci.client.bof.ClientBusinessObject cbo = boService.selectCBOByOid(oid, btmname);
        String secret = cbo.getAttributeValue("secretGrade");
        BusinessObject cbo = boService.selectCBOByOid(oid, btmname);
        String secret = ObjectTool.getBOAttributeValue(cbo,"secretGrade");
        if(StringUtils.isBlank(secret)){
            return new ArrayList<>();
        }else{
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLifeCycleServiceImpl.java
@@ -1,6 +1,7 @@
package com.vci.web.service.impl;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.lcm.Bound;
import com.vci.corba.omd.lcm.LifeCycle;
import com.vci.corba.omd.lcm.TransitionVO;
@@ -151,12 +152,12 @@
     * @throws VciBaseException è½¬æ¢ç”Ÿå‘½å‘¨æœŸå‡ºé”™çš„æ—¶å€™æŠ›å‡ºå¼‚常
     */
    @Override
    public void transCboStatus(List<com.vci.client.bof.ClientBusinessObject> cboList,
    public void transCboStatus(List<BusinessObject> cboList,
            String targetStatus) throws VciBaseException {
        WebUtil.alertNotNull(cboList,"业务数据对象",targetStatus,"目标对象");
        com.vci.corba.omd.data.BusinessObject[] bos = new com.vci.corba.omd.data.BusinessObject[cboList.size()];
        BusinessObject[] bos = new BusinessObject[cboList.size()];
        for(int i = 0 ; i < cboList.size() ; i ++){
            bos[i] = cboList.get(i).getBusinessObject();
            bos[i] = cboList.get(i);
        }
        transStatus(bos, targetStatus);
    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -1,7 +1,9 @@
package com.vci.web.service.impl;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.pagemodel.BaseQueryObject;
@@ -270,11 +272,11 @@
                    "inner JOIN user_col_comments c on t.TABLE_NAME  = c.table_name and t.COLUMN_NAME = c.column_name where " +
                    "t.table_name = '" + VciBaseUtil.getTableName(btmTypeVO.getId()).toUpperCase(Locale.ROOT) + "' order by t.column_name asc";
            Map<String, OsBtmTypeAttributeVO> attributeVOMap = btmTypeVO.getAttributes().stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
            List<com.vci.client.bof.ClientBusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>());
            List<BusinessObject> cbosList = boService.queryBySql(sql, new HashMap<>());
            if(!CollectionUtils.isEmpty(cbosList)){
                cbosList.stream().forEach(cbo->{
                    String attrId = cbo.getAttributeValue("column_name");
                    String dataType = cbo.getAttributeValue("data_type");
                    String attrId = ObjectTool.getBOAttributeValue(cbo,"column_name");
                    String dataType = ObjectTool.getBOAttributeValue(cbo,"data_type");
                    if(StringUtils.isNotBlank(dataType) && dataType.contains("(")){
                        dataType = dataType.substring(0,dataType.indexOf("("));
                    }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmOperationServiceImpl.java
@@ -1,5 +1,7 @@
package com.vci.web.service.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.pageModel.SmOperationVO;
import com.vci.web.service.SmOperationServiceI;
@@ -37,27 +39,27 @@
        String sql = "select f.ploid from plfunction f where  lower(f.plmoduleno) = :functionId";
        Map<String,String> conditionMap = new HashMap<>();
        conditionMap.put("functionId",functionId.toLowerCase(Locale.ROOT).trim());
        List<com.vci.client.bof.ClientBusinessObject> functionCbos = boService.queryBySql(sql, conditionMap);
        List<BusinessObject> functionCbos = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(functionCbos)){
            //都没有这个功能
            return new ArrayList<>();
        }
        String functionOid = functionCbos.get(0).getAttributeValue("ploid");
        String functionOid = ObjectTool.getBOAttributeValue(functionCbos.get(0), "ploid");
        conditionMap.clear();
        conditionMap.put("functionOid",functionOid);
        sql = "select rf.plrightvalue from PLROLERIGHT rf left join pluserrole ur on rf.plroleoid = ur.plroleuid " +
                " where ur.pluseruid =:useroid and rf.plfuncoid = :functionOid";
        conditionMap.put("useroid",VciBaseUtil.getCurrentUserOid());
        List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, conditionMap);
        List<BusinessObject> cbos = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(cbos)){
            //没有授权
            return new ArrayList<>();
        }
        long rightValue = VciBaseUtil.getLong(cbos.get(0).getAttributeValue("plrightvalue"));
        long rightValue = VciBaseUtil.getLong(ObjectTool.getBOAttributeValue(cbos.get(0), "plrightvalue"));
        //获取具体包含哪些按钮
        sql = "select o.ploperoid,o.plno from PLFUNCOPERATION o where o.plfuncoid = :functionOid ";
        conditionMap.remove("useroid");
        List<com.vci.client.bof.ClientBusinessObject> operationLinkCbos = boService.queryBySql(sql, conditionMap);
        List<BusinessObject> operationLinkCbos = boService.queryBySql(sql, conditionMap);
        if(CollectionUtils.isEmpty(operationLinkCbos)){
            //根本没有按钮
            return new ArrayList<>();
@@ -66,8 +68,8 @@
        List<String> hasRightOids = new ArrayList<>();
        Map<String,Integer> oidOrderMap = new HashMap<>();
        operationLinkCbos.stream().forEach(cbo->{
            String operationOid = cbo.getAttributeValue("ploperoid");
            int orderNo = VciBaseUtil.getInt(cbo.getAttributeValue("plno"));
            String operationOid = ObjectTool.getBOAttributeValue(cbo,"ploperoid");
            int orderNo = VciBaseUtil.getInt(ObjectTool.getBOAttributeValue(cbo,"plno"));
            if(hasRight(rightValue,orderNo)){
                hasRightOids.add(operationOid);
                oidOrderMap.put(operationOid,orderNo);
@@ -78,17 +80,17 @@
            return new ArrayList<>();
        }
        sql = "select ploid as oid,plname,pluniqueflag,pldesc,plalias,plsequence from ploperation where ploid in (" + VciBaseUtil.toInSql(hasRightOids.toArray(new String[0])) + ")";
        List<com.vci.client.bof.ClientBusinessObject> opertionCBOs = boService.queryBySql(sql, new HashMap<>());
        List<BusinessObject> opertionCBOs = boService.queryBySql(sql, new HashMap<>());
        List<SmOperationVO> operationVOS = new ArrayList<>();
        Optional.ofNullable(opertionCBOs).orElseGet(()->new ArrayList<>()).stream().forEach(cbo->{
            SmOperationVO operationVO = new SmOperationVO();
            operationVO.setFunctionOid(functionOid);
            operationVO.setOid(cbo.getOid());
            operationVO.setUniqueFlag(cbo.getAttributeValue("pluniqueflag"));
            operationVO.setName(cbo.getAttributeValue("plname"));
            operationVO.setAlias(cbo.getAttributeValue("plalias"));
            operationVO.setOid(cbo.oid);
            operationVO.setUniqueFlag(ObjectTool.getBOAttributeValue(cbo,"pluniqueflag"));
            operationVO.setName(ObjectTool.getBOAttributeValue(cbo,"plname"));
            operationVO.setAlias(ObjectTool.getBOAttributeValue(cbo,"plalias"));
            operationVO.setOrderNo(String.valueOf(oidOrderMap.get(operationVO.getOid())));
            operationVO.setDescription(cbo.getAttributeValue("pldesc"));
            operationVO.setDescription(ObjectTool.getBOAttributeValue(cbo,"pldesc"));
            operationVO.setModuleNo(functionId);
            operationVOS.add(operationVO);
        });
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -1,9 +1,6 @@
package com.vci.web.service.impl;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.bof.RevisionValueObject;
import com.vci.client.bof.VersionValueObject;
import com.vci.client.common.providers.ClientServiceProvider;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
@@ -13,6 +10,7 @@
import com.vci.file.pagemodel.VciFileObjectVO;
import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus;
import com.vci.frameworkcore.lcstatuspck.ReleaseDataLCStatus;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.revision.bo.TreeWrapperOptions;
import com.vci.starter.web.annotation.bus.VciChangeDataAfter;
import com.vci.starter.web.annotation.bus.VciChangeDataBefore;
@@ -250,7 +248,7 @@
        UIFormDataVO formDataVO = new UIFormDataVO();
        replaceMap.put("oid", formQuery.getOid().trim());
        if(!formDefineVO.isLinkTypeFlag()) {
            List<com.vci.client.bof.ClientBusinessObject> cbos = null;
            List<BusinessObject> cbos = null;
            if (StringUtils.isNotBlank(queryTemplate)) {
                replaceMap.put("oid", formQuery.getOid().trim());
                cbos = boService.queryCBOByScheme(queryTemplate, conditionMap, replaceMap, null, queryFieldList.stream().collect(Collectors.toList()));
@@ -259,7 +257,7 @@
                cbos = boService.queryCBO(formQuery.getBtmname(), conditionMap, null, queryFieldList.stream().collect(Collectors.toList()));
            }
            if (!CollectionUtils.isEmpty(cbos)) {
                com.vci.client.bof.ClientBusinessObject cbo = cbos.get(0);
                BusinessObject cbo = cbos.get(0);
                formDataVO.setData(boService.cbo2Map(cbo));
            } else {
                throw new VciBaseException(DATA_OID_NOT_EXIST);
@@ -394,7 +392,7 @@
            if(treeQuery.isQueryRoot()){
                //是查询根节点
                List<com.vci.client.bof.ClientBusinessObject> rootCbos = null;
                List<BusinessObject> rootCbos = null;
                if(StringUtils.isNotBlank(queryTemplate)){
                    //说明是菜单里定义了查询模板的
                    rootCbos = boService.queryCBOByScheme(queryTemplate, null, replaceMap);
@@ -430,7 +428,7 @@
                return rootTreeList;
            }else{
                //这个不是跟节点,但是一般只是增加一个逐级查询,因为全部查询的时候,在根节点已经全部查询完了
                List<com.vci.client.bof.ClientBusinessObject> thisChildren = null;
                List<BusinessObject> thisChildren = null;
                if (StringUtils.isNotBlank(queryTemplate)) {
                    thisChildren = boService.queryCBOByScheme(queryTemplate, treeQuery.getConditionMap(), replaceMap, null, queryFieldList);
                } else {
@@ -545,7 +543,7 @@
     */
    private void queryTreeForBO(List<Tree> rootTreeList, String queryTemplate,List<String> queryFieldList,TreeQueryObject treeQueryObject) {
        for (Tree rootTree : rootTreeList) {
            List<com.vci.client.bof.ClientBusinessObject> thisChildren = null;
            List<BusinessObject> thisChildren = null;
            Map<String,String> sourceDataMap = rootTree.getAttributes();
            sourceDataMap.put("f_oid",rootTree.getOid());
            Map<String,String> conditionMap = new HashMap<>();
@@ -592,7 +590,7 @@
     * @param parentOid ä¸Šçº§çš„主键
     * @return æ ‘
     */
    private List<Tree> cbo2Trees(Collection<com.vci.client.bof.ClientBusinessObject> cbos,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){
    private List<Tree> cbo2Trees(Collection<BusinessObject> cbos,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){
        final int[] i = {0};
        List<Tree> rootList = new ArrayList<>();
        List<Tree> children = new ArrayList<>();
@@ -601,7 +599,7 @@
            tree.setOid(getValueByExpress(cbo,valueField));
            tree.setText(getValueByExpress(cbo,textField));
            if(StringUtils.isNotBlank(parentFieldName)){
                tree.setParentId(cbo.getAttributeValue(parentFieldName));
                tree.setParentId(ObjectTool.getBOAttributeValue(cbo,parentFieldName));
            }
            tree.setAttributes(boService.cbo2Map(cbo));
            tree.setIndex(i[0] + "");
@@ -636,10 +634,10 @@
        List<Tree> children = new ArrayList<>();
        boAndLOS.stream().forEach(boAndLO->{
            Tree tree = new Tree();
            com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject();
            cbo.setBusinessObject(boAndLO.bo);
            com.vci.client.bof.ClientLinkObject clo = new com.vci.client.bof.ClientLinkObject();
            clo.setLinkObject(boAndLO.lo);
            BusinessObject cbo = new BusinessObject();
            cbo = boAndLO.bo;
            LinkObject clo = new LinkObject();
            clo = boAndLO.lo;
            Map<String,String> cloMap = loService.clo2Map(clo);
            Map<String,String> cbo2Map = boService.cbo2Map(cbo);
            if(!CollectionUtils.isEmpty(cbo2Map)){
@@ -653,9 +651,9 @@
                tree.setParentId(boAndLO.lo.oid + TREE_NODE_ID_SEP + boAndLO.lo.fromOid);
            }else {
                if (parentFieldName.contains(".")) {
                    tree.setParentId(cbo.getAttributeValue(parentFieldName));
                    tree.setParentId(ObjectTool.getBOAttributeValue(cbo,parentFieldName));
                } else {
                    tree.setParentId(clo.getAttributeValue(parentFieldName));
                    tree.setParentId(ObjectTool.getLOAttributeValue(clo,parentFieldName));
                }
            }
@@ -680,7 +678,7 @@
     * @param fieldExpress è¡¨è¾¾å¼çš„值
     * @return è½¬æ¢åŽçš„值
     */
    private String getValueByExpress(com.vci.client.bof.ClientBusinessObject cbo,String fieldExpress){
    private String getValueByExpress(BusinessObject cbo,String fieldExpress){
        if(StringUtils.isBlank(fieldExpress)){
            return "";
        }
@@ -691,7 +689,7 @@
            List<String> fieldList = VciBaseUtil.str2List(fieldExpress);
            StringBuilder sb = new StringBuilder();
            fieldList.stream().forEach(field->{
                sb.append(cbo.getAttributeValue(field)).append(" ");
                sb.append(ObjectTool.getBOAttributeValue(cbo,field)).append(" ");
            });
            return sb.toString().trim();
        }
@@ -872,12 +870,12 @@
     * @throws VciBaseException æ‰§è¡Œå‡ºé”™çš„会抛出异常,或者事件直接返回了异常
     */
    @Override
    public BaseResult callPostEvent(Collection<com.vci.client.bof.ClientBusinessObject> cbos, Collection<com.vci.client.bof.ClientLinkObject> clos, String postEvent, VciChangeDocumentTypeEnum businessType) throws VciBaseException{
    public BaseResult callPostEvent(Collection<BusinessObject> cbos, Collection<LinkObject> clos, String postEvent, VciChangeDocumentTypeEnum businessType) throws VciBaseException{
        if(CollectionUtils.isEmpty(cbos)){
            return BaseResult.success();
        }
        String btmType = !CollectionUtils.isEmpty(cbos)?cbos.stream().findFirst().get().getBtmName():null;
        String linkType = !CollectionUtils.isEmpty(clos)?clos.stream().findFirst().get().getLinkObject().ltName:null;
        String btmType = !CollectionUtils.isEmpty(cbos)?cbos.stream().findFirst().get().btName:null;
        String linkType = !CollectionUtils.isEmpty(clos)?clos.stream().findFirst().get().ltName:null;
        if(StringUtils.isNotBlank(postEvent)){
            //前置事件
            //bean的名字#方法; æˆ–者全路径。最后一个是方法的名字
@@ -1063,32 +1061,32 @@
            return beforeResult;
        }
        //封装数据
        BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,false,false);
        BaseResult<BusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,false,false);
        if(!resultCbo.isSuccess()){
            return BaseResult.fail(resultCbo.getMsg(),resultCbo.getMsgObjs());
        }
        //执行保存
        BaseResult<Map<String,Object>> result = BaseResult.success();
        com.vci.client.bof.ClientBusinessObject afterCBO = null;
        BusinessObject afterCBO = null;
        try {
            BusinessObject resultBO = platformClientUtil.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false);
            afterCBO = new com.vci.client.bof.ClientBusinessObject();
            afterCBO.setBusinessObject(resultBO);
            BusinessObject resultBO = platformClientUtil.getBOFService().createBusinessObject(resultCbo.getObj(),false,false);
            afterCBO = new BusinessObject();
            afterCBO = resultBO;
            result.setObj(boService.cbo2Map(afterCBO));
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
            fileObjectService.releasedFile(afterCBO.getBtmName(),afterCBO.getOid(),formDataDTO.getReleaseFileOids());
            fileObjectService.releasedFile(afterCBO.btName,afterCBO.oid,formDataDTO.getReleaseFileOids());
        }
        //后置事件
        String afterEvent = formDataDTO.getPostEvent();
        try {
            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{afterCBO}).collect(Collectors.toList()),null, afterEvent, VciChangeDocumentTypeEnum.ADD);
            callPostEvent(Arrays.stream(new BusinessObject[]{afterCBO}).collect(Collectors.toList()),null, afterEvent, VciChangeDocumentTypeEnum.ADD);
        }catch (Throwable e){
            //说明后置事件出现了错误,那么就需要删除以前的这条数据
            try {
                platformClientUtil.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1);
                platformClientUtil.getBOFService().deleteBusinessObject(afterCBO,1);
            } catch (PLException vciError) {
                throw WebUtil.getVciBaseException(vciError);
            }
@@ -1107,7 +1105,7 @@
     * @param newVersion æ–°ç‰ˆæ¬¡
     * @return  æ‰§è¡Œçš„结果
     */
    private BaseResult<com.vci.client.bof.ClientBusinessObject> wrapperCbo(FormDataDTO formDataDTO,UIFormDefineVO formDefineVO,boolean editFlag,boolean newRevision,boolean newVersion){
    private BaseResult<BusinessObject> wrapperCbo(FormDataDTO formDataDTO,UIFormDefineVO formDefineVO,boolean editFlag,boolean newRevision,boolean newVersion){
        //扩展属性的值
        Map<String, String> data = formDataDTO.getData();
        Map<String,String> dataLow = new HashMap<>();
@@ -1148,7 +1146,7 @@
        if(!result.isSuccess()){
            return result;
        }
        com.vci.client.bof.ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,newRevision,newVersion);
        BusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,newRevision,newVersion);
        return BaseResult.success(cbo);
    }
@@ -1158,41 +1156,41 @@
     * @return åŸºç¡€å¯¹è±¡
     */
    @Override
    public BaseModel cbo2BaseModel(com.vci.client.bof.ClientBusinessObject cbo){
    public BaseModel cbo2BaseModel(BusinessObject cbo){
        BaseModel baseModel = new BaseModel();
        baseModel.setOid(cbo.getOid());
        baseModel.setNameOid(cbo.getNameoid());
        baseModel.setRevisionOid(cbo.getRevisionid());
        baseModel.setBtmname(cbo.getBtmName());
        baseModel.setLastR(String.valueOf(cbo.getIsLastR()));
        baseModel.setLastV(String.valueOf(cbo.getIsLastV()));
        baseModel.setFirstR(String.valueOf(cbo.getIsFirstR()));
        baseModel.setFirstV(String.valueOf(cbo.getIsFirstV()));
        baseModel.setCreator(cbo.getCreator());
        baseModel.setOid(cbo.oid);
        baseModel.setNameOid(cbo.nameoid);
        baseModel.setRevisionOid(cbo.revisionid);
        baseModel.setBtmname(cbo.btName);
        baseModel.setLastR(String.valueOf(cbo.isLastR));
        baseModel.setLastV(String.valueOf(cbo.isLastV));
        baseModel.setFirstR(String.valueOf(cbo.isFirstR));
        baseModel.setFirstV(String.valueOf(cbo.isFirstV));
        baseModel.setCreator(cbo.creator);
        try {
            baseModel.setCreateTime(new Date(cbo.getCreateTime()));
            baseModel.setLastModifyTime(new Date(cbo.getLastModifyTime()));
            baseModel.setTs(new Date(cbo.getTs()));
            baseModel.setCreateTime(new Date(cbo.createTime));
            baseModel.setLastModifyTime(new Date(cbo.modifyTime));
            baseModel.setTs(new Date(cbo.ts));
//            baseModel.setCheckInTime(VciDateUtil.str2Date(cbo.getCheckinTime(), VciDateUtil.DateTimeFormat));
//            baseModel.setCheckOutTime(VciDateUtil.str2Date(cbo.getCheckoutTime(), VciDateUtil.DateTimeFormat));
        }catch (Throwable e){
        }
        baseModel.setLastModifier(cbo.getLastModifier());
        baseModel.setRevisionRule(cbo.getRevisionRule());
        baseModel.setVersionRule(cbo.getVersionRule());
        baseModel.setRevisionSeq(cbo.getRevisionSeq());
        baseModel.setRevisionValue(cbo.getRevisionValue());
        baseModel.setVersionSeq(cbo.getVersionSeq());
        baseModel.setVersionValue(cbo.getVersionValue());
        baseModel.setLcStatus(cbo.getLcStatus());
        baseModel.setId(cbo.getId());
        baseModel.setName(cbo.getName());
        baseModel.setDescription(cbo.getDescription());
        baseModel.setOwner(cbo.getOwner());
        baseModel.setLastModifier(cbo.modifier);
        baseModel.setRevisionRule(cbo.revisionRule);
        baseModel.setVersionRule(cbo.versionRule);
        baseModel.setRevisionSeq(cbo.revisionSeq);
        baseModel.setRevisionValue(cbo.revisionValue);
        baseModel.setVersionSeq(cbo.versionSeq);
        baseModel.setVersionValue(cbo.versionValue);
        baseModel.setLcStatus(cbo.lcStatus);
        baseModel.setId(cbo.id);
        baseModel.setName(cbo.name);
        baseModel.setDescription(cbo.description);
        baseModel.setOwner(cbo.owner);
//        baseModel.setCheckInBy(cbo.getCheckinBy());
//        baseModel.setCheckOutBy(cbo.getCheckoutBy());
        baseModel.setCopyFromVersion(cbo.getCopyFromVersion());
        baseModel.setCopyFromVersion(cbo.fromVersion);
        return baseModel;
    }
@@ -1240,7 +1238,7 @@
     * @return ç‰ˆæœ¬çš„对象
     */
    @Override
    public RevisionValueObject getNextRevision(OsBtmTypeVO btmTypeVO, BaseModel baseModel){
    public RevisionDataInfo getNextRevision(OsBtmTypeVO btmTypeVO, BaseModel baseModel){
        try {
            if(baseModel.getRevisionValue() == null){
                baseModel.setRevisionValue("");
@@ -1256,10 +1254,10 @@
     * @param info corba对象
     * @return java对象
     */
    private RevisionValueObject changeRevisionValueInfoToObject(RevisionDataInfo info) {
        RevisionValueObject object = new RevisionValueObject();
        object.setRevisionVal(info.revisionVal);
        object.setRevisionSeq(info.revisionSeq);
    private RevisionDataInfo changeRevisionValueInfoToObject(RevisionDataInfo info) {
        RevisionDataInfo object = new RevisionDataInfo();
        object.revisionVal = info.revisionVal;
        object.revisionSeq = info.revisionSeq;
        return object;
    }
@@ -1270,7 +1268,7 @@
     * @return ç‰ˆæœ¬çš„值对象
     */
    @Override
    public VersionValueObject getNextVersion(OsBtmTypeVO btmTypeVO, BaseModel baseModel){
    public VersionDataInfo getNextVersion(OsBtmTypeVO btmTypeVO, BaseModel baseModel){
        try{
            return changeRevisionValueInfoToObject(platformClientUtil.getBOFactoryService().getNextVersionValue(WebUtil.getTableName(btmTypeVO.getId()),baseModel.getRevisionOid(),baseModel.getNameOid(),WebUtil.getInt(btmTypeVO.getVersionRule())));
        }catch (PLException vciError){
@@ -1283,10 +1281,10 @@
     * @param info ç‰ˆæ¬¡çš„值
     * @return java对象
     */
    private VersionValueObject changeRevisionValueInfoToObject(VersionDataInfo info) {
        VersionValueObject object = new VersionValueObject();
        object.setVersionVal(info.versionVal);
        object.setVersionSeq(info.versionSeq);
    private VersionDataInfo changeRevisionValueInfoToObject(VersionDataInfo info) {
        VersionDataInfo object = new VersionDataInfo();
        object.versionVal = info.versionVal;
        object.versionSeq = info.versionSeq;
        return object;
    }
    /**
@@ -1331,25 +1329,25 @@
        //封装数据
        List<BusinessObject> addBos = new ArrayList<>();
        List<BusinessObject> afterBOs = new ArrayList<>();
        List<com.vci.client.bof.ClientBusinessObject> afterCBOs = new ArrayList<>();
        List<BusinessObject> afterCBOs = new ArrayList<>();
        Map<String,List<String>> releasedFileOids = new HashMap<>();
        for(FormDataDTO formDataDTO:formDataDTOList.getFormDataDTOS()) {
            BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, false, false, false);
            BaseResult<BusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, false, false, false);
            if (!resultCbo.isSuccess()) {
                return BaseResult.fail(resultCbo.getMsg(), resultCbo.getMsgObjs());
            }
            addBos.add(resultCbo.getObj().getBusinessObject());
            addBos.add(resultCbo.getObj());
            //执行保存
            if (!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())) {
                releasedFileOids.put(resultCbo.getObj().getOid(),formDataDTO.getReleaseFileOids());
                releasedFileOids.put(resultCbo.getObj().oid,formDataDTO.getReleaseFileOids());
            }
        }
        try {
            BusinessObject[] resultBOs = platformClientUtil.getBOFService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false);
            afterBOs = Arrays.stream(resultBOs).collect(Collectors.toList());
            Arrays.stream(resultBOs).forEach(bo->{
                com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject();
                cbo.setBusinessObject(bo);
                BusinessObject cbo = new BusinessObject();
                cbo = bo;
                afterCBOs.add(cbo);
            });
        } catch (PLException vciError) {
@@ -1398,25 +1396,25 @@
            return beforeResult;
        }
        //封装数据
        BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,true,false,false);
        BaseResult<BusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,true,false,false);
        if(!resultCbo.isSuccess()){
            return BaseResult.fail(resultCbo.getMsg(),resultCbo.getMsgObjs());
        }
        //执行保存
         BaseResult<Map<String,Object>> result = BaseResult.success();
        try {
            platformClientUtil.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject());
            platformClientUtil.getBOFService().updateBusinessObject(resultCbo.getObj());
            result.setObj(boService.cbo2Map(resultCbo.getObj()));
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
            fileObjectService.releasedFile(resultCbo.getObj().getBtmName(),resultCbo.getObj().getOid(),formDataDTO.getReleaseFileOids());
            fileObjectService.releasedFile(resultCbo.getObj().btName,resultCbo.getObj().oid,formDataDTO.getReleaseFileOids());
        }
        //后置事件
        String afterEvent = formDataDTO.getPostEvent();
        try {
            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
            callPostEvent(Arrays.stream(new BusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
        }catch (Throwable e){
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
        }
@@ -1443,27 +1441,27 @@
            return beforeResult;
        }
        //封装数据
        BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
        BaseResult<BusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
        if(!resultCbo.isSuccess()){
            return BaseResult.fail(resultCbo.getMsg(),resultCbo.getMsgObjs());
        }
        //执行保存
        BaseResult<Map<String,Object>> result = BaseResult.success();
        try {
            BusinessObject bo = platformClientUtil.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
            com.vci.client.bof.ClientBusinessObject afterCbo = new com.vci.client.bof.ClientBusinessObject();
            afterCbo.setBusinessObject(bo);
            BusinessObject bo = platformClientUtil.getBOFService().createBusinessObject(resultCbo.getObj(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
            BusinessObject afterCbo = new BusinessObject();
            afterCbo = bo;
            result.setObj(boService.cbo2Map(afterCbo));
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
            fileObjectService.releasedFile(resultCbo.getObj().getBtmName(),resultCbo.getObj().getOid(),formDataDTO.getReleaseFileOids());
            fileObjectService.releasedFile(resultCbo.getObj().btName,resultCbo.getObj().oid,formDataDTO.getReleaseFileOids());
        }
        //后置事件
        String afterEvent = formDataDTO.getPostEvent();
        try {
            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
            callPostEvent(Arrays.stream(new BusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
        }catch (Throwable e){
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
        }
@@ -1493,16 +1491,16 @@
        //封装数据
        List<BusinessObject> updateCBOS = new ArrayList<>();
        Map<String,List<String>> releasedFileOids = new HashMap<>();
        List<com.vci.client.bof.ClientBusinessObject> afterCBOs = new ArrayList<>();
        List<BusinessObject> afterCBOs = new ArrayList<>();
        for(FormDataDTO formDataDTO:formDataDTOList.getFormDataDTOS()) {
            BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, true, false, false);
            BaseResult<BusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, true, false, false);
            if (!resultCbo.isSuccess()) {
                return BaseResult.fail(resultCbo.getMsg(), resultCbo.getMsgObjs());
            }
            updateCBOS.add(resultCbo.getObj().getBusinessObject());
            updateCBOS.add(resultCbo.getObj());
            //执行保存
            if (!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())) {
                releasedFileOids.put(resultCbo.getObj().getOid(),formDataDTO.getReleaseFileOids());
                releasedFileOids.put(resultCbo.getObj().oid,formDataDTO.getReleaseFileOids());
            }
        }
        try {
@@ -1540,7 +1538,7 @@
        String btmName = deleteDataDTO.getDataList().get(0).getBtmname();
        List<String> oidList = deleteDataDTO.getDataList().stream().map(BaseModelDTO::getOid).collect(Collectors.toList());
        //看看级联删除。只有自己引用自己的时候可以级联删除
        List<com.vci.client.bof.ClientBusinessObject> cbo = null;
        List<BusinessObject> cbo = null;
        if(deleteDataDTO.isCascade()){
            //级联删除
            OsBtmTypeVO btmTypeVO = btmService.getBtmById(btmName);
@@ -1559,8 +1557,8 @@
        if(CollectionUtils.isEmpty(cbo)){
            return BaseResult.fail("没有在系统中找到这些数据,未执行删除操作");
        }
        List<com.vci.client.bof.ClientBusinessObject> finalCbo = cbo;
        Collection<Collection<String>> oidCollections = WebUtil.switchCollectionForOracleIn(finalCbo.stream().map(com.vci.client.bof.ClientBusinessObject::getOid).collect(Collectors.toList()));
        List<BusinessObject> finalCbo = cbo;
        Collection<Collection<String>> oidCollections = WebUtil.switchCollectionForOracleIn(finalCbo.stream().map(bo -> bo.oid).collect(Collectors.toList()));
        List<OsUsedAttributeVO> usedAttributeVOS = null;
        boolean adminCascade = false;
        if("admin".equalsIgnoreCase(VciBaseUtil.getCurrentUserId()) && deleteDataDTO.isAdminCascade()){
@@ -1595,7 +1593,7 @@
                        Map<String,String> conditionMap = new HashMap<>();
                        conditionMap.put(usedAttributeVO.getId(),QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(oids.toArray(new String[0])) + ")");
                        if(StringUtils.isNotBlank(usedAttributeVO.getPkBtmType())) {
                            List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(usedAttributeVO.getPkBtmType(), conditionMap);
                            List<BusinessObject> tempCbos = boService.queryCBO(usedAttributeVO.getPkBtmType(), conditionMap);
                            if(!CollectionUtils.isEmpty(tempCbos)){
                                finalCbo.addAll(tempCbos);
                            }
@@ -1608,12 +1606,11 @@
        }
        VciBaseUtil.switchCollectionForOracleIn(finalCbo).stream().forEach(cbos->{
            try {
                platformClientUtil.getBOFService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1);
                platformClientUtil.getBOFService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),1);
            } catch (PLException vciError) {
                throw WebUtil.getVciBaseException(vciError);
            }
        });
        System.out.println("zheshi shazi ");
        return BaseResult.success();
    }
@@ -1649,7 +1646,7 @@
            //说明前置事件没有执行成功
            return beforeResult;
        }
        com.vci.client.bof.ClientLinkObject clo = null;
        LinkObject clo = null;
        String prefix = "";
        if(formLinkDataDTO.isDirection()){
            prefix = LO_FROM_PREFIX;
@@ -1677,9 +1674,9 @@
        }
        //查询from端的
        com.vci.client.bof.ClientBusinessObject fromCbo = new com.vci.client.bof.ClientBusinessObject();
        BusinessObject fromCbo = new BusinessObject();
        try {
            fromCbo.setBusinessObject(platformClientUtil.getBOFService().readBusinessObject(fromOid,fromBtmName));
            fromCbo = platformClientUtil.getBOFService().readBusinessObject(fromOid,fromBtmName);
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
@@ -1692,52 +1689,45 @@
            }
        });
        //封装to端的
        BaseResult<com.vci.client.bof.ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO,formDefineVO,toOid,toBtmName,boData);
        BaseResult<BusinessObject> result = wrapperToCbo(formLinkDataDTO,formDefineVO,toOid,toBtmName,boData);
        if(!result.isSuccess()){
            return BaseResult.fail(result.getMsg(),result.getMsgObjs());
        }
        com.vci.client.bof.ClientBusinessObject toCbo = result.getObj();
        BusinessObject toCbo = result.getObj();
        //初始化链接类型的值
        BaseResult<com.vci.client.bof.ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, false);
        BaseResult<LinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, false);
        if(!resultClo.isSuccess()){
            return BaseResult.fail(resultClo.getMsg(),resultClo.getMsgObjs());
        }
        clo = resultClo.getObj();
        if(formLinkDataDTO.isDirection()){
            clo.setFromBO(toCbo);
            clo.setToBO(fromCbo);
        } else {
            clo.setFromBO(fromCbo);
            clo.setToBO(toCbo);
        }
        //执行保存
        BusinessObject[] bos = new BusinessObject[1];
        toCbo.dealBusinessObjectNullValue();
        clo.dealLinkObjectNullValue();
        bos[0] = toCbo.getBusinessObject();
        ObjectTool.dealBusinessObjectNullValue(toCbo);
        ObjectTool.dealLinkObjectNullValue(clo);
        bos[0] = toCbo;
        try {
            platformClientUtil.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject());
            platformClientUtil.getBOFService().createBusinessObjectWithLink(bos,clo);
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        if(!CollectionUtils.isEmpty(formLinkDataDTO.getReleaseFileOids())){
            fileObjectService.releasedFile(formLinkDataDTO.getLinkType(),clo.getOid(),formLinkDataDTO.getReleaseFileOids());
            fileObjectService.releasedFile(formLinkDataDTO.getLinkType(),clo.oid,formLinkDataDTO.getReleaseFileOids());
        }
        //后置事件
        String afterEvent = formLinkDataDTO.getPostEvent();
        try {
            callPostEvent(null,Arrays.stream(new com.vci.client.bof.ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
            callPostEvent(null,Arrays.stream(new LinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
        }catch (Throwable e){
            //说明后置事件出现了错误,那么就需要删除以前的这条数据
            try {
                platformClientUtil.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1);
                platformClientUtil.getBOFService().deleteLinkObject(clo.getLinkObject());
                platformClientUtil.getBOFService().deleteBusinessObject(toCbo,1);
                platformClientUtil.getBOFService().deleteLinkObject(clo);
            } catch (PLException vciError) {
                throw WebUtil.getVciBaseException(vciError);
            }
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
        }
        return BaseResult.success(clo.getOid());
        return BaseResult.success(clo.oid);
    }
    /**
@@ -1748,7 +1738,7 @@
     * @param editFlag æ˜¯å¦ä¸ºç¼–辑
     * @return é“¾æŽ¥ç±»åž‹çš„内容
     */
    private BaseResult<com.vci.client.bof.ClientLinkObject> wrapperOnlyCLO(FormLinkDataDTO formLinkDataDTO,Map<String,String> loData,UIFormDefineVO formDefineVO,boolean editFlag){
    private BaseResult<LinkObject> wrapperOnlyCLO(FormLinkDataDTO formLinkDataDTO,Map<String,String> loData,UIFormDefineVO formDefineVO,boolean editFlag){
        Map<String,String> baseDataMap = formLinkDataDTO2MapLow(formLinkDataDTO);
        Map<String,String> allDataMap = new HashMap<>();
        allDataMap.putAll(loData);
@@ -1764,32 +1754,33 @@
            return result;
        }
        //处理业务类型得到数据
        ClientLinkObject clo ;
        LinkObject clo ;
        if(editFlag){
            try {
                LinkObject linkObject = platformClientUtil.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType());
                clo = new ClientLinkObject();
                clo.setLinkObject(linkObject);
                clo = new LinkObject();
                clo = linkObject;
            } catch (PLException vciError) {
                throw WebUtil.getVciBaseException(vciError);
            }
        }else{
            clo = new ClientLinkObject();
            clo = new LinkObject();
            //处理初始化的数据
            clo.setOid(VciBaseUtil.getPk());
            clo.setCreator(VciBaseUtil.getCurrentUserId());
            clo.setCreateTime(System.currentTimeMillis());
            clo.setTs(System.currentTimeMillis());
            clo.setLoName(formLinkDataDTO.getLinkType());
            clo.oid = VciBaseUtil.getPk();
            clo.creator = VciBaseUtil.getCurrentUserId();
            clo.createTime = System.currentTimeMillis();
            clo.ts = System.currentTimeMillis();
            clo.ltName = formLinkDataDTO.getLinkType();
        }
        //
        allDataMap.forEach((key,value)->{
        LinkObject finalClo = clo;
        allDataMap.forEach((key, value)->{
            if(editFlag&&("lastmodifier".equalsIgnoreCase(key) || "lastmodifytime".equalsIgnoreCase(key)
                    || "ts".equalsIgnoreCase(key)  || "creator".equalsIgnoreCase(key)
                    || "createtime".equalsIgnoreCase(key))){
                //平台不能传递这个
            }else{
                loService.setAttribute(clo,key,value);
                loService.setAttribute(finalClo,key,value);
            }
        });
        return BaseResult.success(clo);
@@ -1805,7 +1796,7 @@
     * @param boData to的数据
     * @return åŒ…含的对象
     */
    private BaseResult<com.vci.client.bof.ClientBusinessObject> wrapperToCbo(FormLinkDataDTO formLinkDataDTO,UIFormDefineVO formDefineVO,String toOid,String toBtmName,Map<String,String> boData){
    private BaseResult<BusinessObject> wrapperToCbo(FormLinkDataDTO formLinkDataDTO,UIFormDefineVO formDefineVO,String toOid,String toBtmName,Map<String,String> boData){
        Map<String,String> dataLow = new HashMap<>();
        boData.forEach((key,value)->{
            dataLow.put(key.toLowerCase(),value);
@@ -1832,7 +1823,7 @@
        if(!result.isSuccess()){
            return result;
        }
        com.vci.client.bof.ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,formLinkDataDTO.isToUpRevision(),formLinkDataDTO.isToUpVersion());
        BusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,formLinkDataDTO.isToUpRevision(),formLinkDataDTO.isToUpVersion());
        return BaseResult.success(cbo);
    }
@@ -1925,41 +1916,41 @@
     * @param newVersion æ˜¯å¦å‡ç‰ˆæ¬¡
     * @return cbo对象
     */
    public com.vci.client.bof.ClientBusinessObject createOrGetCbo(Map<String,String> dataLowMap,Map<String,String> baseDataMap,boolean editFlag,boolean newRevision,boolean newVersion){
    public BusinessObject createOrGetCbo(Map<String,String> dataLowMap,Map<String,String> baseDataMap,boolean editFlag,boolean newRevision,boolean newVersion){
        String btmName = baseDataMap.get("btmname");
        String oid = baseDataMap.get("oid");
//        ClientBusinessObject cbo = new ClientBusinessObject();
        ClientBusinessObject cbo = new ClientBusinessObject();
//        BusinessObject cbo = new BusinessObject();
        BusinessObject cbo = new BusinessObject();
        String copyfromversion = baseDataMap.get("copyfromversion");
        OsBtmTypeVO btmTypeVO = btmService.getBtmById(btmName);
        List<String> attributeList = btmTypeVO.getAttributes().stream().map(attribute -> attribute.getId()).collect(Collectors.toList());
        if(editFlag || newRevision || newVersion){
            try {
                cbo.setBusinessObject(platformClientUtil.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName));
                cbo = platformClientUtil.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName);
            } catch (PLException vciError) {
                throw new VciBaseException("使用主键在系统中没有查询到数据",new String[]{oid},vciError);
            }
            if(btmTypeVO.isRevisionFlag() && newRevision){
                cbo.setOid(VciBaseUtil.getPk());
                cbo.setCopyFromVersion(copyfromversion);
                cbo.oid = VciBaseUtil.getPk();
                cbo.fromVersion = copyfromversion;
                if(btmTypeVO.isInputRevisionFlag() && StringUtils.isNotBlank(baseDataMap.getOrDefault("revisionvalue",""))){
                    //手动的,所以不处理版本规则了
                    cbo.setRevisionValue(baseDataMap.get("revisionvalue"));
                    cbo.revisionValue = baseDataMap.get("revisionvalue");
                }else{
                    //说明是升版
                    BaseModel baseModel = cbo2BaseModel(cbo);
                    RevisionValueObject revisionValueObject = getNextRevision(btmTypeVO,baseModel);
                    cbo.setRevisionid(VciBaseUtil.getPk());
                    cbo.setRevisionSeq((short) revisionValueObject.getRevisionSeq());
                    cbo.setRevisionValue(revisionValueObject.getRevisionVal());
                    cbo.setIsLastR(true);
                    cbo.setIsFirstR(false);
                    RevisionDataInfo revisionValueObject = getNextRevision(btmTypeVO,baseModel);
                    cbo.revisionid = VciBaseUtil.getPk();
                    cbo.revisionSeq = revisionValueObject.revisionSeq;
                    cbo.revisionValue = revisionValueObject.revisionVal;
                    cbo.isLastR = true;
                    cbo.isFirstR = false;
                    //处理版次
                    cbo.setVersionValue(getFirstVersion(btmTypeVO.getVersionRule()));
                    cbo.setVersionRule(btmTypeVO.getVersionRule());
                    cbo.setVersionSeq((short) 0);
                    cbo.setIsLastV(true);
                    cbo.setIsFirstV(true);
                    cbo.versionValue = getFirstVersion(btmTypeVO.getVersionRule());
                    cbo.versionRule = btmTypeVO.getVersionRule();
                    cbo.versionSeq = (short) 0;
                    cbo.isLastV = true;
                    cbo.isFirstV = true;
                }
                //升版的时候,生命周期的状态需要改动到默认状态
                if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){
@@ -1973,19 +1964,19 @@
                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){
                        throw new VciBaseException("{0}里的生命周期设置得不正确,在系统中没有找到{1}这个生命周期",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()});
                    }
                    cbo.setLcStatus(lifeCycleVO.startState);
                    cbo.lcStatus = lifeCycleVO.startState;
                }
            }
            if(btmTypeVO.isRevisionFlag() && newVersion){
                cbo.setCopyFromVersion(copyfromversion);
                cbo.setOid(VciBaseUtil.getPk());
                cbo.fromVersion = copyfromversion;
                cbo.oid = VciBaseUtil.getPk();
                //这是升版次,不存在即升版本,又升版次的情况
                BaseModel baseModel = cbo2BaseModel(cbo);
                VersionValueObject versionValueObject = getNextVersion(btmTypeVO,baseModel);
                cbo.setVersionValue(versionValueObject.getVersionVal());
                cbo.setVersionSeq((short) versionValueObject.getVersionSeq());
                cbo.setIsLastV(true);
                cbo.setIsFirstV(false);
                VersionDataInfo versionValueObject = getNextVersion(btmTypeVO,baseModel);
                cbo.versionValue = versionValueObject.versionVal;
                cbo.versionSeq = versionValueObject.versionSeq;
                cbo.isLastV = true;
                cbo.isFirstV = false;
                //升版的时候,生命周期的状态需要改动到默认状态
                if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){
                    //查询生命周期
@@ -1998,65 +1989,65 @@
                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){
                        throw new VciBaseException("{0}里的生命周期设置得不正确,在系统中没有找到{1}这个生命周期",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()});
                    }
                    cbo.setLcStatus(lifeCycleVO.startState);
                    cbo.lcStatus = lifeCycleVO.startState;
                }
            }
        }else{
            //我们需要将属性初始化
            if(StringUtils.isBlank(cbo.getOid()) || (newRevision || newVersion)){
                cbo.setOid(VciBaseUtil.getPk());
            if(StringUtils.isBlank(cbo.oid) || (newRevision || newVersion)){
                cbo.oid = VciBaseUtil.getPk();
            }
            if(StringUtils.isBlank(cbo.getCreator())){
                cbo.setCreator(VciBaseUtil.getCurrentUserId());
            if(StringUtils.isBlank(cbo.creator)){
                cbo.creator = VciBaseUtil.getCurrentUserId();
            }
            if(cbo.getCreateTime() != 0){
                cbo.setCreateTime(System.currentTimeMillis());
            if(cbo.createTime != 0){
                cbo.createTime = System.currentTimeMillis();
            }
            if(StringUtils.isBlank(cbo.getOwner())){
                cbo.setOwner(cbo.getCreator());
            if(StringUtils.isBlank(cbo.owner)){
                cbo.owner = cbo.creator;
            }
            cbo.setTs(System.currentTimeMillis());
            if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId()) && (StringUtils.isBlank(cbo.getLcStatus()) || newRevision || newVersion)){
            cbo.ts = System.currentTimeMillis();
            if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId()) && (StringUtils.isBlank(cbo.lcStatus) || newRevision || newVersion)){
                //查询生命周期
                OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
                if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.getOid())){
                    throw new VciBaseException("{0}里的生命周期设置得不正确,在系统中没有找到{1}这个生命周期",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()});
                }
                cbo.setLcStatus(lifeCycleVO.getStartStatus());
                cbo.setLctId(btmTypeVO.getLifeCycleId());
                cbo.lcStatus = lifeCycleVO.getStartStatus();
                cbo.lctId = btmTypeVO.getLifeCycleId();
            }
            if(StringUtils.isBlank(cbo.getBtmName())){
                cbo.setBtmName(btmTypeVO.getId());
            if(StringUtils.isBlank(cbo.btName)){
                cbo.btName = btmTypeVO.getId();
            }
            if(btmTypeVO.isRevisionFlag()){
                //要管理版本
                if(btmTypeVO.isInputRevisionFlag() && StringUtils.isNotBlank(baseDataMap.getOrDefault("revisionvalue",""))){
                    //手动的,所以不处理版本规则了
                    cbo.setRevisionValue(baseDataMap.get("revisionvalue"));
                    cbo.revisionValue = baseDataMap.get("revisionvalue");
                }else {
                    OsRevisionRuleVO ruleVO = revisionRuleServiceI.getRevisionRuleById(btmTypeVO.getRevisionRuleId());
                    if (ruleVO == null || StringUtils.isBlank(ruleVO.getOid())) {
                        throw new VciBaseException("{0}里的版本规则设置得不正确,在系统中没有找到{1}这个版本规则", new String[]{btmTypeVO.getName(), btmTypeVO.getRevisionRuleId()});
                    }
                    cbo.setRevisionValue(ruleVO.getStartCode());
                    cbo.revisionValue = ruleVO.getStartCode();
                }
                if (StringUtils.isBlank(cbo.getNameoid())) {
                    cbo.setNameoid(VciBaseUtil.getPk());
                if (StringUtils.isBlank(cbo.nameoid)) {
                    cbo.nameoid = VciBaseUtil.getPk();
                }
                if (StringUtils.isBlank(cbo.getRevisionid())) {
                    cbo.setRevisionid(VciBaseUtil.getPk());
                if (StringUtils.isBlank(cbo.revisionid)) {
                    cbo.revisionid = VciBaseUtil.getPk();
                }
                cbo.setIsFirstR(true);
                cbo.setIsLastR(true);
                cbo.setRevisionRule(btmTypeVO.getRevisionRuleId());
                cbo.setRevisionSeq((short) 0);
                cbo.isFirstR = true;
                cbo.isLastR = true;
                cbo.revisionRule = btmTypeVO.getRevisionRuleId();
                cbo.revisionSeq = (short) 0;
                //看看是否需要处理版次
                cbo.setVersionValue(getFirstVersion(btmTypeVO.getVersionRule()));
                cbo.setVersionRule(btmTypeVO.getVersionRule());
                cbo.setVersionSeq((short) 0);
                cbo.setIsLastV(true);
                cbo.setIsFirstV(true);
                cbo.versionValue = getFirstVersion(btmTypeVO.getVersionRule());
                cbo.versionRule = btmTypeVO.getVersionRule();
                cbo.versionSeq = (short) 0;
                cbo.isLastV = true;
                cbo.isFirstV = true;
            }
        }
//        Iterator<Map.Entry<String, String>> iterator = baseDataMap.entrySet().iterator();
@@ -2098,18 +2089,12 @@
     * @param editFlag æ˜¯å¦ä¸ºç¼–辑
     */
    @Override
    public void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, com.vci.client.bof.ClientBusinessObject cbo, boolean editFlag){
    public void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, BusinessObject cbo, boolean editFlag){
        dataLow.forEach((key,value)->{
            if(editFlag&&notSendOnEdit(key)){
                //平台不能传递这个
            }else{
                try {
//                    if(!SystemAttribute.bosysAttList().contains(key)){
                        cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
//                    }
                } catch (PLException vciError) {
                    throw new VciBaseException("{0}的值不符合要求,当前是{1}", new String[]{key, value}, vciError);
                }
                ObjectTool.setBOAttributeValue(cbo,key,value);
            }
        });
        baseDataLow.forEach((key,value)->{
@@ -2118,23 +2103,11 @@
            }else{
                if(editFlag) {
                    //编辑的时候可以都设置
                    try {
//                        if(!SystemAttribute.bosysAttList().contains(key)){
                            cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
//                        }
                    } catch (PLException vciError) {
                        throw new VciBaseException("{0}的值不符合要求,当前是{1}", new String[]{key, value}, vciError);
                    }
                    ObjectTool.setBOAttributeValue(cbo,key,value);
                }else{
                    //只需要处理id,name,description,密级即可,其余的都已经被设置了
                    if(basicFields.contains(key) &&StringUtils.isNotBlank(value)){
                        try {
//                            if(!SystemAttribute.bosysAttList().contains(key)){
                                cbo.setAttributeValueWithNoCheck(key, value, true);
//                            }
                        } catch (PLException vciError) {
                            throw new VciBaseException("{0}的值不符合要求,当前是{1}", new String[]{key, value}, vciError);
                        }
                        ObjectTool.setBOAttributeValue(cbo,key,value);
                    }
                }
            }
@@ -2170,7 +2143,7 @@
            //说明前置事件没有执行成功
            return beforeResult;
        }
        com.vci.client.bof.ClientLinkObject clo = null;
        LinkObject clo = null;
        String prefix = formLinkDataDTO.isDirection()?LO_FROM_PREFIX:LO_TO_PREFIX;
        String toOid = formLinkDataDTO.isDirection()?formLinkDataDTO.getFoid():formLinkDataDTO.getToid();
        String toBtmName =  formLinkDataDTO.isDirection()?formLinkDataDTO.getFbtmname():formLinkDataDTO.getTbtmname();
@@ -2188,10 +2161,10 @@
                }
            });
        }
        com.vci.client.bof.ClientBusinessObject toCbo =null;
        BusinessObject toCbo =null;
        if(!CollectionUtils.isEmpty(boData)) {
            //封装to端的
            BaseResult<com.vci.client.bof.ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO, formDefineVO, toOid, toBtmName, boData);
            BaseResult<BusinessObject> result = wrapperToCbo(formLinkDataDTO, formDefineVO, toOid, toBtmName, boData);
            if (!result.isSuccess()) {
                return BaseResult.fail(result.getMsg(), result.getMsgObjs());
            }
@@ -2199,41 +2172,34 @@
        }
        //初始化链接类型的值
        BaseResult<com.vci.client.bof.ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, true);
        BaseResult<LinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, true);
        if(!resultClo.isSuccess()){
            return BaseResult.fail(resultClo.getMsg(),resultClo.getMsgObjs());
        }
        clo = resultClo.getObj();
        if(toCbo!=null) {
            if (formLinkDataDTO.isDirection()) {
                clo.setFromBO(toCbo);
            } else {
                clo.setToBO(toCbo);
            }
        }
        try {
            platformClientUtil.getBOFService().updateLinkObject(clo.getLinkObject());
            platformClientUtil.getBOFService().updateLinkObject(clo);
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        //保存to端或者from端
        try{
            platformClientUtil.getBOFactoryService().updateBusinessObject(toCbo.getBusinessObject());
            platformClientUtil.getBOFactoryService().updateBusinessObject(toCbo);
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        if(!CollectionUtils.isEmpty(formLinkDataDTO.getReleaseFileOids())){
            fileObjectService.releasedFile(formLinkDataDTO.getLinkType(),clo.getOid(),formLinkDataDTO.getReleaseFileOids());
            fileObjectService.releasedFile(formLinkDataDTO.getLinkType(),clo.oid,formLinkDataDTO.getReleaseFileOids());
        }
        //后置事件
        String afterEvent = formLinkDataDTO.getPostEvent();
        try {
            callPostEvent(null,Arrays.stream(new com.vci.client.bof.ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
            callPostEvent(null,Arrays.stream(new LinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
        }catch (Throwable e){
            //后置事件有问题了就只能是这样了,没办法恢复
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
        }
        return BaseResult.success(clo.getOid());
        return BaseResult.success(clo.oid);
    }
    /**
@@ -2249,31 +2215,31 @@
        if(deleteLinkDataDTO.getDataList().stream().anyMatch(s->StringUtils.isBlank(s.getOid()) || StringUtils.isBlank(s.getLinkType()))){
            throw new VciBaseException("有数据的主键(或链接类型)没有值,无法删除");
        }
        List<ClientLinkObject> clos = new ArrayList<>();
        List<LinkObject> clos = new ArrayList<>();
        VciBaseUtil.switchListForOracleIn(deleteLinkDataDTO.getDataList()).stream().forEach(linkModelDTOs->{
            Map<String,String> conditionMap = new HashMap<>();
            conditionMap.put("oid",QueryOptionConstant.IN +"(" + VciBaseUtil.toInSql(linkModelDTOs.stream().map(BaseLinkModelDTO::getOid).toArray(String[]::new)) +")");
            List<ClientLinkObject> clientLinkObjects = loService.queryCLO(linkModelDTOs.get(0).getLinkType(), conditionMap);
            if(!CollectionUtils.isEmpty(clientLinkObjects)){
                clos.addAll(clientLinkObjects);
            List<LinkObject> LinkObjects = loService.queryCLO(linkModelDTOs.get(0).getLinkType(), conditionMap);
            if(!CollectionUtils.isEmpty(LinkObjects)){
                clos.addAll(LinkObjects);
            }
        });
        if(CollectionUtils.isEmpty(clos)){
            throw new VciBaseException("使用主键没有在系统中找到链接类型的数据");
        }
        Map<String,List<ClientLinkObject>> fromBtmGroups = clos.stream().collect(Collectors.groupingBy(s->s.getFromBTMName()));
        Map<String,List<ClientLinkObject>> toBtmGroups = clos.stream().collect(Collectors.groupingBy(s->s.getToBTMName()));
        Map<String,List<com.vci.client.bof.ClientBusinessObject>> fromBtmDataGroups = new HashMap<>();
        Map<String,List<com.vci.client.bof.ClientBusinessObject>> toBtmDataGroups = new HashMap<>();
        Map<String,List<LinkObject>> fromBtmGroups = clos.stream().collect(Collectors.groupingBy(s->s.fromBTName));
        Map<String,List<LinkObject>> toBtmGroups = clos.stream().collect(Collectors.groupingBy(s->s.toBTName));
        Map<String,List<BusinessObject>> fromBtmDataGroups = new HashMap<>();
        Map<String,List<BusinessObject>> toBtmDataGroups = new HashMap<>();
        if(!CollectionUtils.isEmpty(fromBtmGroups)){
            fromBtmGroups.forEach((btmType,cloList)->{
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getFromOid).collect(Collectors.toList()), btmType);
                List<BusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(clo -> clo.fromOid).collect(Collectors.toList()), btmType);
                fromBtmDataGroups.put(btmType,cbos);
            });
        }
        if(!CollectionUtils.isEmpty(toBtmGroups)){
            toBtmGroups.forEach((btmType,cloList)->{
                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getToOid).collect(Collectors.toList()), btmType);
                List<BusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(clo -> clo.toOid).collect(Collectors.toList()), btmType);
                toBtmDataGroups.put(btmType,cbos);
            });
        }
@@ -2288,19 +2254,19 @@
                if(attr.toLowerCase().startsWith(LO_FROM_PREFIX)){
                    fromBtmDataGroups.forEach((btm,cbos)->{
                        String attrNotPrefix = attr.substring(LO_FROM_PREFIX.length());
                        if(!CollectionUtils.isEmpty(cbos) && cbos.stream().anyMatch(s->!attrValue.equalsIgnoreCase(s.getAttributeValue(attrNotPrefix)))){
                        if(!CollectionUtils.isEmpty(cbos) && cbos.stream().anyMatch(s->!attrValue.equalsIgnoreCase(ObjectTool.getBOAttributeValue(s, attrNotPrefix)))){
                            throw new VciBaseException("数据的内容不允许删除,{0}", new String[]{deleteLinkDataDTO.getCheckNotDeleteMsg()});
                        }
                    });
                }else if(attr.toLowerCase().startsWith(LO_TO_PREFIX)){
                    toBtmDataGroups.forEach((btm,cbos)->{
                        String attrNotPrefix = attr.substring(LO_TO_PREFIX.length());
                        if(!CollectionUtils.isEmpty(cbos) && cbos.stream().anyMatch(s->!attrValue.equalsIgnoreCase(s.getAttributeValue(attrNotPrefix)))){
                        if(!CollectionUtils.isEmpty(cbos) && cbos.stream().anyMatch(s->!attrValue.equalsIgnoreCase(ObjectTool.getBOAttributeValue(s, attrNotPrefix)))){
                            throw new VciBaseException("数据的内容不允许删除,{0}", new String[]{deleteLinkDataDTO.getCheckNotDeleteMsg()});
                        }
                    });
                }else {
                    if (clos.stream().anyMatch(s -> attrValue.equalsIgnoreCase(s.getAttributeValue(attr)))) {
                    if (clos.stream().anyMatch(s -> attrValue.equalsIgnoreCase(ObjectTool.getLOAttributeValue(s,attr)))) {
                        throw new VciBaseException("数据的内容不允许删除,{0}", new String[]{deleteLinkDataDTO.getCheckNotDeleteMsg()});
                    }
                }
@@ -2309,7 +2275,7 @@
        //链接类型本身一般不会有关联
        List<LinkObject> los = new ArrayList<>();
        clos.stream().forEach(clo->{
            los.add(clo.getLinkObject());
            los.add(clo);
        });
        try {
            platformClientUtil.getBOFactoryService().batchDeleteLinkObject(los.toArray(new LinkObject[0]));
@@ -2319,7 +2285,7 @@
        if(deleteLinkDataDTO.isDeleteFromData()){
            fromBtmDataGroups.forEach((btm,cbos)->{
                try{
                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(com.vci.client.bof.ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),1);
                }catch (PLException vciError) {
                    throw WebUtil.getVciBaseException(vciError);
                }
@@ -2328,7 +2294,7 @@
        if(deleteLinkDataDTO.isDeleteToData()){
            toBtmDataGroups.forEach((btm,cbos)->{
                try{
                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(com.vci.client.bof.ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),1);
                }catch (PLException vciError) {
                    throw WebUtil.getVciBaseException(vciError);
                }
@@ -2402,7 +2368,7 @@
            referConfigVO.setConditionMap(new HashMap<>());
        }
        List<com.vci.client.bof.ClientBusinessObject> cbos = null;
        List<BusinessObject> cbos = null;
        String oidFieldName = StringUtils.isNotBlank(referConfigVO.getParentUsedField())?referConfigVO.getParentUsedField():referConfigVO.getValueField();
        if(referConfigVO.isSelectAllLevel()) {
            String parentOidSql = "";
@@ -2477,7 +2443,7 @@
    @Override
    public List<Map<String,String>> getDataAttr(String btmname, String oid) {
        VciBaseUtil.alertNotNull(btmname,"业务类型的信息",oid,"业务数据的主键");
        List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btmname,WebUtil.getOidQuery(oid));
        List<BusinessObject> cbos = boService.queryCBO(btmname,WebUtil.getOidQuery(oid));
        List<Map<String,String>> dataMap = new ArrayList<>();
        if(!CollectionUtils.isEmpty(cbos)){
            cbos.stream().forEach(cbo->{
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebActionServiceImpl.java
@@ -1,13 +1,15 @@
package com.vci.web.service.impl;
import com.vci.client.portal.utility.UITools;
//import com.vci.client.portal.utility.UITools;
import com.vci.corba.common.PLException;
import com.vci.corba.portal.data.PLAction;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.web.pageModel.UIActionVO;
import com.vci.web.service.WebActionServiceI;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@@ -18,6 +20,11 @@
@Service
public class WebActionServiceImpl implements WebActionServiceI {
    /**
     * å¹³å°çš„调用工具类
     */
    @Autowired
    private PlatformClientUtil platformClientUtil;
    /**
     * action对象
@@ -29,7 +36,7 @@
    public UIActionVO getActionByOid(String oid) throws VciBaseException {
        WebUtil.alertNotNull(oid,"action的主键");
        try {
            PLAction action = UITools.getService()
            PLAction action = platformClientUtil.getUIService()
                    .getPLActionById(oid);
            if(action == null || StringUtils.isBlank(action.plOId)){
                throw new VciBaseException("这个action在系统中不存在");
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java
@@ -1,8 +1,7 @@
package com.vci.web.service.impl;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.common.oq.OQTool;
import com.vci.client.common.providers.ClientServiceProvider;
import com.vci.common.qt.object.*;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
@@ -15,6 +14,7 @@
import com.vci.corba.query.data.BtmRefQueryOption;
import com.vci.corba.query.data.KV;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.annotation.Column;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.enumpck.BooleanEnum;
@@ -123,7 +123,7 @@
    /**
     * å·²ç»åˆ›å»ºè¿‡çš„业务对象
     */
    private static Map<String, ClientBusinessObject> hasCreatedCbos = new HashMap<String, ClientBusinessObject>();
    private static Map<String, BusinessObject> hasCreatedCbos = new HashMap<String, BusinessObject>();
    /**
     * ä¸šåŠ¡å¯¹è±¡é»˜è®¤å±žæ€§
@@ -149,7 +149,7 @@
     * @throws VciBaseException åˆå§‹åŒ–出错的是会抛出异常
     */
    @Override
    public ClientBusinessObject createCBOByBtmName(String btmName)
    public BusinessObject createCBOByBtmName(String btmName)
            throws VciBaseException {
        if(btmName!=null){
            btmName = btmName.trim().toLowerCase();
@@ -162,13 +162,14 @@
                throw new VciBaseException(msgCodePrefix +"noHasUserid");
            }
            try {
//                ClientServiceProvider.getBOFService().initBusinessObject(btmName); å¯ä»¥è¿›è¡Œæ›¿æ¢
                hasCreatedCbos.put(btmName, createBusinessObject(btmName));
            } catch (Exception e) {
                logger.error("创建业务类型对象",e);
                throw new VciBaseException(msgCodePrefix + "initBoError",new String[]{btmName});
            }
        }
        ClientBusinessObject cbo = cloneClientBusinessObject(hasCreatedCbos.get(btmName));
        BusinessObject cbo = cloneBusinessObject(hasCreatedCbos.get(btmName));
        return cbo;
    }
@@ -177,44 +178,45 @@
     * @param boName ä¸šåŠ¡ç±»åž‹åç§°
     * @return ä¸šåŠ¡æ•°æ®å¯¹è±¡
     */
    public ClientBusinessObject createBusinessObject(String boName)  {
    public BusinessObject createBusinessObject(String boName) throws PLException {
//        ClientServiceProvider.getBOFService().initBusinessObject(boName);
        OsBtmTypeVO btmTypeVO = btmService.getBtmById(boName);
        String userName = WebUtil.getCurrentUserId();
        ClientBusinessObject bo = new ClientBusinessObject();
        bo.setOid((new ObjectUtility()).getNewObjectID36());
        bo.setRevisionid((new ObjectUtility()).getNewObjectID36());
        bo.setNameoid((new ObjectUtility()).getNewObjectID36());
        bo.setBtmName(boName);
        bo.setIsLastR(true);
        bo.setIsFirstR(true);
        bo.setIsFirstV(true);
        bo.setIsLastV(true);
        bo.setCreator(userName);
        bo.setCreateTime(System.currentTimeMillis());
        bo.setLastModifier(userName);
        bo.setLastModifyTime(System.currentTimeMillis());
        bo.setRevisionRule(btmTypeVO.getRevisionRuleId());
        bo.setVersionRule(String.valueOf(btmTypeVO.getVersionRule()));
        BusinessObject bo = new BusinessObject();
        bo.oid = (new ObjectUtility()).getNewObjectID36();
        bo.revisionid = (new ObjectUtility()).getNewObjectID36();
        bo.nameoid = (new ObjectUtility()).getNewObjectID36();
        bo.btName = boName;
        bo.isLastR = true;
        bo.isFirstR = true;
        bo.isFirstV = true;
        bo.isLastV = true;
        bo.creator = userName;
        bo.createTime = System.currentTimeMillis();
        bo.modifier = userName;
        bo.modifyTime = System.currentTimeMillis();
        bo.revisionRule = btmTypeVO.getRevisionRuleId();
        bo.versionRule = String.valueOf(btmTypeVO.getVersionRule());
        if(StringUtils.isNotBlank(btmTypeVO.getRevisionRuleId())){
            OsRevisionRuleVO revisionRuleVO = revisionRuleService.getRevisionRuleById(btmTypeVO.getRevisionRuleId());
            bo.setRevisionValue(revisionRuleVO.getStartCode());
            bo.revisionValue = revisionRuleVO.getStartCode();
        }
        bo.setRevisionSeq((short) 1);
        bo.setVersionSeq((short) 1);
        bo.setVersionValue(getVersionValue(WebUtil.getInt(btmTypeVO.getVersionRule())));
        bo.setLctId(btmTypeVO.getLifeCycleId());
        bo.revisionSeq = (short) 1;
        bo.versionSeq = (short) 1;
        bo.versionValue = getVersionValue(WebUtil.getInt(btmTypeVO.getVersionRule()));
        bo.lctId = btmTypeVO.getLifeCycleId();
        if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){
            OsLifeCycleVO lifeCycleVO = lifeService.getLifeCycleById(btmTypeVO.getLifeCycleId());
            //todo æ— æ³•获取数据
            //            bo.setLcStatus(lifeCycleVO.getStartStatus());
            bo.lcStatus = lifeCycleVO == null ? "" : lifeCycleVO.getStartStatus();
        }
        bo.setId("");
        bo.setName("");
        bo.setDescription("");
        bo.setOwner(userName);
        bo.id = "";
        bo.name = "";
        bo.description = "";
        bo.owner = userName;
//        bo.setCheckinBy(userName);
        bo.setCopyFromVersion("");
        bo.fromVersion = "";
        this.initTypeAttributeValue(bo,btmTypeVO);
        return bo;
    }
@@ -224,15 +226,9 @@
     * @param cbo ä¸šåŠ¡æ•°æ®å¯¹è±¡
     * @param btmTypeVO ä¸šåŠ¡ç±»åž‹çš„æ˜¾ç¤ºå¯¹è±¡
     */
    private void initTypeAttributeValue(ClientBusinessObject cbo,OsBtmTypeVO btmTypeVO) {
    private void initTypeAttributeValue(BusinessObject cbo,OsBtmTypeVO btmTypeVO) {
        Optional.ofNullable(btmTypeVO.getAttributes()).orElseGet(()->new ArrayList<>()).stream().forEach(attribute->{
            try {
                cbo.setAttributeValueWithNoCheck(attribute.getId(),attribute.getDefaultValue());
            } catch (PLException vciError) {
                if(logger.isErrorEnabled()){
                    logger.error("设置属性的值的时候出现了错误",vciError);
                }
            }
            ObjectTool.setBOAttributeValue(cbo,attribute.getId(),attribute.getDefaultValue());
        });
    }
@@ -257,49 +253,42 @@
     * @param cbo ä»¥å‰çš„业务数据对象
     * @return æ‹·è´åŽçš„对象
     */
    private  ClientBusinessObject cloneClientBusinessObject(ClientBusinessObject cbo){
    private  BusinessObject cloneBusinessObject(BusinessObject cbo){
        if(cbo !=null){
            BusinessObject businessObject = new BusinessObject();
            BusinessObject bo = cbo.getBusinessObject();
            businessObject.oid = new ObjectUtility().getNewObjectID36();
            businessObject.revisionid = new ObjectUtility().getNewObjectID36();
            businessObject.nameoid = new ObjectUtility().getNewObjectID36();
            businessObject.btName = bo.btName;
            businessObject.isLastR = bo.isLastR;
            businessObject.isFirstR = bo.isFirstR;
            businessObject.isLastV = bo.isLastV;
            businessObject.isFirstV = bo.isFirstV;
            businessObject.btName = cbo.btName;
            businessObject.isLastR = cbo.isLastR;
            businessObject.isFirstR = cbo.isFirstR;
            businessObject.isLastV = cbo.isLastV;
            businessObject.isFirstV = cbo.isFirstV;
            businessObject.creator = WebUtil.getCurrentUserId();
            businessObject.createTime = System.currentTimeMillis();
            businessObject.modifier = bo.modifier;
            businessObject.modifyTime = bo.modifyTime;
            businessObject.revisionRule = bo.revisionRule;
            businessObject.versionRule = bo.versionRule;
            businessObject.revisionSeq = bo.revisionSeq;
            businessObject.revisionValue = bo.revisionValue;
            businessObject.versionSeq = bo.versionSeq;
            businessObject.versionValue = bo.versionValue;
            businessObject.lctId = bo.lctId;
            businessObject.lcStatus = bo.lcStatus;
            businessObject.modifier = cbo.modifier;
            businessObject.modifyTime = cbo.modifyTime;
            businessObject.revisionRule = cbo.revisionRule;
            businessObject.versionRule = cbo.versionRule;
            businessObject.revisionSeq = cbo.revisionSeq;
            businessObject.revisionValue = cbo.revisionValue;
            businessObject.versionSeq = cbo.versionSeq;
            businessObject.versionValue = cbo.versionValue;
            businessObject.lctId = cbo.lctId;
            businessObject.lcStatus = cbo.lcStatus;
            businessObject.ts = System.currentTimeMillis();
            businessObject.id = bo.id;
            businessObject.name = bo.name;
            businessObject.description = bo.description;
            businessObject.id = cbo.id;
            businessObject.name = cbo.name;
            businessObject.description = cbo.description;
            businessObject.owner = businessObject.creator;
//            businessObject.checkinBy = bo.checkinBy;
//            businessObject.checkinTime = bo.checkinTime;
//            businessObject.checkoutBy = bo.checkoutBy;
//            businessObject.checkoutTime = bo.checkoutTime;
            businessObject.fromVersion = bo.fromVersion;
            if(bo.newAttrValList !=null){
                businessObject.newAttrValList = clone(bo.newAttrValList);
            businessObject.fromVersion = cbo.fromVersion;
            if(cbo.newAttrValList !=null){
                businessObject.newAttrValList = clone(cbo.newAttrValList);
            }
            if(bo.hisAttrValList !=null){
                businessObject.hisAttrValList = clone(bo.hisAttrValList);
            if(cbo.hisAttrValList !=null){
                businessObject.hisAttrValList = clone(cbo.hisAttrValList);
            }
            ClientBusinessObject cbo2 = new ClientBusinessObject();
            cbo2.setBusinessObject(businessObject);
            return cbo2;
            return businessObject;
        }else {
            return null;
        }
@@ -399,12 +388,12 @@
        String fieldName = referInfo.split("\\.")[1].trim().toLowerCase();
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put(fieldName,QueryOptionConstant.IN + "(" + WebUtil.toInSql(value.toArray(new String[0])) + ")");
        List<com.vci.client.bof.ClientBusinessObject> cbos = queryCBO(btmName,conditionMap,null, Arrays.asList(new String[]{"oid",fieldName}));
        List<BusinessObject> cbos = queryCBO(btmName,conditionMap,null, Arrays.asList(new String[]{"oid",fieldName}));
        Map<String,String> data = new HashMap<String, String>();
        if(cbos!=null && cbos.size() > 0){
            for(ClientBusinessObject cbo : cbos){
                data.put(cbo.getAttributeValue(fieldName),cbo.getOid());
            for(BusinessObject cbo : cbos){
                data.put(ObjectTool.getBOAttributeValue(cbo,fieldName),cbo.oid);
            }
        }
        return data;
@@ -433,10 +422,10 @@
            throw new VciBaseException("属性" + columnName + "的值为空");
        }
        conditionMap.put(columnName,QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(oidSet.toArray(new String[0])) + ")");
        List<ClientBusinessObject> cbos = queryCBO(btmName,conditionMap,null,Arrays.asList(new String[]{columnName}));
        List<BusinessObject> cbos = queryCBO(btmName,conditionMap,null,Arrays.asList(new String[]{columnName}));
        if(cbos !=null && cbos.size() >0){
            for(ClientBusinessObject cbo : cbos){
                String oid = cbo.getAttributeValue(columnName);
            for(BusinessObject cbo : cbos){
                String oid = ObjectTool.getBOAttributeValue(cbo,columnName);
                if(oidSet.contains(oid)){
                    oidSet.remove(oid);
                }
@@ -473,7 +462,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ˜¯æŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBO(String btmType,
    public List<BusinessObject> queryCBO(String btmType,
            Map<String, String> conditionMap) throws VciBaseException {
        List<String> clauseList = new ArrayList<String>();
        clauseList.add("*");
@@ -490,7 +479,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ˜¯æŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBO(String btmType,
    public List<BusinessObject> queryCBO(String btmType,
            Map<String, String> conditionMap, PageHelper ph)
            throws VciBaseException {
        List<String> clauseList = new ArrayList<String>();
@@ -508,7 +497,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ˜¯æŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBO(String btmType,
    public List<BusinessObject> queryCBO(String btmType,
            Map<String, String> conditionMap, PageHelper ph,
            List<String> clauseList) throws VciBaseException {
        QueryTemplate qt = new QueryTemplate();
@@ -559,8 +548,8 @@
     * @return æŸ¥è¯¢å‡ºæ¥çš„值
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    private List<ClientBusinessObject> baseQueryCBO(QueryTemplate qt,Map<String,String> conditionMap,PageHelper ph,List<String> clauseList) throws VciBaseException{
        List<ClientBusinessObject> allCbos = new ArrayList<ClientBusinessObject>();
    private List<BusinessObject> baseQueryCBO(QueryTemplate qt,Map<String,String> conditionMap,PageHelper ph,List<String> clauseList) throws VciBaseException{
        List<BusinessObject> allCbos = new ArrayList<BusinessObject>();
        if(clauseList == null){
            clauseList = new ArrayList<String>();
            clauseList.add("*");
@@ -621,10 +610,10 @@
            ObjectQueryService.FindBTMObjectsV3Result bos = qtService.findBTMObjectsV3(qt.getId(), OQTool.qtTOXMl(qt).asXML(), refOpts.toArray(new BtmRefQueryOption[refOpts.size()]));
            if (bos != null && bos.count > 0) {
                for (BusinessObject bo : bos.returnValue) {
                    ClientBusinessObject cbo = new ClientBusinessObject();
                    cbo.setBusinessObject(bo);
                    queryEnumText(cbo,enumAttrName);
                    allCbos.add(cbo);
//                    BusinessObject cbo = new BusinessObject();
//                    cbo = bo;
                    queryEnumText(bo,enumAttrName);
//                    allCbos.add(cbo);
                }
                //因为修改了查询的方式,所以就不需要单独查询参照
            }
@@ -719,13 +708,13 @@
     * æŸ¥è¯¢ç”Ÿå‘½å‘¨æœŸçš„值
     * @param cbos ä¸šåŠ¡å¯¹è±¡
     */
    private void queryLcStatus(List<ClientBusinessObject> cbos){
    private void queryLcStatus(List<BusinessObject> cbos){
        if(!CollectionUtils.isEmpty(cbos)){
            Map<String, OsStatusVO> statusVOMap = statusService.selectAllStatusMap();
            cbos.stream().forEach(cbo->{
                try{
                    cbo.setAttributeValueWithNoCheck("lcStatus_text", statusVOMap.getOrDefault(cbo.getLcStatus(),new OsStatusVO()).getName());
                    ObjectTool.setBOAttributeValue(cbo,"lcStatus_text", statusVOMap.getOrDefault(cbo.lcStatus,new OsStatusVO()).getName());
                }catch(Exception e){
                    logger.error("获取生命周期中状态的显示文本出错",e);
                }
@@ -739,7 +728,7 @@
     * @param enumAttrName æžšä¸¾å±žæ€§çš„值
     * @throws VciBaseException
     */
    private void queryEnumText(ClientBusinessObject cbo,List<String> enumAttrName) throws VciBaseException{
    private void queryEnumText(BusinessObject cbo,List<String> enumAttrName) throws VciBaseException{
        queryEnumText(cbo,null,enumAttrName);
    }
@@ -751,16 +740,16 @@
     * @throws VciBaseException æŸ¥è¯¢æžšä¸¾å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public void queryEnumText(ClientBusinessObject cbo, ClientLinkObject clo, List<String> enumAttrName) throws VciBaseException{
    public void queryEnumText(BusinessObject cbo, LinkObject clo, List<String> enumAttrName) throws VciBaseException{
        if(enumAttrName.size()>0){//查询枚举
            for(String enumAttr:enumAttrName){//格式为   code_field  code是枚举的编码,field是当前业务类型存储枚举值的字段
                if(enumAttr.toLowerCase().equals("creator_name")){
                    //创建人的名称
                    String creator = "";
                    if(cbo!=null){
                        creator = cbo.getCreator();
                        creator = cbo.creator;
                    }else{
                        creator = clo.getCreator();
                        creator = clo.creator;
                    }
                    if(StringUtils.isNotBlank(creator)){
                        String userTrueName = userQueryService.getUserNameByUserId(creator);
@@ -770,9 +759,9 @@
                    //最后修改人名称
                    String modifier = "";
                    if(cbo!=null){
                        modifier = cbo.getLastModifier();
                        modifier = cbo.modifier;
                    }else{
                        modifier = clo.getLastModifier();
                        modifier = clo.modifier;
                    }
                    if(StringUtils.isNotBlank(modifier)){
                        String userTrueName = userQueryService.getUserNameByUserId(modifier);
@@ -784,7 +773,7 @@
                    if(fields.contains("_")){
                        String valueField = "";
                        valueField = fields.split("_")[0];
                        String value = cbo.getAttributeValue(valueField);
                        String value = ObjectTool.getBOAttributeValue(cbo,valueField);;
                        if(StringUtils.isNotBlank(value)){
                            String userTrueName = userQueryService.getUserNameByUserId(value);
                            setValueToCboOrClo(cbo,clo,enumAttr,userTrueName);
@@ -803,9 +792,9 @@
                        }
                        String enumKey = "";
                        if (cbo != null) {
                            enumKey = cbo.getAttributeValue(valueFieldName);
                            enumKey = ObjectTool.getBOAttributeValue(cbo,valueFieldName);
                        } else if (clo != null) {
                            enumKey = clo.getAttributeValue(valueFieldName);
                            enumKey = ObjectTool.getLOAttributeValue(clo,valueFieldName);
                        }
                        String enumText = "";
                        if (WebUtil.isNotNull(enumKey)) {
@@ -829,10 +818,10 @@
     * @param attr å±žæ€§å
     * @param value å€¼
     */
    private void setValueToCboOrClo(ClientBusinessObject cbo,ClientLinkObject clo,String attr,String value){
    private void setValueToCboOrClo(BusinessObject cbo,LinkObject clo,String attr,String value){
        try {
            if (cbo != null) {
                cbo.setAttributeValueWithNoCheck(attr, value);
                ObjectTool.setBOAttributeValue(cbo, attr, value);
            }else{
                setAttributeValueForClo(clo,attr, value);
            }
@@ -848,8 +837,8 @@
     * @param attributeValue å±žæ€§çš„值
     */
    @Override
    public void setAttributeValueForClo(ClientLinkObject clo, String attributeName, String attributeValue) {
        AttributeValue[] attrValues = clo.getLinkObject().newAttrValList;
    public void setAttributeValueForClo(LinkObject clo, String attributeName, String attributeValue) {
        AttributeValue[] attrValues = clo.newAttrValList;
        ArrayList<AttributeValue> attrValList = new ArrayList();
        AttributeValue attrVal;
        int i;
@@ -882,7 +871,7 @@
            attrValList.add(attrVal);
        }
        clo.getLinkObject().newAttrValList = (AttributeValue[]) attrValList.toArray(new AttributeValue[attrValList.size()]);
        clo.newAttrValList = attrValList.toArray(new AttributeValue[attrValList.size()]);
    }
@@ -892,7 +881,7 @@
     * @param enumAttrName æžšä¸¾å±žæ€§
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    private void queryEnumTextClo(ClientLinkObject clo,List<String> enumAttrName) throws VciBaseException{
    private void queryEnumTextClo(LinkObject clo,List<String> enumAttrName) throws VciBaseException{
        queryEnumText(null,clo,enumAttrName);
    }
@@ -905,7 +894,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBOByScheme(String queryScheme,
    public List<BusinessObject> queryCBOByScheme(String queryScheme,
            Map<String, String> conditionMap, Map<String, String> replaceMap)
            throws VciBaseException {
        PageHelper ph = new PageHelper(-1);
@@ -923,7 +912,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBOByScheme(String queryScheme,
    public List<BusinessObject> queryCBOByScheme(String queryScheme,
            Map<String, String> conditionMap, Map<String, String> replaceMap,
            PageHelper ph) throws VciBaseException {
        List<String> clauseList = new ArrayList<String>();
@@ -1002,7 +991,7 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryCBOByScheme(String queryScheme,
    public List<BusinessObject> queryCBOByScheme(String queryScheme,
            Map<String, String> conditionMap, Map<String, String> replaceMap,
            PageHelper ph, List<String> clauseList) throws VciBaseException {
        QueryTemplate qt = getQtByName(queryScheme,replaceMap);
@@ -1134,11 +1123,11 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryBySql(String sql,
    public List<BusinessObject> queryBySql(String sql,
            Map<String, String> conditionMap) throws VciBaseException {
        List<Map> allData = queryBySqlForMap(sql,conditionMap);
        if(allData == null || allData.size() == 0){
            return new ArrayList<ClientBusinessObject>();
            return new ArrayList<BusinessObject>();
        }else{
            return map2Cbos(allData);
        }
@@ -1151,10 +1140,10 @@
     * @throws VciBaseException æŸ¥è¯¢å‡ºé”™æ´»æŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> queryByOnlySql(String sql) throws VciBaseException{
    public List<BusinessObject> queryByOnlySql(String sql) throws VciBaseException{
        List<Map> allData = queryByOnlySqlForMap(sql);
        if(allData == null || allData.size() == 0){
            return new ArrayList<ClientBusinessObject>();
            return new ArrayList<BusinessObject>();
        }else{
            return map2Cbos(allData);
        }
@@ -1367,11 +1356,11 @@
            allFieldAttrMap.put(columnName.toLowerCase(),fieldName);
        }
        List<T> allObject = new ArrayList<T>();
        List<ClientBusinessObject> allCbos = queryCBO(WebUtil.getBtmTypeByObject(c), conditionMap, ph, allFieldAttrMap.keySet().stream().collect(Collectors.toList()));//执行查询
        List<BusinessObject> allCbos = queryCBO(WebUtil.getBtmTypeByObject(c), conditionMap, ph, allFieldAttrMap.keySet().stream().collect(Collectors.toList()));//执行查询
        List<String> oids = new ArrayList<String>();
        
        if(allCbos!=null&&allCbos.size()>0){
            for(ClientBusinessObject cbo : allCbos){
            for(BusinessObject cbo : allCbos){
                T obj  = null;
                try {
                    obj = c.newInstance();
@@ -1381,7 +1370,7 @@
                } catch (IllegalAccessException e) {
                }
                if(obj !=null){
                    oids.add(cbo.getOid());
                    oids.add(cbo.oid);
                    allObject.add(obj);
                }
            }
@@ -1472,10 +1461,10 @@
            allFieldAttrMap.put(columnName.toLowerCase(),fieldName);
        }
        List<T> allObject = new ArrayList<T>();
        List<ClientBusinessObject> allCbos = queryCBOByScheme(queryScheme, conditionMap, replaceMap,ph, allFieldAttrMap.keySet().stream().collect(Collectors.toList()));
        List<BusinessObject> allCbos = queryCBOByScheme(queryScheme, conditionMap, replaceMap,ph, allFieldAttrMap.keySet().stream().collect(Collectors.toList()));
        List<String> oids = new ArrayList<String>();
        if(allCbos!=null&&allCbos.size()>0){
            for(ClientBusinessObject cbo : allCbos){
            for(BusinessObject cbo : allCbos){
                T obj  = null;
                try {
                    obj = c.newInstance();
@@ -1485,7 +1474,7 @@
                } catch (IllegalAccessException e) {
                }
                if(obj !=null){
                    oids.add(cbo.getOid());
                    oids.add(cbo.oid);
                    allObject.add(obj);
                }
            }
@@ -1539,7 +1528,7 @@
     * @param isEdit æ˜¯å¦ä¸ºç¼–辑
     * @throws VciBaseException è®¾ç½®å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    private void setValueToCbo(Object obj,String btmType,ClientBusinessObject cbo ,boolean isEdit) throws VciBaseException{
    private void setValueToCbo(Object obj,String btmType,BusinessObject cbo ,boolean isEdit) throws VciBaseException{
        Field pkField = WebUtil.getPkFieldForObj(obj.getClass());
        if(pkField == null){
            throw new VciBaseException("{0}类中没有定义主键属性",new Object[]{obj.getClass()});
@@ -1547,10 +1536,10 @@
        //主键
        Object pkValue = WebUtil.getValueFromField(pkField.getName(), obj);
        if(pkValue == null || (pkValue instanceof String && WebUtil.isNull(pkValue.toString()))){
            WebUtil.setValueToField(pkField.getName(), obj, cbo.getOid());
            pkValue = cbo.getOid();
            WebUtil.setValueToField(pkField.getName(), obj, cbo.oid);
            pkValue = cbo.oid;
        }else{
            cbo.setOid(pkValue.toString());
            cbo.oid = pkValue.toString();
        }
        //进行非空,长度,重复的校验。。校验通过的赋值
        Map<String,String> fieldMap = WebUtil.getFieldNameMap(obj.getClass());
@@ -1592,7 +1581,7 @@
                        //说明不能重复,那么就需要查询一下
                        Map<String,String> queryRepeatMap = getOneQuery(attrName, value);
                        if(isEdit){
                            queryRepeatMap.put("oid", QueryOptionConstant.NOTEQUAL + cbo.getOid());
                            queryRepeatMap.put("oid", QueryOptionConstant.NOTEQUAL + cbo.oid);
                        }
                        if(queryCount(btmType, queryRepeatMap)>0){
                            throw new VciBaseException("{0}字段的值{1}在系统中已经存在", new Object[]{columnText,value});
@@ -1605,16 +1594,12 @@
                if(isEdit && checkUnAttrUnEdit(attrName)){
                    //编辑的时候,TS和OID不能设置.因为平台那接口设置了就会报错
                }else {
                    try {
                        //需要判断是否默认的属性,如果是默认属性,则使用对象的赋值的方式
                        if (WebUtil.isDefaultField(fieldName) && WebUtil.inArray(new String[]{"id", "name", "description","lcstatus","revisionvalue","versionvalue"}, fieldName.toLowerCase())) {
                            WebUtil.setValueToField(fieldName, cbo, value);
                            cbo.setAttributeValueWithNoCheck(attrName.toLowerCase(), value);
                        } else {
                            cbo.setAttributeValueWithNoCheck(attrName.toLowerCase(), value);
                        }
                    } catch (PLException e) {
                        throw WebUtil.getVciBaseException(e);
                    //需要判断是否默认的属性,如果是默认属性,则使用对象的赋值的方式
                    if (WebUtil.isDefaultField(fieldName) && WebUtil.inArray(new String[]{"id", "name", "description","lcstatus","revisionvalue","versionvalue"}, fieldName.toLowerCase())) {
                        WebUtil.setValueToField(fieldName, cbo, value);
                        ObjectTool.setBOAttributeValue(cbo, attrName.toLowerCase(), value);
                    } else {
                        ObjectTool.setBOAttributeValue(cbo, attrName.toLowerCase(), value);
                    }
                }
            }
@@ -1633,7 +1618,7 @@
        if(list==null){
            throw new VciBaseException(VciBaseException.paramNull);
        }
        Set<ClientBusinessObject> allCbos = new HashSet<ClientBusinessObject>();
        Set<BusinessObject> allCbos = new HashSet<BusinessObject>();
        for(T obj : list){
            //需要处理默认值
            Field pkField = WebUtil.getPkFieldForObj(obj.getClass());
@@ -1641,7 +1626,7 @@
                throw new VciBaseException("{0}对象中没有设置主键的属性",new Object[]{obj.getClass()});
            }
            String btmType = WebUtil.getBtmTypeByObject(obj.getClass());
            ClientBusinessObject cbo = createCBOByBtmName(btmType);
            BusinessObject cbo = createCBOByBtmName(btmType);
            setValueToCbo(obj,btmType,cbo,false);
            allCbos.add(cbo);
        }
@@ -1684,9 +1669,9 @@
        if(list==null){
            throw new VciBaseException(VciBaseException.paramNull);
        }
        Set<ClientBusinessObject> allUpdateCbos = new HashSet<ClientBusinessObject>();
        Set<ClientBusinessObject> allDeleteCbos = new HashSet<ClientBusinessObject>();
        Set<ClientBusinessObject> allAddCbos = new HashSet<ClientBusinessObject>();
        Set<BusinessObject> allUpdateCbos = new HashSet<BusinessObject>();
        Set<BusinessObject> allDeleteCbos = new HashSet<BusinessObject>();
        Set<BusinessObject> allAddCbos = new HashSet<BusinessObject>();
        Map<String,String> btmOidsMap = new HashMap<String, String>();
        for(T obj : list){
            String btmType = WebUtil.getBtmTypeByObject(obj.getClass());
@@ -1707,7 +1692,7 @@
            }
            btmOidsMap.put(btmType, tempOids);
        }
        List<ClientBusinessObject> needUpdateCbos = new ArrayList<ClientBusinessObject>();
        List<BusinessObject> needUpdateCbos = new ArrayList<BusinessObject>();
        Iterator<String> it = btmOidsMap.keySet().iterator();
        while(it.hasNext()){
            String btmType = it.next();
@@ -1725,12 +1710,12 @@
            }
            //主键
            Object pkValue = WebUtil.getValueFromField(pkField.getName(), obj);
            ClientBusinessObject cbo = null;
            BusinessObject cbo = null;
            if(pkValue == null || (pkValue instanceof String && WebUtil.isNull(pkValue.toString()))){
                continue;
            }else{
                for(ClientBusinessObject tempCbo : needUpdateCbos){
                    if(tempCbo.getOid().equalsIgnoreCase(pkValue.toString().trim())){
                for(BusinessObject tempCbo : needUpdateCbos){
                    if(tempCbo.oid.equalsIgnoreCase(pkValue.toString().trim())){
                        cbo = tempCbo;
                        break;
                    }
@@ -1738,7 +1723,7 @@
            }
            String btmType = WebUtil.getBtmTypeByObject(obj.getClass());
            //拷贝之前先清除已经有的值
            cbo.getBusinessObject().newAttrValList = new AttributeValue[0];
            cbo.newAttrValList = new AttributeValue[0];
            setValueToCbo(obj,btmType,cbo,true);
            allUpdateCbos.add(cbo);
        }
@@ -1797,8 +1782,8 @@
        if(list==null){
            throw new VciBaseException(VciBaseException.paramNull);
        }
        Set<ClientBusinessObject> allDeleteCbos = new HashSet<ClientBusinessObject>();
        Map<String,List<ClientBusinessObject>> btmBos = new HashMap<String, List<ClientBusinessObject>>();
        Set<BusinessObject> allDeleteCbos = new HashSet<BusinessObject>();
        Map<String,List<BusinessObject>> btmBos = new HashMap<String, List<BusinessObject>>();
        for(Object obj : list){
            //有可能不属于同一个业务类型下
            Field pkField = WebUtil.getPkFieldForObj(obj.getClass());
@@ -1808,7 +1793,7 @@
            String btmType = WebUtil.getBtmTypeByObject(obj.getClass());
            String pkValue = WebUtil.getValueFromFieldForCbo(pkField, obj);
            //所以这里也是直接查询的单个'
            List<ClientBusinessObject> deleteCbos = queryCBO(btmType, getOneQuery(
            List<BusinessObject> deleteCbos = queryCBO(btmType, getOneQuery(
                    WebUtil.getCboAttrNameFromField(pkField, obj.getClass()), pkValue));
            if(deleteCbos!=null){
                allDeleteCbos.addAll(deleteCbos);
@@ -1838,7 +1823,7 @@
     * @param btmBos ä¸šåŠ¡æ•°æ®
     * @throws VciBaseException è¢«å¼•用的时候会抛出异常
     */
    private void checkCanDelete(Map<String,List<ClientBusinessObject>> btmBos) throws VciBaseException{
    private void checkCanDelete(Map<String,List<BusinessObject>> btmBos) throws VciBaseException{
        //查找表是否被其他的属性引用
        if(!btmBos.isEmpty()){
            Iterator<String> it = btmBos.keySet().iterator();
@@ -1848,13 +1833,13 @@
                List<OsUsedAttributeVO> usedAttrVOs = btmService.listBtmUsedInfo(btmType);
                Map<String, List<OsUsedAttributeVO>> allReferAttr = Optional.ofNullable(usedAttrVOs).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.groupingBy(s -> s.getPkBtmType()));
                List<ClientBusinessObject> thisBtmTypeBo = btmBos.get(btmType);
                List<BusinessObject> thisBtmTypeBo = btmBos.get(btmType);
                if(thisBtmTypeBo.size()== 0){
                    return;
                }
                String oids = "";
                for(ClientBusinessObject cbo : thisBtmTypeBo){
                    oids += "'" + cbo.getOid() + "',";
                for(BusinessObject cbo : thisBtmTypeBo){
                    oids += "'" + cbo.oid + "',";
                }
                oids = WebUtil.removeComma(oids);
                if(!allReferAttr.isEmpty()){
@@ -1904,13 +1889,13 @@
            conditionMap = new HashMap<String, String>();
        }
        conditionMap.put(QUERY_FILTER_SECRET,BooleanEnum.FASLE.getValue());//查询的时候不能查询密级
        List<ClientBusinessObject> allCbos = queryCBO(btmType, conditionMap);
        List<BusinessObject> allCbos = queryCBO(btmType, conditionMap);
        BatchCBO batchCbo = new BatchCBO();
        if(allCbos.size()>0){
            Map<String,List<ClientBusinessObject>> btmBos = new HashMap<String, List<ClientBusinessObject>>();
            Map<String,List<BusinessObject>> btmBos = new HashMap<String, List<BusinessObject>>();
            btmBos.put(btmType, allCbos);
            checkCanDelete(btmBos);
            Set<ClientBusinessObject> allDeleteCbos = new HashSet<ClientBusinessObject>();
            Set<BusinessObject> allDeleteCbos = new HashSet<BusinessObject>();
            allDeleteCbos.addAll(allCbos);
            batchCbo.setDeleteCbos(allDeleteCbos);
        }
@@ -1943,24 +1928,24 @@
            selectSql += ",btmname ";
        }
        sql = selectSql + fromSql;
        List<ClientBusinessObject> allDelete =queryBySql(sql, conditionMap);
        List<BusinessObject> allDelete =queryBySql(sql, conditionMap);
        if(allDelete.size() == 0){
            return batchCbo;//没有删除任何数据
        }
        //找btmType;
        String btmType = allDelete.get(0).getAttributeValue("btmName");
        Map<String,List<ClientBusinessObject>> btmBos = new HashMap<String, List<ClientBusinessObject>>();
        String btmType = ObjectTool.getBOAttributeValue(allDelete.get(0),"btmName");
        Map<String,List<BusinessObject>> btmBos = new HashMap<String, List<BusinessObject>>();
        btmBos.put(btmType, allDelete);
        checkCanDelete(btmBos);
        Set<ClientBusinessObject> allDeleteCbos = new HashSet<ClientBusinessObject>();
        Set<BusinessObject> allDeleteCbos = new HashSet<BusinessObject>();
        //我们需要从后台查询整个的内容才可以执行删除,
        String oids = "";
        for(ClientBusinessObject cbo : allDelete){
            oids  += "'" + cbo.getOid() + "',";
        for(BusinessObject cbo : allDelete){
            oids  += "'" + cbo.oid + "',";
        }
        conditionMap.clear();
        conditionMap.put("oid", QueryOptionConstant.IN + "(" + WebUtil.removeComma(oids) + ")");
        List<ClientBusinessObject> inDbCbos = queryCBO(btmType, conditionMap);
        List<BusinessObject> inDbCbos = queryCBO(btmType, conditionMap);
        
        allDeleteCbos.addAll(inDbCbos);
        batchCbo.setDeleteCbos(allDeleteCbos);
@@ -1991,14 +1976,14 @@
        Map<String,String> conditionMap = getOneQuery("oid", pkValue);
        List<String> causeList = new ArrayList<>();
        causeList.add("ts");
        List<ClientBusinessObject> cbos = queryCBO(WebUtil.getBtmTypeByObject(obj.getClass()), conditionMap,new PageHelper(-1),causeList);
        List<BusinessObject> cbos = queryCBO(WebUtil.getBtmTypeByObject(obj.getClass()), conditionMap,new PageHelper(-1),causeList);
        if(CollectionUtils.isEmpty(cbos)){
            return false;
        }
        if(ts.contains(".")){
            ts = ts.substring(0,ts.lastIndexOf("."));
        }
        return cbos.get(0).getTs() == Long.valueOf(ts);
        return cbos.get(0).ts == Long.valueOf(ts);
    }
    /**
@@ -2047,7 +2032,7 @@
            ph = new PageHelper(-1);
            ph.setQueryTotal(true);
        }
        List<ClientBusinessObject> allCbos = queryCBO(btmType, conditionMap, ph, clauseList);
        List<BusinessObject> allCbos = queryCBO(btmType, conditionMap, ph, clauseList);
        DataGrid dg = new DataGrid();
        if(allCbos.size()>0){
            List<Map> mapList = cbos2Map(allCbos);
@@ -2123,7 +2108,7 @@
        if(ph == null){
            ph = new PageHelper(-1,true);
        }
        List<ClientBusinessObject> allCbos = queryCBOByScheme(queryScheme, conditionMap,replaceMap, ph, clauseList);
        List<BusinessObject> allCbos = queryCBOByScheme(queryScheme, conditionMap,replaceMap, ph, clauseList);
        DataGrid dg = new DataGrid();
        if(allCbos.size()>0){
            List<Map> mapList = cbos2Map(allCbos);
@@ -2224,29 +2209,29 @@
    }
    /**
     * ClientBusinessObject è½¬ä¸ºHashMap
     * BusinessObject è½¬ä¸ºHashMap
     * @param cbos CBOS
     * @return map
     * @throws VciBaseException è½¬æ¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<Map> cbos2Map(List<ClientBusinessObject> cbos)
    public List<Map> cbos2Map(List<BusinessObject> cbos)
            throws VciBaseException {
        List<Map> mapList = new ArrayList<Map>();
        for(ClientBusinessObject cbo : cbos){
        for(BusinessObject cbo : cbos){
            mapList.add(cbo2Map(cbo));
        }
        return mapList;
    }
    /**
     * ClientBusinessObject è½¬ä¸ºHashMap
     * BusinessObject è½¬ä¸ºHashMap
     * @param cbo ä¸šåŠ¡æ•°æ®å¯¹è±¡
     * @return map
     * @throws VciBaseException è½¬æ¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public Map cbo2Map(ClientBusinessObject cbo) throws VciBaseException {
    public Map cbo2Map(BusinessObject cbo) throws VciBaseException {
        Map<String,String> map = new HashMap<String, String>();
        WebUtil.copyValueToMapFromCbos(cbo, map);
        return map;
@@ -2254,15 +2239,15 @@
    /**
     * map转为clientBusinessObject
     * map转为BusinessObject
     * @param mapList  map列表
     * @return ä¸šåŠ¡æ•°æ®åˆ—è¡¨
     * @throws VciBaseException è½¬æ¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public List<ClientBusinessObject> map2Cbos(List<Map> mapList)
    public List<BusinessObject> map2Cbos(List<Map> mapList)
            throws VciBaseException {
        List<ClientBusinessObject> cboList = new ArrayList<ClientBusinessObject>();
        List<BusinessObject> cboList = new ArrayList<BusinessObject>();
        for(Map map : mapList){
            cboList.add(map2Cbo(map));
        }
@@ -2271,14 +2256,14 @@
     
    /**
     * map转为clientBusinessObject
     * map转为BusinessObject
     * @param map map
     * @return ä¸šåŠ¡æ•°æ®
     * @throws VciBaseException è½¬æ¢å‡ºé”™ä¼šæŠ›å‡ºå¼‚常
     */
    @Override
    public ClientBusinessObject map2Cbo(Map map) throws VciBaseException {
        ClientBusinessObject cbo = new ClientBusinessObject();
    public BusinessObject map2Cbo(Map map) throws VciBaseException {
        BusinessObject cbo = new BusinessObject();
        WebUtil.copyValueToCboFromMap(cbo, map);
        return cbo;
    }
@@ -2326,13 +2311,13 @@
     * @param cbos å®¢æˆ·ç«¯å¯¹è±¡
     * @return ä¸šåŠ¡å¯¹è±¡
     */
    private BusinessObject[] cboArray2Bo(ClientBusinessObject[] cbos){
    private BusinessObject[] cboArray2Bo(BusinessObject[] cbos){
        if(cbos == null ||cbos.length == 0){
            return new BusinessObject[0];
        }
        BusinessObject[] bos = new BusinessObject[cbos.length];
        for(int i = 0; i < cbos.length; i++){
            bos[i] = cbos[i].getBusinessObject();
            bos[i] = cbos[i];
        }
        return bos;
    }
@@ -2342,13 +2327,13 @@
     * @param clos å®¢æˆ·ç«¯å¯¹è±¡
     * @return ä¸šåŠ¡å¯¹è±¡
     */
    private LinkObject[] cloArray2Lo(ClientLinkObject[] clos){
    private LinkObject[] cloArray2Lo(LinkObject[] clos){
        if(clos == null ||clos.length == 0){
            return new LinkObject[0];
        }
        LinkObject[] bos = new LinkObject[clos.length];
        for(int i = 0; i < clos.length; i++){
            bos[i] = clos[i].getLinkObject();
            bos[i] = clos[i];
        }
        return bos;
    }
@@ -2357,10 +2342,10 @@
     * åˆ é™¤æžšä¸¾å’Œå‚照的属性
     * @param cbos ä¸šåŠ¡æ•°æ®
     */
    private void deleteReferAttrInCbo(Set<ClientBusinessObject> cbos){
    private void deleteReferAttrInCbo(Set<BusinessObject> cbos){
        if(cbos !=null){
            for(ClientBusinessObject cbo : cbos){
                BusinessObject bo = cbo.getBusinessObject();
            for(BusinessObject cbo : cbos){
                BusinessObject bo = cbo;
                List<AttributeValue> newAttr = new ArrayList<AttributeValue>();
                if (bo.newAttrValList != null) {
                    for (int i = 0; i < bo.newAttrValList.length; ++i) {
@@ -2374,7 +2359,7 @@
                    }
                }
                bo.newAttrValList = newAttr.toArray(new AttributeValue[0]);
                cbo.setBusinessObject(bo);
                cbo = bo;
            }
        }
    }
@@ -2410,11 +2395,11 @@
     * @throws VciBaseException å‚数为空,数据不存在会抛出异常
     */
    @Override
    public ClientBusinessObject selectCBOByOid(String oid, String btmName) throws VciBaseException {
    public BusinessObject selectCBOByOid(String oid, String btmName) throws VciBaseException {
        VciBaseUtil.alertNotNull(oid,"主键",btmName,"业务类型");
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put("oid", oid.trim());
        List<ClientBusinessObject> cbos = queryCBO(btmName, conditionMap);
        List<BusinessObject> cbos = queryCBO(btmName, conditionMap);
        if(CollectionUtils.isEmpty(cbos)){
            throw new VciBaseException("数据在系统中不存在{0}",new String[]{oid});
        }
@@ -2456,15 +2441,15 @@
     * @throws VciBaseException å‚数为空,查询出错会抛出异常
     */
    @Override
    public List<ClientBusinessObject> selectCBOByOidCollection(Collection<String> oidCollection, String btmName) throws VciBaseException {
    public List<BusinessObject> selectCBOByOidCollection(Collection<String> oidCollection, String btmName) throws VciBaseException {
        VciBaseUtil.alertNotNull(oidCollection,"主键集合",btmName,"业务类型");
        Collection<Collection<String>> oidCollections = WebUtil.switchCollectionForOracleIn(oidCollection);
        List<ClientBusinessObject> doList = new ArrayList<ClientBusinessObject>();
        List<BusinessObject> doList = new ArrayList<BusinessObject>();
        for(Collection<String> oids: oidCollections){
            Map<String,String> conditionMap = new HashMap<String, String>();
            conditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oids.toArray(new String[0])) + ")");
            List<ClientBusinessObject> list = queryCBO(btmName, conditionMap);
            List<BusinessObject> list = queryCBO(btmName, conditionMap);
            if(CollectionUtils.isEmpty(list)){
                throw new VciBaseException("{0}条数据在系统中不存在",new String[]{String.valueOf(oids.size())});
            }
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
@@ -1,8 +1,6 @@
package com.vci.web.service.impl;
import com.vci.client.omd.linktype.util.Tool;
import com.vci.client.omd.provider.BtmProvider;
import com.vci.client.omd.provider.LinkTypeProvider;
import com.vci.client.common.providers.WebServiceProvider;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.atm.AttributeDef;
import com.vci.corba.omd.btm.BTMServicePrx;
@@ -48,7 +46,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*;
import static com.vci.omd.constants.AttributeConstants.*;
/**
@@ -630,21 +628,25 @@
                    btmService.addBizType(btmItem);
                    //执行完成了需要创建表
                    //获取的时候不一定刷新了缓存,这样就获取不到信息
                    String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name);
                    //OmdHelper
                    //todo æ­¤å æ— æ³•引用,后续会进行调整,再进行引用
//                    String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name);
                    String btmTableName = null;
                    String sql = "create Table " + btmTableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tREVISIONOID VARCHAR2(36),\n\tNAMEOID VARCHAR2(36),\n\tBtmName VARCHAR2(36),\n\tISLastR CHAR(1),\n\tISFirstR CHAR(1),\n\tISLastV CHAR(1),\n\tISFirstV CHAR(1),\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tRevisionRule VARCHAR2(36),\n\tVersionRule VARCHAR2(36),\n\tRevisionSeq NUMBER,\n\tRevisionValue VARCHAR2(10),\n\tVersionSeq NUMBER,\n\tVersionValue VARCHAR2(10),\n\tLCTID VARCHAR2(36),\n\tLCStatus VARCHAR2(36),\n\tTS TIMESTAMP,\n\tID VARCHAR2(36),\n\tNAME VARCHAR2(128),\n\tDESCRIPTION VARCHAR2(255),\n\tOWNER VARCHAR2(36),\n\tCHECKINBY VARCHAR2(36),\n\tCHECKINTIME TIMESTAMP,\n\tCHECKOUTBY VARCHAR2(36),\n\tCHECKOUTTIME TIMESTAMP,\n\tCOPYFROMVERSION VARCHAR2(36),\n\t";
                    String[] apNameArray = btmItem.apNameArray;
                    if(apNameArray!=null && apNameArray.length>0){
                        for(String attrId : apNameArray){
                            OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim());
                            if(attrVO!=null) {
                                String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
                                sql = sql + abSql;
                                //todo æ­¤å æ— æ³•引用,后续会进行调整,再进行引用
//                                String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
//                                sql = sql + abSql;
                            }else{
                                logger.info("业务类型{}里的属性{}没找到",btmTableName,attrId.toLowerCase().trim());
                            }
                        }
                    }
                    String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name);
//                    String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name);
                    sql = sql.substring(0, sql.lastIndexOf(","));
                    sql = sql + "\n)";
                    //TODO æš‚时不清楚用何种方式创建表,此处先注释掉
@@ -1122,12 +1124,15 @@
     */
    private void addAttrToDB(Collection<String> addedAbList,String btmType,boolean linkType){
        if (!CollectionUtils.isEmpty(addedAbList)) {
            String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
            //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//            String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
            String tableName = null;
            String addSql = "alter table " + tableName + " add(";
            Map<String, OsAttributeVO> attributeMap = attrService.selectAllAttributeMap();
            for (String abName : addedAbList) {
                AttributeDef abItem = attrService.attributeVO2DO(attributeMap.get(abName));
                addSql = addSql + Tool.getInstance().getAbSql(abItem);
                //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//                addSql = addSql + Tool.getInstance().getAbSql(abItem);
            }
            addSql = VciBaseUtil.removeComma(addSql.replace("\n\t",""));
            addSql = addSql + ")";
@@ -1143,13 +1148,14 @@
     */
    private void removeAttrToDB(Collection<String> removeAbList,String btmType,boolean linkType){
        if (!CollectionUtils.isEmpty(removeAbList)) {
            String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
            String removeSql = "alter table " + tableName + " drop(";
            for (String abName : removeAbList) {
                removeSql = removeSql + abName + ",";
            }
            removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t",""));
            removeSql = removeSql + ")";
            //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//            String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
//            String removeSql = "alter table " + tableName + " drop(";
//            for (String abName : removeAbList) {
//                removeSql = removeSql + abName + ",";
//            }
//            removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t",""));
//            removeSql = removeSql + ")";
            //TODO ä¸æ¸…楚具体使用什么方法,暂时注释,但不要删除
//            DDLToolClient.getService().batchExecuteUpdateOracle(new String[]{removeSql});
        }
@@ -1275,14 +1281,17 @@
            for(LinkType linkType : linkTypes){
                try{
                    platformClientUtil.getLinkTypeService().addLinkType(linkType);
                    String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name);
                    //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//                    String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name);
                    String tableName = null;
                    String sql = "create table " + tableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tTS TIMESTAMP,\n\t";
                    String[] apNameArray = linkType.attributes;
                    if(apNameArray!=null && apNameArray.length>0){
                        for(String attrId : apNameArray){
                            OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim());
                            String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
                            sql = sql + abSql;
                            //todo æ­¤æš‚无法引用,后续会进行调整,再进行引用
//                            String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
//                            sql = sql + abSql;
                        }
                    }
                    sql = sql.substring(0, sql.lastIndexOf(","));
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java
@@ -2,18 +2,16 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.vci.client.bof.BOFactoryClient;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.bof.ClientLinkObjectOperation;
import com.vci.client.common.oq.OQTool;
import com.vci.common.qt.object.*;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.AttributeValue;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.query.ObjectQueryService;
import com.vci.corba.query.data.BOAndLO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
@@ -55,10 +53,6 @@
     */
    private Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * LO操作类
     */
    private ClientLinkObjectOperation loOperation = new ClientLinkObjectOperation();
    @Autowired
    private WebBoServiceI boService;
@@ -95,32 +89,28 @@
        LO_BASE_FIELD_MAP.put("linkTypeName","linkTypeName");
    }
    @Override
    public ClientLinkObjectOperation getLoOption() throws VciBaseException {
        return loOperation;
    }
    @Override
    public List<ClientLinkObject> queryCLO(String linkType,
    public List<LinkObject> queryCLO(String linkType,
                                           Map<String, String> conditionMap) throws VciBaseException {
        return queryCLO(linkType, "", 1, conditionMap);
    }
    @Override
    public List<ClientBusinessObject> queryLinkCbo(String linkType,
                                                   String toBtmname, Map<String, String> conditionMap)
    public List<BusinessObject> queryLinkCbo(String linkType,
                                             String toBtmname, Map<String, String> conditionMap)
            throws VciBaseException {
        return queryLinkCbo(linkType, toBtmname, 1, conditionMap);
    }
    @Override
    public List<ClientLinkObject> queryCLO(String linkType, String toBtmName,
    public List<LinkObject> queryCLO(String linkType, String toBtmName,
            int level, Map<String, String> conditionMap) throws VciBaseException {
        return queryCLO(linkType, toBtmName, level, false, conditionMap);
    }
    @Override
    public List<ClientLinkObject> queryCLO(String linkType, String toBtmName,
    public List<LinkObject> queryCLO(String linkType, String toBtmName,
            int level, boolean isDirection,Map<String, String> conditionMap) throws VciBaseException {
        return queryCLO(linkType,toBtmName,level,isDirection,conditionMap,new PageHelper(-1));
    }
@@ -135,9 +125,9 @@
     * @param ph æŽ’序和分页,链接一般不建议分页
     */
    @Override
    public List<ClientLinkObject> queryCLO(String linkType, String toBtmName,
    public List<LinkObject> queryCLO(String linkType, String toBtmName,
            int level, boolean isDirection,Map<String, String> conditionMap,PageHelper ph) throws VciBaseException {
        List<ClientLinkObject> rtnOBJs = new ArrayList<ClientLinkObject>();
        List<LinkObject> rtnOBJs = new ArrayList<LinkObject>();
        QueryTemplate qt = new QueryTemplate();
        qt.setId("queryLO");
        qt.setType(QTConstants.TYPE_LINK);
@@ -192,8 +182,8 @@
            LinkObject[] bos = platformClientUtil.getQueryService().findLTObjects(qt.getId(), OQTool.qtTOXMl(qt).asXML());
            if (bos != null && bos.length > 0) {
                for (LinkObject bo : bos) {
                    ClientLinkObject clo = new ClientLinkObject();
                    clo.setLinkObject(bo);
                    LinkObject clo = new LinkObject();
                    clo = bo;
                    rtnOBJs.add(clo);
                }
@@ -208,17 +198,17 @@
    @Override
    public List<ClientBusinessObject> queryLinkCbo(String linkType,
    public List<BusinessObject> queryLinkCbo(String linkType,
            String toBtmname, int level, Map<String, String> conditionMap)
            throws VciBaseException {
        return queryLinkCbo(linkType, toBtmname, level, false, conditionMap);
    }
    @Override
    public List<ClientBusinessObject> queryLinkCbo(String linkType,
    public List<BusinessObject> queryLinkCbo(String linkType,
            String toBtmName, int level,boolean isDirection, Map<String, String> conditionMap)
            throws VciBaseException {
        List<ClientBusinessObject> rtnOBJs = new ArrayList<ClientBusinessObject>();
        List<BusinessObject> rtnOBJs = new ArrayList<BusinessObject>();
        QueryTemplate qt = new QueryTemplate();
        qt.setId("queryLO");
        qt.setType(QTConstants.TYPE_LINK);
@@ -246,8 +236,8 @@
            BOAndLO[] bos = platformClientUtil.getQueryService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),btmOid);
            if (bos != null && bos.length > 0) {
                for (BOAndLO blo : bos) {
                    ClientBusinessObject cbo = new ClientBusinessObject();
                    cbo.setBusinessObject(blo.bo);
                    BusinessObject cbo = new BusinessObject();
                    cbo = blo.bo;
                    rtnOBJs.add(cbo);
                }
                return rtnOBJs;
@@ -258,36 +248,36 @@
        }
        return rtnOBJs;
    }
//
//    @Override
//    public Map<String, BusinessObject> queryLinkedCbo(LinkObject[] lo,
//            boolean isDirection) throws VciBaseException {
//        LinkObject[] clos = new LinkObject[lo.length];
//        for(int i =0 ; i < lo.length; i ++){
//            LinkObject clo = new LinkObject();
//            clo = lo[i];
//            clos[i] = clo;
//        }
//        return queryLinkedCbo(clos,isDirection);
//    }
    @Override
    public Map<String, ClientBusinessObject> queryLinkedCbo(LinkObject[] lo,
            boolean isDirection) throws VciBaseException {
        ClientLinkObject[] clos = new ClientLinkObject[lo.length];
        for(int i =0 ; i < lo.length; i ++){
            ClientLinkObject clo = new ClientLinkObject();
            clo.setLinkObject(lo[i]);
            clos[i] = clo;
        }
        return queryLinkedCbo(clos,isDirection);
    }
    @Override
    public Map<String, ClientBusinessObject> queryLinkedCbo(List los,
    public Map<String, BusinessObject> queryLinkedCbo(List los,
            boolean isDirection) throws VciBaseException {
        return queryLinkedCbo(los,isDirection,new ArrayList<String>());
    }
    @Override
    public Map<String, ClientBusinessObject> queryLinkedCbo(List los,
    public Map<String, BusinessObject> queryLinkedCbo(List los,
            boolean isDirection,List<String> queryColumn) throws VciBaseException {
        ClientLinkObject[] clos = new ClientLinkObject[los.size()];
        LinkObject[] clos = new LinkObject[los.size()];
        for(int i = 0 ; i < los.size(); i ++){
            Object o = los.get(i);
            ClientLinkObject clo = new ClientLinkObject();
            LinkObject clo = new LinkObject();
            if(o instanceof LinkObject){
                clo.setLinkObject((LinkObject)o);
            }else if(o instanceof ClientLinkObject){
                clo = (ClientLinkObject)o;
                clo = (LinkObject)o;
            }else if(o instanceof LinkObject){
                clo = (LinkObject)o;
            }
            clos[i] = clo;
        }
@@ -295,31 +285,31 @@
    }
    @Override
    public Map<String, ClientBusinessObject> queryLinkedCbo(
            ClientLinkObject[] clol, boolean isDirection) throws VciBaseException {
    public Map<String, BusinessObject> queryLinkedCbo(
            LinkObject[] clol, boolean isDirection) throws VciBaseException {
        return queryLinkedCbo(clol,isDirection,new ArrayList<String>());
    }
    /*****
     *
     */
    @Override
    public Map<String, ClientBusinessObject> queryLinkedCbo(
            ClientLinkObject[] clol, boolean isDirection,List<String> queryColumn) throws VciBaseException{
    public Map<String, BusinessObject> queryLinkedCbo(
            LinkObject[] clol, boolean isDirection,List<String> queryColumn) throws VciBaseException{
        Map<String/*t_oid或者f_oid*/,String/*oid*/> linkBoOidMap = new HashMap<String, String>();
        Map<String,String> btmTypeOidMap = new HashMap<String, String>();
        for(int i = 0 ; i < clol.length; i ++){
            ClientLinkObject clo = clol[i];
            LinkObject clo = clol[i];
            if(clo!=null){
                String btmType = "";
                String btmOid = "";
                if(isDirection){
                    linkBoOidMap.put(clo.getToOid(),clo.getOid());
                    btmType = clo.getToBTMName().toLowerCase().trim();
                    btmOid = clo.getToOid();
                    linkBoOidMap.put(clo.toOid,clo.oid);
                    btmType = clo.toBTName.toLowerCase().trim();
                    btmOid = clo.toOid;
                }else{
                    linkBoOidMap.put(clo.getFromOid(),clo.getOid());
                    btmType = clo.getFromBTMName().toLowerCase().trim();
                    btmOid = clo.getFromOid();
                    linkBoOidMap.put(clo.fromOid,clo.oid);
                    btmType = clo.fromBTName.toLowerCase().trim();
                    btmOid = clo.fromOid;
                }
                String oids = "";
                if(btmTypeOidMap.containsKey(btmType)){
@@ -329,7 +319,7 @@
                btmTypeOidMap.put(btmType, oids);
            }
        }
        Map<String,ClientBusinessObject> linkedCboMap = new HashMap<>();
        Map<String,BusinessObject> linkedCboMap = new HashMap<>();
        Iterator<String> it = btmTypeOidMap.keySet().iterator();
        while(it.hasNext()){
            String btmType = it.next();
@@ -346,10 +336,10 @@
            }
            Map<String,String> conditionMap = new HashMap<>();
            conditionMap.put("oid",oids);
            List<ClientBusinessObject> allCbo = boService.queryCBO(btmType, conditionMap,new PageHelper(-1),clauseList);
            List<BusinessObject> allCbo = boService.queryCBO(btmType, conditionMap,new PageHelper(-1),clauseList);
            if(allCbo.size()>0){
                for(ClientBusinessObject cbo : allCbo){
                    String linkOid = linkBoOidMap.get(cbo.getOid());
                for(BusinessObject cbo : allCbo){
                    String linkOid = linkBoOidMap.get(cbo.oid);
                    linkedCboMap.put(linkOid, cbo);
                }
            }
@@ -358,24 +348,24 @@
    }
    @Override
    public List<Map> clos2Map(List<ClientLinkObject> clos) throws VciBaseException {
    public List<Map> clos2Map(List<LinkObject> clos) throws VciBaseException {
        List<Map> allMap = new ArrayList<Map>();
        for(ClientLinkObject clo : clos){
        for(LinkObject clo : clos){
            allMap.add(clo2Map(clo));
        }
        return allMap;
    }
    @Override
    public Map clo2Map(ClientLinkObject clo) throws VciBaseException {
    public Map clo2Map(LinkObject clo) throws VciBaseException {
        Map<String,String> map = new HashMap<String, String>();
        WebUtil.copyValueToMapFromClos(clo, map);
        return map;
    }
    @Override
    public List<ClientLinkObject> map2Clos(List<Map> map) throws VciBaseException {
        List<ClientLinkObject> allClo = new ArrayList<ClientLinkObject>();
    public List<LinkObject> map2Clos(List<Map> map) throws VciBaseException {
        List<LinkObject> allClo = new ArrayList<LinkObject>();
        for(Map m : map){
            allClo.add(map2Clo(m));
        }
@@ -383,8 +373,8 @@
    }
    @Override
    public ClientLinkObject map2Clo(Map map) throws VciBaseException {
        ClientLinkObject clo = new ClientLinkObject();
    public LinkObject map2Clo(Map map) throws VciBaseException {
        LinkObject clo = new LinkObject();
        WebUtil.copyValueToCloFromMap(clo, map);
        return clo;
    }
@@ -397,47 +387,47 @@
     * @throws VciBaseException
     */
    @Override
    public List<ClientLinkObject> saveClientLinkObjects(List<ClientLinkObject> clos) throws VciBaseException {
    public List<LinkObject> saveLinkObjects(List<LinkObject> clos) throws VciBaseException {
        if(clos == null || clos.size()  == 0){
            throw new VciBaseException("没有要保存的业务类型数据");
        }
        List<LinkObject> linkObjects = new ArrayList<LinkObject>();
        for(ClientLinkObject clo : clos){
        for(LinkObject clo : clos){
            //需要看看基本的信息是否有
            if(StringUtils.isBlank(clo.getLoName())){
            if(StringUtils.isBlank(clo.ltName)){
                throw new VciBaseException("链接类型的名称为空");
            }
            if(StringUtils.isBlank(clo.getOid())){
                clo.setOid((new ObjectUtility()).getNewObjectID36());
            if(StringUtils.isBlank(clo.oid)){
                clo.oid = (new ObjectUtility()).getNewObjectID36();
            }
            if(StringUtils.isBlank(clo.getCreator())){
                clo.setCreator(WebUtil.getCurrentUserId());
            if(StringUtils.isBlank(clo.creator)){
                clo.creator = WebUtil.getCurrentUserId();
            }
            if(clo.getCreateTime() == 0){
                clo.setCreateTime(VciDateUtil.getNowTime());
            if(clo.createTime == 0){
                clo.createTime = VciDateUtil.getNowTime();
            }
            if(StringUtils.isBlank(clo.getLastModifier())){
                clo.setLastModifier(clo.getCreator());
            if(StringUtils.isBlank(clo.modifier)){
                clo.modifier = clo.creator;
            }
            if(clo.getLastModifyTime() == 0){
                clo.setLastModifyTime(clo.getCreateTime());
            if(clo.modifyTime == 0){
                clo.modifyTime = clo.createTime;
            }
            if(clo.getTs() == 0){
                clo.setTs(clo.getCreateTime());
            if(clo.ts == 0){
                clo.ts = clo.createTime;
            }
            linkObjects.add(clo.getLinkObject());
            linkObjects.add(clo);
        }
        try {
            LinkObject[] savedLinkObject = BOFactoryClient.getBOFactoryService().batchCreateLinkObject(linkObjects.toArray(new LinkObject[0]));
            List<ClientLinkObject> savedClientLinkObject = new ArrayList<ClientLinkObject>();
            LinkObject[] savedLinkObject = platformClientUtil.getBOFactoryService().batchCreateLinkObject(linkObjects.toArray(new LinkObject[0]));
            List<LinkObject> savedListLinkObject = new ArrayList<LinkObject>();
            if(savedLinkObject != null && savedLinkObject.length > 0){
                for(LinkObject linkObject : savedLinkObject){
                    ClientLinkObject clo = new ClientLinkObject();
                    clo.setLinkObject(linkObject);
                    savedClientLinkObject.add(clo);
                    LinkObject clo = new LinkObject();
                    clo = linkObject;
                    savedListLinkObject.add(clo);
                }
            }
            return savedClientLinkObject;
            return savedListLinkObject;
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
@@ -451,13 +441,11 @@
     * @throws VciBaseException
     */
    @Override
    public ClientLinkObject createClientLinkObject(String loName) throws VciBaseException {
    public LinkObject createLinkObject(String loName) throws VciBaseException {
        WebUtil.alertNotNull(loName,"链接");
        try {
            return loOperation.createLinkObject(loName,WebUtil.getCurrentUserId());
        } catch (PLException vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        return null;
        //todo åœ¨å¹³å°é‡Œé¢éœ€è¦ä¼ å…¥å¯¹è±¡ï¼ŒçŽ°åœ¨æ˜¯å­—ç¬¦ä¸²ï¼Œéœ€è¦çœ‹å¹³å°å¦‚ä½•å¤„ç†
//            return loOperation.createLinkObject(loName,WebUtil.getCurrentUserId());
    }
    /**
@@ -468,9 +456,9 @@
     * @throws VciBaseException
     */
    @Override
    public ClientLinkObject cloneClientLinkObject(ClientLinkObject clo) throws VciBaseException {
        ClientLinkObject newClo = new ClientLinkObject();
        String JSONString = JSONObject.toJSONStringWithDateFormat(clo.getLinkObject(),VciDateUtil.DateTimeMillFormat,SerializerFeature.WriteDateUseDateFormat);
    public LinkObject cloneLinkObject(LinkObject clo) throws VciBaseException {
        LinkObject newClo = new LinkObject();
        String JSONString = JSONObject.toJSONStringWithDateFormat(clo,VciDateUtil.DateTimeMillFormat,SerializerFeature.WriteDateUseDateFormat);
        LinkObject lo = JSONObject.parseObject(JSONString,LinkObject.class);
        if(lo.newAttrValList == null) {
            lo.newAttrValList = new AttributeValue[0];
@@ -478,13 +466,13 @@
        if(lo.hisAttrValList == null) {
            lo.hisAttrValList =  new AttributeValue[0];
        }
        newClo.setLinkObject(lo);
        newClo.setOid((new ObjectUtility()).getNewObjectID36());
        newClo.setCreator(WebUtil.getCurrentUserId());
        newClo.setCreateTime(VciDateUtil.getNowTime());
        newClo.setLastModifier(newClo.getCreator());
        newClo.setLastModifyTime(newClo.getCreateTime());
        newClo.setTs(newClo.getCreateTime());
        newClo = lo;
        newClo.oid = (new ObjectUtility()).getNewObjectID36();
        newClo.creator = WebUtil.getCurrentUserId();
        newClo.createTime = VciDateUtil.getNowTime();
        newClo.modifier = newClo.creator;
        newClo.modifyTime = newClo.createTime;
        newClo.ts = newClo.createTime;
        return  newClo;
    }
@@ -495,10 +483,10 @@
     * @throws VciBaseException
     */
    @Override
    public void deleteClientLinkObjects(List<ClientLinkObject> clos) throws VciBaseException {
    public void deleteLinkObjects(List<LinkObject> clos) throws VciBaseException {
        if(clos!=null){
            try {
                loOperation.batchdDeleteLinkObject(clos.toArray(new ClientLinkObject[0]));
                platformClientUtil.getBOFactoryService().batchDeleteLinkObject(clos.toArray(new LinkObject[0]));
            } catch (PLException vciError) {
                throw  WebUtil.getVciBaseException(vciError);
            }
@@ -511,10 +499,10 @@
     * @throws VciBaseException
     */
    @Override
    public void updateClientLinkObject(List<ClientLinkObject> clos) throws VciBaseException {
    public void updateLinkObject(List<LinkObject> clos) throws VciBaseException {
        if(clos!=null){
            try {
                loOperation.batchUpdateLinkObject(clos.toArray(new ClientLinkObject[0]));
                platformClientUtil.getBOFactoryService().batchUpdateLinkObject(clos.toArray(new LinkObject[0]));
            } catch (PLException vciError) {
                throw  WebUtil.getVciBaseException(vciError);
            }
@@ -709,8 +697,8 @@
            List<String> finalEnumFields = enumFields;
            final Integer[] total = {totalHolder.value};
            Arrays.stream(linkObjects.returnValue).forEach(lo->{
                ClientLinkObject clo = new ClientLinkObject();
                clo.setLinkObject(lo);
                LinkObject clo = new LinkObject();
                clo = lo;
                Map<String, String> map = new HashMap<>();
                boService.queryEnumText(null,clo, finalEnumFields);
                WebUtil.copyValueToMapFromClos(clo,map);
@@ -744,14 +732,14 @@
                    //分页不要超过1000
                    Map<String,String> boConditionMap =new HashMap<>();
                    boConditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oids.toArray(new String[0])) + ")");
                    List<ClientBusinessObject> cbos = boService.queryCBO(btm, boConditionMap, null, fromFieldsFix);
                    List<BusinessObject> cbos = boService.queryCBO(btm, boConditionMap, null, fromFieldsFix);
                    if(!CollectionUtils.isEmpty(cbos)){
                        cbos.stream().forEach(cbo->{
                            dataGrid.getData().forEach(data->{
                                Map<String, String> map = (Map<String, String>) data;
                                if(map.getOrDefault("f_oid","").equals(cbo.getOid())){
                                if(map.getOrDefault("f_oid","").equals(cbo.oid)){
                                    fromFieldsFix.stream().forEach(fromField->{
                                        map.put("f_oid." + fromField,cbo.getAttributeValue(fromField));
                                        map.put("f_oid." + fromField, ObjectTool.getBOAttributeValue(cbo,fromField));
                                    });
                                }
                            });
@@ -768,14 +756,14 @@
                    //分页不要超过1000
                    Map<String,String> boConditionMap =new HashMap<>();
                    boConditionMap.put("oid",QueryOptionConstant.IN + "(" + WebUtil.toInSql(oids.toArray(new String[0])) + ")");
                    List<ClientBusinessObject> cbos = boService.queryCBO(btm, boConditionMap, null, toFieldsFix);
                    List<BusinessObject> cbos = boService.queryCBO(btm, boConditionMap, null, toFieldsFix);
                    if(!CollectionUtils.isEmpty(cbos)){
                        cbos.stream().forEach(cbo->{
                            dataGrid.getData().forEach(data->{
                                Map<String, String> map = (Map<String, String>) data;
                                if(map.getOrDefault("t_oid","").equals(cbo.getOid())){
                                if(map.getOrDefault("t_oid","").equals(cbo.oid)){
                                    toFieldsFix.stream().forEach(toField->{
                                        map.put("t_oid." + toField,cbo.getAttributeValue(toField));
                                        map.put("t_oid." + toField,ObjectTool.getBOAttributeValue(cbo,toField));
                                    });
                                }
                            });
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java
@@ -1,11 +1,13 @@
package com.vci.web.service.impl;
import com.vci.client.bof.ClientLinkObject;
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.data.FlowInstanceInfo;
import com.vci.corba.workflow.data.MapTransfersInfo;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.file.dto.VciFileObjectDTO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.enumpck.DataSecretEnum;
import com.vci.starter.web.exception.VciBaseException;
@@ -146,7 +148,7 @@
        Map<String, String> conditionMap = WebUtil.getOidQuery(config.getOids());
        conditionMap.put(WebBoServiceI.QUERY_FILTER_SECRET, "false");
        conditionMap.put(WebBoServiceI.QUERY_FILTER_DATARIGHT, "false");
        List<com.vci.client.bof.ClientBusinessObject> allCbo = boService.queryCBO(config.getBtmType().toLowerCase().trim(), conditionMap);
        List<BusinessObject> allCbo = boService.queryCBO(config.getBtmType().toLowerCase().trim(), conditionMap);
        if (allCbo == null || allCbo.size() == 0) {
            throw new VciBaseException(msgCodePrefix + "dataNotNull", new String[]{});
        }
@@ -154,11 +156,11 @@
        //查询数据是否已经发起了流程
        //查询input连接里是不是有流程实例,并且流程实例不等于终止
        conditionMap.put("oid", " in (select f_oid from platformlt_" + processDao.getTaskDataLink() + " where oid " + conditionMap.get("oid").replace("\\IN", " in ") + ")");
        List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        List<BusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        if (workInstanceCbos != null && workInstanceCbos.size() > 0) {
            for (com.vci.client.bof.ClientBusinessObject workInstance : workInstanceCbos) {
                if (!workInstance.getLcStatus().equalsIgnoreCase("Obsoleted")) {
                    throw new VciBaseException(msgCodePrefix + "dataSubmitedToProcess", new String[]{workInstance.getName(), workInstance.getCreator()});
            for (BusinessObject workInstance : workInstanceCbos) {
                if (!workInstance.lcStatus.equalsIgnoreCase("Obsoleted")) {
                    throw new VciBaseException(msgCodePrefix + "dataSubmitedToProcess", new String[]{workInstance.name, workInstance.creator});
                }
            }
        }
@@ -167,14 +169,14 @@
        String[][] objectPropertyValues = new String[allCbo.size()][4];
        String[] objIds = new String[allCbo.size()];//业务数据的组件
        for (int i = 0; i < allCbo.size(); i++) {
            com.vci.client.bof.ClientBusinessObject cbo = allCbo.get(i);
            BusinessObject cbo = allCbo.get(i);
            String[] values = new String[4];
            values[0] = cbo.getOid();
            values[1] = cbo.getRevisionid();
            values[2] = cbo.getNameoid();
            values[3] = cbo.getBtmName();
            values[0] = cbo.oid;
            values[1] = cbo.revisionid;
            values[2] = cbo.nameoid;
            values[3] = cbo.btName;
            objectPropertyValues[i] = values;
            objIds[i] = cbo.getOid();
            objIds[i] = cbo.oid;
        }
        FlowInstanceInfo flowInstanceInfo = new FlowInstanceInfo();
@@ -471,15 +473,15 @@
        Map<String, String> conditionMap = new HashMap<String, String>();
        conditionMap.put("f_btwname", processDao.getWorkitemBtmType());
        conditionMap.put("f_oid", QueryOptionConstant.IN + "(" + WebUtil.toInSql(taskIds) + ")");
        List<ClientLinkObject> allLinkData = loService.queryCLO(processDao.getTaskDataLink(), conditionMap);
        List<LinkObject> allLinkData = loService.queryCLO(processDao.getTaskDataLink(), conditionMap);
        String[][] objectPropertyValues = new String[allLinkData.size()][4];
        for (int i = 0; i < allLinkData.size(); i++) {
            ClientLinkObject clo = allLinkData.get(i);
            LinkObject clo = allLinkData.get(i);
            String[] values = new String[4];
            values[0] = clo.getToOid();
            values[1] = clo.getToRevisionOid();
            values[2] = clo.getToNameOid();
            values[3] = clo.getToBTMName();
            values[0] = clo.toOid;
            values[1] = clo.toRevOid;
            values[2] = clo.toNameOid;
            values[3] = clo.toBTName;
            objectPropertyValues[i] = values;
        }
        if ("未命名路由".equalsIgnoreCase(outCome)) {
@@ -592,24 +594,24 @@
        //查询流程实例
        Map<String, String> conditionMap = new HashMap<String, String>();
        conditionMap.put("executionid", executionId.trim() + "*");//会有子流程
        List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        List<BusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        if (workInstanceCbos == null || workInstanceCbos.size() == 0) {
            throw new VciBaseException(msgCodePrefix + "executionNotExist");
        }
        //判断是否都是执行状态,前端的判断能被跳过
        List<com.vci.client.bof.ClientBusinessObject> needUpdateCbos = new ArrayList<>();
        List<BusinessObject> needUpdateCbos = new ArrayList<>();
        List<String> workInstanceOids = new ArrayList<String>();
        for (com.vci.client.bof.ClientBusinessObject cbo : workInstanceCbos) {
            if (!cbo.getLcStatus().equalsIgnoreCase("Executing")) {
        for (BusinessObject cbo : workInstanceCbos) {
            if (!cbo.lcStatus.equalsIgnoreCase("Executing")) {
                throw new VciBaseException(msgCodePrefix + "processNotExecutionStatus");
            }
            needUpdateCbos.add(cbo);
            workInstanceOids.add(cbo.getAttributeValue("executionid"));
            workInstanceOids.add(ObjectTool.getBOAttributeValue(cbo,"executionid"));
        }
        //找相关的流程任务对象,并且是正在执行中的
        conditionMap.put("executionid", QueryOptionConstant.IN + "(" + WebUtil.toInSql(workInstanceOids.toArray(new String[0])) + ")");
        conditionMap.put("lcstatus", "Executing");
        List<com.vci.client.bof.ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap);
        List<BusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap);
        if (workItemCbos != null && workItemCbos.size() > 0) {
            needUpdateCbos.addAll(workItemCbos);
        }
@@ -632,24 +634,24 @@
        //查询流程实例
        Map<String, String> conditionMap = new HashMap<String, String>();
        conditionMap.put("executionid", executionId.trim() + "*");//会有子流程
        List<com.vci.client.bof.ClientBusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        List<BusinessObject> workInstanceCbos = boService.queryCBO(processDao.getWorkIntanceBtmType(), conditionMap);
        if (workInstanceCbos == null || workInstanceCbos.size() == 0) {
            throw new VciBaseException(msgCodePrefix + "executionNotExist");
        }
        //判断是否都是执行状态,前端的判断能被跳过
        List<com.vci.client.bof.ClientBusinessObject> needUpdateCbos = new ArrayList<>();
        List<BusinessObject> needUpdateCbos = new ArrayList<>();
        List<String> workInstanceOids = new ArrayList<String>();
        for (com.vci.client.bof.ClientBusinessObject cbo : workInstanceCbos) {
            if (!cbo.getLcStatus().equalsIgnoreCase("Suspended")) {
        for (BusinessObject cbo : workInstanceCbos) {
            if (!cbo.lcStatus.equalsIgnoreCase("Suspended")) {
                throw new VciBaseException(msgCodePrefix + "processNotSuspendedStatus");
            }
            needUpdateCbos.add(cbo);
            workInstanceOids.add(cbo.getOid());
            workInstanceOids.add(cbo.oid);
        }
        //找相关的流程任务对象,并且是正在执行中的
        conditionMap.put("executionid", QueryOptionConstant.IN + "(" + WebUtil.toInSql(workInstanceOids.toArray(new String[0])) + ")");
        conditionMap.put("lcstatus", "Suspended");
        List<com.vci.client.bof.ClientBusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap);
        List<BusinessObject> workItemCbos = boService.queryCBO(processDao.getWorkitemBtmType(), conditionMap);
        if (workItemCbos != null && workItemCbos.size() > 0) {
            needUpdateCbos.addAll(workItemCbos);
        }
@@ -706,7 +708,7 @@
            }
        }
        List<String> causeList = Arrays.asList(new String[]{primaryKeyName});
        List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btmType, conditionMap, null, causeList);
        List<BusinessObject> cbos = boService.queryCBO(btmType, conditionMap, null, causeList);
        if (cbos == null || cbos.size() == 0) {
            throw new VciBaseException("发起流程的业务数据全部不符合要求");
        }
@@ -715,9 +717,9 @@
        for (String oid : oidArray) {
            oidSet.add(oid);
        }
        for (com.vci.client.bof.ClientBusinessObject cbo : cbos) {
            if (oidSet.contains(cbo.getAttributeValue(primaryKeyName))) {
                oidSet.remove(cbo.getAttributeValue(primaryKeyName));
        for (BusinessObject cbo : cbos) {
            if (oidSet.contains(ObjectTool.getBOAttributeValue(cbo,primaryKeyName))) {
                oidSet.remove(ObjectTool.getBOAttributeValue(cbo,primaryKeyName));
            }
        }
        if (oidSet.size() > 0) {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java
@@ -1,7 +1,6 @@
package com.vci.web.service.impl;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.workflow.editor.FlowConstants;
import com.vci.corba.omd.data.LinkObject;
import com.vci.file.pagemodel.VciFileObjectVO;
import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI;
import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI;
@@ -23,6 +22,7 @@
import com.vci.web.pageModel.*;
import com.vci.web.properties.WebProperties;
import com.vci.web.service.*;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
@@ -60,6 +60,9 @@
    
    @Autowired
    private WebProcessCommandServiceI proCmdService;
    @Autowired
    private PlatformClientUtil platformClientUtil;
    /**
     * ä¸šåŠ¡æ•°æ®æœåŠ¡
@@ -440,14 +443,14 @@
        map.put("detailUrl",detailUrl== null?"":detailUrl);
        map.put("UIContentCode",UIContent);
        //增加查询关联的业务数据
        List<ClientLinkObject> linkObjects = processDao.getDataCloInTask("",executionid);
        List<LinkObject> linkObjects = processDao.getDataCloInTask("",executionid);
        StringBuilder sb = new StringBuilder();
        String thisBusinessOid = "";
        if(linkObjects!=null && linkObjects.size()>0){
            Set<String> oidSet = new HashSet<String>();
            //去除重复
            for(ClientLinkObject clo : linkObjects){
                oidSet.add(clo.getToOid());
            for(LinkObject clo : linkObjects){
                oidSet.add(clo.toOid);
            }
            for(String oidString : oidSet) {
                sb.append(oidString).append(",");
@@ -480,11 +483,12 @@
                    }
                    for (Iterator<?> a = root.elementIterator(); a.hasNext();) {
                        Element next = (Element) a.next();
                        String cellName = next.attributeValue(FlowConstants.XMLNAME);
                        if(cellName != null && cellName.equals(name)) {
                            map.put("customerbuttoninfo",next.attributeValue(FlowConstants.URL_PATH));
                            break;
                        }
                        //todo FlowConstants此占无法引用,后续会进行调整,再进行引用
//                        String cellName = next.attributeValue(FlowConstants.XMLNAME);
//                        if(cellName != null && cellName.equals(name)) {
//                            map.put("customerbuttoninfo",next.attributeValue(FlowConstants.URL_PATH));
//                            break;
//                        }
                    }
                }catch (Exception e) {
                    throw new VciBaseException("读取流程的xml内容出现了错误");
@@ -644,19 +648,19 @@
     */
    @Override
    public DataGrid getFilesInProcess(Map<String, String> conditionMap, String taskOid, String executionId,PageHelper pageHelper) throws VciBaseException{
        List<ClientLinkObject> cloByTask = processDao.getDataCloInTask(taskOid,executionId);
        List<LinkObject> cloByTask = processDao.getDataCloInTask(taskOid,executionId);
        if(cloByTask == null || cloByTask.size() == 0){
            throw new VciBaseException("没有关联的业务数据");
        }
        Map<String,List<String>> busOid_btmMap = new HashMap<String, List<String>>();
        Set<String> fileOidSet = new HashSet();
        for(ClientLinkObject clo:cloByTask){
            if(FileTypeConstants.FILE_DATA_TABLE.equals(clo.getToBTMName())){
                fileOidSet.add(clo.getToOid());
        for(LinkObject clo:cloByTask){
            if(FileTypeConstants.FILE_DATA_TABLE.equals(clo.toBTName)){
                fileOidSet.add(clo.toOid);
            }else {
                List<String> thisBtmOids = busOid_btmMap.getOrDefault(clo.getToBTMName(),new ArrayList<>());
                thisBtmOids.add(clo.getToOid());
                busOid_btmMap.put(clo.getToBTMName(), thisBtmOids);
                List<String> thisBtmOids = busOid_btmMap.getOrDefault(clo.toBTName,new ArrayList<>());
                thisBtmOids.add(clo.toOid);
                busOid_btmMap.put(clo.toBTName, thisBtmOids);
            }
        }
        DataGrid dg = new DataGrid();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebSecretServiceImpl.java
@@ -1,7 +1,9 @@
package com.vci.web.service.impl;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.frameworkcore.pagemodel.SmUserVO;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.web.enumpck.DataSecretEnum;
import com.vci.starter.web.enumpck.UserSecretEnum;
import com.vci.starter.web.exception.VciBaseException;
@@ -314,10 +316,10 @@
        Map<String,String> conditionMap = new HashMap<String, String>();
        conditionMap.put("startip",ip.trim());
        List<com.vci.client.bof.ClientBusinessObject> ipCbos = boService.queryCBO(EnumIdConstant.IPSECRET_BTMNAME,conditionMap,null, Arrays.asList(new String[]{"ipsecret"}));
        List<BusinessObject> ipCbos = boService.queryCBO(EnumIdConstant.IPSECRET_BTMNAME,conditionMap,null, Arrays.asList(new String[]{"ipsecret"}));
        int ipSecret = 0;
        if(ipCbos!=null&& ipCbos.size()>0){
            ipSecret = WebUtil.getInt(ipCbos.get(0).getAttributeValue("ipsecret"));
            ipSecret = WebUtil.getInt(ObjectTool.getBOAttributeValue(ipCbos.get(0), "ipsecret"));
        }
        if(ipSecret == 0){
            ipSecret = getMinIpSecret();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/RightControlUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,267 @@
package com.vci.web.util;
import com.vci.client.common.objects.RoleObject;
import com.vci.common.exception.VciException;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.data.FunctionInfo;
import com.vci.corba.framework.data.RoleInfo;
import com.vci.corba.framework.data.RoleRightInfo;
import com.vci.starter.web.pagemodel.SessionInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@Component
public class RightControlUtil {
    @Resource
    private PlatformClientUtil platformClientUtil;
    // add by xchao 2012.09.20 ç»Ÿä¸€å½’整管理员、开发者用户判断
    // ä»¥ä¾¿å°†æ¥æœ‰å¯èƒ½ä¿®æ”¹ç®¡ç†å‘˜ã€å¼€å‘者用户,对于判断依然有效
    private static String userAdminEnum = "user.admin";
    private String userNameAdmin = null;
    private static String userDeveloperEnum = "user.developer";
    private String userNameDeveloper = null;
    private String userNameRoot = null;
    private static String userRootEnum = "user.rooter";
    public boolean isAdmin(String userName){
        return userName.equals(getUserNameAdmin(userAdminEnum));
    }
    public boolean isDeveloper(String userName){
        return userName.equals(getUserNameDeveloper(userDeveloperEnum));
    }
    public boolean isRoot(String userName){
        return userName.equals(getUserNameRoot(userRootEnum));
    }
    /**
     * æ˜¯å¦ä¸ºç®¡ç†å‘˜ã€å¼€å‘者用户
     * @param userName ç™»å½•用户名
     * @return åˆ¤æ–­ç»“æžœ
     */
    public boolean isAdminOrDeveloperOrRoot(String userName){
        return isAdmin(userName) || isDeveloper(userName)||isRoot(userName);
    }
    /**
     * èŽ·å–é…ç½®çš„ç®¡ç†å‘˜
     * @param key é…ç½®key
     * @return ç®¡ç†å‘˜è´¦å·
     */
    public String getUserNameAdmin(String key) {
        if (userNameAdmin == null) {
            synchronized (RightControlUtil.class) {
                if (userNameAdmin == null) {
                    try {
                        userNameAdmin = platformClientUtil.getFrameworkService().getConfigValue(key);
                    }catch (PLException e){
                        log.error(e.code, e.messages);
                    }
                }
            }
        }
        return userNameAdmin;
    }
    /**
     * èŽ·å–é…ç½®çš„å¼€å‘äººå‘˜
     * @param key é…ç½®key
     * @return å¼€å‘人员账号
     */
    public String getUserNameDeveloper(String key) {
        if (userNameDeveloper == null) {
            synchronized (RightControlUtil.class) {
                if (userNameDeveloper == null) {
                    try {
                        userNameDeveloper = platformClientUtil.getFrameworkService().getConfigValue(key);
                    }catch (PLException e){
                        log.error(e.code, e.messages);
                    }
                }
            }
        }
        return userNameDeveloper;
    }
    /**
     * èŽ·å–é…ç½®çš„ç®¡ç†å‘˜
     * @param key é…ç½®key
     * @return ç®¡ç†å‘˜è´¦å·
     */
    public String getUserNameRoot(String key) {
        if (userNameRoot == null) {
            synchronized (RightControlUtil.class) {
                if (userNameRoot == null) {
                    try {
                        userNameRoot = platformClientUtil.getFrameworkService().getConfigValue(key);
                    }catch (PLException e){
                        log.error(e.code, e.messages);
                    }
                }
            }
        }
        return userNameRoot;
    }
    /**
     * åˆ¤æ–­å½“前是否为三元用户
     * @return
     */
    public boolean isThreeAdminCurUser() {
        SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException();
        try {
            RoleInfo[] roles = platformClientUtil.getFrameworkService().fetchRoleInfoByUserId(sessionInfo.getUserId());
            for (RoleInfo role : roles) {
                if (role.name.equalsIgnoreCase("系统管理员")){
                    return true;
                }
                else if (role.name.equalsIgnoreCase("安全管理员")){
                    return true;
                }
                else if (role.name.equalsIgnoreCase("审计管理员")){
                    return true;
                }
            }
        } catch (PLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return false;
    }
    /**
     * èŽ·å–å½“å‰ç”¨æˆ·çš„æƒé™
     * @param userName
     * @return
     */
    public RoleRightInfo[] getRoleRightByUserName(String userName){
        RoleRightInfo[] roleRightByUserName = new RoleRightInfo[0];
        try {
            roleRightByUserName = platformClientUtil.getFrameworkService().getRoleRightByUserName(userName);
        } catch (PLException e) {
            e.printStackTrace();
            log.error(e.code,e.messages);
        }
        return roleRightByUserName;
    }
    /**
     * èŽ·å–å½“å‰ç”¨æˆ·å…·æœ‰æƒé™çš„æ‰€æœ‰æ¨¡å—
     * @param parentId, çˆ¶æ¨¡å—id
     * @param userName, ç”¨æˆ·å
     * @param userRoleRights, å½“前用户具有的权限
     * @return
     */
    public Map<String, List<FunctionInfo>> getAllChildrenFunctionsByUserName(String parentId, String userName, RoleRightInfo[] userRoleRights) {
        Map<String, List<RoleRightInfo>> mapRight = new LinkedHashMap<String, List<RoleRightInfo>>();
        for (int i = 0; i < userRoleRights.length; i++) {
            RoleRightInfo right = userRoleRights[i];
            List<RoleRightInfo> lstRight = null;
            if (mapRight.containsKey(right.funcId)) {
                lstRight = mapRight.get(right.funcId);
            } else {
                lstRight = new ArrayList<RoleRightInfo>();
            }
            lstRight.add(right);
            mapRight.put(right.funcId, lstRight);
        }
        FunctionInfo[] AllFunction = getFunctionsByParentId(parentId, userName);
        Map<String, List<FunctionInfo>> map = new LinkedHashMap<String, List<FunctionInfo>>();
        boolean isAllShow = isDeveloper(userName) || isAdmin(userName) || !isFunctionSwithOn();
        boolean isHasRight = false;
        FunctionInfo func;
        for (int i = 0; i < AllFunction.length; i++) {
            func = AllFunction[i];
            //System.out.println("=== FUNC:ID=" + func.getId()+ "  ParentID=" + func.getParentId() + ";  Name=" + func.getName());
            isHasRight = false;
            if (isAllShow) {
                isHasRight = true;
            } else {
                List<RoleRightInfo> lstRight = null;
                if (mapRight.containsKey(func.id)) {
                    lstRight = mapRight.get(func.id);
                    //System.out.println("   === æœ‰æŽˆæƒä¿¡æ¯");
                }
                if (lstRight == null)
                    isHasRight = false;
                else{
                    if (lstRight.size() > 0)
                        isHasRight = true;
//                    for (int j = 0; j < lstRight.size(); j++) {
//                        long lRight = lstRight.get(j).getRightValue();
//                        if (lRight != 0){
//                            isHasRight = true;
//                            //System.out.println("      === æœ‰æŽˆæƒ");
//
//                            break;
//                        }
//                    }
                }
            }
            if (!isHasRight) {
                continue;
            }
            String cparentId = func.parentId;
            //System.out.println("####==== ParentId=" + cparentId + "; Func=" + func.getName());
            List<FunctionInfo> lstFunc = null;
            if (map.containsKey(cparentId)) {
                lstFunc = map.get(cparentId);
            } else {
                lstFunc = new ArrayList<FunctionInfo>();
            }
            lstFunc.add(func);
            map.put(cparentId, lstFunc);
        }
        return map;
    }
    public FunctionInfo[] getFunctionsByParentId(String parentId, String userName) {
        FunctionInfo[] funcObjs =  null;
        try {
            if(isDeveloper(userName)){
                funcObjs = platformClientUtil.getFrameworkService().getChildrenFunctionsByParentId(parentId, true);
            } else {
                funcObjs =  platformClientUtil.getFrameworkService().getChildrenFunctionsByParentId(parentId, false);
            }
        } catch (PLException e) {
            e.printStackTrace();
            log.error(e.code, e.messages);
        }
        return funcObjs;
    }
    /**
     * åˆ¤æ–­åŠŸèƒ½æƒé™æ˜¯å¦å¼€å¯
     * @return
     */
    public boolean isFunctionSwithOn() {
        String functionRightSwith = null;
        try {
            functionRightSwith = platformClientUtil.getFrameworkService().getConfigValue("function.right.swith");
        } catch (PLException e) {
            e.printStackTrace();
            log.error(e.code, e.messages);
        }
        if(functionRightSwith != null && "on".equalsIgnoreCase(functionRightSwith)){
            return true;
        }
        return false;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/WebUtil.java
@@ -2,8 +2,6 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.vci.client.bof.ClientBusinessObject;
import com.vci.client.bof.ClientLinkObject;
import com.vci.client.common.objects.UserEntityObject;
import com.vci.common.exception.VciException;
import com.vci.corba.common.PLException;
@@ -11,6 +9,7 @@
import com.vci.corba.omd.data.AttributeValue;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.omd.utils.ObjectTool;
import com.vci.starter.revision.bo.TreeWrapperOptions;
import com.vci.starter.web.annotation.*;
import com.vci.starter.web.constant.QueryOptionConstant;
@@ -1078,9 +1077,9 @@
     * @param cbo ä¸šåŠ¡æ•°æ®
     * @param obj å¯¹è±¡
     */
    public static void copyValueToObjectFromCbos(com.vci.client.bof.ClientBusinessObject cbo,Object obj){
    public static void copyValueToObjectFromCbos(BusinessObject cbo,Object obj){
        if(cbo!=null){
            copyValueToObjectFromBos(cbo.getBusinessObject(),obj);
            copyValueToObjectFromBos(cbo,obj);
        }
    }
@@ -1090,9 +1089,9 @@
     * @param obj å¯¹è±¡
     * @param fieldAttrMap å±žæ€§æ˜ å°„
     */
    public static void copyValueToObjectFromCbos(com.vci.client.bof.ClientBusinessObject cbo,Object obj,Map<String,String> fieldAttrMap){
    public static void copyValueToObjectFromCbos(BusinessObject cbo,Object obj,Map<String,String> fieldAttrMap){
        if(cbo!=null){
            copyValueToObjectFromBos(cbo.getBusinessObject(),obj,fieldAttrMap);
            copyValueToObjectFromBos(cbo,obj,fieldAttrMap);
        }
    }
@@ -1218,9 +1217,9 @@
     * @param cbo ä¸šåŠ¡æ•°æ®
     * @param map map
     */
    public static void copyValueToMapFromCbos(com.vci.client.bof.ClientBusinessObject cbo,Map<String,String> map){
    public static void copyValueToMapFromCbos(BusinessObject cbo,Map<String,String> map){
        if(cbo!=null){
            copyValueToMapFromBos(cbo.getBusinessObject(),map);
            copyValueToMapFromBos(cbo,map);
        }
    }
@@ -1256,9 +1255,9 @@
     * @param clo é“¾æŽ¥ç±»åž‹
     * @param map map
     */
    public static void copyValueToMapFromClos(com.vci.client.bof.ClientLinkObject clo,Map<String,String> map){
    public static void copyValueToMapFromClos(LinkObject clo,Map<String,String> map){
        if(clo!=null){
            copyValueToMapFromLos(clo.getLinkObject(),map);
            copyValueToMapFromLos(clo,map);
        }
    }
@@ -1297,9 +1296,9 @@
     * @param obj å¯¹è±¡
     * @param fieldAttrMap å±žæ€§map
     */
    public static void copyValueToObjectFromClos(ClientLinkObject clo,Object obj,Map<String,String> fieldAttrMap){
    public static void copyValueToObjectFromClos(LinkObject clo,Object obj,Map<String,String> fieldAttrMap){
        if(clo!=null){
            copyValueToObjectFromLos(clo.getLinkObject(),obj,fieldAttrMap);
            copyValueToObjectFromLos(clo,obj,fieldAttrMap);
        }
    }
@@ -1351,7 +1350,7 @@
     * @param cbo é“¾æŽ¥ç±»åž‹
     * @param map å¯¹è±¡
     */
    public static void copyValueToCboFromMap(com.vci.client.bof.ClientBusinessObject cbo,Map<String,String> map) throws VciBaseException{
    public static void copyValueToCboFromMap(BusinessObject cbo,Map<String,String> map) throws VciBaseException{
        if(map!=null){
            Iterator<String> it = map.keySet().iterator();
            while(it.hasNext()){
@@ -1360,15 +1359,11 @@
                if(value == null){
                    value = "";
                }
                try {
                    if(isDefaultField(key)){
                        setValueToField(key, cbo, value);
                    }
                    cbo.setAttributeValueWithNoCheck(key.toLowerCase(), value);
                } catch (PLException e) {
                    throw WebUtil.getVciBaseException(e);
                }
            }
                if(isDefaultField(key)){
                    setValueToField(key, cbo, value);
                }
                ObjectTool.setBOAttributeValue(cbo,key.toLowerCase(), value);
            }
        }
    }
@@ -1377,7 +1372,7 @@
     * @param clo é“¾æŽ¥ç±»åž‹
     * @param map å¯¹è±¡
     */
    public static void copyValueToCloFromMap(ClientLinkObject clo,Map<String,String> map) throws VciBaseException{
    public static void copyValueToCloFromMap(LinkObject clo,Map<String,String> map) throws VciBaseException{
        if(map!=null){
            Iterator<String> it = map.keySet().iterator();
            while(it.hasNext()){
@@ -1386,16 +1381,12 @@
                if(value == null){
                    value = "";
                }
                try {
                    if(isDefaultField(key)){
                        setValueToField(key, clo, value);
                    }else {
                        clo.setAttributeValue(key.toLowerCase(), value);
                    }
                } catch (PLException e) {
                    throw WebUtil.getVciBaseException(e);
                }
            }
                if(isDefaultField(key)){
                    setValueToField(key, clo, value);
                }else {
                    ObjectTool.setLOAttributeValue(clo,key.toLowerCase(), value);
                }
            }
        }
    }
@@ -1406,10 +1397,10 @@
     * @throws VciBaseException æ‹·è´å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    public static void copyValueToBoFromObj(BusinessObject bo,Object obj) throws VciBaseException{
        ClientBusinessObject cbo = new ClientBusinessObject();
        cbo.setBusinessObject(bo);
        BusinessObject cbo = new BusinessObject();
        cbo = bo;
        copyValueToCboFromObj(cbo,obj);
        bo = cbo.getBusinessObject();
        bo = cbo;
    }
    /**
@@ -1418,7 +1409,7 @@
     * @param obj æ•°æ®å¯¹è±¡
     * @throws VciBaseException æ‹·è´å‡ºé”™çš„æ—¶å€™ä¼šæŠ›å‡ºå¼‚常
     */
    public static void copyValueToCboFromObj(ClientBusinessObject cbo ,Object obj) throws VciBaseException{
    public static void copyValueToCboFromObj(BusinessObject cbo ,Object obj) throws VciBaseException{
        Map<String,String> fieldMap = getFieldNameMap(obj.getClass());//先查找所有需要持久化到平台的属性,不需要持久化的就不用赋值了
        Iterator<String> it = fieldMap.keySet().iterator();
        while(it.hasNext()){
@@ -1430,15 +1421,11 @@
                if(value==null){
                    value = "";
                }
                try {
                    if(isDefaultField(fieldName)){
                        setValueToField(fieldName, cbo, value);
                    }
                    cbo.setAttributeValue(attrName.toLowerCase(), value);
                } catch (PLException e) {
                    throw WebUtil.getVciBaseException(e);
                }
            }
                if(isDefaultField(fieldName)){
                    setValueToField(fieldName, cbo, value);
                }
                ObjectTool.setBOAttributeValue(cbo,attrName.toLowerCase(), value);
            }
        }
    }
@@ -1665,19 +1652,19 @@
     * @param wrapperOptions å°è£…的信息
     * @return æ ‘列表
     */
    public static <T,R> List<Tree> cboList2Trees(List<? extends com.vci.client.bof.ClientBusinessObject> doList, TreeWrapperOptions wrapperOptions, Function<T,R> f){
    public static <T,R> List<Tree> cboList2Trees(List<? extends BusinessObject> doList, TreeWrapperOptions wrapperOptions, Function<T,R> f){
        if(CollectionUtils.isEmpty(doList)){
            return new ArrayList<>();
        }
        List<Tree> allTree = new ArrayList<Tree>();
        List<Tree> children = new ArrayList<Tree>();
        for (int i = 0 ; i < doList.size();i++) {
            com.vci.client.bof.ClientBusinessObject cbo =  doList.get(i);
            BusinessObject cbo =  doList.get(i);
            Tree tree =new Tree();
            List<String> oidFieldNames = VciBaseUtil.str2List(wrapperOptions.getOidFieldName());
            List<String> oidValues = new LinkedList<>();
            oidFieldNames.stream().forEach( s->{
                oidValues.add(cbo.getAttributeValue(s));
                oidValues.add(ObjectTool.getBOAttributeValue(cbo, s));
            });
            tree.setOid(oidValues.stream().collect(Collectors.joining(wrapperOptions.getOidValueSep())));
            if(f !=null){
@@ -1686,12 +1673,12 @@
                List<String> textFieldNames = VciBaseUtil.str2List(wrapperOptions.getTextFieldName());
                List<String> textValues = new LinkedList<>();
                textFieldNames.stream().forEach( s->{
                    textValues.add(cbo.getAttributeValue(s));
                    textValues.add(ObjectTool.getBOAttributeValue(cbo, s));
                });
                tree.setText(textValues.stream().collect(Collectors.joining(wrapperOptions.getTextValueSep())));
            }
            if(StringUtils.isNotBlank(wrapperOptions.getParentFieldName())){
                tree.setParentId(cbo.getAttributeValue(wrapperOptions.getParentFieldName()));
                tree.setParentId(ObjectTool.getBOAttributeValue(cbo, wrapperOptions.getParentFieldName()));
            }
            if(wrapperOptions.isAllAttributes()) {
                try {
@@ -1735,23 +1722,23 @@
        return allTree;
    }
    public static com.vci.client.bof.ClientBusinessObject arryAndSqlToClientBusinessObject(String sqlStr,String[] valueArry) {
        com.vci.client.bof.ClientBusinessObject clientBusinessObject = new com.vci.client.bof.ClientBusinessObject();
    public static BusinessObject arryAndSqlToBusinessObject(String sqlStr,String[] valueArry) {
        BusinessObject BusinessObject = new BusinessObject();
        try {
            PlainSelect select = (PlainSelect) CCJSqlParserUtil.parse(sqlStr);
            com.vci.corba.omd.data.AttributeValue[] attributeValues = new com.vci.corba.omd.data.AttributeValue[valueArry.length];
            AttributeValue[] attributeValues = new AttributeValue[valueArry.length];
            for (int i = 0; i < select.getSelectItems().size(); i++) {
                SelectItem selectItem = select.getSelectItem(i);
                com.vci.corba.omd.data.AttributeValue attributeValue = new com.vci.corba.omd.data.AttributeValue();
                AttributeValue attributeValue = new AttributeValue();
                attributeValue.attrName = selectItem.getAlias().getName();
                attributeValue.attrVal    = valueArry[i];
                attributeValues[i] = attributeValue;
            }
            clientBusinessObject.getBusinessObject().newAttrValList= attributeValues;
            BusinessObject.newAttrValList= attributeValues;
        }catch (Exception e){
            logger.error("数据解析错误",e);
            return null;
        }
        return clientBusinessObject;
        return BusinessObject;
    }
}