|
|
@ -74,14 +74,20 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr |
|
|
|
List<GridAndOrgCategoryCountResultDTO> closedList = new ArrayList<>(); |
|
|
|
if (CollectionUtils.isEmpty(relationInfo)){ |
|
|
|
// 单客户
|
|
|
|
allList = screenProjectDataDao.selectGridCategoryProjectCount(customerIds, dateId, ProjectConstant.PROJECT_STATUS_ALL,customerId, NumConstant.FOUR); |
|
|
|
closedList = screenProjectDataDao.selectGridCategoryProjectCount(customerIds, dateId, ProjectConstant.PROJECT_STATUS_CLOSED,customerId, NumConstant.FOUR); |
|
|
|
allList = screenProjectDataDao.selectGridCategoryProjectCount(dateId, customerId, ProjectConstant.PROJECT_STATUS_ALL,customerId, NumConstant.FOUR); |
|
|
|
closedList = screenProjectDataDao.selectGridCategoryProjectCount(dateId, customerId, ProjectConstant.PROJECT_STATUS_CLOSED,customerId, NumConstant.FOUR); |
|
|
|
}else { |
|
|
|
// 多客户
|
|
|
|
List<String> subCustomerIds = relationInfo.stream().map(CustomerRelationEntity::getCustomerId).collect(Collectors.toList()); |
|
|
|
customerIds.addAll(subCustomerIds); |
|
|
|
allList = screenProjectDataDao.selectGridCategoryProjectCount(customerIds, dateId, ProjectConstant.PROJECT_STATUS_ALL,customerId, NumConstant.TWO); |
|
|
|
closedList = screenProjectDataDao.selectGridCategoryProjectCount(customerIds, dateId, ProjectConstant.PROJECT_STATUS_CLOSED,customerId, NumConstant.TWO); |
|
|
|
List<GridAndOrgCategoryCountResultDTO> finalAllList = allList; |
|
|
|
List<GridAndOrgCategoryCountResultDTO> finalClosedList1 = closedList; |
|
|
|
customerIds.forEach(c -> { |
|
|
|
List<GridAndOrgCategoryCountResultDTO> all = screenProjectDataDao.selectGridCategoryProjectCount(dateId, customerId, ProjectConstant.PROJECT_STATUS_ALL, c, NumConstant.TWO); |
|
|
|
finalAllList.addAll(all); |
|
|
|
List<GridAndOrgCategoryCountResultDTO> closed = screenProjectDataDao.selectGridCategoryProjectCount(dateId, customerId, ProjectConstant.PROJECT_STATUS_CLOSED, c, NumConstant.TWO); |
|
|
|
finalClosedList1.addAll(closed); |
|
|
|
}); |
|
|
|
} |
|
|
|
log.info("网格-所有项目分类{}",allList); |
|
|
|
log.info("网格-所有已关闭项目分类{}",closedList); |
|
|
|