From 90b343acf8e2b4393de0addc999025d750455178 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期二, 04 六月 2024 11:48:34 +0800
Subject: [PATCH] 1、pom文件改动上传。 2、文件上传代码改动。

---
 Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java |  332 +++++++++++++++++++++++++++++++-----------------------
 1 files changed, 189 insertions(+), 143 deletions(-)

diff --git a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
index 5e6e69a..1407ee0 100644
--- a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
+++ b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -1,9 +1,13 @@
 package com.vci.web.service.impl;
 
+import com.vci.client.common.providers.ServiceProvider;
+import com.vci.corba.common.PLException;
 import com.vci.corba.common.VCIError;
+import com.vci.corba.omd.lcm.LifeCycle;
 import com.vci.file.pagemodel.VciFileObjectVO;
 import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus;
 import com.vci.frameworkcore.lcstatuspck.ReleaseDataLCStatus;
+import com.vci.omd.constants.SystemAttribute;
 import com.vci.starter.revision.bo.TreeWrapperOptions;
 import com.vci.starter.web.annotation.bus.VciChangeDataAfter;
 import com.vci.starter.web.annotation.bus.VciChangeDataBefore;
@@ -246,7 +250,7 @@
         UIFormDataVO formDataVO = new UIFormDataVO();
         replaceMap.put("oid", formQuery.getOid().trim());
         if(!formDefineVO.isLinkTypeFlag()) {
-            List<ClientBusinessObject> cbos = null;
+            List<com.vci.client.bof.ClientBusinessObject> cbos = null;
             if (StringUtils.isNotBlank(queryTemplate)) {
                 replaceMap.put("oid", formQuery.getOid().trim());
                 cbos = boService.queryCBOByScheme(queryTemplate, conditionMap, replaceMap, null, queryFieldList.stream().collect(Collectors.toList()));
@@ -255,7 +259,7 @@
                 cbos = boService.queryCBO(formQuery.getBtmname(), conditionMap, null, queryFieldList.stream().collect(Collectors.toList()));
             }
             if (!CollectionUtils.isEmpty(cbos)) {
-                ClientBusinessObject cbo = cbos.get(0);
+                com.vci.client.bof.ClientBusinessObject cbo = cbos.get(0);
                 formDataVO.setData(boService.cbo2Map(cbo));
             } else {
                 throw new VciBaseException(DATA_OID_NOT_EXIST);
@@ -327,6 +331,7 @@
      * 鏍戣妭鐐圭殑鍒嗛殧绗︿笉涓�鏍�
      */
     private static final String TREE_NODE_ID_SEP = "@vcitreesep@";
+
     /**
      * 鑾峰彇鏍戝舰鏁版嵁
      *
@@ -389,7 +394,7 @@
 
             if(treeQuery.isQueryRoot()){
                 //鏄煡璇㈡牴鑺傜偣
-                List<ClientBusinessObject> rootCbos = null;
+                List<com.vci.client.bof.ClientBusinessObject> rootCbos = null;
                 if(StringUtils.isNotBlank(queryTemplate)){
                     //璇存槑鏄彍鍗曢噷瀹氫箟浜嗘煡璇㈡ā鏉跨殑
                     rootCbos = boService.queryCBOByScheme(queryTemplate, null, replaceMap);
@@ -425,11 +430,10 @@
                 return rootTreeList;
             }else{
                 //杩欎釜涓嶆槸璺熻妭鐐癸紝浣嗘槸涓�鑸彧鏄鍔犱竴涓�愮骇鏌ヨ锛屽洜涓哄叏閮ㄦ煡璇㈢殑鏃跺�欙紝鍦ㄦ牴鑺傜偣宸茬粡鍏ㄩ儴鏌ヨ瀹屼簡
-                List<ClientBusinessObject> thisChildren = null;
+                List<com.vci.client.bof.ClientBusinessObject> thisChildren = null;
                 if (StringUtils.isNotBlank(queryTemplate)) {
                     thisChildren = boService.queryCBOByScheme(queryTemplate, treeQuery.getConditionMap(), replaceMap, null, queryFieldList);
                 } else {
-
                     thisChildren = boService.queryCBO(treeQuery.getParentBtmName(), treeQuery.getConditionMap(), null, queryFieldList);
                 }
                 return cbo2Trees(thisChildren, valueField, textField, parentFieldName, treeQuery.isShowCheckBox(), null);
@@ -455,7 +459,7 @@
             }
             if(treeQuery.isQueryRoot()){
                 //鏌ヨ鏍硅妭鐐�.鎴戜滑闇�瑕佸垽鏂槸鍚﹁缃簡鏍硅妭鐐圭殑鏌ヨ鏉′欢
-                List<BOAndLO> rootCbos = null;
+                List<com.vci.corba.query.data.BOAndLO> rootCbos = null;
                 String parentFieldNameAndValue = treeDefineVO.getShowLinkAbs();
                 if(StringUtils.isNotBlank(parentFieldNameAndValue)){
                     if(StringUtils.isNotBlank(queryTemplate)){
@@ -541,7 +545,7 @@
      */
     private void queryTreeForBO(List<Tree> rootTreeList, String queryTemplate,List<String> queryFieldList,TreeQueryObject treeQueryObject) {
         for (Tree rootTree : rootTreeList) {
-            List<ClientBusinessObject> thisChildren = null;
+            List<com.vci.client.bof.ClientBusinessObject> thisChildren = null;
             Map<String,String> sourceDataMap = rootTree.getAttributes();
             sourceDataMap.put("f_oid",rootTree.getOid());
             Map<String,String> conditionMap = new HashMap<>();
@@ -588,7 +592,7 @@
      * @param parentOid 涓婄骇鐨勪富閿�
      * @return 鏍�
      */
-    private List<Tree> cbo2Trees(Collection<ClientBusinessObject> cbos,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){
+    private List<Tree> cbo2Trees(Collection<com.vci.client.bof.ClientBusinessObject> 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<>();
@@ -610,7 +614,9 @@
                 children.add(tree);
             }
         });
-
+        if(rootList.size() == 0 && children.size() == 0){
+            return rootList;
+        }
         return Tree.getChildList(rootList,children);
     }
 
@@ -624,15 +630,15 @@
      * @param parentOid 涓婄骇鐨勫��
      * @return 鏍戝舰鏁版嵁
      */
-    public List<Tree> cloAndCbo2Trees(Collection<BOAndLO> boAndLOS,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){
+    public List<Tree> cloAndCbo2Trees(Collection<com.vci.corba.query.data.BOAndLO> boAndLOS,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){
         final int[] i = {0};
         List<Tree> rootList = new ArrayList<>();
         List<Tree> children = new ArrayList<>();
         boAndLOS.stream().forEach(boAndLO->{
             Tree tree = new Tree();
-            ClientBusinessObject cbo = new ClientBusinessObject();
+            com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject();
             cbo.setBusinessObject(boAndLO.bo);
-            ClientLinkObject clo = new ClientLinkObject();
+            com.vci.client.bof.ClientLinkObject clo = new com.vci.client.bof.ClientLinkObject();
             clo.setLinkObject(boAndLO.lo);
             Map<String,String> cloMap = loService.clo2Map(clo);
             Map<String,String> cbo2Map = boService.cbo2Map(cbo);
@@ -674,7 +680,7 @@
      * @param fieldExpress 琛ㄨ揪寮忕殑鍊�
      * @return 杞崲鍚庣殑鍊�
      */
-    private String getValueByExpress(ClientBusinessObject cbo,String fieldExpress){
+    private String getValueByExpress(com.vci.client.bof.ClientBusinessObject cbo,String fieldExpress){
         if(StringUtils.isBlank(fieldExpress)){
             return "";
         }
@@ -866,12 +872,12 @@
      * @throws VciBaseException 鎵ц鍑洪敊鐨勪細鎶涘嚭寮傚父锛屾垨鑰呬簨浠剁洿鎺ヨ繑鍥炰簡寮傚父
      */
     @Override
-    public BaseResult callPostEvent(Collection<ClientBusinessObject> cbos, Collection<ClientLinkObject> clos, String postEvent, VciChangeDocumentTypeEnum businessType) throws VciBaseException{
+    public BaseResult callPostEvent(Collection<com.vci.client.bof.ClientBusinessObject> cbos, Collection<com.vci.client.bof.ClientLinkObject> 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().linkTypeName:null;
+        String linkType = !CollectionUtils.isEmpty(clos)?clos.stream().findFirst().get().getLinkObject().ltName:null;
         if(StringUtils.isNotBlank(postEvent)){
             //鍓嶇疆浜嬩欢
             //bean鐨勫悕瀛�#鏂规硶; 鎴栬�呭叏璺緞銆傛渶鍚庝竴涓槸鏂规硶鐨勫悕瀛�
@@ -1057,19 +1063,21 @@
             return beforeResult;
         }
         //灏佽鏁版嵁
-        BaseResult<ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,false,false);
+        BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,false,false);
         if(!resultCbo.isSuccess()){
             return BaseResult.fail(resultCbo.getMsg(),resultCbo.getMsgObjs());
         }
         //鎵ц淇濆瓨
         BaseResult<Map<String,Object>> result = BaseResult.success();
-        ClientBusinessObject afterCBO = null;
+        com.vci.client.bof.ClientBusinessObject afterCBO = null;
         try {
-            BusinessObject resultBO = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false);
-            afterCBO = new ClientBusinessObject();
+//            BusinessObject resultBO = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false);
+//            com.vci.corba.omd.data.BusinessObject resultBO = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false);
+            com.vci.corba.omd.data.BusinessObject resultBO = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false);
+            afterCBO = new com.vci.client.bof.ClientBusinessObject();
             afterCBO.setBusinessObject(resultBO);
             result.setObj(boService.cbo2Map(afterCBO));
-        } catch (VCIError vciError) {
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
@@ -1078,12 +1086,13 @@
         //鍚庣疆浜嬩欢
         String afterEvent = formDataDTO.getPostEvent();
         try {
-            callPostEvent(Arrays.stream(new ClientBusinessObject[]{afterCBO}).collect(Collectors.toList()),null, afterEvent, VciChangeDocumentTypeEnum.ADD);
+            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{afterCBO}).collect(Collectors.toList()),null, afterEvent, VciChangeDocumentTypeEnum.ADD);
         }catch (Throwable e){
             //璇存槑鍚庣疆浜嬩欢鍑虹幇浜嗛敊璇紝閭d箞灏遍渶瑕佸垹闄や互鍓嶇殑杩欐潯鏁版嵁
             try {
-                platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1);
-            } catch (VCIError vciError) {
+//                platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1);
+                ServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1);
+            } catch (PLException vciError) {
                 throw WebUtil.getVciBaseException(vciError);
             }
             throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
@@ -1101,7 +1110,7 @@
      * @param newVersion 鏂扮増娆�
      * @return  鎵ц鐨勭粨鏋�
      */
-    private BaseResult<ClientBusinessObject> wrapperCbo(FormDataDTO formDataDTO,UIFormDefineVO formDefineVO,boolean editFlag,boolean newRevision,boolean newVersion){
+    private BaseResult<com.vci.client.bof.ClientBusinessObject> wrapperCbo(FormDataDTO formDataDTO,UIFormDefineVO formDefineVO,boolean editFlag,boolean newRevision,boolean newVersion){
         //鎵╁睍灞炴�х殑鍊�
         Map<String, String> data = formDataDTO.getData();
         Map<String,String> dataLow = new HashMap<>();
@@ -1129,7 +1138,7 @@
         Map<String,String> baseDataMap = formDataDTO2MapLow(formDataDTO);
         Map<String,String> allDataMapLow = new HashMap<>();
         allDataMapLow.putAll(dataLow);
-        allDataMapLow.putAll(baseDataMap);
+//        allDataMapLow.putAll(baseDataMap);
         //鍒ゆ柇蹇呰緭椤�
         BaseResult result = checkRequired(formDefineVO,null,allDataMapLow);
         if(!result.isSuccess()){
@@ -1142,7 +1151,7 @@
         if(!result.isSuccess()){
             return result;
         }
-        ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,newRevision,newVersion);
+        com.vci.client.bof.ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,newRevision,newVersion);
         return BaseResult.success(cbo);
     }
 
@@ -1152,7 +1161,7 @@
      * @return 鍩虹瀵硅薄
      */
     @Override
-    public BaseModel cbo2BaseModel(ClientBusinessObject cbo){
+    public BaseModel cbo2BaseModel(com.vci.client.bof.ClientBusinessObject cbo){
         BaseModel baseModel = new BaseModel();
         baseModel.setOid(cbo.getOid());
         baseModel.setNameOid(cbo.getNameoid());
@@ -1164,11 +1173,11 @@
         baseModel.setFirstV(String.valueOf(cbo.getIsFirstV()));
         baseModel.setCreator(cbo.getCreator());
         try {
-            baseModel.setCreateTime(VciDateUtil.str2Date(cbo.getCreateTime(), VciDateUtil.DateTimeFormat));
-            baseModel.setLastModifyTime(VciDateUtil.str2Date(cbo.getLastModifyTime(), VciDateUtil.DateTimeFormat));
-            baseModel.setTs(VciDateUtil.str2Date(cbo.getTs(), VciDateUtil.DateTimeFormat));
-            baseModel.setCheckInTime(VciDateUtil.str2Date(cbo.getCheckinTime(), VciDateUtil.DateTimeFormat));
-            baseModel.setCheckOutTime(VciDateUtil.str2Date(cbo.getCheckoutTime(), VciDateUtil.DateTimeFormat));
+            baseModel.setCreateTime(new Date(cbo.getCreateTime()));
+            baseModel.setLastModifyTime(new Date(cbo.getLastModifyTime()));
+            baseModel.setTs(new Date(cbo.getTs()));
+//            baseModel.setCheckInTime(VciDateUtil.str2Date(cbo.getCheckinTime(), VciDateUtil.DateTimeFormat));
+//            baseModel.setCheckOutTime(VciDateUtil.str2Date(cbo.getCheckoutTime(), VciDateUtil.DateTimeFormat));
         }catch (Throwable e){
 
         }
@@ -1184,8 +1193,8 @@
         baseModel.setName(cbo.getName());
         baseModel.setDescription(cbo.getDescription());
         baseModel.setOwner(cbo.getOwner());
-        baseModel.setCheckInBy(cbo.getCheckinBy());
-        baseModel.setCheckOutBy(cbo.getCheckoutBy());
+//        baseModel.setCheckInBy(cbo.getCheckinBy());
+//        baseModel.setCheckOutBy(cbo.getCheckoutBy());
         baseModel.setCopyFromVersion(cbo.getCopyFromVersion());
         return baseModel;
     }
@@ -1323,12 +1332,12 @@
             return beforeResult;
         }
         //灏佽鏁版嵁
-        List<BusinessObject> addBos = new ArrayList<>();
-        List<BusinessObject> afterBOs = new ArrayList<>();
-        List<ClientBusinessObject> afterCBOs = new ArrayList<>();
+        List<com.vci.corba.omd.data.BusinessObject> addBos = new ArrayList<>();
+        List<com.vci.corba.omd.data.BusinessObject> afterBOs = new ArrayList<>();
+        List<com.vci.client.bof.ClientBusinessObject> afterCBOs = new ArrayList<>();
         Map<String,List<String>> releasedFileOids = new HashMap<>();
         for(FormDataDTO formDataDTO:formDataDTOList.getFormDataDTOS()) {
-            BaseResult<ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, false, false, false);
+            BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, false, false, false);
             if (!resultCbo.isSuccess()) {
                 return BaseResult.fail(resultCbo.getMsg(), resultCbo.getMsgObjs());
             }
@@ -1339,14 +1348,15 @@
             }
         }
         try {
-            BusinessObject[] resultBOs = platformClientUtil.getBOFactoryService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false);
+//            com.vci.corba.omd.data.BusinessObject[] resultBOs = platformClientUtil.getBOFactoryService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false);
+            com.vci.corba.omd.data.BusinessObject[] resultBOs = ServiceProvider.getBOFService().batchCreateBusinessObject(addBos.toArray(new com.vci.corba.omd.data.BusinessObject[0]), false, false);
             afterBOs = Arrays.stream(resultBOs).collect(Collectors.toList());
             Arrays.stream(resultBOs).forEach(bo->{
-                ClientBusinessObject cbo = new ClientBusinessObject();
+                com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject();
                 cbo.setBusinessObject(bo);
                 afterCBOs.add(cbo);
             });
-        } catch (VCIError vciError) {
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(releasedFileOids)){
@@ -1392,16 +1402,17 @@
             return beforeResult;
         }
         //灏佽鏁版嵁
