| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.common.providers.ServiceProvider; |
| | | 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; |
| | |
| | | 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())); |
| | |
| | | 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); |
| | |
| | | |
| | | 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); |
| | |
| | | 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 { |
| | |
| | | } |
| | | 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)){ |
| | |
| | | */ |
| | | 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<>(); |
| | |
| | | * @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<>(); |
| | |
| | | children.add(tree); |
| | | } |
| | | }); |
| | | |
| | | if(rootList.size() == 0 && children.size() == 0){ |
| | | return rootList; |
| | | } |
| | | return Tree.getChildList(rootList,children); |
| | | } |
| | | |
| | |
| | | * @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); |
| | |
| | | * @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 ""; |
| | | } |
| | |
| | | * @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的名字#方法; 或者全路径。最后一个是方法的名字 |
| | |
| | | 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); |
| | | afterCBO = new com.vci.client.bof.ClientBusinessObject(); |
| | | afterCBO.setBusinessObject(resultBO); |
| | | result.setObj(boService.cbo2Map(afterCBO)); |
| | | } catch (VCIError vciError) { |
| | |
| | | //后置事件 |
| | | 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){ |
| | | //说明后置事件出现了错误,那么就需要删除以前的这条数据 |
| | | try { |
| | | platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | // platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | ServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | * @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<>(); |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | * @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()); |
| | |
| | | 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){ |
| | | |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | } |
| | | 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); |
| | | }); |
| | |
| | | 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) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | |
| | | //后置事件 |
| | | 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); |
| | | } |
| | |
| | | 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) { |
| | |
| | | //后置事件 |
| | | 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); |
| | | } |
| | |
| | | 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()); |
| | | } |
| | |
| | | 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); |
| | |
| | | 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()){ |
| | |
| | | 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); |
| | | } |
| | |
| | | //说明前置事件没有执行成功 |
| | | return beforeResult; |
| | | } |
| | | ClientLinkObject clo = null; |
| | | com.vci.client.bof.ClientLinkObject clo = null; |
| | | String prefix = ""; |
| | | if(formLinkDataDTO.isDirection()){ |
| | | prefix = LO_FROM_PREFIX; |
| | |
| | | } |
| | | |
| | | //查询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)); |
| | | // fromCbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(fromOid,fromBtmName)); |
| | | fromCbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName)); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | } |
| | | }); |
| | | //封装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()); |
| | | } |
| | |
| | | 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); |
| | | // platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder); |
| | | ServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | //后置事件 |
| | | 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){ |
| | | //说明后置事件出现了错误,那么就需要删除以前的这条数据 |
| | | try { |
| | | platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject()); |
| | | // platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | // platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject()); |
| | | ServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | ServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject()); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | * @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); |
| | |
| | | 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) { |
| | | 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()); |
| | | } |
| | | // |
| | |
| | | * @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); |
| | |
| | | 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); |
| | | |
| | | } |
| | |
| | | * @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); |
| | | if(editFlag || newRevision || newVersion){ |
| | | try { |
| | | cbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | // cbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | cbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | } catch (VCIError vciError) { |
| | | throw new VciBaseException("使用主键在系统中没有查询到数据",new String[]{oid},vciError); |
| | | } |
| | |
| | | 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 (VCIError e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){ |
| | | throw new VciBaseException("{0}里的生命周期设置得不正确,在系统中没有找到{1}这个生命周期",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()}); |
| | | } |
| | | cbo.setLcStatus(lifeCycleVO.getStartStatus()); |
| | | cbo.setLcStatus(lifeCycleVO.startState); |
| | | } |
| | | } |
| | | if(btmTypeVO.isRevisionFlag() && newVersion){ |
| | |
| | | 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 (VCIError e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.oid)){ |
| | | throw new VciBaseException("{0}里的生命周期设置得不正确,在系统中没有找到{1}这个生命周期",new String[]{btmTypeVO.getName(),btmTypeVO.getLifeCycleId()}); |
| | | } |
| | | cbo.setLcStatus(lifeCycleVO.getStartStatus()); |
| | | cbo.setLcStatus(lifeCycleVO.startState); |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | 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()); |
| | |
| | | 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); |
| | | } |
| | | } |
| | | setValueToCbo(dataLowMap,baseDataMap,cbo,editFlag); |
| | |
| | | * @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&¬SendOnEdit(key)){ |
| | | //平台不能传递这个 |
| | |
| | | //说明前置事件没有执行成功 |
| | | 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(); |
| | |
| | | } |
| | | }); |
| | | } |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | |
| | | //初始化链接类型的值 |
| | | 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()); |
| | | } |
| | |
| | | clo.setToBO(toCbo); |
| | | } |
| | | } |
| | | LinkObjectHolder loHolder = new LinkObjectHolder(); |
| | | loHolder.value = clo.getLinkObject(); |
| | | // LinkObjectHolder loHolder = new LinkObjectHolder(); |
| | | // loHolder.value = clo.getLinkObject(); |
| | | try { |
| | | platformClientUtil.getBOFactoryService().updateLinkObject(loHolder); |
| | | // platformClientUtil.getBOFactoryService().updateLinkObject(loHolder); |
| | | ServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject()); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | //保存to端或者from端 |
| | | BusinessObjectHolder boHolder = new BusinessObjectHolder(); |
| | | toCbo.dealBusinessObjectNullValue(); |
| | | boHolder.value = toCbo.getBusinessObject(); |
| | | // toCbo.dealBusinessObjectNullValue(); |
| | | // boHolder.value = toCbo.getBusinessObject(); |
| | | try{ |
| | | platformClientUtil.getBOFactoryService().updateBusinessObject(boHolder); |
| | | // platformClientUtil.getBOFactoryService().updateBusinessObject(boHolder); |
| | | ServiceProvider.getBOFService().updateBusinessObject(toCbo.getBusinessObject()); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | //后置事件 |
| | | 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); |
| | |
| | | } |
| | | 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); |
| | | }); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | 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 = ""; |
| | |
| | | @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->{ |