Jelajahi Sumber

普通报销台账接口修改

chenjun 1 tahun lalu
induk
melakukan
55679363b3

+ 12 - 8
zjugis-business/src/main/java/com/zjugis/business/flow/commoncost/service/CommonCostServiceImpl.java

@@ -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);