-        BaseResult<ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,true,false,false);
+        BaseResult<com.vci.client.bof.ClientBusinessObject> 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.getBOFactoryService().updateBusinessObject(new BusinessObjectHolder(resultCbo.getObj().getBusinessObject()));
+//            platformClientUtil.getBOFactoryService().updateBusinessObject(new BusinessObjectHolder(resultCbo.getObj().getBusinessObject()));
+            ServiceProvider.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject());
             result.setObj(boService.cbo2Map(resultCbo.getObj()));
-        } catch (VCIError vciError) {
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
@@ -1410,7 +1421,7 @@
         //鍚庣疆浜嬩欢
         String afterEvent = formDataDTO.getPostEvent();
         try {
-            callPostEvent(Arrays.stream(new ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
+            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
         }catch (Throwable e){
             throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
         }
@@ -1437,18 +1448,19 @@
             return beforeResult;
         }
         //灏佽鏁版嵁
-        BaseResult<ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO,formDefineVO,false,formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
+        BaseResult<com.vci.client.bof.ClientBusinessObject> 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.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
-            ClientBusinessObject afterCbo = new ClientBusinessObject();
+//            BusinessObject bo = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion());
+            com.vci.corba.omd.data.BusinessObject bo = ServiceProvider.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));
-        } catch (VCIError vciError) {
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(formDataDTO.getReleaseFileOids())){
@@ -1457,7 +1469,7 @@
         //鍚庣疆浜嬩欢
         String afterEvent = formDataDTO.getPostEvent();
         try {
-            callPostEvent(Arrays.stream(new ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
+            callPostEvent(Arrays.stream(new com.vci.client.bof.ClientBusinessObject[]{resultCbo.getObj()}).collect(Collectors.toList()), null,afterEvent, VciChangeDocumentTypeEnum.EDIT);
         }catch (Throwable e){
             throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
         }
@@ -1485,11 +1497,11 @@
             return beforeResult;
         }
         //灏佽鏁版嵁
-        List<BusinessObject> updateCBOS = new ArrayList<>();
+        List<com.vci.corba.omd.data.BusinessObject> updateCBOS = new ArrayList<>();
         Map<String,List<String>> releasedFileOids = new HashMap<>();
-        List<ClientBusinessObject> afterCBOs = new ArrayList<>();
+        List<com.vci.client.bof.ClientBusinessObject> afterCBOs = new ArrayList<>();
         for(FormDataDTO formDataDTO:formDataDTOList.getFormDataDTOS()) {
-            BaseResult<ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, true, false, false);
+            BaseResult<com.vci.client.bof.ClientBusinessObject> resultCbo = wrapperCbo(formDataDTO, formDefineVO, true, false, false);
             if (!resultCbo.isSuccess()) {
                 return BaseResult.fail(resultCbo.getMsg(), resultCbo.getMsgObjs());
             }
@@ -1534,7 +1546,7 @@
         String btmName = deleteDataDTO.getDataList().get(0).getBtmname();
         List<String> oidList = deleteDataDTO.getDataList().stream().map(BaseModelDTO::getOid).collect(Collectors.toList());
         //鐪嬬湅绾ц仈鍒犻櫎銆傚彧鏈夎嚜宸卞紩鐢ㄨ嚜宸辩殑鏃跺�欏彲浠ョ骇鑱斿垹闄�
-        List<ClientBusinessObject> cbo = null;
+        List<com.vci.client.bof.ClientBusinessObject> cbo = null;
         if(deleteDataDTO.isCascade()){
             //绾ц仈鍒犻櫎
             OsBtmTypeVO btmTypeVO = btmService.getBtmById(btmName);
@@ -1553,8 +1565,8 @@
         if(CollectionUtils.isEmpty(cbo)){
             return BaseResult.fail("娌℃湁鍦ㄧ郴缁熶腑鎵惧埌杩欎簺鏁版嵁锛屾湭鎵ц鍒犻櫎鎿嶄綔");
         }
-        List<ClientBusinessObject> finalCbo = cbo;
-        Collection<Collection<String>> oidCollections = WebUtil.switchCollectionForOracleIn(finalCbo.stream().map(ClientBusinessObject::getOid).collect(Collectors.toList()));
+        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<OsUsedAttributeVO> usedAttributeVOS = null;
         boolean adminCascade = false;
         if("admin".equalsIgnoreCase(VciBaseUtil.getCurrentUserId()) && deleteDataDTO.isAdminCascade()){
@@ -1589,7 +1601,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<ClientBusinessObject> tempCbos = boService.queryCBO(usedAttributeVO.getPkBtmType(), conditionMap);
+                            List<com.vci.client.bof.ClientBusinessObject> tempCbos = boService.queryCBO(usedAttributeVO.getPkBtmType(), conditionMap);
                             if(!CollectionUtils.isEmpty(tempCbos)){
                                 finalCbo.addAll(tempCbos);
                             }
@@ -1602,11 +1614,13 @@
         }
         VciBaseUtil.switchCollectionForOracleIn(finalCbo).stream().forEach(cbos->{
             try {
-                platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1);
-            } catch (VCIError vciError) {
+//                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 com.vci.corba.omd.data.BusinessObject[0]),1);
+            } catch (PLException vciError) {
                 throw WebUtil.getVciBaseException(vciError);
             }
         });
+        System.out.println("zheshi shazi ");
         return BaseResult.success();
     }
 
@@ -1642,7 +1656,7 @@
             //璇存槑鍓嶇疆浜嬩欢娌℃湁鎵ц鎴愬姛
             return beforeResult;
         }
