|
|
@ -137,6 +137,10 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr |
|
|
|
List<ScreenProjectOrgDailyDTO> agencies = screenCustomerAgencyDao.selectAgencyByCustomer(customerId); |
|
|
|
List<GridAndOrgCategoryCountResultDTO> allAgencies = ConvertUtils.sourceToTarget(agencies, GridAndOrgCategoryCountResultDTO.class); |
|
|
|
result = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies); |
|
|
|
List<GridAndOrgCategoryCountResultDTO> oneLevelList = screenProjectDataDao.selectOrgCategoryOneLevelProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies); |
|
|
|
if (CollectionUtils.isNotEmpty(oneLevelList)){ |
|
|
|
result.addAll(oneLevelList); |
|
|
|
} |
|
|
|
List<GridAndOrgCategoryCountResultDTO> closedList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_CLOSED, customerId, NumConstant.FOUR, allAgencies); |
|
|
|
result.forEach(r -> closedList.stream().filter(c -> r.getOrgId().equals(c.getOrgId()) && r.getCategoryCode().equals(c.getCategoryCode())).forEach(c -> r.setClosedProjectTotal(c.getClosedProjectTotal()))); |
|
|
|
}else { |
|
|
@ -154,6 +158,10 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr |
|
|
|
List<GridAndOrgCategoryCountResultDTO> allOrgCategoryList = result; |
|
|
|
partition.forEach(p -> { |
|
|
|
List<GridAndOrgCategoryCountResultDTO> allOrgList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.TWO, p); |
|
|
|
List<GridAndOrgCategoryCountResultDTO> oneLevelList = screenProjectDataDao.selectOrgCategoryOneLevelProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies); |
|
|
|
if (CollectionUtils.isNotEmpty(oneLevelList)){ |
|
|
|
allOrgList.addAll(oneLevelList); |
|
|
|
} |
|
|
|
List<GridAndOrgCategoryCountResultDTO> closedOrgList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_CLOSED, customerId, NumConstant.TWO, p); |
|
|
|
allOrgList.forEach(a -> closedOrgList.stream().filter(c -> a.getOrgId().equals(c.getOrgId()) && a.getCategoryCode().equals(c.getCategoryCode())).forEach(c -> a.setClosedProjectTotal(c.getClosedProjectTotal()))); |
|
|
|
allOrgCategoryList.addAll(allOrgList); |
|
|
|