springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PageComPbCheckUnitDto.java
@@ -1,6 +1,7 @@ package com.panzhihua.common.model.dtos.common; import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; @@ -93,5 +94,9 @@ @ApiModelProperty("单位性质") private String natureName; @ApiModelProperty(value = "社区id集合") private List<Long> communityIds; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyOrganizationVO.java
@@ -8,6 +8,7 @@ import lombok.Data; import java.util.Date; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -40,6 +41,9 @@ @ApiModelProperty(value = "社区id", hidden = true) private Long communityId; @ApiModelProperty(value = "社区id", hidden = true) private List<Long> communityIds; @ApiModelProperty(value = "关键词") private String keyWord; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -10346,4 +10346,12 @@ */ @PostMapping("/comActAcidRecord/batchCheck") R batchCheck(@RequestBody BatchCheckAcidRecordDTO batchCheckAcidRecordDTO); /** * 查询社区id集合 * @param id * @return */ @GetMapping("selectCommunityIds") R selectCommunityIds(@RequestParam("id") Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -2686,4 +2686,14 @@ public R activityInviteDelete(@RequestParam("id") Long id) { return comActActivityInviteService.activityInviteDelete(id); } /** * 根据id查询重复的社区id集合 * @param id * @return */ @GetMapping("selectCommunityIds") public R selectCommunityIds(@RequestParam("id") Long id){ return comActService.selectIds(id); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActService.java
@@ -113,4 +113,6 @@ R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO); R getCommunityPassword(Long communityId); R selectIds(Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -290,4 +290,7 @@ return R.ok(comActPasswordVo); } public R selectIds(Long id){ return R.ok(this.comActDAO.selectIds(id)); } } springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -1,5 +1,7 @@ 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.google.common.collect.Lists; @@ -7,6 +9,7 @@ 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.ComPbMemberDAO; import com.panzhihua.service_dangjian.dao.ComPbMemberRoleDAO; @@ -48,6 +51,8 @@ private ComPbMemberRoleDAO comPbMemberRoleDAO; @Resource private ComPbMemberService comPbMemberService; @Resource private CommunityService communityService; /** * description queryByPage 分页查询 @@ -59,6 +64,20 @@ */ @Override 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 { communityIds = new ArrayList<>(); communityIds.add(communityId); } IPage<ComPbCheckUnitVo> checkUnitVoPage= this.baseMapper.queryAllByLimit(comPbCheckUnit, new Page(comPbCheckUnit.getPageNum(), comPbCheckUnit.getPageSize())); checkUnitVoPage.getRecords().forEach(checkUnit -> { if(StringUtils.isEmpty(checkUnit.getOrgName())){ @@ -168,6 +187,19 @@ */ @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 { communityIds = new ArrayList<>(); communityIds.add(communityId); } IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize())); checkUnitList.getRecords().forEach(checkUnit -> { if(StringUtils.isEmpty(checkUnit.getOrgName())){ springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -8,7 +8,9 @@ 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.panzhihua.common.model.dtos.community.PageMemberForInviteDTO; import com.panzhihua.common.model.dtos.partybuilding.ComDataStatisticsOrgDto; @@ -202,6 +204,21 @@ */ @Override 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 (CollUtil.isEmpty(communityIds)) { communityIds = new ArrayList<>(); communityIds.add(communityId); } }else { communityIds = new ArrayList<>(); communityIds.add(communityId); } Page page = new Page<>(); Long pageNum = pagePartyOrganizationVO.getPageNum(); Long pageSize = pagePartyOrganizationVO.getPageSize(); springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -36,8 +36,11 @@ <if test="dto.type != null"> and cpcu.`type` = #{dto.type} </if> <if test="dto.communityId != null and dto.communityId!=0"> and cpcu.community_id = #{dto.communityId} <if test="dto.communityIds != null and dto.communityIds.size()>0"> AND cpcu.community_id IN <foreach collection="dto.communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> <if test="dto.keyWord != null and dto.keyWord != ''"> and (cpcu.contacts like concat(#{dto.keyWord},'%') or cpcu.`name` like concat('%',#{dto.keyWord},'%') or cpcu.phone like concat(#{dto.keyWord},'%')) springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -89,8 +89,12 @@ and m.org_id = #{dto.orgId} </if> <if test="dto.communityId != null and dto.communityId !=0"> and m.community_id = ${dto.communityId} and m.community_id IN <foreach collection="dto.communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> <if test="dto.keyWord != null and dto.keyWord != ''"> and (m.name like concat ('%',#{dto.keyWord},'%') or m.phone like concat ('%',#{dto.keyWord},'%') or