|
@@ -248,8 +248,9 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
@Override
|
|
|
public PageResult<CommonCostRespVO> getCommonCostPage(CommonCostPageReqVO pageReqVO) {
|
|
|
Set<String> ids = Collections.emptySet();
|
|
|
- if(CollectionUtil.isNotEmpty(pageReqVO.getProjectIds())){
|
|
|
- List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(pageReqVO.getProjectIds());
|
|
|
+ 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);
|
|
@@ -271,8 +272,9 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
@Override
|
|
|
public CommonCostOverviewVO getCommonCostOverview(CommonCostPageReqVO pageReqVO) {
|
|
|
Set<String> ids = Collections.emptySet();
|
|
|
- if(CollectionUtil.isNotEmpty(pageReqVO.getProjectIds())){
|
|
|
- List<CommonCostDetailDO> detailList = commonCostDetailService.getListByProjectIds(pageReqVO.getProjectIds());
|
|
|
+ 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);
|