From ee6a2aa9e265f498ce7df9c603d3148487c0b1e8 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期三, 21 五月 2025 12:00:20 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java index 0b161b4..5e9b046 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java @@ -643,7 +643,12 @@ PartyMember partyMember = identityInformationVO.getPartyMember(); name = partyMember.getName(); } - Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class); + + Long complaintId = dto.getId(); + Complaint complaint = this.getById(complaintId); + Date createTime = complaint.getCreateTime(); + complaint = BeanUtil.copyProperties(dto, Complaint.class); + complaint.setUpdateTime(new Date()); complaint.setCompletionUserId(loginUserInfoVO.getUserId()); complaint.setCompletionUsername(name); @@ -651,7 +656,6 @@ complaint.setCompletionTime(new Date()); complaint.setCompletionUserLevel(accountLevel); // 计算处理时间 - Date createTime = complaint.getCreateTime(); long l = Duration.between(createTime.toInstant(), complaint.getCompletionTime().toInstant()).getSeconds() / 3600; double handlingDay = new BigDecimal(l).divide(new BigDecimal("24"), 2, RoundingMode.HALF_UP).doubleValue(); complaint.setHandlingDay(handlingDay); @@ -1558,6 +1562,7 @@ String[] split = time.split(" - "); System.out.println(split[0]); } + @Override public List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(String time, List<Complaint> complaints, SimpleDateFormat simpleDateFormat) { ArrayList<AnalyticStatisticsTwoVo> list = new ArrayList<>(); @@ -1644,7 +1649,7 @@ @Override public AnalyticStatisticsFourVo analyticStatisticsFour(List<Complaint> complaints) { // 只计算评分了的 - complaints = complaints.stream().filter(e ->e.getCommentRate() != null).collect(Collectors.toList()); + complaints = complaints.stream().filter(e -> e.getCommentRate() != null).collect(Collectors.toList()); AnalyticStatisticsFourVo vo = new AnalyticStatisticsFourVo(); // 0:不满意 1:一般 2:满意 3:非常满意 long count = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 0).count(); @@ -1693,12 +1698,12 @@ targetId = systemUserLevel.getCommunityId(); break; } - }else { + } else { targetId = Long.valueOf(query.getAreaId()); accountLevel = query.getTier(); } } - return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo,query); + return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo, query); } } -- Gitblit v1.7.1