From d039b89816988e6bed65ac7e5892d12df3e5e604 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 14 六月 2024 14:12:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java | 57 +++++++++++++++++++++------------------------------------ 1 files changed, 21 insertions(+), 36 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java index dc56825..11ebca6 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java @@ -1,11 +1,14 @@ 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.ServiceProvider; 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; @@ -1068,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 = ServiceProvider.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)); @@ -1087,8 +1088,7 @@ }catch (Throwable e){ //璇存槑鍚庣疆浜嬩欢鍑虹幇浜嗛敊璇紝閭d箞灏遍渶瑕佸垹闄や互鍓嶇殑杩欐潯鏁版嵁 try { -// platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1); - ServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); + platformClientUtil.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1345,8 +1345,7 @@ } } try { -// BusinessObject[] resultBOs = platformClientUtil.getBOFactoryService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); - BusinessObject[] resultBOs = ServiceProvider.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(); @@ -1406,8 +1405,7 @@ //鎵ц淇濆瓨 BaseResult<Map<String,Object>> result = BaseResult.success(); try { -// platformClientUtil.getBOFactoryService().updateBusinessObject(new BusinessObjectHolder(resultCbo.getObj().getBusinessObject())); - ServiceProvider.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); + platformClientUtil.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); result.setObj(boService.cbo2Map(resultCbo.getObj())); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); @@ -1452,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 = ServiceProvider.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)); @@ -1611,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); - ServiceProvider.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); } @@ -1683,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(ServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName)); + fromCbo.setBusinessObject(platformClientUtil.getBOFService().readBusinessObject(fromOid,fromBtmName)); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1721,8 +1716,7 @@ clo.dealLinkObjectNullValue(); bos[0] = toCbo.getBusinessObject(); try { -// platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder); - ServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); + platformClientUtil.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1736,10 +1730,8 @@ }catch (Throwable e){ //璇存槑鍚庣疆浜嬩欢鍑虹幇浜嗛敊璇紝閭d箞灏遍渶瑕佸垹闄や互鍓嶇殑杩欐潯鏁版嵁 try { -// platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1); -// platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject()); - ServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); - ServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject()); + platformClientUtil.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); + platformClientUtil.getBOFService().deleteLinkObject(clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1775,8 +1767,7 @@ ClientLinkObject clo ; if(editFlag){ try { -// LinkObject linkObject = platformClientUtil.getBOFactoryService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); - LinkObject linkObject = ServiceProvider.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); + LinkObject linkObject = platformClientUtil.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); clo = new ClientLinkObject(); clo.setLinkObject(linkObject); } catch (PLException vciError) { @@ -1938,14 +1929,13 @@ String btmName = baseDataMap.get("btmname"); String oid = baseDataMap.get("oid"); // ClientBusinessObject cbo = new ClientBusinessObject(); - com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject(); + ClientBusinessObject cbo = new ClientBusinessObject(); 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.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); - cbo.setBusinessObject(ServiceProvider.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); } @@ -1974,10 +1964,9 @@ //鍗囩増鐨勬椂鍊欙紝鐢熷懡鍛ㄦ湡鐨勭姸鎬侀渶瑕佹敼鍔ㄥ埌榛樿鐘舵�� if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){ //鏌ヨ鐢熷懡鍛ㄦ湡 -// OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); LifeCycle lifeCycleVO = null; try { - lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); + lifeCycleVO = platformClientUtil.getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); } catch (PLException e) { throw new RuntimeException(e); } @@ -2000,10 +1989,9 @@ //鍗囩増鐨勬椂鍊欙紝鐢熷懡鍛ㄦ湡鐨勭姸鎬侀渶瑕佹敼鍔ㄥ埌榛樿鐘舵�� if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){ //鏌ヨ鐢熷懡鍛ㄦ湡 -// OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); LifeCycle lifeCycleVO = null; try { - lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); + lifeCycleVO = platformClientUtil.getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); } catch (PLException e) { throw new RuntimeException(e); } @@ -2223,11 +2211,8 @@ clo.setToBO(toCbo); } } -// LinkObjectHolder loHolder = new LinkObjectHolder(); -// loHolder.value = clo.getLinkObject(); try { -// platformClientUtil.getBOFactoryService().updateLinkObject(loHolder); - ServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject()); + platformClientUtil.getBOFService().updateLinkObject(clo.getLinkObject()); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } -- Gitblit v1.9.3