|
|
|
@ -232,6 +232,11 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen |
|
|
|
List<EfficiencyEvaluationResultDTO> list = baseDao.getScreenDataByInterval(formDTO); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
list.forEach(item -> { |
|
|
|
if ("grid_party".equals(item.getDeptLevel())) { |
|
|
|
if (item.getDeptName().contains("社区")) { |
|
|
|
item.setDeptName(StringUtils.substringAfter(item.getDeptName(), "社区")); |
|
|
|
} |
|
|
|
} |
|
|
|
//计算结案率,响应率,满意率
|
|
|
|
if (item.getEventCount() != NumConstant.ZERO) { |
|
|
|
BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); |
|
|
|
@ -258,8 +263,17 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen |
|
|
|
} |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
return baseDao.getScreenData(formDTO); |
|
|
|
List<EfficiencyEvaluationResultDTO> list = baseDao.getScreenData(formDTO); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
list.forEach(item -> { |
|
|
|
if ("grid_party".equals(item.getDeptLevel())) { |
|
|
|
if (item.getDeptName().contains("社区")) { |
|
|
|
item.setDeptName(StringUtils.substringAfter(item.getDeptName(), "社区")); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -293,18 +307,19 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen |
|
|
|
} else if (NumConstant.THREE_STR.equals(formDTO.getStatType())) { |
|
|
|
//日期为本年
|
|
|
|
formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 4)); |
|
|
|
} else { |
|
|
|
//自定义区间
|
|
|
|
List<EfficiencyEvaluationResultDTO> list = baseDao.getScreenDataByInterval(formDTO); |
|
|
|
return getBarCategoryResultDTO(result, list); |
|
|
|
} |
|
|
|
List<EfficiencyEvaluationResultDTO> list = baseDao.getScreenData(formDTO); |
|
|
|
List<EfficiencyEvaluationResultDTO> list = baseDao.getEventBar(formDTO); |
|
|
|
return getBarCategoryResultDTO(result, list); |
|
|
|
} |
|
|
|
|
|
|
|
private BarCategoryResultDTO getBarCategoryResultDTO(BarCategoryResultDTO result, List<EfficiencyEvaluationResultDTO> list) { |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
List<BarCategoryDTO> barList = list.stream().map(item -> { |
|
|
|
if ("grid_party".equals(item.getDeptLevel())) { |
|
|
|
if (item.getDeptName().contains("社区")) { |
|
|
|
item.setDeptName(StringUtils.substringAfter(item.getDeptName(), "社区")); |
|
|
|
} |
|
|
|
} |
|
|
|
BarCategoryDTO dto = new BarCategoryDTO(); |
|
|
|
dto.setCategoryCode(item.getDeptId()); |
|
|
|
dto.setCategoryName(item.getDeptName()); |
|
|
|
@ -315,7 +330,7 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen |
|
|
|
detail.add(eventDetail); |
|
|
|
BarCategoryDetail closedDetail = new BarCategoryDetail(); |
|
|
|
closedDetail.setLegendName("结案数"); |
|
|
|
closedDetail.setCount(item.getEventCount()); |
|
|
|
closedDetail.setCount(item.getClosedCount()); |
|
|
|
detail.add(closedDetail); |
|
|
|
dto.setDetail(detail); |
|
|
|
return dto; |
|
|
|
|