From d130547c1f3b64cf8544261cdf1d9146ff319756 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 19 五月 2025 13:13:30 +0800
Subject: [PATCH] Merge branch 'dev-2.0.1' of http://120.76.84.145:10101/gitblit/r/java/zhihuishenqu into dev-2.0.1

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java    |    4 
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java |   18 ++++
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml                                      |   13 +++
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java        |   24 +++++
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java   |   21 +++--
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java           |   16 ++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java         |   64 +++++++++++++++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java  |   23 ++++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml                                    |    2 
 9 files changed, 156 insertions(+), 29 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java
index 6b38359..e024aa4 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/AnalyticStatisticsController.java
@@ -168,10 +168,10 @@
         AnalyticStatisticsOneVo analyticStatisticsOneVo = complaintService.analyticStatisticsOne(query,complaints,simpleDateFormat);
 
         // 第二部分数据
-        List<AnalyticStatisticsTwoVo> analyticStatisticsTwoVos =complaintService.analyticStatisticsTwo(query,complaints,simpleDateFormat);
+        List<AnalyticStatisticsTwoVo> analyticStatisticsTwoVos =complaintService.analyticStatisticsTwo(query.getTime(),complaints,simpleDateFormat);
 
         // 第三部分数据
-        List<AnalyticStatisticsThreeVo> analyticStatisticsThreeVos =complaintService.analyticStatisticsThree(query,complaints);
+        List<AnalyticStatisticsThreeVo> analyticStatisticsThreeVos =complaintService.analyticStatisticsThree(query.getRank(), complaints);
 
         // 第四部分数据
         AnalyticStatisticsFourVo analyticStatisticsFourVos =complaintService.analyticStatisticsFour(complaints);
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java
index 9ba9a84..1eacf74 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java
@@ -8,7 +8,10 @@
 import com.panzhihua.sangeshenbian.model.entity.ComAct;
 import com.panzhihua.sangeshenbian.model.query.AnalyticStatisticsQuery;
 import com.panzhihua.sangeshenbian.model.query.AppStaticsQuery;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsFourVo;
 import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsOneVo;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsThreeVo;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsTwoVo;
 import com.panzhihua.sangeshenbian.model.vo.RegionVO;
 import com.panzhihua.sangeshenbian.service.IdentityInformationService;
 import com.panzhihua.sangeshenbian.service.impl.StaticsService;
@@ -36,7 +39,6 @@
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class StaticsController extends BaseController {
     private final StaticsService staticsService;
-    private final IdentityInformationService identityInformationService;
 
     @GetMapping("/region-tree")
     @ApiOperation("获取区域树")
@@ -45,9 +47,27 @@
         return R.ok(staticsService.queryRegionTree(loginUserInfo));
     }
     @PostMapping("/part-one")
-    @ApiOperation("获取统计分析-第一部分")
+    @ApiOperation("获取统计分析-第一部分(处理满意率+诉求单量统计上面部分)")
     public R<AnalyticStatisticsOneVo> queryStaticsPartOne(@RequestBody AppStaticsQuery query) {
         LoginUserInfoVO loginUserInfo = getLoginUserInfo();
         return R.ok(staticsService.queryStaticsPartOne(query,loginUserInfo));
     }
+    @PostMapping("/part-two")
+    @ApiOperation("获取统计分析-第二部分(诉求单量统计柱状图)")
+    public R<List<AnalyticStatisticsTwoVo>> queryStaticsPartTwo(@RequestBody AppStaticsQuery query) {
+        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+        return R.ok(staticsService.queryStaticsPartTwo(query,loginUserInfo));
+    }
+    @PostMapping("/part-three")
+    @ApiOperation("获取统计分析-第三部分(问题类型排名)")
+    public R<List<AnalyticStatisticsThreeVo>> queryStaticsPartThree(@RequestBody AppStaticsQuery query) {
+        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+        return R.ok(staticsService.queryStaticsPartThree(query,loginUserInfo));
+    }
+    @PostMapping("/part-four")
+    @ApiOperation("获取统计分析-第四部分(评价占比)")
+    public R<AnalyticStatisticsFourVo> queryStaticsPartFour(@RequestBody AppStaticsQuery query) {
+        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+        return R.ok(staticsService.queryStaticsPartFour(query,loginUserInfo));
+    }
 }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java
index 1914b75..c1e0872 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java
@@ -187,21 +187,24 @@
 
     /**
      * 数据统计第二部分
-     * @param query
+     *
+     * @param time
      * @param complaints
      * @param simpleDateFormat
      * @return
      */