-        ClientLinkObject clo = null;
+        com.vci.client.bof.ClientLinkObject clo = null;
         String prefix = "";
         if(formLinkDataDTO.isDirection()){
             prefix = LO_FROM_PREFIX;
@@ -1670,10 +1684,11 @@
         }
 
         //鏌ヨfrom绔殑
-        ClientBusinessObject fromCbo = new ClientBusinessObject();
+        com.vci.client.bof.ClientBusinessObject fromCbo = new com.vci.client.bof.ClientBusinessObject();
         try {
-            fromCbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(fromOid,fromBtmName));
-        } catch (VCIError vciError) {
+//            fromCbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(fromOid,fromBtmName));
+            fromCbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName));
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         String finalPrefix = prefix;
@@ -1685,13 +1700,13 @@
             }
         });
         //灏佽to绔殑
-        BaseResult<ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO,formDefineVO,toOid,toBtmName,boData);
+        BaseResult<com.vci.client.bof.ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO,formDefineVO,toOid,toBtmName,boData);
         if(!result.isSuccess()){
             return BaseResult.fail(result.getMsg(),result.getMsgObjs());
         }
-        ClientBusinessObject toCbo = result.getObj();
+        com.vci.client.bof.ClientBusinessObject toCbo = result.getObj();
         //鍒濆鍖栭摼鎺ョ被鍨嬬殑鍊�
