|
|
@ -165,7 +165,7 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询各项目经受了多少机关 |
|
|
|
* @Description 查询各项目经手的最高机关Id |
|
|
|
* @param customerId |
|
|
|
* @return |
|
|
|
* @author wangc |
|
|
@ -197,16 +197,44 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询机关单位经手的项目数 |
|
|
|
* @param customerId |
|
|
|
* @param dimId |
|
|
|
* @param dateType - 日期维度类型 month date week quarter year |
|
|
|
* @return |
|
|
|
* @author wangc |
|
|
|
* @date 2020.09.23 10:06 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public Map<String, Integer> getCountOfProjectsHandledByAgency(String customerId, String dimId, String dateType) { |
|
|
|
Map<String,Integer> result = new HashMap<>(); |
|
|
|
List<ProjectParticipatedAgencyResultDTO> projectAgencyCount = baseDao.selectProjectParticipatedAgency(customerId,dimId,dateType); |
|
|
|
if(!CollectionUtils.isEmpty(projectAgencyCount)){ |
|
|
|
Map<String,List<ProjectParticipatedAgencyResultDTO>> map = |
|
|
|
projectAgencyCount.stream().collect(Collectors.groupingBy(ProjectParticipatedAgencyResultDTO :: getProjectId)); |
|
|
|
|
|
|
|
map.forEach((agency,handledProjectList) -> { |
|
|
|
result.put(agency,handledProjectList.size()); |
|
|
|
}); |
|
|
|
return result; |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 计算机关响应度 |
|
|
|
* @Description 计算机关办结项目效率 |
|
|
|
* @param customerId |
|
|
|
* @return |
|
|
|
* @author wangc |
|
|
|
* @date 2020.09.21 02:16 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public Map<String, BigDecimal> getAgencyResponseRatio(String customerId, String dimId, String dateType) { |
|
|
|
public Map<String, BigDecimal> getAgencyWorkPieceRatio(String customerId, String dimId, String dateType) { |
|
|
|
//网格、部门的办结系数
|
|
|
|
List<OrgResponseTimeResultDTO> gridDeptResponse = projectOrgPeriodDailyDao.selectSubOrgResponseCoefficient(customerId, dimId, dateType); |
|
|
|
//机关的办结系数
|
|
|
|
List<OrgResponseTimeResultDTO> agencyResponse = projectOrgPeriodDailyDao.selectAgencyResponseCoefficient(customerId, dimId, dateType); |
|
|
|
Map<String,BigDecimal> consumingMap = new HashMap<>(); |
|
|
|
Map<String,BigDecimal> timeMap = new HashMap<>(); |
|
|
@ -229,13 +257,14 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
Map<String,BigDecimal> ratioMap = new HashMap<>(); |
|
|
|
//效率map
|
|
|
|
Map<String,BigDecimal> efficiencyMap = new HashMap<>(); |
|
|
|
if(!CollectionUtils.isEmpty(consumingMap)) { |
|
|
|
consumingMap.keySet().forEach(agencyId -> { |
|
|
|
ratioMap.put(agencyId, consumingMap.get(agencyId).divide(timeMap.get(agencyId), NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
efficiencyMap.put(agencyId, consumingMap.get(agencyId).divide(timeMap.get(agencyId), NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
}); |
|
|
|
} |
|
|
|
return ratioMap; |
|
|
|
return efficiencyMap; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|