| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.bof.ClientBusinessObject; |
| | | import com.vci.client.bof.ClientLinkObject; |
| | | import com.vci.client.bof.RevisionValueObject; |
| | | import com.vci.client.bof.VersionValueObject; |
| | | import com.vci.client.common.providers.ServiceProvider; |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.*; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | |
| | | try { |
| | | // BusinessObject resultBO = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); |
| | | // BusinessObject resultBO = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); |
| | | BusinessObject resultBO = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); |
| | | BusinessObject resultBO = ClientServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),false,false); |
| | | afterCBO = new com.vci.client.bof.ClientBusinessObject(); |
| | | afterCBO.setBusinessObject(resultBO); |
| | | result.setObj(boService.cbo2Map(afterCBO)); |
| | |
| | | //说明后置事件出现了错误,那么就需要删除以前的这条数据 |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | ServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | ClientServiceProvider.getBOFService().deleteBusinessObject(afterCBO.getBusinessObject(),1); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | } |
| | | try { |
| | | // BusinessObject[] resultBOs = platformClientUtil.getBOFactoryService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); |
| | | BusinessObject[] resultBOs = ServiceProvider.getBOFService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); |
| | | BusinessObject[] resultBOs = ClientServiceProvider.getBOFService().batchCreateBusinessObject(addBos.toArray(new BusinessObject[0]), false, false); |
| | | afterBOs = Arrays.stream(resultBOs).collect(Collectors.toList()); |
| | | Arrays.stream(resultBOs).forEach(bo->{ |
| | | com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject(); |
| | |
| | | BaseResult<Map<String,Object>> result = BaseResult.success(); |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().updateBusinessObject(new BusinessObjectHolder(resultCbo.getObj().getBusinessObject())); |
| | | ServiceProvider.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); |
| | | ClientServiceProvider.getBOFService().updateBusinessObject(resultCbo.getObj().getBusinessObject()); |
| | | result.setObj(boService.cbo2Map(resultCbo.getObj())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | |
| | | BaseResult<Map<String,Object>> result = BaseResult.success(); |
| | | try { |
| | | // BusinessObject bo = platformClientUtil.getBOFactoryService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion()); |
| | | BusinessObject bo = ServiceProvider.getBOFService().createBusinessObject(resultCbo.getObj().getBusinessObject(),formDataDTO.isUpVersion()?false:true,formDataDTO.isUpVersion()); |
| | | BusinessObject bo = ClientServiceProvider.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)); |
| | |
| | | VciBaseUtil.switchCollectionForOracleIn(finalCbo).stream().forEach(cbos->{ |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); |
| | | ServiceProvider.getBOFService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); |
| | | ClientServiceProvider.getBOFService().batchDeleteBusinessObject(cbos.stream().map(s->s.getBusinessObject()).collect(Collectors.toList()).toArray(new BusinessObject[0]),1); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | com.vci.client.bof.ClientBusinessObject fromCbo = new com.vci.client.bof.ClientBusinessObject(); |
| | | try { |
| | | // fromCbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(fromOid,fromBtmName)); |
| | | fromCbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName)); |
| | | fromCbo.setBusinessObject(ClientServiceProvider.getBOFService().readBusinessObject(fromOid,fromBtmName)); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | bos[0] = toCbo.getBusinessObject(); |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().createBusinessObjectWithLink(bosHolder,loHolder); |
| | | ServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); |
| | | ClientServiceProvider.getBOFService().createBusinessObjectWithLink(bos,clo.getLinkObject()); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | // platformClientUtil.getBOFactoryService().deleteLinkObject(clo.getLinkObject()); |
| | | ServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | ServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject()); |
| | | ClientServiceProvider.getBOFService().deleteBusinessObject(toCbo.getBusinessObject(),1); |
| | | ClientServiceProvider.getBOFService().deleteLinkObject(clo.getLinkObject()); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | if(editFlag){ |
| | | try { |
| | | // LinkObject linkObject = platformClientUtil.getBOFactoryService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); |
| | | LinkObject linkObject = ServiceProvider.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); |
| | | LinkObject linkObject = ClientServiceProvider.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); |
| | | clo = new ClientLinkObject(); |
| | | clo.setLinkObject(linkObject); |
| | | } catch (PLException vciError) { |
| | |
| | | String btmName = baseDataMap.get("btmname"); |
| | | String oid = baseDataMap.get("oid"); |
| | | // ClientBusinessObject cbo = new ClientBusinessObject(); |
| | | com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject(); |
| | | ClientBusinessObject cbo = new ClientBusinessObject(); |
| | | String copyfromversion = baseDataMap.get("copyfromversion"); |
| | | OsBtmTypeVO btmTypeVO = btmService.getBtmById(btmName); |
| | | List<String> attributeList = btmTypeVO.getAttributes().stream().map(attribute -> attribute.getId()).collect(Collectors.toList()); |
| | | if(editFlag || newRevision || newVersion){ |
| | | try { |
| | | // cbo.setBusinessObject(platformClientUtil.getBOFactoryService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | cbo.setBusinessObject(ServiceProvider.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | cbo.setBusinessObject(ClientServiceProvider.getBOFService().readBusinessObject(editFlag?oid:copyfromversion,btmName)); |
| | | } catch (PLException vciError) { |
| | | throw new VciBaseException("使用主键在系统中没有查询到数据",new String[]{oid},vciError); |
| | | } |
| | |
| | | // OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); |
| | | LifeCycle lifeCycleVO = null; |
| | | try { |
| | | lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); |
| | | lifeCycleVO = ClientServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); |
| | | } catch (PLException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | // OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(btmTypeVO.getLifeCycleId()); |
| | | LifeCycle lifeCycleVO = null; |
| | | try { |
| | | lifeCycleVO = ServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); |
| | | lifeCycleVO = ClientServiceProvider.getOMDService().getLifeCycleService().getLifeCycle(btmTypeVO.getLifeCycleId()); |
| | | } catch (PLException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | // loHolder.value = clo.getLinkObject(); |
| | | try { |
| | | // platformClientUtil.getBOFactoryService().updateLinkObject(loHolder); |
| | | ServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject()); |
| | | ClientServiceProvider.getBOFService().updateLinkObject(clo.getLinkObject()); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |