From ce4a770744d7a0b4e4ea3b5101556b94e72bdf1c Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 14 十一月 2023 17:49:20 +0800
Subject: [PATCH] 修改打卡

---
 springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java |  121 +++++++++++++++++++++++++--------------
 1 files changed, 77 insertions(+), 44 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
index c792c0f..356f0e6 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -1,24 +1,34 @@
 package com.panzhihua.service_dangjian.service.impl;
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.IdcardUtil;
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+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.panzhihua.common.constants.UserConstants;
+import com.panzhihua.common.exceptions.PartyBuildingMemberException;
 import com.panzhihua.common.model.dtos.community.PageMemberForInviteDTO;
 import com.panzhihua.common.model.dtos.partybuilding.ComDataStatisticsOrgDto;
 import com.panzhihua.common.model.dtos.partybuilding.PageComDataStatisticsMemberDto;
+import com.panzhihua.common.model.vos.R;
+import com.panzhihua.common.model.vos.partybuilding.*;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComDataStatisticsMemberExcelVo;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComPbMemberRoleExcelVo;
-import com.panzhihua.common.service.community.CommunityService;
+import com.panzhihua.common.model.vos.user.SysUserVO;
 import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.common.utlis.DateUtils;
+import com.panzhihua.common.utlis.RichTextUtil;
+import com.panzhihua.common.utlis.SensitiveUtil;
+import com.panzhihua.common.utlis.StringUtils;
+import com.panzhihua.service_dangjian.dao.*;
+import com.panzhihua.service_dangjian.model.dos.ComPbDynDO;
+import com.panzhihua.service_dangjian.model.dos.ComPbDynUserDO;
+import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO;
+import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO;
+import com.panzhihua.service_dangjian.service.ComPbMemberService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
@@ -26,23 +36,12 @@
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.ObjectUtils;
 
-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.panzhihua.common.constants.UserConstants;
-import com.panzhihua.common.exceptions.PartyBuildingMemberException;
-import com.panzhihua.common.model.vos.R;
-import com.panzhihua.common.model.vos.partybuilding.*;
-import com.panzhihua.common.model.vos.user.SysUserVO;
-import com.panzhihua.common.utlis.DateUtils;
-import com.panzhihua.common.utlis.SensitiveUtil;
-import com.panzhihua.common.utlis.StringUtils;
-import com.panzhihua.service_dangjian.dao.*;
-import com.panzhihua.service_dangjian.model.dos.*;
-import com.panzhihua.service_dangjian.service.ComPbMemberService;
-
-import lombok.extern.slf4j.Slf4j;
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 import static java.util.Objects.nonNull;
 
@@ -68,8 +67,6 @@
     private ComPbDynDAO comPbDynDAO;
     @Resource
     private ComPbDynUserDAO comPbDynUserDAO;
-    @Resource
-    private CommunityService communityService;
     @Resource
     private UserService userService;
 
@@ -206,19 +203,15 @@
     public R pagePartyOrganization(PagePartyOrganizationVO pagePartyOrganizationVO) {
 
         Long communityId = pagePartyOrganizationVO.getCommunityId();
-        R r = communityService.selectCommunityIds(communityId);
-        List<Long> communityIds = null;
-        if(R.isOk(r)){
-            communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class);
+
+        if (null != communityId){
+            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
             if (CollUtil.isEmpty(communityIds)) {
                 communityIds = new ArrayList<>();
                 communityIds.add(communityId);
             }
-        }else {
-            communityIds = new ArrayList<>();
-            communityIds.add(communityId);
+            pagePartyOrganizationVO.setCommunityIds(communityIds);
         }
-        pagePartyOrganizationVO.setCommunityIds(communityIds);
 
         Page page = new Page<>();
         Long pageNum = pagePartyOrganizationVO.getPageNum();
@@ -308,7 +301,22 @@
 
     @Override
     public R pagePartyCommittee(PartyCommitteeVO partyCommitteeVO) {
-        return null;
+        Page page = new Page<>();
+        Long pageNum = partyCommitteeVO.getPageNum();
+        Long pageSize = partyCommitteeVO.getPageSize();
+        if (null == pageNum || 0 == pageNum) {
+            pageNum = 1l;
+        }
+        if (null == pageSize || 0 == pageSize) {
+            pageSize = 10l;
+        }
+        page.setSize(pageSize);
+        page.setCurrent(pageNum);
+        IPage<PartyCommitteeVO> iPage = comPbMemberRoleDAO.pagePartyOrganizations(page, partyCommitteeVO);
+        iPage.getRecords().forEach(record -> {
+            record.setPhone(SensitiveUtil.desensitizedPhoneNumber(record.getPhone()));
+        });
+        return R.ok(iPage);
     }
 
 //    /**
@@ -516,8 +524,31 @@
     }
 
     @Override
