|
@@ -248,10 +248,12 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
@Override
|
|
|
public PageResult<CommonCostRespVO> getCommonCostPage(CommonCostPageReqVO pageReqVO) {
|
|
|
Set<String> ids = Collections.emptySet();
|
|
|
- Set<String> projectIds = new HashSet<>(Arrays.asList(pageReqVO.getProjectIds()));
|
|
|
- if(CollectionUtil.isNotEmpty(projectIds)){
|
|
|
- List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(projectIds);
|
|
|
- ids = convertSet(detailList, CommonCostDetailDO::getCommonCostId);
|
|
|
+ if(pageReqVO.getProjectIds()!=null){
|
|
|
+ Set<String> projectIds = new HashSet<>(Arrays.asList(pageReqVO.getProjectIds()));
|
|
|
+ if(CollectionUtil.isNotEmpty(projectIds)){
|
|
|
+ List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(projectIds);
|
|
|
+ ids = convertSet(detailList, CommonCostDetailDO::getCommonCostId);
|
|
|
+ }
|
|
|
}
|
|
|
PageResult<CommonCostDO> pageResult = commonCostDao.getCommonCostPage(pageReqVO, commonService.getDeptCondition(pageReqVO.getDeptId()), ids);
|
|
|
PageResult<CommonCostRespVO> commonCostRespVOPageResult = getCommonCostRespVOPageResult(pageResult);
|
|
@@ -272,10 +274,12 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
@Override
|
|
|
public CommonCostOverviewVO getCommonCostOverview(CommonCostPageReqVO pageReqVO) {
|
|
|
Set<String> ids = Collections.emptySet();
|
|
|
- Set<String> projectIds = new HashSet<>(Arrays.asList(pageReqVO.getProjectIds()));
|
|
|
- if(CollectionUtil.isNotEmpty(projectIds)){
|
|
|
- List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(projectIds);
|
|
|
- ids = convertSet(detailList, CommonCostDetailDO::getCommonCostId);
|
|
|
+ if(pageReqVO.getProjectIds()!=null){
|
|
|
+ Set<String> projectIds = new HashSet<>(Arrays.asList(pageReqVO.getProjectIds()));
|
|
|
+ if(CollectionUtil.isNotEmpty(projectIds)){
|
|
|
+ List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(projectIds);
|
|
|
+ ids = convertSet(detailList, CommonCostDetailDO::getCommonCostId);
|
|
|
+ }
|
|
|
}
|
|
|
PageResult<CommonCostDO> pageResult = commonCostDao.getCommonCostPage(pageReqVO, commonService.getDeptCondition(pageReqVO.getDeptId()), ids);
|
|
|
List<CommonCostDO> commonCostList = commonCostDao.getCommonCostList(pageReqVO, commonService.getDeptCondition(pageReqVO.getDeptId()),ids);
|