Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -1,7 +1,6 @@ package com.vci.frameworkcore.compatibility.impl; import com.alibaba.fastjson.JSONObject; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.framework.data.FunctionInfo; import com.vci.corba.portal.data.PLUILayout; @@ -18,6 +17,7 @@ import com.vci.web.pageModel.UIContentVO; import com.vci.web.service.UIEngineServiceI; import com.vci.web.service.WebBoServiceI; import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -70,6 +70,9 @@ @Autowired private UIEngineServiceI uiEngineServiceI; @Autowired private PlatformClientUtil platformClientUtil; /** * 查询所有的功能 @@ -195,33 +198,6 @@ return functionVO; } // /** // * 获取当前角色的菜单 // * // * @param treeQueryObject 属性查询对象 // * @param resourceControlTypeEnum 角色控制区域,也是功能控制的区域 // * @return 菜单,包含上下级 // */ // @Override // public List<Tree> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) { // SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException(); // if(sessionInfo == null || CollectionUtils.isEmpty(sessionInfo.getFunctionOids())){ // return new ArrayList<Tree>(); // } // if(resourceControlTypeEnum == null){ // resourceControlTypeEnum = ResourceControlTypeEnum.BS; // } // Map<String, SmFunctionVO> functionVOMap = selectAllFunctionMap(); // List<SmFunctionVO> functionVOList = new ArrayList<>(); // for(String oid : sessionInfo.getFunctionOids()) { // SmFunctionVO functionVO = functionVOMap.get(oid); // if(functionVO !=null && resourceControlTypeEnum.getValue().equals(functionVO.getResourceControlType()) && functionVO.isDisplayFlag()) { // functionVOList.add(functionVO); // } // } // return dos2Trees(functionVOList.stream().sorted(Comparator.comparing(s -> s.getOrderNum())).collect(Collectors.toList()),treeQueryObject == null?null:treeQueryObject.getParentOid()); // } /** * 获取当前角色的菜单 * @@ -232,20 +208,11 @@ @Override public List<MenuVO> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException { SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException(); // if(sessionInfo == null || CollectionUtils.isEmpty(sessionInfo.getFunctionOids())){ // return new ArrayList<Tree>(); // } if(resourceControlTypeEnum == null){ resourceControlTypeEnum = ResourceControlTypeEnum.BS; } // PortalServicePrx uiService = ServiceProvider.getUIService(); // FrameworkServicePrx frameService = ServiceProvider.getFrameService(); FunctionInfo[] menus = ClientServiceProvider.getFrameService().getModuleListByParentId("modelManagmentNode", true); // FunctionInfo[] menus = ServiceProvider.getFrameService().("modelManagmentNode", true); // PLAction[] allPLAction = uiService.getAllPLAction(); FunctionInfo[] menus = platformClientUtil.getFrameworkService().getModuleListByParentId("modelManagmentNode", true); List<MenuVO> functionVOList = new ArrayList<>(); // Map<String, SmFunctionVO> functionVOMap = selectAllFunctionMap(); for (FunctionInfo menu : menus) { if(!menu.isValid){ continue; @@ -257,13 +224,6 @@ continue; } functionVO.setPath(menu.resourceB); // if(menu.resourceB.contains("type=") || menu.resourceB.contains("context=")){ // String[] split = menu.resourceB.split("\\?")[0].split("="); // functionVO.setPath((split.length>1 && split[1].equals("test") ? "/custom-ui/" :"/base/UIContentViewer") + menu.resourceB.substring(3)); // }else{ // functionVO.setPath("/views/" + menu.id); //// functionVO.setPath("/" + menu.resourceB + menu.aliasName); // } functionVO.setParentId(menu.parentId); functionVO.setCode(menu.aliasName); functionVO.setAlias(menu.aliasName); @@ -278,12 +238,11 @@ } functionVOList.add(functionVO); } // return dos2Trees(functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()),treeQueryObject == null?null:treeQueryObject.getParentOid()); return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); } public List<MenuVO> findChildFunctionVO(String parentOid) throws PLException { FunctionInfo[] menus = ClientServiceProvider.getFrameService().getModuleListByParentId(parentOid, true); FunctionInfo[] menus = platformClientUtil.getFrameworkService().getModuleListByParentId(parentOid, true); List<MenuVO> functionVOList = new ArrayList<>(); for (FunctionInfo menu : menus) { if(!menu.isValid){ @@ -296,13 +255,6 @@ continue; } functionVO.setPath(menu.resourceB); // if(menu.resourceB.contains("type=") || menu.resourceB.contains("context=")){ // String[] split = menu.resourceB.split("\\?")[0].split("="); // functionVO.setPath((split.length>1 && split[1].equals("test") ? "/custom-ui/" :"/base/UIContentViewer") + menu.resourceB.substring(3)); // }else{ // functionVO.setPath("/views/" + menu.id); //// functionVO.setPath("/" + menu.resourceB + menu.aliasName); // } functionVO.setCode(menu.aliasName); functionVO.setAlias(menu.aliasName); functionVO.setParentId(menu.parentId); @@ -324,13 +276,10 @@ @Override public UIContentVO getUIContentByBtmTypeAndId(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException { SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException(); // if(sessionInfo == null || CollectionUtils.isEmpty(sessionInfo.getFunctionOids())){ // return new ArrayList<Tree>(); // } if(resourceControlTypeEnum == null){ resourceControlTypeEnum = ResourceControlTypeEnum.BS; } for (PLUILayout allPLUILayout : ClientServiceProvider.getUIService().getAllPLUILayouts()) { for (PLUILayout allPLUILayout : platformClientUtil.getUIService().getAllPLUILayouts()) { if(treeQueryObject.getConditionMap().getOrDefault("type","").equals(allPLUILayout.plRelatedType) && treeQueryObject.getConditionMap().getOrDefault("context","").equals(allPLUILayout.plCode)){ return uiEngineServiceI.UIContentDO2VO(allPLUILayout,true); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.frameworkcore.compatibility.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.common.util.ThreeDES; import com.vci.corba.common.PLException; import com.vci.corba.framework.data.UserInfo; @@ -147,7 +146,7 @@ " left join PLUSERPASSWORDSTRATEGY pkUserPassword on " +queryWrapper.getTableNick() + ".pluid = pkUserPassword.pluseruid " + queryWrapper.getLinkTableSql() + (StringUtils.isNotBlank(queryWrapper.getWhereSql())?(" where " + queryWrapper.getWhereSql()):""); try{ String[][] sqlQueryResult = ClientServiceProvider.getBOFService().getSqlQueryResult(sql + fromSql, null); String[][] sqlQueryResult = platformClientUtil.getBOFService().getSqlQueryResult(sql + fromSql, null); if(sqlQueryResult.length>0){ com.vci.client.bof.ClientBusinessObject cbo = arryAndSqlToClientBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]); return cbo2VO(cbo); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.atm.AttributeDef; import com.vci.starter.web.annotation.log.VciUnLog; @@ -108,9 +107,7 @@ public List<OsAttributeVO> selectAllAttribute() { //后面两个分页数,完全没有用 try { // return attributeDO2VOs(Arrays.stream(platformClientUtil.getAttributeService().getAttribItems(abFilter,1,1)).collect(Collectors.toList())); // return attributeDO2VOs(Arrays.stream(ServiceProvider.getOMDService().getAttributeService().getAttribItems(abFilter.name,1,1)).collect(Collectors.toList())); return attributeDO2VOs(Arrays.stream(ClientServiceProvider.getOMDService().getAttributeService().getAttributeDefs("",1,1)).collect(Collectors.toList())); return attributeDO2VOs(Arrays.stream(platformClientUtil.getAttributeService().getAttributeDefs("",1,1)).collect(Collectors.toList())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.btm.BizType; import com.vci.starter.web.annotation.log.VciUnLog; @@ -15,6 +14,7 @@ import com.vci.web.service.*; import com.vci.web.util.ConcurrentDateFormat; import com.vci.web.util.Func; import com.vci.web.util.PlatformClientUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,8 +42,8 @@ /** * 平台的调用工具类 */ //@Autowired //private PlatformClientUtil platformClientUtil; @Autowired private PlatformClientUtil platformClientUtil; /** * 属性的服务 @@ -86,9 +86,7 @@ @VciUnLog public List<OsBtmTypeVO> selectAllBtm() { try { // return btmDO2VOs(Arrays.stream(platformClientUtil.getBtmService().getAllBtmItem("")).collect(Collectors.toList())); // return btmDO2VOs(Arrays.stream(ServiceProvider.getOMDService().getBTMService().getAllBtmItem("")).collect(Collectors.toList())); return btmDO2VOs(Arrays.stream(ClientServiceProvider.getOMDService().getBTMService().getBizTypes("")).collect(Collectors.toList())); return btmDO2VOs(Arrays.stream(platformClientUtil.getBtmService().getBizTypes("")).collect(Collectors.toList())); } catch (PLException e) { throw new RuntimeException(e); } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsEnumServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.etm.EnumItem; import com.vci.corba.omd.etm.EnumType; @@ -46,7 +45,7 @@ /** * 平台调用客户端 */ //@Autowired @Autowired private PlatformClientUtil platformClientUtil; /** @@ -209,7 +208,7 @@ public List<OsEnumVO> selectAllEnum() { //后面两个参数居然完全没有作用 try { return enumDO2VOs(Arrays.stream(ClientServiceProvider.getOMDService().getEnumService().getEnumTypes("",1,1)).collect(Collectors.toList())); return enumDO2VOs(Arrays.stream(platformClientUtil.getEnumService().getEnumTypes("",1,1)).collect(Collectors.toList())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -326,7 +325,6 @@ VciBaseUtil.alertNotNull(oid,"业务数据的主键",btmname,"业务类型"); com.vci.client.bof.ClientBusinessObject cbo = boService.selectCBOByOid(oid, btmname); String secret = cbo.getAttributeValue("secretGrade"); //secret = DataSecretEnum.SECRET.getValue() + ""; if(StringUtils.isBlank(secret)){ return new ArrayList<>(); }else{ @@ -360,7 +358,7 @@ if(!CollectionUtils.isEmpty(enumItemList)){ enumItemList.stream().forEach(enumItem -> { try { ClientServiceProvider.getOMDService().getEnumService().addEnumType(enumItem); platformClientUtil.getEnumService().addEnumType(enumItem); } catch (PLException e) { throw WebUtil.getVciBaseException(e); } @@ -378,8 +376,7 @@ if(!CollectionUtils.isEmpty(enumItemList)){ enumItemList.stream().forEach(enumItem -> { try { // ServiceProvider.getOMDService().getEnumService().modifyEmItem(enumItem); ClientServiceProvider.getOMDService().getEnumService().modifyEnumType(enumItem); platformClientUtil.getEnumService().modifyEnumType(enumItem); } catch (PLException e) { throw WebUtil.getVciBaseException(e); } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLifeCycleServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.lcm.Bound; import com.vci.corba.omd.lcm.LifeCycle; @@ -309,12 +308,11 @@ @VciUnLog public List<OsLifeCycleVO> selectAllLifeCycle() throws VciBaseException { try { // LifeCyle[] lifeCyles = platformClientUtil.getLifeCycleService().getLifeCyles(); LifeCycle[] lifeCyles = ClientServiceProvider.getOMDService().getLifeCycleService().getLifeCycles(); LifeCycle[] lifeCyles = platformClientUtil.getLifeCycleService().getLifeCycles(); return lifeCycleDO2VOs(Arrays.stream(lifeCyles).collect(Collectors.toList())); } catch (PLException vciError) { if(logger.isErrorEnabled()){ // logger.error(vciError.error_code,vciError); logger.error(vciError.code,vciError); } throw WebUtil.getVciBaseException(vciError); } @@ -373,8 +371,7 @@ if(lineVO!=null){ try { com.vci.corba.omd.lcm.TransitionVO transitionVO = lifeCycleLineVO2DO(lineVO); // platformClientUtil.getBOFactoryService().transferBusinessObject(new BusinessObjectHolder(obj), transitionVO); ClientServiceProvider.getBOFService().transferBusinessObject(obj, transitionVO.destination); platformClientUtil.getBOFService().transferBusinessObject(obj, transitionVO.destination); } catch (PLException e) { throw WebUtil.getVciBaseException(e); } @@ -604,9 +601,7 @@ for(int i = 0 ; i < lineVOs.length; i ++){ vos[i] = lifeCycleLineVO2DO(lineVOs[i]); } // platformClientUtil.getBOFactoryService().batchTransferBusinessObjectAndRelease( // bos, vos, releaseStatus); ClientServiceProvider.getBOFService().batchTransferBusinessObjectAndRelease( platformClientUtil.getBOFService().batchTransferBusinessObjectAndRelease( bos, vos, releaseStatus); } catch (PLException e) { throw WebUtil.getVciBaseException(e); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.omd.stm.StatePool; import com.vci.starter.web.annotation.log.VciUnLog; @@ -125,8 +124,7 @@ @VciUnLog public List<OsStatusVO> selectAllStatus() { try { // return statusDO2VOs(Arrays.stream(platformClientUtil.getStatePoolService().getStatePools()).collect(Collectors.toList())); return statusDO2VOs(Arrays.stream(ClientServiceProvider.getOMDService().getStateService().getStatePools()).collect(Collectors.toList())); return statusDO2VOs(Arrays.stream(platformClientUtil.getStatePoolService().getStatePools()).collect(Collectors.toList())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -4,9 +4,11 @@ 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.*; 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.corba.omd.lcm.LifeCycle; import com.vci.file.pagemodel.VciFileObjectVO; import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus; @@ -1069,9 +1071,7 @@ BaseResult<Map<String,Object>> result = BaseResult.success(); com.vci.client.bof.ClientBusinessObject afterCBO = null; try { // BusinessObject resultBO = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); // BusinessObject resultBO = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); BusinessObject resultBO = ClientServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); BusinessObject resultBO = platformClientUtil.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); afterCBO = new com.vci.client.bof.ClientBusinessObject(); afterCBO.setBusinessObject(resultBO); result.setObj(boService.cbo2Map(afterCBO)); @@ -1088,8 +1088,7 @@ }catch (Throwable e){ //说明后置事件出现了错误,那么就需要删除以前的这条数据 try { // platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1); ClientServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); platformClientUtil.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1346,8 +1345,7 @@ } } try { // BusinessObject[] resultBOs = platformClientUtil.getBOFactoryService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); BusinessObject[] resultBOs = ClientServiceProvider.getBOFService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); 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(); @@ -1407,8 +1405,7 @@ //执行保存 BaseResult<Map<String,Object>> result = BaseResult.success(); try { // platformClientUtil.getBOFactoryService().updateBusinessObject(new BusinessObjectHolder(resultCbo.getObj().getBusinessObject())); ClientServiceProvider.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); platformClientUtil.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); result.setObj(boService.cbo2Map(resultCbo.getObj())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); @@ -1453,8 +1450,7 @@ //执行保存 BaseResult<Map<String,Object>> result = BaseResult.success(); try { // BusinessObject bo = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion()); BusinessObject bo = ClientServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion()); 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); result.setObj(boService.cbo2Map(afterCbo)); @@ -1612,8 +1608,7 @@ } VciBaseUtil.switchCollectionForOracleIn(finalCbo).stream().forEach(cbos->{ try { // platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); ClientServiceProvider.getBOFService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); platformClientUtil.getBOFService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1684,8 +1679,7 @@ //查询from端的 com.vci.client.bof.ClientBusinessObject fromCbo = new com.vci.client.bof.ClientBusinessObject(); try { // fromCbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(fromOid,fromBtmName)); fromCbo.setBusinessObject(ClientServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName)); fromCbo.setBusinessObject(platformClientUtil.getBOFService().readBusinessObject(fromOid,fromBtmName)); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1722,8 +1716,7 @@ clo.dealLinkObjectNullValue(); bos[0] = toCbo.getBusinessObject(); try { // platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder); ClientServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); platformClientUtil.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1737,10 +1730,8 @@ }catch (Throwable e){ //说明后置事件出现了错误,那么就需要删除以前的这条数据 try { // platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1); // platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject()); ClientServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); ClientServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject()); platformClientUtil.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); platformClientUtil.getBOFService().deleteLinkObject(clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1776,8 +1767,7 @@ ClientLinkObject clo ; if(editFlag){ try { // LinkObject linkObject = platformClientUtil.getBOFactoryService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); LinkObject linkObject = ClientServiceProvider.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); LinkObject linkObject = platformClientUtil.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); clo = new ClientLinkObject(); clo.setLinkObject(linkObject); } catch (PLException vciError) { @@ -1945,8 +1935,7 @@ List<String> attributeList = btmTypeVO.getAttributes().stream().map(attribute -> attribute.getId()).collect(Collectors.toList()); if(editFlag || newRevision || newVersion){ try { // cbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); cbo.setBusinessObject(ClientServiceProvider.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); cbo.setBusinessObject(platformClientUtil.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); } catch (PLException vciError) { throw new VciBaseException("使用主键在系统中没有查询到数据",new String[]{oid},vciError); } @@ -1975,10 +1964,9 @@ //升版的时候,生命周期的状态需要改动到默认状态 if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){ //查询生命周期 // OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); LifeCycle lifeCycleVO = null; try { lifeCycleVO = ClientServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); lifeCycleVO = platformClientUtil.getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); } catch (PLException e) { throw new RuntimeException(e); } @@ -2001,10 +1989,9 @@ //升版的时候,生命周期的状态需要改动到默认状态 if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){ //查询生命周期 // OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); LifeCycle lifeCycleVO = null; try { lifeCycleVO = ClientServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); lifeCycleVO = platformClientUtil.getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); } catch (PLException e) { throw new RuntimeException(e); } @@ -2224,11 +2211,8 @@ clo.setToBO(toCbo); } } // LinkObjectHolder loHolder = new LinkObjectHolder(); // loHolder.value = clo.getLinkObject(); try { // platformClientUtil.getBOFactoryService().updateLinkObject(loHolder); ClientServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject()); platformClientUtil.getBOFService().updateLinkObject(clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -4,7 +4,6 @@ import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; import com.thoughtworks.xstream.io.xml.XppDriver; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.portal.data.*; import com.vci.starter.web.annotation.log.VciUnLog; @@ -131,8 +130,7 @@ public void checkInvalidXmlVI() { PortalVI[] portalVIS = null; try { portalVIS = ClientServiceProvider.getUIService().getAllPortalVI(); // portalVIS = platformClientUtil.getPortalService().getAllPortalVI(); portalVIS = platformClientUtil.getUIService().getAllPortalVI(); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -156,7 +154,7 @@ public List<UIFormDefineVO> selectAllForm() { PortalVI[] portalVIS = null; try { portalVIS = ClientServiceProvider.getUIService().getAllPortalVI(); portalVIS = platformClientUtil.getUIService().getAllPortalVI(); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -405,7 +403,7 @@ if(!QUERY_BY_CACHE){ PortalVI portalVI = null; try { portalVI = ClientServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); portalVI = platformClientUtil.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -447,7 +445,7 @@ public List<UITableDefineVO> selectAllTable() { PortalVI[] portalVIS = null; try { portalVIS = ClientServiceProvider.getUIService().getAllPortalVI(); portalVIS = platformClientUtil.getUIService().getAllPortalVI(); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -523,7 +521,7 @@ self.selectAllForm().stream().filter(s -> formOid.equalsIgnoreCase(s.getOid())).findAny().orElseGet(() -> null); }else{ try { formDefineVO = formDO2VO(ClientServiceProvider.getUIService().getPortalVIById(formOid)); formDefineVO = formDO2VO(platformClientUtil.getUIService().getPortalVIById(formOid)); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -723,7 +721,7 @@ if(!QUERY_BY_CACHE){ PortalVI portalVI = null; try { portalVI = ClientServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); portalVI = platformClientUtil.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -764,8 +762,7 @@ @VciUnLog public List<UIActionVO> selectAllAction() { try { // return actionDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLAction()).collect(Collectors.toList())); return actionDO2VOs(Arrays.stream(ClientServiceProvider.getUIService().getAllPLAction()).collect(Collectors.toList())); return actionDO2VOs(Arrays.stream(platformClientUtil.getUIService().getAllPLAction()).collect(Collectors.toList())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1006,7 +1003,7 @@ */ private List<UILayoutVO> listLayoutByContent(String pkContent){ try { return UILayoutDO2VOs(Arrays.stream(ClientServiceProvider.getUIService().getPLTabPagesByPageDefinationOId(pkContent)).collect(Collectors.toList()),true); return UILayoutDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLTabPagesByPageDefinationOId(pkContent)).collect(Collectors.toList()),true); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1129,8 +1126,7 @@ if(queryDetail){ //单个的,直接获取 try { layoutVO.setComponentVOs(uiComponentDO2VOs(Arrays.stream(ClientServiceProvider.getUIService().getPLPageDefinationsByPageContextOId(layoutVO.getOid())).collect(Collectors.toList()),true)); // layoutVO.setComponentVOs(uiComponentDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getPLPageDefinationsByPageContextOId(layoutVO.getOid())).collect(Collectors.toList()),true)); layoutVO.setComponentVOs(uiComponentDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLPageDefinationsByPageContextOId(layoutVO.getOid())).collect(Collectors.toList()),true)); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1176,7 +1172,7 @@ } if(!QUERY_BY_CACHE){ try { return uiComponentDO2VO(ClientServiceProvider.getUIService().getPLPageDefinationById(componentOid),true); return uiComponentDO2VO(platformClientUtil.getUIService().getPLPageDefinationById(componentOid),true); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1248,8 +1244,7 @@ componentVO.setTableDefineVO(tableDefineVOMap.get(key)); }else{ try { componentVO.setTableDefineVO(tableDO2VO(ClientServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); //componentVO.setTableDefineVO(tableDO2VO(platformClientUtil.getPortalService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); componentVO.setTableDefineVO(tableDO2VO(platformClientUtil.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1285,7 +1280,7 @@ tableDefineVO= tableDefineVOMap.get(key); }else{ try { tableDefineVO = tableDO2VO(ClientServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true); tableDefineVO = tableDO2VO(platformClientUtil.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1336,7 +1331,7 @@ componentVO.setFormDefineVO(formDefineVOMap.get(key)); }else{ try { componentVO.setFormDefineVO(formDO2VO(ClientServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()))); componentVO.setFormDefineVO(formDO2VO(platformClientUtil.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()))); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1386,7 +1381,7 @@ @Override public List<UIButtonDefineVO> listButtonByComponent(String pkComponent){ try { List<UIButtonDefineVO> buttonDefineVOS = buttonDO2VOs(Arrays.stream(ClientServiceProvider.getUIService().getPLTabButtonsByTableOId(pkComponent)).collect(Collectors.toSet())).stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); List<UIButtonDefineVO> buttonDefineVOS = buttonDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLTabButtonsByTableOId(pkComponent)).collect(Collectors.toSet())).stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); if(CollectionUtils.isEmpty(buttonDefineVOS)){ return buttonDefineVOS; } @@ -1460,8 +1455,7 @@ //查找参数 Map<String,String> params = new HashMap<>(); try { //PLCommandParameter[] parameters = platformClientUtil.getPortalService().getPLCommandParametersByCommandOId(buttonVO.getOid()); PLCommandParameter[] parameters = ClientServiceProvider.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid()); PLCommandParameter[] parameters = platformClientUtil.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid()); if(parameters!=null && parameters.length > 0){ for(PLCommandParameter parameter: parameters){ params.put(parameter.plKey,parameter.plValue); @@ -1526,10 +1520,7 @@ WebUtil.alertNotNull(btmType,"业务类型或者链接类型",id,"UI上下文的编号"); PLUILayout[] obj = null; try { obj = ClientServiceProvider.getUIService().getPLUILayoutsByRelatedType(btmType); // obj = platformClientUtil.getPortalService().getPLPageLayoutDefinationsByRelatedType(btmType); // obj = ServiceProvider.geT(btmType); obj = platformClientUtil.getUIService().getPLUILayoutsByRelatedType(btmType); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1541,7 +1532,6 @@ } } return UIContentDO2VO(context,true); // return UIContentDO2VO(null,true); } } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileVolumeServiceImpl.java
@@ -1,6 +1,5 @@ package com.vci.web.service.impl; import com.vci.client.common.providers.ClientServiceProvider; import com.vci.corba.common.PLException; import com.vci.corba.framework.data.PvolumeInfo; import com.vci.file.dto.VciFileVolumeDTO; @@ -384,7 +383,7 @@ @Override public VciFileVolumeDO getUploadVolume(){ try { PvolumeInfo volumeInfo = ClientServiceProvider.getFrameService().getDefaultVolume(); PvolumeInfo volumeInfo = platformClientUtil.getFrameworkService().getDefaultVolume(); VciFileVolumeDO fileVolumeDO = new VciFileVolumeDO(); fileVolumeDO.setOid(volumeInfo.id); fileVolumeDO.setId(volumeInfo.name); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java
@@ -7,7 +7,6 @@ import com.vci.client.bof.ClientLinkObject; import com.vci.client.bof.ClientLinkObjectOperation; 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; @@ -34,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; @@ -588,8 +588,7 @@ } boService.setPageAndOrderToQT(qt,linkTypeDataQuery.getPageHelper()); try { // com.vci.corba.query.data.BOAndLO[] bos = platformClientUtil.getQueryService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),linkTypeDataQuery.getParentOid()==null?"":linkTypeDataQuery.getParentOid()); com.vci.corba.query.data.BOAndLO[] bos = ClientServiceProvider.getOQService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),linkTypeDataQuery.getParentOid()==null?"":linkTypeDataQuery.getParentOid()); com.vci.corba.query.data.BOAndLO[] bos = platformClientUtil.getQueryService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),linkTypeDataQuery.getParentOid()==null?"":linkTypeDataQuery.getParentOid()); return Arrays.stream(bos).collect(Collectors.toList()); } catch (PLException e) { // logger.error(e.error_code,e); @@ -703,8 +702,7 @@ Map<String,List<String>> toBtmOidsMap = new HashMap<>(); try { IntHolder totalHolder = new IntHolder(); // com.vci.corba.omd.data.LinkObject[] linkObjects = platformClientUtil.getQueryService().findLTObjectsV2(qt.getId(), OQTool.qtTOXMl(qt).asXML(),totalHolder); ObjectQueryService.FindLTObjectsV2Result linkObjects = ClientServiceProvider.getOQService().findLTObjectsV2(qt.getId(), OQTool.qtTOXMl(qt).asXML()); ObjectQueryService.FindLTObjectsV2Result linkObjects = platformClientUtil.getQueryService().findLTObjectsV2(qt.getId(), OQTool.qtTOXMl(qt).asXML()); List<Map<String,String>> data = new ArrayList<>(); Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PlatformClientUtil.java
@@ -212,4 +212,20 @@ public LogServicePrx getLogService(){ return ClientServiceProvider.getLogService(); } /** * 获取UI服务 * @return */ public PortalServicePrx getUIService(){ return ClientServiceProvider.getUIService(); } /** * 获取对象工厂服务 * @return */ public BOFactoryServicePrx getBOFService() { return ClientServiceProvider.getBOFService(); } }