-    public R pageYnamic(PartyBuildingComPbDynVO partyBuildingComPbDynVO) {
-        return null;
+    public R pageYnamic(PartyBuildingComPbDynVO partyBuildingComPbDynVO)
+    {
+        Page page = new Page<>();
+        Long pageNum = partyBuildingComPbDynVO.getPageNum();
+        Long pageSize = partyBuildingComPbDynVO.getPageSize();
+        if (null == pageNum) {
+            pageNum = 1l;
+        }
+        if (null == pageSize) {
+            pageSize = 10l;
+        }
+        page.setSize(pageSize);
+        page.setCurrent(pageNum);
+        IPage<PartyBuildingComPbDynVO> iPage = comPbDynDAO.pageYnamics(page, partyBuildingComPbDynVO);
+        List<PartyBuildingComPbDynVO> records = iPage.getRecords();
+        if (!(ObjectUtils.isEmpty(records))) {
+            records.forEach(partyBuildingComPbDynVO1 -> {
+                String content = partyBuildingComPbDynVO1.getContent();
+                if (!ObjectUtils.isEmpty(content)) {
+                    String text = RichTextUtil.getText(content);
+                    partyBuildingComPbDynVO1.setContentText(text);
+                }
+            });
+        }
+        return R.ok(iPage);
     }
 
     @Override
@@ -855,7 +886,7 @@
         }
 
         //查询左下数据
-        statisticsVo = comPbMemberDAO.getOrgDataStatisticsLeftDown(communityId,orgIds,startTime,endTime);
+        statisticsVo = comPbMemberDAO.getOrgDataStatisticsLeftDown(communityId,orgIds,startTime,endTime,"");
         if(statisticsVo != null){
             statisticsOrgVo.setParticipateVolunteerActivityDuration(statisticsVo.getParticipateVolunteerActivityDuration());
             statisticsOrgVo.setParticipateVolunteerActivityNum(statisticsVo.getParticipateVolunteerActivityNum());
@@ -866,8 +897,9 @@
         }
 
         //查询党员数据
-        IPage<PartyBuildingMemberVO> partyMemberPage = comPbMemberDAO.getOrgDataStatisticsMember(new Page(statisticsOrgDto.getPageNum()
-                ,statisticsOrgDto.getPageSize()),communityId,orgIds);
+        IPage<PartyBuildingMemberVO> partyMemberPage = comPbMemberDAO.getOrgDataStatisticsMember(
+                new Page(statisticsOrgDto.getPageNum()
+                ,statisticsOrgDto.getPageSize()),communityId,orgIds,"");
         if(partyMemberPage.getRecords() != null && !partyMemberPage.getRecords().isEmpty()){
             statisticsOrgVo.setPartyMemberList(partyMemberPage.getRecords());
         }
@@ -879,7 +911,8 @@
         List<String> completeEasyList = new ArrayList<>();
         List<String> cumulativeEasyList = new ArrayList<>();
         for (int i = 0; i < startDateList.size(); i++) {
-            Map<String,Object> statisticsMap = comPbMemberDAO.getOrgDataStatisticsRightDown(communityId,orgIds, startDateList.get(i) + " 00:00:00", endDateList.get(i) + " 23:59:59");
+            Map<String,Object> statisticsMap = comPbMemberDAO.getOrgDataStatisticsRightDown(communityId,orgIds,
+                    startDateList.get(i) + " 00:00:00", endDateList.get(i) + " 23:59:59");
             if(statisticsMap != null){
                 completeWishList.add(statisticsMap.get("completeWishNum").toString());
                 cumulativeWishList.add(statisticsMap.get("cumulativeWishNum").toString());

--
Gitblit v1.7.1