| | |
| | | throw new VciBaseException("要删除的状态对象不能为空"); |
| | | } |
| | | Set<String> oidSet= new HashSet<>(); |
| | | Set<String> idSet= new HashSet<>(); |
| | | statusVOList.stream().forEach( s -> { |
| | | VciBaseUtil.alertNotNull(s.getOid(),"要删除的状态对象的主键"); |
| | | oidSet.add(s.getOid()); |
| | | idSet.add(s.getId()); |
| | | }); |
| | | //查询 |
| | | List<Status> statusDOList = listStatusByOidCollectionDO(oidSet); |
| | |
| | | } |
| | | }); |
| | | //检查属性是否被引用 |
| | | if(checkStatusUseds(oidSet)){ |
| | | if(checkStatusUseds(idSet)){ |
| | | throw new VciBaseException("要删除的状态在生命周期对象中被使用,无法删除"); |
| | | } |
| | | Collection<Collection<String>> oidCollections = VciBaseUtil.switchCollectionForOracleIn(oidInDbSet); |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkStatusUseds(Collection<String> oidCollection) { |
| | | Long count = lifeCycleNodeMapper.selectCount(Wrappers.<LifeCycleNode>query().lambda().in(LifeCycleNode::getId,oidCollection)); |
| | | if(count>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkStatusUsed(String pkStatus) throws VciBaseException { |
| | | |
| | | return false; |
| | | } |
| | | |