-        BaseResult<ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, false);
+        BaseResult<com.vci.client.bof.ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, false);
         if(!resultClo.isSuccess()){
             return BaseResult.fail(resultClo.getMsg(),resultClo.getMsgObjs());
         }
@@ -1704,17 +1719,14 @@
             clo.setToBO(toCbo);
         }
         //鎵ц淇濆瓨
-        BusinessObject[] bos = new BusinessObject[1];
+        com.vci.corba.omd.data.BusinessObject[] bos = new com.vci.corba.omd.data.BusinessObject[1];
         toCbo.dealBusinessObjectNullValue();
         clo.dealLinkObjectNullValue();
         bos[0] = toCbo.getBusinessObject();
-        BusinessObjectListHolder bosHolder = new BusinessObjectListHolder();
-        bosHolder.value = bos;
-        LinkObjectHolder loHolder = new LinkObjectHolder();
-        loHolder.value = clo.getLinkObject();
         try {
-            platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder);
-        } catch (VCIError vciError) {
+//            platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder);
+            ServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject());
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(formLinkDataDTO.getReleaseFileOids())){
@@ -1723,13 +1735,15 @@
         //鍚庣疆浜嬩欢
         String afterEvent = formLinkDataDTO.getPostEvent();
         try {
-            callPostEvent(null,Arrays.stream(new ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
+            callPostEvent(null,Arrays.stream(new com.vci.client.bof.ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
         }catch (Throwable e){
             //璇存槑鍚庣疆浜嬩欢鍑虹幇浜嗛敊璇紝閭d箞灏遍渶瑕佸垹闄や互鍓嶇殑杩欐潯鏁版嵁
             try {
-                platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1);
-                platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject());
-            } catch (VCIError vciError) {
+//                platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1);
+//                platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject());
+                ServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1);
+                ServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject());
+            } catch (PLException vciError) {
                 throw WebUtil.getVciBaseException(vciError);
             }
             throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
@@ -1745,7 +1759,7 @@
      * @param editFlag 鏄惁涓虹紪杈�
      * @return 閾炬帴绫诲瀷鐨勫唴瀹�
      */
-    private BaseResult<ClientLinkObject> wrapperOnlyCLO(FormLinkDataDTO formLinkDataDTO,Map<String,String> loData,UIFormDefineVO formDefineVO,boolean editFlag){
+    private BaseResult<com.vci.client.bof.ClientLinkObject> 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);
@@ -1761,22 +1775,23 @@
             return result;
         }
         //澶勭悊涓氬姟绫诲瀷寰楀埌鏁版嵁
-        ClientLinkObject clo ;
+        com.vci.client.bof.ClientLinkObject clo ;
         if(editFlag){
             try {
-                LinkObject linkObject = platformClientUtil.getBOFactoryService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType());
-                clo = new ClientLinkObject();
+//                LinkObject linkObject = platformClientUtil.getBOFactoryService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType());
+                com.vci.corba.omd.data.LinkObject linkObject = ServiceProvider.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType());
+                clo = new com.vci.client.bof.ClientLinkObject();
                 clo.setLinkObject(linkObject);
-            } catch (VCIError vciError) {
+            } catch (PLException vciError) {
                 throw WebUtil.getVciBaseException(vciError);
             }
         }else{
-            clo = new ClientLinkObject();
+            clo = new com.vci.client.bof.ClientLinkObject();
             //澶勭悊鍒濆鍖栫殑鏁版嵁
             clo.setOid(VciBaseUtil.getPk());
             clo.setCreator(VciBaseUtil.getCurrentUserId());
-            clo.setCreateTime(VciDateUtil.getNowString());
-            clo.setTs(VciDateUtil.getNowString());
+            clo.setCreateTime(System.currentTimeMillis());
+            clo.setTs(System.currentTimeMillis());
             clo.setLoName(formLinkDataDTO.getLinkType());
         }
         //
@@ -1802,7 +1817,7 @@
      * @param boData to鐨勬暟鎹�
      * @return 鍖呭惈鐨勫璞�
      */
-    private BaseResult<ClientBusinessObject> wrapperToCbo(FormLinkDataDTO formLinkDataDTO,UIFormDefineVO formDefineVO,String toOid,String toBtmName,Map<String,String> boData){
+    private BaseResult<com.vci.client.bof.ClientBusinessObject> 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);
@@ -1829,7 +1844,7 @@
         if(!result.isSuccess()){
             return result;
         }
-        ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,formLinkDataDTO.isToUpRevision(),formLinkDataDTO.isToUpVersion());
+        com.vci.client.bof.ClientBusinessObject cbo = createOrGetCbo(dataLow,baseDataMap,editFlag,formLinkDataDTO.isToUpRevision(),formLinkDataDTO.isToUpVersion());
         return BaseResult.success(cbo);
 
     }
@@ -1922,16 +1937,19 @@
      * @param newVersion 鏄惁鍗囩増娆�
      * @return cbo瀵硅薄
      */
-    public ClientBusinessObject createOrGetCbo(Map<String,String> dataLowMap,Map<String,String> baseDataMap,boolean editFlag,boolean newRevision,boolean newVersion){
+    public com.vci.client.bof.ClientBusinessObject 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();
+        com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.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));
-            } catch (VCIError vciError) {
+//                cbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName));
+                cbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName));
+            } catch (PLException vciError) {
                 throw new VciBaseException("浣跨敤涓婚敭鍦ㄧ郴缁熶腑娌℃湁鏌ヨ鍒版暟鎹�",new String[]{oid},vciError);
             }
             if(btmTypeVO.isRevisionFlag() && newRevision){
@@ -1945,25 +1963,31 @@
                     BaseModel baseModel = cbo2BaseModel(cbo);
                     RevisionValueObject revisionValueObject = getNextRevision(btmTypeVO,baseModel);
                     cbo.setRevisionid(VciBaseUtil.getPk());
-                    cbo.setRevisionSeq(revisionValueObject.getRevisionSeq());
+                    cbo.setRevisionSeq((short) revisionValueObject.getRevisionSeq());
                     cbo.setRevisionValue(revisionValueObject.getRevisionVal());
-                    cbo.setIsLastR(1);
-                    cbo.setIsFirstR(0);
+                    cbo.setIsLastR(true);
+                    cbo.setIsFirstR(false);
                     //澶勭悊鐗堟
                     cbo.setVersionValue(getFirstVersion(btmTypeVO.getVersionRule()));
                     cbo.setVersionRule(btmTypeVO.getVersionRule());
-                    cbo.setVersionSeq(0);
-                    cbo.setIsLastV(1);
-                    cbo.setIsFirstV(1);
+                    cbo.setVersionSeq((short) 0);
+                    cbo.setIsLastV(true);
+                    cbo.setIsFirstV(true);
                 }
                 //鍗囩増鐨勬椂鍊欙紝鐢熷懡鍛ㄦ湡鐨勭姸鎬侀渶瑕佹敼鍔ㄥ埌榛樿鐘舵��
                 if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){
                     //鏌ヨ鐢熷懡鍛ㄦ湡
-                    OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
-                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.getOid())){
+//                    OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
+                    LifeCycle lifeCycleVO = null;
+                    try {
+                        lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId());
+                    } catch (PLException e) {
+                        throw new RuntimeException(e);
+                    }
+                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){
                         throw new VciBaseException("{0}閲岀殑鐢熷懡鍛ㄦ湡璁剧疆寰椾笉姝g‘锛屽湪绯荤粺涓病鏈夋壘鍒皗1}杩欎釜鐢熷懡鍛ㄦ湡",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()});
                     }
-                    cbo.setLcStatus(lifeCycleVO.getStartStatus());
+                    cbo.setLcStatus(lifeCycleVO.startState);
                 }
             }
             if(btmTypeVO.isRevisionFlag() && newVersion){
@@ -1973,17 +1997,23 @@
                 BaseModel baseModel = cbo2BaseModel(cbo);
                 VersionValueObject versionValueObject = getNextVersion(btmTypeVO,baseModel);
                 cbo.setVersionValue(versionValueObject.getVersionVal());
-                cbo.setVersionSeq(versionValueObject.getVersionSeq());
-                cbo.setIsLastV(1);
-                cbo.setIsFirstV(0);
+                cbo.setVersionSeq((short) versionValueObject.getVersionSeq());
+                cbo.setIsLastV(true);
+                cbo.setIsFirstV(false);
                 //鍗囩増鐨勬椂鍊欙紝鐢熷懡鍛ㄦ湡鐨勭姸鎬侀渶瑕佹敼鍔ㄥ埌榛樿鐘舵��
                 if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId())){
                     //鏌ヨ鐢熷懡鍛ㄦ湡
-                    OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
-                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.getOid())){
+//                    OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
+                    LifeCycle lifeCycleVO = null;
+                    try {
+                        lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId());
+                    } catch (PLException e) {
+                        throw new RuntimeException(e);
+                    }
+                    if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){
                         throw new VciBaseException("{0}閲岀殑鐢熷懡鍛ㄦ湡璁剧疆寰椾笉姝g‘锛屽湪绯荤粺涓病鏈夋壘鍒皗1}杩欎釜鐢熷懡鍛ㄦ湡",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()});
                     }
-                    cbo.setLcStatus(lifeCycleVO.getStartStatus());
+                    cbo.setLcStatus(lifeCycleVO.startState);
                 }
             }
         }else{
@@ -1994,13 +2024,13 @@
             if(StringUtils.isBlank(cbo.getCreator())){
                 cbo.setCreator(VciBaseUtil.getCurrentUserId());
             }
-            if(StringUtils.isBlank(cbo.getCreateTime())){
-                cbo.setCreateTime(VciDateUtil.getNowString());
+            if(cbo.getCreateTime() != 0){
+                cbo.setCreateTime(System.currentTimeMillis());
             }
             if(StringUtils.isBlank(cbo.getOwner())){
                 cbo.setOwner(cbo.getCreator());
             }
-            cbo.setTs(VciDateUtil.getNowString());
+            cbo.setTs(System.currentTimeMillis());
             if(StringUtils.isNotBlank(btmTypeVO.getLifeCycleId()) && (StringUtils.isBlank(cbo.getLcStatus()) || newRevision || newVersion)){
                 //鏌ヨ鐢熷懡鍛ㄦ湡
                 OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId());
@@ -2031,20 +2061,28 @@
                 if (StringUtils.isBlank(cbo.getRevisionid())) {
                     cbo.setRevisionid(VciBaseUtil.getPk());
                 }
-                cbo.setIsFirstR(1);
-                cbo.setIsLastR(1);
+                cbo.setIsFirstR(true);
+                cbo.setIsLastR(true);
                 cbo.setRevisionRule(btmTypeVO.getRevisionRuleId());
-                cbo.setRevisionSeq(0);
+                cbo.setRevisionSeq((short) 0);
                 //鐪嬬湅鏄惁闇�瑕佸鐞嗙増娆�
 
                 cbo.setVersionValue(getFirstVersion(btmTypeVO.getVersionRule()));
                 cbo.setVersionRule(btmTypeVO.getVersionRule());
-                cbo.setVersionSeq(0);
-                cbo.setIsLastV(1);
-                cbo.setIsFirstV(1);
+                cbo.setVersionSeq((short) 0);
+                cbo.setIsLastV(true);
+                cbo.setIsFirstV(true);
             }
         }
+//        Iterator<Map.Entry<String, String>> iterator = baseDataMap.entrySet().iterator();
+//        while(iterator.hasNext()){
+//            Map.Entry<String, String> next = iterator.next();
+//            if(!attributeList.contains(next.getKey())){
+//                iterator.remove();
+//            }
+//        }
         setValueToCbo(dataLowMap,baseDataMap,cbo,editFlag);
+//        cbo.setName(dataLowMap.get("name"));
         return cbo;
     }
 
@@ -2075,14 +2113,16 @@
      * @param editFlag 鏄惁涓虹紪杈�
      */
     @Override
-    public void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, ClientBusinessObject cbo, boolean editFlag){
+    public void setValueToCbo(Map<String, String> dataLow, Map<String, String> baseDataLow, com.vci.client.bof.ClientBusinessObject cbo, boolean editFlag){
         dataLow.forEach((key,value)->{
             if(editFlag&&notSendOnEdit(key)){
                 //骞冲彴涓嶈兘浼犻�掕繖涓�
             }else{
                 try {
-                    cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
-                } catch (VCIError vciError) {
+//                    if(!SystemAttribute.bosysAttList().contains(key)){
+                        cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
+//                    }
+                } catch (PLException vciError) {
                     throw new VciBaseException("{0}鐨勫�间笉绗﹀悎瑕佹眰锛屽綋鍓嶆槸{1}", new String[]{key, value}, vciError);
                 }
             }
@@ -2094,16 +2134,20 @@
                 if(editFlag) {
                     //缂栬緫鐨勬椂鍊欏彲浠ラ兘璁剧疆
                     try {
-                        cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
-                    } catch (VCIError vciError) {
+//                        if(!SystemAttribute.bosysAttList().contains(key)){
+                            cbo.setAttributeValueWithNoCheck(key, value, !editFlag);
+//                        }
+                    } catch (PLException vciError) {
                         throw new VciBaseException("{0}鐨勫�间笉绗﹀悎瑕佹眰锛屽綋鍓嶆槸{1}", new String[]{key, value}, vciError);
                     }
                 }else{
                     //鍙渶瑕佸鐞唅d,name,description锛屽瘑绾у嵆鍙紝鍏朵綑鐨勯兘宸茬粡琚缃簡
                     if(basicFields.contains(key) &&StringUtils.isNotBlank(value)){
                         try {
-                            cbo.setAttributeValueWithNoCheck(key, value, true);
-                        } catch (VCIError vciError) {
+//                            if(!SystemAttribute.bosysAttList().contains(key)){
+                                cbo.setAttributeValueWithNoCheck(key, value, true);
+//                            }
+                        } catch (PLException vciError) {
                             throw new VciBaseException("{0}鐨勫�间笉绗﹀悎瑕佹眰锛屽綋鍓嶆槸{1}", new String[]{key, value}, vciError);
                         }
                     }
@@ -2141,7 +2185,7 @@
             //璇存槑鍓嶇疆浜嬩欢娌℃湁鎵ц鎴愬姛
             return beforeResult;
         }
-        ClientLinkObject clo = null;
+        com.vci.client.bof.ClientLinkObject 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();
@@ -2159,10 +2203,10 @@
                 }
             });
         }
-        ClientBusinessObject toCbo =null;
+        com.vci.client.bof.ClientBusinessObject toCbo =null;
         if(!CollectionUtils.isEmpty(boData)) {
             //灏佽to绔殑
-            BaseResult<ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO, formDefineVO, toOid, toBtmName, boData);
+            BaseResult<com.vci.client.bof.ClientBusinessObject> result = wrapperToCbo(formLinkDataDTO, formDefineVO, toOid, toBtmName, boData);
             if (!result.isSuccess()) {
                 return BaseResult.fail(result.getMsg(), result.getMsgObjs());
             }
@@ -2170,7 +2214,7 @@
         }
 
         //鍒濆鍖栭摼鎺ョ被鍨嬬殑鍊�
