| | |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.DeleteTypeEnum; |
| | | import com.vci.web.enumpck.UIFieldTypeEnum; |
| | | import com.vci.web.enumpck.UITreeLoadTypeEnum; |
| | | import com.vci.web.query.UIDataGridQuery; |
| | |
| | | }catch (Throwable e){ |
| | | //说æåç½®äºä»¶åºç°äºé误ï¼é£ä¹å°±éè¦å é¤ä»¥åçè¿æ¡æ°æ® |
| | | try { |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(afterBOs.toArray(new BusinessObject[0]),1); |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(afterBOs.toArray(new BusinessObject[0]),DeleteTypeEnum.OID_AND_TS.getValue()); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | throw new VciBaseException(formLinkDataDTO.isDirection()?"from端":"to端" + "çä¸å¡ç±»å为空"); |
| | | } |
| | | |
| | | //æ¥è¯¢from端ç |
| | | BusinessObject fromCbo = new BusinessObject(); |
| | | try { |
| | | fromCbo = platformClientUtil.getBOFService().readBusinessObject(fromOid,fromBtmName); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | String finalPrefix = prefix; |
| | | formLinkDataDTO.getData().forEach((key, value)->{ |
| | | if(key.toLowerCase().startsWith(finalPrefix)){ |
| | |
| | | return BaseResult.fail(resultClo.getMsg(),resultClo.getMsgObjs()); |
| | | } |
| | | clo = resultClo.getObj(); |
| | | if(StringUtils.isBlank(clo.toOid)){ |
| | | clo.toOid = toCbo.oid; |
| | | } |
| | | //æ§è¡ä¿å |
| | | BusinessObject[] bos = new BusinessObject[1]; |
| | | ObjectTool.dealBusinessObjectNullValue(toCbo); |
| | | ObjectTool.dealLinkObjectNullValue(clo); |
| | | bos[0] = toCbo; |
| | | try { |
| | | platformClientUtil.getBOFService().createBusinessObjectWithLink(bos,clo); |
| | |
| | | if(editFlag){ |
| | | try { |
| | | LinkObject linkObject = platformClientUtil.getBOFService().readLinkObjectById(formLinkDataDTO.getOid(), formLinkDataDTO.getLinkType()); |
| | | clo = new LinkObject(); |
| | | clo = linkObject; |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | |
| | | clo.createTime = System.currentTimeMillis(); |
| | | clo.ts = System.currentTimeMillis(); |
| | | clo.ltName = formLinkDataDTO.getLinkType(); |
| | | clo.toOid = formLinkDataDTO.getToid(); |
| | | clo.toNameOid = formLinkDataDTO.getTnameoid(); |
| | | clo.toRevOid = formLinkDataDTO.getTrevisionoid(); |
| | | clo.toBTName = formLinkDataDTO.getTbtmname(); |
| | | clo.fromOid = formLinkDataDTO.getFoid(); |
| | | clo.fromBTName = formLinkDataDTO.getFbtmname(); |
| | | clo.fromNameOid = formLinkDataDTO.getFnameoid(); |
| | | clo.fromRevOid = formLinkDataDTO.getFrevisionoid(); |
| | | } |
| | | // |
| | | LinkObject finalClo = clo; |
| | |
| | | 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(); |
| | | String fromOid = formLinkDataDTO.isDirection()?formLinkDataDTO.getToid():formLinkDataDTO.getFoid(); |
| | | String fromBtmName = formLinkDataDTO.isDirection()?formLinkDataDTO.getTbtmname():formLinkDataDTO.getFbtmname(); |
| | | |
| | | Map<String,String> boData = new HashMap<>(); |
| | | Map<String,String> loData = new HashMap<>(); |
| | |
| | | if(deleteLinkDataDTO.isDeleteFromData()){ |
| | | fromBtmDataGroups.forEach((btm,cbos)->{ |
| | | try{ |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),1); |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]), DeleteTypeEnum.OID_AND_TS.getValue()); |
| | | }catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | if(deleteLinkDataDTO.isDeleteToData()){ |
| | | toBtmDataGroups.forEach((btm,cbos)->{ |
| | | try{ |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),1); |
| | | platformClientUtil.getBOFactoryService().batchDeleteBusinessObject(cbos.toArray(new BusinessObject[0]),DeleteTypeEnum.OID_AND_TS.getValue()); |
| | | }catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |