| | |
| | | Long reporterId = s.getReporterId(); |
| | | Long superiorId = s.getSuperiorId2(); |
| | | if (!targetId.equals(reporterId) && !targetId.equals(superiorId) && (s.getStatus() == 5)) { |
| | | s.setStatus(0); |
| | | // s.setStatus(0); |
| | | } |
| | | } |
| | | return page; |
| | |
| | | } |
| | | //审核不通过 |
| | | if (complaintAuditRecord.getAuditType().equals(1) && complaintAuditRecord.getAuditStatus().equals(0) && dto.getAuditResult().equals(2)) { |
| | | Complaint complaint = getById(complaintAuditRecord.getComplaintId()); |
| | | // 设置为正在办理 |
| | | complaint.setStatus(0); |
| | | updateById(complaint); |
| | | |
| | | complaintAuditRecord.setRejectReason(dto.getRejectReason()); |
| | | complaintAuditRecord.setAuditStatus(2); |
| | | complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId()); |
| | |
| | | |
| | | // 诉求单量总计 |
| | | vo.setAllTotal(complaints.size()); |
| | | |
| | | // 诉求单量本月 |
| | | int thisMonthTotal = (int) complaints.stream().filter(e -> simpleDateFormat.format(e.getCreateTime()).contains(nowYearMonth)).count(); |
| | | vo.setThisMonthTotal(thisMonthTotal); |
| | |
| | | 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()); |
| | | } |
| | | |
| | | } |
| | |
| | | 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()); |