-        BaseResult<ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, true);
+        BaseResult<com.vci.client.bof.ClientLinkObject> resultClo = wrapperOnlyCLO(formLinkDataDTO, loData, formDefineVO, true);
         if(!resultClo.isSuccess()){
             return BaseResult.fail(resultClo.getMsg(),resultClo.getMsgObjs());
         }
@@ -2182,20 +2226,22 @@
                 clo.setToBO(toCbo);
             }
         }
-        LinkObjectHolder loHolder = new LinkObjectHolder();
-        loHolder.value = clo.getLinkObject();
+//        LinkObjectHolder loHolder = new LinkObjectHolder();
+//        loHolder.value = clo.getLinkObject();
         try {
-            platformClientUtil.getBOFactoryService().updateLinkObject(loHolder);
-        } catch (VCIError vciError) {
+//            platformClientUtil.getBOFactoryService().updateLinkObject(loHolder);
+            ServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject());
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         //淇濆瓨to绔垨鑰協rom绔�
         BusinessObjectHolder boHolder = new BusinessObjectHolder();
-        toCbo.dealBusinessObjectNullValue();
-        boHolder.value = toCbo.getBusinessObject();
+//        toCbo.dealBusinessObjectNullValue();
+//        boHolder.value = toCbo.getBusinessObject();
         try{
-            platformClientUtil.getBOFactoryService().updateBusinessObject(boHolder);
-        } catch (VCIError vciError) {
+//            platformClientUtil.getBOFactoryService().updateBusinessObject(boHolder);
+            ServiceProvider.getBOFService().updateBusinessObject(toCbo.getBusinessObject());
+        } catch (PLException vciError) {
             throw WebUtil.getVciBaseException(vciError);
         }
         if(!CollectionUtils.isEmpty(formLinkDataDTO.getReleaseFileOids())){
@@ -2204,7 +2250,7 @@
         //鍚庣疆浜嬩欢
         String afterEvent = formLinkDataDTO.getPostEvent();
         try {
-            callPostEvent(null,Arrays.stream(new ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
+            callPostEvent(null,Arrays.stream(new com.vci.client.bof.ClientLinkObject[]{clo}).collect(Collectors.toList()), afterEvent, VciChangeDocumentTypeEnum.ADD);
         }catch (Throwable e){
             //鍚庣疆浜嬩欢鏈夐棶棰樹簡灏卞彧鑳芥槸杩欐牱浜嗭紝娌″姙娉曟仮澶�
             throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e);
@@ -2239,17 +2285,17 @@
         }
         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<ClientBusinessObject>> fromBtmDataGroups = new HashMap<>();
-        Map<String,List<ClientBusinessObject>> toBtmDataGroups = new HashMap<>();
+        Map<String,List<com.vci.client.bof.ClientBusinessObject>> fromBtmDataGroups = new HashMap<>();
+        Map<String,List<com.vci.client.bof.ClientBusinessObject>> toBtmDataGroups = new HashMap<>();
         if(!CollectionUtils.isEmpty(fromBtmGroups)){
             fromBtmGroups.forEach((btmType,cloList)->{
-                List<ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getFromOid).collect(Collectors.toList()), btmType);
+                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getFromOid).collect(Collectors.toList()), btmType);
                 fromBtmDataGroups.put(btmType,cbos);
             });
         }
         if(!CollectionUtils.isEmpty(toBtmGroups)){
             toBtmGroups.forEach((btmType,cloList)->{
-                List<ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getToOid).collect(Collectors.toList()), btmType);
+                List<com.vci.client.bof.ClientBusinessObject> cbos = boService.selectCBOByOidCollection(cloList.stream().map(ClientLinkObject::getToOid).collect(Collectors.toList()), btmType);
                 toBtmDataGroups.put(btmType,cbos);
             });
         }
@@ -2295,7 +2341,7 @@
         if(deleteLinkDataDTO.isDeleteFromData()){
             fromBtmDataGroups.forEach((btm,cbos)->{
                 try{
-                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
+                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(com.vci.client.bof.ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
                 }catch (VCIError vciError) {
                     throw WebUtil.getVciBaseException(vciError);
                 }
@@ -2304,7 +2350,7 @@
         if(deleteLinkDataDTO.isDeleteToData()){
             toBtmDataGroups.forEach((btm,cbos)->{
                 try{
-                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
+                    platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(com.vci.client.bof.ClientBusinessObject::getBusinessObject).toArray(BusinessObject[] :: new),1);
                 }catch (VCIError vciError) {
                     throw WebUtil.getVciBaseException(vciError);
                 }
@@ -2378,7 +2424,7 @@
             referConfigVO.setConditionMap(new HashMap<>());
         }
 
-        List<ClientBusinessObject> cbos = null;
+        List<com.vci.client.bof.ClientBusinessObject> cbos = null;
         String oidFieldName = StringUtils.isNotBlank(referConfigVO.getParentUsedField())?referConfigVO.getParentUsedField():referConfigVO.getValueField();
         if(referConfigVO.isSelectAllLevel()) {
             String parentOidSql = "";
@@ -2453,7 +2499,7 @@
     @Override
     public List<Map<String,String>> getDataAttr(String btmname, String oid) {
         VciBaseUtil.alertNotNull(btmname,"涓氬姟绫诲瀷鐨勪俊鎭�",oid,"涓氬姟鏁版嵁鐨勪富閿�");
-        List<ClientBusinessObject> cbos = boService.queryCBO(btmname,WebUtil.getOidQuery(oid));
+        List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryCBO(btmname,WebUtil.getOidQuery(oid));
         List<Map<String,String>> dataMap = new ArrayList<>();
         if(!CollectionUtils.isEmpty(cbos)){
             cbos.stream().forEach(cbo->{

--
Gitblit v1.9.3