|
|
@ -185,13 +185,15 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
projectEntity.setCustomerId(customerId); |
|
|
|
projectEntity.setCreatedTime(date); |
|
|
|
projectEntity.setStatus(ProjectConstant.CLOSED); |
|
|
|
projectEntity.setPageSize(NumConstant.ONE_THOUSAND); |
|
|
|
projectEntity.setPageSize(NumConstant.FIFTY); |
|
|
|
int pageNo = NumConstant.ONE; |
|
|
|
int size = NumConstant.ZERO; |
|
|
|
List<ProjectProcessEntity> processList = new ArrayList<>(); |
|
|
|
do { |
|
|
|
//1.一千条一循环查询节点数据,封装每个组织对应数据
|
|
|
|
projectEntity.setPageNo(pageNo); |
|
|
|
processList = projectProcessService.getProcessList(projectEntity); |
|
|
|
size = processList.size(); |
|
|
|
pageNo++; |
|
|
|
//遍历删除项目节点表查询的无效数据
|
|
|
|
if (list.size() > NumConstant.ZERO) { |
|
|
@ -248,8 +250,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
entity.setPendingTotal(entity.getPendingTotal() + projectTotal.intValue() - closedTotal.intValue()); |
|
|
|
entity.setClosedTotal(entity.getClosedTotal() + closedTotal.intValue()); |
|
|
|
if (projectTotal.intValue() > NumConstant.ZERO) { |
|
|
|
entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) projectTotal.intValue()))); |
|
|
|
entity.setClosedRatio(new BigDecimal(numberFormat.format((float) closedTotal.intValue() / (float) projectTotal.intValue()))); |
|
|
|
entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) entity.getProjectTotal()))); |
|
|
|
entity.setClosedRatio(new BigDecimal(numberFormat.format((float) entity.getClosedTotal() / (float) entity.getProjectTotal()))); |
|
|
|
} |
|
|
|
entity.setProjectIncr(entity.getProjectIncr() + projectIncr.intValue()); |
|
|
|
entity.setPendingIncr(entity.getPendingIncr() + projectIncr.intValue()); |
|
|
@ -267,8 +269,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
entity.setPendingTotal(projectTotal.intValue() - closedTotal.intValue()); |
|
|
|
entity.setClosedTotal(closedTotal.intValue()); |
|
|
|
if (projectTotal.intValue() > NumConstant.ZERO) { |
|
|
|
entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) projectTotal.intValue()))); |
|
|
|
entity.setClosedRatio(new BigDecimal(numberFormat.format((float) closedTotal.intValue() / (float) projectTotal.intValue()))); |
|
|
|
entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) entity.getProjectTotal()))); |
|
|
|
entity.setClosedRatio(new BigDecimal(numberFormat.format((float) entity.getClosedTotal() / (float) entity.getProjectTotal()))); |
|
|
|
} |
|
|
|
entity.setProjectIncr(projectIncr.intValue()); |
|
|
|
entity.setPendingIncr(projectIncr.intValue()); |
|
|
@ -276,7 +278,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
} |
|
|
|
mapList.put(agency.getId(), entity); |
|
|
|
} |
|
|
|
} while (!CollectionUtil.isEmpty(processList) && processList.size() == NumConstant.ONE_THOUSAND); |
|
|
|
} while (size == NumConstant.FIFTY); |
|
|
|
|
|
|
|
//二、再分页查询项目表数据,封装每个组织的已结案已解决总数、已结案未解决总数;日增量中已结案已解决总数、已结案未解决总数
|
|
|
|
int num = NumConstant.ONE; |
|
|
@ -285,6 +287,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
//3.一千条一循环查询项目数据,封装每个组织对应数据
|
|
|
|
projectEntity.setPageNo(num); |
|
|
|
projectList = projectService.getProjectList(projectEntity); |
|
|
|
size = projectList.size(); |
|
|
|
num++; |
|
|
|
//遍历删除项目主表查询的无效数据
|
|
|
|
if (list.size() > NumConstant.ZERO) { |
|
|
@ -343,8 +346,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
entity.setResolvedTotal(entity.getResolvedTotal() + resolvedTotal.intValue()); |
|
|
|
entity.setUnresolvedTotal(entity.getUnresolvedTotal() + unResolvedTotal.intValue()); |
|
|
|
if (entity.getClosedTotal() > NumConstant.ZERO) { |
|
|
|
entity.setResolvedRatio(new BigDecimal(numberFormat.format((float) resolvedTotal.intValue() / (float) entity.getClosedTotal()))); |
|
|
|
entity.setUnresolvedRatio(new BigDecimal(numberFormat.format((float) unResolvedTotal.intValue() / (float) entity.getClosedTotal()))); |
|
|
|
entity.setResolvedRatio(new BigDecimal(numberFormat.format((float) entity.getResolvedTotal() / (float) entity.getClosedTotal()))); |
|
|
|
entity.setUnresolvedRatio(new BigDecimal(numberFormat.format((float) entity.getUnresolvedTotal() / (float) entity.getClosedTotal()))); |
|
|
|
} |
|
|
|
entity.setResolvedIncr(entity.getResolvedIncr() + resolvedIncr.intValue()); |
|
|
|
entity.setUnresolvedIncr(entity.getUnresolvedIncr() + unResolvedIncr.intValue()); |
|
|
@ -371,7 +374,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
|
} |
|
|
|
mapList.put(agency.getId(), entity); |
|
|
|
} |
|
|
|
} while (!CollectionUtil.isEmpty(projectList) && projectList.size() == NumConstant.ONE_THOUSAND); |
|
|
|
} while (size == NumConstant.FIFTY); |
|
|
|
|
|
|
|
List<FactAgencyProjectDailyEntity> projectDateEntityList = new ArrayList<>(mapList.values()); |
|
|
|
//三、批量保存数据,先删后增
|
|
|
|