From b3a6181fd2e7d098e9ce227aa291c683217c5421 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 19 五月 2025 13:12:02 +0800
Subject: [PATCH] update

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java |   43 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 42 insertions(+), 1 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 0f4afa9..599e05a 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
@@ -21,6 +21,7 @@
 import com.panzhihua.sangeshenbian.model.entity.*;
 import com.panzhihua.sangeshenbian.model.excel.ComplaintExcel;
 import com.panzhihua.sangeshenbian.model.query.AnalyticStatisticsQuery;
+import com.panzhihua.sangeshenbian.model.query.AppStaticsQuery;
 import com.panzhihua.sangeshenbian.model.query.BasePage;
 import com.panzhihua.sangeshenbian.model.query.ComplaintQuery;
 import com.panzhihua.sangeshenbian.model.vo.*;
@@ -924,6 +925,7 @@
         }
         complaintAuditRecord.setAuditorName(systemUser.getName());
         complaintAuditRecord.setAuditorPhone(systemUser.getPhone());
+        complaintAuditRecord.setAuditTime(new Date());
         if (complaintReporAuditDTO.getAuditResult().equals(1)) {
             complaintAuditRecord.setAuditStatus(1);
             complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId());
@@ -1080,6 +1082,7 @@
         }
         complaintAuditRecord.setAuditorName(systemUser.getName());
         complaintAuditRecord.setAuditorPhone(systemUser.getPhone());
+        complaintAuditRecord.setAuditTime(new Date());
         //审核通过后,设置诉求延期
         if (complaintAuditRecord.getAuditType().equals(1) && complaintAuditRecord.getAuditStatus().equals(0) && dto.getAuditResult().equals(1)) {
             Complaint complaint = getById(complaintAuditRecord.getComplaintId());
@@ -1633,6 +1636,8 @@
 
     @Override
     public AnalyticStatisticsFourVo analyticStatisticsFour(List<Complaint> complaints) {
+        // 只计算评分了的
+        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();
@@ -1648,6 +1653,42 @@
         return vo;
     }
 
-
+    @Override
+    public List<Complaint> queryCompliantList(AppStaticsQuery query, LoginUserInfoVO loginUserInfo) {
+        IdentityInformation identityInformation = identityInformationService.getIdentityInformation(loginUserInfo);
+        Integer identity = identityInformation.getIdentity();
+        PartyMember partyMember = identityInformation.getPartyMember();
+        SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
+        Long targetId = null;
+        Integer accountLevel = 5;
+        //党员,查询该党员
+        if (identity.equals(1)) {
+            targetId = partyMember.getId();
+        } else if (identity.equals(2)) {
+            //上级
+            if (StringUtils.isBlank(query.getAreaId())) {
+                accountLevel = systemUserLevel.getLevel();
+                switch (systemUserLevel.getLevel()) {
+                    case 1:
+                        //市级
+                        targetId = 510400L;
+                        break;
+                    case 2:
+                        //区县级
+                        targetId = Long.valueOf(systemUserLevel.getDistrictsCode());
+                        break;
+                    case 3:
+                        //街道
+                        targetId = Long.valueOf(systemUserLevel.getStreetId());
+                        break;
+                    case 4:
+                        //社区
+                        targetId = systemUserLevel.getCommunityId();
+                        break;
+                }
+            }
+        }
+        return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo);
+    }
 }
 

--
Gitblit v1.7.1