From abe9f2de85ff402a4c989dbc1427807b4e3a59f4 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 06 七月 2023 13:56:17 +0800 Subject: [PATCH] 代码提交 --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java index af7f220..a75265e 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java @@ -887,6 +887,30 @@ } /** + * 鑾峰彇寮曠敤鏌愪簺鐢熷懡鍛ㄦ湡鐨勪笟鍔$被鍨� + * + * @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 鐢熷懡鍛ㄦ湡鐨勭紪鍙� @@ -901,4 +925,28 @@ 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]; + } } -- Gitblit v1.9.3