springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java
@@ -139,6 +139,9 @@ // 街道账号 找出id 且不在上面的区县下的街道 List<String> finalDistrictsCodes1 = districtsCodes; streetIds = systemUserLevels3.stream().filter(e -> !finalDistrictsCodes1.contains(e.getDistrictsCode())).map(SystemUserLevel::getStreetId).collect(Collectors.toList()); if(streetIds.isEmpty()){ streetIds.add("0"); } }else { streetIds.add("0"); } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ComplaintRejectController.java
@@ -33,6 +33,11 @@ @GetMapping("/list") @ApiOperation(value = "获取问题驳回统计列表", tags = {"三个身边后台-问题驳回统计"}) public R<IPage<ComplaintRejectVo>> list(ComplaintRejectQuery query){ IPage<ComplaintRejectVo> list = complaintRejectService.getComplaintRejectList(query); return R.ok(list); } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java
@@ -43,6 +43,7 @@ } @ApiOperation("导出") @PostMapping("/export") @SysLog(operatorCategory = "诉求导出",operId = 9) public void export(@RequestBody MgtComplaintQuery query) { SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); try { springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -283,8 +283,14 @@ if(0 < count){ return R.fail("手机号重复。"); } systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel)); SystemUserLevel systemUserLevel = systemUserLevels.get(0); systemUser.setDistrictsCode(systemUserLevel.getDistrictsCode()); systemUser.setDistricts(systemUserLevel.getDistricts()); systemUser.setStreetId(systemUserLevel.getStreetId()); systemUser.setStreet(systemUserLevel.getStreet()); systemUser.setCommunityId(systemUserLevel.getCommunityId()); systemUser.setCommunity(systemUserLevel.getCommunity()); String districtsCode = systemUser.getDistrictsCode(); @@ -309,7 +315,7 @@ systemUser.setCreateTime(LocalDateTime.now()); // 获取最高层级的用于原来的判断 systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel)); Integer level = systemUserLevels.get(0).getLevel(); systemUser.setAccountLevel(level); springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/aspectj/OperLogAspect.java
@@ -190,6 +190,8 @@ String postName = jsonResult.get("data").toString(); sysLog.setOperatorCategory("删除党员"); sysLog.setTargetName(postName); }else if(opLog.operatorCategory().contains("导")) { sysLog.setOperatorCategory(opLog.operatorCategory()); }else { for (Object arg : args) { if (arg instanceof PartyMemberDTO) { @@ -218,13 +220,16 @@ break; // 党员审核 case 9: JSONObject auditData = jsonResult.getJSONObject("data"); sysLog.setTargetName(auditData.getString("name")); if(auditData.getInteger("auditStatus")==1){ sysLog.setOperatorCategory("党员审核通过"); if(opLog.operatorCategory().contains("诉求导出")){ sysLog.setOperatorName(opLog.operatorCategory()); }else { sysLog.setOperatorCategory("党员审核拒绝"); JSONObject auditData = jsonResult.getJSONObject("data"); sysLog.setTargetName(auditData.getString("name")); if(auditData.getInteger("auditStatus")==1){ sysLog.setOperatorCategory("党员审核通过"); }else { sysLog.setOperatorCategory("党员审核拒绝"); } } break; // 导出 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/AnalyticStatisticsFourVo.java
@@ -9,14 +9,25 @@ public class AnalyticStatisticsFourVo { @ApiModelProperty("非常满意") private Double greatSatisfactionRate=0.0; @ApiModelProperty("非常满意数") private Integer greatSatisfactionNum=0; @ApiModelProperty("满意") private Double satisfactionRate=0.0; @ApiModelProperty("满意数") private Integer satisfactionRateNum=0; @ApiModelProperty("一般") private Double generalSatisfactionRate=0.0; @ApiModelProperty("一般数") private Integer generalSatisfactionNum=0; @ApiModelProperty("不满意") private Double dissatisfactionRate=0.0; @ApiModelProperty("不满意数") private Integer dissatisfactionNum=0; } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -1474,7 +1474,6 @@ // 诉求单量总计 vo.setAllTotal(complaints.size()); // 诉求单量本月 int thisMonthTotal = (int) complaints.stream().filter(e -> simpleDateFormat.format(e.getCreateTime()).contains(nowYearMonth)).count(); vo.setThisMonthTotal(thisMonthTotal); @@ -1526,8 +1525,9 @@ List<Complaint> lastMonthAverageTimeComplaints = complaints.stream().filter(e -> simpleDateFormat.format(e.getCreateTime()).contains(lastYearMonth)).collect(Collectors.toList()); if (lastMonthAverageTimeComplaints.size() > 0) { double lastMonthAverageTime = lastMonthAverageTimeComplaints.stream().mapToDouble(v -> v.getHandlingDay() == null ? 0 : v.getHandlingDay()).average().getAsDouble(); lastMonthAverageTime = BigDecimal.valueOf(lastMonthAverageTime).setScale(2, RoundingMode.HALF_UP).doubleValue(); vo.setLastMonthCompareAverageTime(vo.getThisMonthAverageTime() - lastMonthAverageTime); BigDecimal lastMonthAverageTime1 = BigDecimal.valueOf(lastMonthAverageTime).setScale(2, RoundingMode.HALF_UP); vo.setLastMonthCompareAverageTime( new BigDecimal(vo.getThisMonthAverageTime()).subtract(lastMonthAverageTime1).setScale(2,RoundingMode.HALF_UP).doubleValue()); } } @@ -1658,9 +1658,13 @@ AnalyticStatisticsFourVo vo = new AnalyticStatisticsFourVo(); // 0:不满意 1:一般 2:满意 3:非常满意 long count = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 0).count(); vo.setDissatisfactionNum((int) count); long count1 = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 1).count(); vo.setGeneralSatisfactionNum((int) count1); long count2 = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 2).count(); vo.setSatisfactionRateNum((int) count2); long count3 = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 3).count(); vo.setGreatSatisfactionNum((int) count3); if (complaints.size() > 0) { vo.setDissatisfactionRate(BigDecimal.valueOf(count).divide(BigDecimal.valueOf(complaints.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).doubleValue()); vo.setGeneralSatisfactionRate(BigDecimal.valueOf(count1).divide(BigDecimal.valueOf(complaints.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).doubleValue());