From cd7dcfe32b0eddc70a3c33532bd6fdcbe52e4dc6 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期五, 21 十月 2022 16:23:21 +0800
Subject: [PATCH] #feat 修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java |   98 +++++++++++-------------------------------------
 1 files changed, 23 insertions(+), 75 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
index 3a5477d..31a4649 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -1,30 +1,30 @@
 package com.panzhihua.service_dangjian.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
-import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum;
+import com.panzhihua.common.model.dtos.common.AddComPbCheckUnitDto;
+import com.panzhihua.common.model.dtos.common.EditComPbCheckUnitDto;
+import com.panzhihua.common.model.dtos.common.PageComPbCheckUnitDto;
+import com.panzhihua.common.model.dtos.common.PagePbCheckUnitCommonDto;
+import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO;
-import com.panzhihua.common.service.community.CommunityService;
 import com.panzhihua.common.utlis.StringUtils;
+import com.panzhihua.service_dangjian.dao.ComPbCheckUnitMapper;
 import com.panzhihua.service_dangjian.dao.ComPbMemberDAO;
 import com.panzhihua.service_dangjian.dao.ComPbMemberRoleDAO;
 import com.panzhihua.service_dangjian.entity.ComPbCheckUnit;
-import com.panzhihua.service_dangjian.dao.ComPbCheckUnitMapper;
 import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO;
 import com.panzhihua.service_dangjian.model.dos.ComPbMemberRoleDO;
 import com.panzhihua.service_dangjian.service.ComPbCheckUnitService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.panzhihua.service_dangjian.service.ComPbMemberService;
 import org.springframework.beans.BeanUtils;
-import com.panzhihua.common.model.dtos.common.*;
-import com.panzhihua.common.model.vos.R;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
@@ -49,10 +49,7 @@
     private ComPbMemberDAO comPbMemberDAO;
     @Resource
     private ComPbMemberRoleDAO comPbMemberRoleDAO;
-    @Resource
-    private ComPbMemberService comPbMemberService;
-    @Resource
-    private CommunityService communityService;
+
 
     /**
      * description  queryByPage  分页查询
@@ -66,15 +63,8 @@
     public R queryByPage(PageComPbCheckUnitDto comPbCheckUnit) {
 
         Long communityId = comPbCheckUnit.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -189,15 +179,8 @@
     @Override
     public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) {
         Long communityId = comPbCheckUnit.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -280,15 +263,8 @@
      */
     @Override
     public R unitStatisticsTop(Long communityId, String belongTo, String choice) {
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -303,15 +279,8 @@
     @Override
     public R unitStatistics(PagePbCheckUnitCommonDto commonDto) {
         Long communityId = commonDto.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -330,15 +299,8 @@
     @Override
     public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) {
 
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -353,15 +315,8 @@
     @Override
     public R pbStatisticsBelong(PagePbCheckUnitCommonDto commonDto) {
         Long communityId = commonDto.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }
@@ -377,15 +332,8 @@
     @Override
     public R pbStatisticsUnit(PagePbCheckUnitCommonDto commonDto) {
         Long communityId = commonDto.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
-            if (CollUtil.isEmpty(communityIds)) {
-                communityIds = new ArrayList<>();
-                communityIds.add(communityId);
-            }
-        }else {
+        List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+        if (CollUtil.isEmpty(communityIds)) {
             communityIds = new ArrayList<>();
             communityIds.add(communityId);
         }

--
Gitblit v1.7.1