| | |
| | | } |
| | | |
| | | /** |
| | | * 获取引用某些生命周期的业务类型 |
| | | * |
| | | * @param lifeIds 生命周期的编号集合 |
| | | * @return 业务类型显示对象 |
| | | */ |
| | | @Override |
| | | public List<BtmTypeVO> selectByLifeIds(Collection<String> lifeIds) { |
| | | if(CollectionUtils.isEmpty(lifeIds)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<BtmType> btmTypeList = new ArrayList<>(); |
| | | VciBaseUtil.switchCollectionForOracleIn(lifeIds).stream().forEach(ids->{ |
| | | LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>(); |
| | | ids.stream().forEach(id->{ |
| | | query.eq(BtmType::getLifeCycleId,id); |
| | | query.or(); |
| | | }); |
| | | query.eq(BtmType::getLifeCycleId,"-1"); |
| | | btmTypeList.addAll(baseMapper.selectList(query)); |
| | | }); |
| | | return BtmTypeWrapper.build().listEntityVO(btmTypeList); |
| | | } |
| | | |
| | | /** |
| | | * 统计引用某个生命周期的业务类型 |
| | | * |
| | | * @param lifeId 生命周期的编号 |
| | |
| | | query.eq(BtmType::getLifeCycleId,lifeId); |
| | | return baseMapper.selectCount(query).intValue(); |
| | | } |
| | | |
| | | /** |
| | | * 统计引用某些生命周期的业务类型 |
| | | * |
| | | * @param lifeIds 生命周期的编号集合 |
| | | * @return 个数 |
| | | */ |
| | | @Override |
| | | public Integer countByLifeIds(Collection<String> lifeIds) { |
| | | if(CollectionUtils.isEmpty(lifeIds)){ |
| | | return 0; |
| | | } |
| | | final Integer[] total = {0}; |
| | | VciBaseUtil.switchCollectionForOracleIn(lifeIds).stream().forEach(ids->{ |
| | | LambdaQueryWrapper<BtmType> query = new LambdaQueryWrapper<BtmType>(); |
| | | ids.stream().forEach(id->{ |
| | | query.eq(BtmType::getLifeCycleId,id); |
| | | query.or(); |
| | | }); |
| | | query.eq(BtmType::getLifeCycleId,"-1"); |
| | | total[0] += baseMapper.selectCount(query).intValue(); |
| | | }); |
| | | return total[0]; |
| | | } |
| | | } |