|
|
@ -184,44 +184,30 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj |
|
|
|
log.warn(String.format(PingYinConstants.AGENCY_INFO_IS_ZERO,customerId)); |
|
|
|
return; |
|
|
|
} |
|
|
|
del(customerId, dateId); |
|
|
|
List<ProjectOrgDailyResultDTO> projectOrgDaily = baseDao.selectOrgProjectByAgency(agencyInfos, dateId); |
|
|
|
if (CollectionUtils.isEmpty(projectOrgDaily)){ |
|
|
|
log.info(String.format(PingYinConstants.SELECT_GRID_INFO_BY_ORG_IS_NULL,customerId)); |
|
|
|
return; |
|
|
|
} |
|
|
|
log.info(projectOrgDaily.toString()); |
|
|
|
List<ScreenProjectOrgDailyDTO> createProjects = disposeCreateProject(agencyInfos, dateId); |
|
|
|
agencyInfos = disposeCreateProject(agencyInfos, dateId); |
|
|
|
agencyInfos.forEach(a -> { |
|
|
|
a.setDateId(dateId); |
|
|
|
projectOrgDaily.forEach(p -> { |
|
|
|
if (a.getAreaCode().equals(p.getAreaCode())){ |
|
|
|
a.setResolvedRatio(getRatio(p.getResolvedNum(),p.getProjectTotal())); |
|
|
|
a.setBadRatio(getRatio(p.getBadTotal(),p.getEvaluateTotal())); |
|
|
|
a.setGoodRatio(getRatio(p.getGoodTotal(),p.getEvaluateTotal())); |
|
|
|
a.setBadTotal(p.getBadTotal()); |
|
|
|
a.setEvaluateTotal(p.getEvaluateTotal()); |
|
|
|
a.setGoodTotal(p.getGoodTotal()); |
|
|
|
a.setProjectTotal(p.getProjectTotal()); |
|
|
|
a.setResolvedNum(p.getResolvedNum()); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
agencyInfos.forEach(a -> { |
|
|
|
createProjects.forEach(p -> { |
|
|
|
if (a.getOrgId().equals(p.getOrgId())){ |
|
|
|
a.setBadTotal(p.getBadTotal() + a.getBadTotal()); |
|
|
|
a.setEvaluateTotal(p.getEvaluateTotal() + a.getEvaluateTotal()); |
|
|
|
a.setGoodTotal(p.getGoodTotal() + a.getGoodTotal()); |
|
|
|
a.setProjectTotal(p.getProjectTotal() + a.getProjectTotal()); |
|
|
|
a.setResolvedNum(p.getResolvedNum() + a.getResolvedNum()); |
|
|
|
a.setResolvedRatio(getRatio(a.getResolvedNum(),a.getProjectTotal())); |
|
|
|
a.setBadRatio(getRatio(a.getBadTotal(),a.getEvaluateTotal())); |
|
|
|
a.setGoodRatio(getRatio(a.getGoodTotal(),a.getEvaluateTotal())); |
|
|
|
a.setResolvedRatio(getRatio(p.getResolvedNum(),p.getProjectTotal())); |
|
|
|
a.setBadRatio(getRatio(p.getBadTotal(),p.getEvaluateTotal())); |
|
|
|
a.setGoodRatio(getRatio(p.getGoodTotal(),p.getEvaluateTotal())); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
log.info(agencyInfos.toString()); |
|
|
|
del(customerId, dateId); |
|
|
|
insert(agencyInfos,customerId,dateId); |
|
|
|
} |
|
|
|
|
|
|
@ -239,6 +225,7 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj |
|
|
|
log.warn(String.format(PingYinConstants.AGENCY_INFO_IS_ZERO,customerId)); |
|
|
|
return; |
|
|
|
} |
|
|
|
del(customerId, dateId); |
|
|
|
List<ProjectOrgDailyResultDTO> projectOrgDaily = baseDao.selectOrgProject(agencyInfos, dateId); |
|
|
|
if (CollectionUtils.isEmpty(projectOrgDaily)){ |
|
|
|
log.info(String.format(PingYinConstants.SELECT_GRID_INFO_BY_ORG_IS_NULL,customerId)); |
|
|
@ -278,7 +265,6 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj |
|
|
|
}); |
|
|
|
}); |
|
|
|
log.info(agencyInfos.toString()); |
|
|
|
del(customerId, dateId); |
|
|
|
insert(agencyInfos,customerId,dateId); |
|
|
|
} |
|
|
|
|
|
|
|