-    List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(AnalyticStatisticsQuery query, List<Complaint> complaints, SimpleDateFormat simpleDateFormat);
+    List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(String time, List<Complaint> complaints, SimpleDateFormat simpleDateFormat);
 
 
-    /**+
+    /**
+     * +
      * 数据统计第三部分
-     * @param query
+     *
+     * @param rank
      * @param complaints
      * @return
      */
-    List<AnalyticStatisticsThreeVo> analyticStatisticsThree(AnalyticStatisticsQuery query, List<Complaint> complaints);
+    List<AnalyticStatisticsThreeVo> analyticStatisticsThree(Integer rank, List<Complaint> complaints);
 
     /**
      * 数据统计第四部分
@@ -212,8 +215,7 @@
 
     /**
      * 查询党员或上级对应的诉求列表
-     * @param targetId
-     * @param accountLevel
+     * @param query
      * @param loginUserInfo
      * @return
      */
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 599e05a..171c4ec 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
@@ -1551,12 +1551,17 @@
         return vo;
     }
 
+    public static void main(String[] args) {
+        String time = "2022-02-02 - 2023-02-02";
+        String[] split = time.split(" - ");
+        System.out.println(split[0]);
+    }
     @Override
-    public List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(AnalyticStatisticsQuery query, List<Complaint> complaints, SimpleDateFormat simpleDateFormat) {
+    public List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(String time, List<Complaint> complaints, SimpleDateFormat simpleDateFormat) {
         ArrayList<AnalyticStatisticsTwoVo> list = new ArrayList<>();
         try {
-            if (StringUtils.isNotEmpty(query.getTime())) {
-                String[] split = query.getTime().split(" - ");
+            if (StringUtils.isNotEmpty(time)) {
+                String[] split = time.split(" - ");
                 Date parse = simpleDateFormat.parse(split[0] + " 00:00:00");
                 Date parse1 = simpleDateFormat.parse(split[1] + " 23:59:59");
                 complaints = complaints.stream().filter(e -> e.getCreateTime().getTime() <= parse1.getTime() && e.getCreateTime().getTime() >= parse.getTime()).collect(Collectors.toList());
@@ -1587,7 +1592,7 @@
                 }
 
             } else {
-                String time = DateUtils.getBeforeDay(6) + " 00:00:00";
+                time = DateUtils.getBeforeDay(6) + " 00:00:00";
                 Date parse = simpleDateFormat.parse(time);
                 // 近7天数据
                 complaints = complaints.stream().filter(e -> e.getCreateTime().getTime() <= new Date().getTime() && e.getCreateTime().getTime() >= parse.getTime()).collect(Collectors.toList());
@@ -1612,7 +1617,7 @@
     }
 
     @Override
-    public List<AnalyticStatisticsThreeVo> analyticStatisticsThree(AnalyticStatisticsQuery query, List<Complaint> complaints) {
+    public List<AnalyticStatisticsThreeVo> analyticStatisticsThree(Integer rank, List<Complaint> complaints) {
         Map<String, List<Complaint>> groupedByProblemType = complaints.stream()
                 .collect(Collectors.groupingBy(Complaint::getProblemType));
         List<AnalyticStatisticsThreeVo> analyticStatisticsThreeVos = groupedByProblemType.entrySet().stream()
@@ -1624,11 +1629,11 @@
                 })
                 .collect(Collectors.toList());
         analyticStatisticsThreeVos = analyticStatisticsThreeVos.stream().sorted(Comparator.comparing(AnalyticStatisticsThreeVo::getAllTotal).reversed()).collect(Collectors.toList());
-        if (query.getRank() == null) {
+        if (rank == null) {
             return analyticStatisticsThreeVos;
-        } else if (query.getRank() == 5) {
+        } else if (rank == 5) {
             return analyticStatisticsThreeVos.stream().limit(5).collect(Collectors.toList());
-        } else if (query.getRank() == 10) {
+        } else if (rank == 10) {
             return analyticStatisticsThreeVos.stream().limit(10).collect(Collectors.toList());
         }
         return Collections.emptyList();
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
index f41fb40..68af4ae 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
@@ -59,6 +59,14 @@
      */
     @Override
     public Page<PartyMember> pageList(PartyMemberQuery query, SystemUserVo loginUserInfo) {
+        SystemUser user = systemUserService.getById(loginUserInfo.getId());
+        if (Objects.isNull(user)){
+            throw new ServiceException("用户不存在");
+        }
+        loginUserInfo.setAccountLevel(user.getAccountLevel());
+        loginUserInfo.setDistrictsCode(user.getDistrictsCode());
+        loginUserInfo.setStreetId(user.getStreetId());
+        loginUserInfo.setCommunityId(user.getCommunityId());
         return  baseMapper.pageList(new Page<>(query.getPageNum(), query.getPageSize()),query,loginUserInfo);
         // 判断当前登录用户是否有权限查看这个社区的党员
 //        if(loginUserInfo.getAccountLevel()==1){
@@ -146,7 +154,15 @@
      */
     @Override
     public void export(PartyMemberQuery query, SystemUserVo loginUserInfo) throws IOException {
-     List<PartyMember> list = baseMapper.queryList(query,loginUserInfo);
+        SystemUser user = systemUserService.getById(loginUserInfo.getId());
+        if (Objects.isNull(user)){
+            throw new ServiceException("用户不存在");
+        }
+        loginUserInfo.setAccountLevel(user.getAccountLevel());
+        loginUserInfo.setDistrictsCode(user.getDistrictsCode());
+        loginUserInfo.setStreetId(user.getStreetId());
+        loginUserInfo.setCommunityId(user.getCommunityId());
+        List<PartyMember> list = baseMapper.queryList(query,loginUserInfo);
         List<PartyMemberExcel> partyMemberExcels = BeanUtil.copyToList(list, PartyMemberExcel.class);
         response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
         response.setCharacterEncoding("utf-8");
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
index 9feb7bb..0d41c72 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
@@ -1,17 +1,18 @@
 package com.panzhihua.sangeshenbian.service.impl;
 
-import com.beust.jcommander.internal.Lists;
 import com.panzhihua.common.exceptions.ServiceException;
 import com.panzhihua.common.model.vos.LoginUserInfoVO;
-import com.panzhihua.common.utlis.StringUtils;
+import com.panzhihua.common.utlis.DateUtils;
 import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
 import com.panzhihua.sangeshenbian.model.entity.ComAct;
 import com.panzhihua.sangeshenbian.model.entity.ComStreet;
 import com.panzhihua.sangeshenbian.model.entity.Complaint;
-import com.panzhihua.sangeshenbian.model.entity.PartyMember;
 import com.panzhihua.sangeshenbian.model.entity.SystemUserLevel;
 import com.panzhihua.sangeshenbian.model.query.AppStaticsQuery;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsFourVo;
 import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsOneVo;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsThreeVo;
+import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsTwoVo;
 import com.panzhihua.sangeshenbian.model.vo.RegionVO;
 import com.panzhihua.sangeshenbian.service.IBcRegionService;
 import com.panzhihua.sangeshenbian.service.IComActService;
@@ -24,9 +25,10 @@
 import org.springframework.stereotype.Service;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Date;
 import java.util.List;
+import java.util.Objects;
 
 /**
  * @author mitao
@@ -139,4 +141,58 @@
         List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo);
         return  complaintService.analyticStatisticsOne(null, complaints, simpleDateFormat);
     }
+
+    /**
+     *获取统计分析-第二部分(诉求单量统计柱状图)
+     * @param query
+     * @param loginUserInfo
+     * @return
+     */
+    public List<AnalyticStatisticsTwoVo> queryStaticsPartTwo(AppStaticsQuery query, LoginUserInfoVO loginUserInfo) {
+        List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo);
+        //时间范围
+        String time = "";
+        if (Objects.nonNull(query.getTimeType())) {
+            Date now = new Date();
+            Date start = null;
+            switch (query.getTimeType()) {
+                case 2:
+                    start = DateUtils.addDay(now, -15);
+                    break;
+                case 3:
+                    start = DateUtils.addDay(now, -30);
+                    break;
+                default:
+                    start = DateUtils.addDay(now, -7);
+                    break;
+            }
+            //格式化
+            String startStr = DateUtils.format(start, DateUtils.yyyyMMdd_format);
+            String endStr = DateUtils.format(now, DateUtils.yyyyMMdd_format);
+            time = startStr + " - " + endStr;
+        }
+        return complaintService.analyticStatisticsTwo(time, complaints, simpleDateFormat);
+    }
+
+    /**
+     *获取统计分析-第三部分(问题类型排名)
+     * @param query
+     * @param loginUserInfo
+     * @return
+     */
+    public List<AnalyticStatisticsThreeVo> queryStaticsPartThree(AppStaticsQuery query, LoginUserInfoVO loginUserInfo) {
+        List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo);
+        return complaintService.analyticStatisticsThree(query.getRank(), complaints);
+    }
+
+    /**
+     * 获取统计分析-第四部分(评价占比)
+     * @param query
+     * @param loginUserInfo
+     * @return
+     */
+    public AnalyticStatisticsFourVo queryStaticsPartFour(AppStaticsQuery query, LoginUserInfoVO loginUserInfo) {
+        List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo);
+        return complaintService.analyticStatisticsFour(complaints);
+    }
 }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java
index 9fb7274..816ae9e 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/SystemUserServiceImpl.java
@@ -1,5 +1,6 @@
 package com.panzhihua.sangeshenbian.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,14 +11,18 @@
 import com.panzhihua.sangeshenbian.dao.SystemUserLevelMapper;
 import com.panzhihua.sangeshenbian.dao.SystemUserMapper;
 import com.panzhihua.sangeshenbian.model.entity.ComAct;
+import com.panzhihua.sangeshenbian.model.entity.ComStreet;
+import com.panzhihua.sangeshenbian.model.entity.PartyMember;
 import com.panzhihua.sangeshenbian.model.entity.SystemUser;
 import com.panzhihua.sangeshenbian.model.entity.SystemUserLevel;
 import com.panzhihua.sangeshenbian.model.vo.RegionVO;
 import com.panzhihua.sangeshenbian.service.IComActService;
+import com.panzhihua.sangeshenbian.service.IComStreetService;
 import com.panzhihua.sangeshenbian.service.ISystemUserService;
 import com.panzhihua.sangeshenbian.warpper.SystemUserList;
 import com.panzhihua.sangeshenbian.warpper.SystemUserListVo;
 import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
@@ -30,11 +35,13 @@
  * @author zhibing.pu
  * @Date 2025/2/18 22:30
  */
+@Slf4j
 @Service
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
 	private final IComActService comActService;
 	private final SystemUserLevelMapper systemUserLevelMapper;
+	private final IComStreetService comStreetService;
 	/**
 	 * 获取列表数据
 	 * @param query
@@ -119,7 +126,9 @@
 	 */
 	@Override
 	public List<RegionVO> getRegionTree(SystemUserVo loginUserInfo) {
-		Integer accountLevel = loginUserInfo.getAccountLevel();
+		log.info("getRegionTree入参:{}",JSONObject.toJSONString(loginUserInfo));
+		SystemUser systemUser = getById(loginUserInfo.getId());
+		Integer accountLevel = systemUser.getAccountLevel();
 		List<RegionVO> regionTree = new ArrayList<>();
 		switch (accountLevel) {
 			case 1:
@@ -135,17 +144,23 @@
 				});
 				break;
 			case 2:
-				regionTree = baseMapper.getStreet(loginUserInfo.getDistrictsCode());
+				regionTree = baseMapper.getStreet(systemUser.getDistrictsCode());
 				regionTree.forEach(regionVO->{
 					List<RegionVO> communities = baseMapper.getCommunity(regionVO.getId());
 					regionVO.setChildren(communities);
 				});
 				break;
 			case 3:
-				regionTree = baseMapper.getCommunity(loginUserInfo.getStreetId());
+				ComStreet street = comStreetService.getById(systemUser.getStreetId());
+				RegionVO streetVO = new RegionVO();
+				streetVO.setId(street.getStreetId());
+				streetVO.setName(street.getName());
+				List<RegionVO> communities = baseMapper.getCommunity(systemUser.getStreetId());
+				streetVO.setChildren(communities);
+				regionTree = Lists.newArrayList(streetVO);
 				break;
 			case 4:
-				ComAct byId = comActService.getById(loginUserInfo.getCommunityId());
+				ComAct byId = comActService.getById(systemUser.getCommunityId());
 				RegionVO regionVO = new RegionVO();
 				regionVO.setId(byId.getCommunityId().toString());
 				regionVO.setName(byId.getName());
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
index 7b584c7..ce5d6c6 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -720,6 +720,19 @@
             <if test="5 == accountLevel">
                 and (sc.party_member_id = #{targetId} || sc.id in (select complaint_id from sgsb_complaint_audit_record where audit_type = 3 and audit_status = 1 and report_type = #{accountLevel} and superior_id = #{targetId}))
             </if>
+            <if test="query.timeType !=null">
+                <choose>
+                    <when test="query.timeType == 1">
+                        and date_sub(curdate(), INTERVAL 7 DAY) &lt;= date(sc.create_time)
+                    </when>
+                    <when test="query.timeType == 2">
+                        and date_sub(curdate(), INTERVAL 15 DAY) &lt;= date(sc.create_time)
+                    </when>
+                    <when test="query.timeType == 3">
+                        and date_sub(curdate(), INTERVAL 30 DAY) &lt;= date(sc.create_time)
+                    </when>
+                </choose>
+            </if>
         </where>
         ORDER BY sc.create_time DESC
     </select>
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
index 08179c8..66c9bac 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
@@ -147,7 +147,7 @@
         FROM
             sgsb_party_member
         WHERE
-            audit_status = 0 and phone != ${phone} and del_flag = 0
+            audit_status = 0 and del_flag = 0
         <if test="accountLevel==2">
             and districts_code = #{districtsCode}
         </if>

--
Gitblit v1.7.1