diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java index 7f96edbca9..95d4b4e254 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java @@ -563,7 +563,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ return cateogries.stream().map(c -> { LingshanAgentServiceRecordEntity data = categoryAndData.get(c.getId()); - return new ScreenAgentServiceCategoryAnalysisRstDTO(c.getCategoryName(), data.getQty()); + return new ScreenAgentServiceCategoryAnalysisRstDTO(c.getCategoryName(), data == null ? 0 : data.getQty()); }).collect(Collectors.toList()); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java index 1c2e08954f..d13716a4b8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java @@ -182,4 +182,8 @@ public class IcHouseDTO implements Serializable { private String longitude; private String latitude; + /** + * 灵山项目:是否党员中心户:1是;0不是 + */ + private String partyCenterHouseFlag; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/PartyCenterHousePageFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/PartyCenterHousePageFormDTO.java new file mode 100644 index 0000000000..267b23e03f --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/PartyCenterHousePageFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form.lingshan; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/16 17:50 + */ +@Data +public class PartyCenterHousePageFormDTO extends PageFormDTO { + /** + * 所属小区 + */ + private String neighborHoodName; + /** + * 所属楼栋 + */ + private String buildingName; + + //tokenDto. + private String customerId; + //tokenDto. + private String staffId; +} + diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuFormDTO.java new file mode 100644 index 0000000000..ae1737f3ef --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result.lingshan; + +import lombok.Data; + +import java.util.List; + +/** + * @Description 灵山需求:绑定联户入参DTO + * @Author yzm + * @Date 2023/5/16 18:27 + */ +@Data +public class PartyCenterHouseBindLianHuFormDTO { + private String partyCenterHouseId; + private List lianHuHouseIdList; +} + diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseResultDTO.java new file mode 100644 index 0000000000..d42084013a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseResultDTO.java @@ -0,0 +1,86 @@ +package com.epmet.dto.result.lingshan; + +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/16 17:51 + */ +@Data +public class PartyCenterHouseResultDTO { + private String partyCenterHouseId; + private String houseName; + /** + * 门牌号 + */ + private String doorName; + + /** + * 所属楼栋id + */ + private String buildingId; + private String buildingName; + + /** + * 所属单元id + */ + private String buildingUnitId; + private String unitName; + + /** + * 所属小区 + */ + private String neighborHoodId; + private String neighborHoodName; + + /** + * 所属网格 + */ + private String gridId; + private String gridName; + + /** + * 所属组织 + */ + private String agencyId; + private String agencyName; + + /** + * 房屋类型 + */ + private String houseType; + private String houseTypeName; + /** + * 房屋用途 + */ + private String purpose; + private String purposeName; + /** + * 是否出租 + * 房屋状态:1:出租 0:自住 2:闲置 3:未售出 + */ + private Integer rentFlag; + private String houseStatusName; + + /** + * 房主姓名 + */ + private String ownerName; + /** + * 房主电话 + */ + private String ownerPhone; + /** + * 房主身份证 + */ + private String ownerIdCard; + + private String remark; + /** + * 联户数 + */ + private Integer totalLianHu; + +} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java index 7c8bdc939f..3ee3a3562d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -43,6 +44,13 @@ import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.HouseCountPictureFormDTO; import com.epmet.dto.form.HouseFormDTO; +import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; +import com.epmet.dto.result.HouseAgencyInfoResultDTO; +import com.epmet.dto.result.HouseInfoDTO; +import com.epmet.dto.result.HouseListResultDTO; +import com.epmet.dto.result.HousesNameResultDTO; +import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuFormDTO; +import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.dto.result.*; import com.epmet.excel.EnterpriseExportExcelDTO; import com.epmet.excel.HousePictureListExcelDTO; @@ -51,6 +59,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -266,4 +275,45 @@ public class IcHouseController { } } } + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * + * @param formDTO + * @return + */ + @PostMapping("party-center-house-list") + public Result> queryPartyCenterHouseList(@LoginUser TokenDto tokenDto, @RequestBody PartyCenterHousePageFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icHouseService.queryPartyCenterHouseList(formDTO)); + } + + /** + * 灵山项目-党员中心户,绑定联户 + * @param formDTO + * @return + */ + @PostMapping("bingLianHu") + public Result bingLianHu( @RequestBody PartyCenterHouseBindLianHuFormDTO formDTO) { + if(StringUtils.isNotBlank(formDTO.getPartyCenterHouseId())){ + icHouseService.bingLianHu(formDTO.getPartyCenterHouseId(),formDTO.getLianHuHouseIdList()); + } + return new Result(); + } + + /** + * 灵山项目-查询联户房屋列表 + * + * @param partyCenterHouseId + * @return + */ + @PostMapping("queryLianHuHouseId/{partyCenterHouseId}") + public Result> queryLianHuHouseId(@PathVariable("partyCenterHouseId") String partyCenterHouseId) { + List list = icHouseService.queryLianHuHouseId(partyCenterHouseId); + return new Result>().ok(list); + } + + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index 9f76843368..74f29ac7bc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.CustomerOrgParameterEntity; import com.epmet.entity.IcHouseEntity; import org.apache.ibatis.annotations.Mapper; @@ -212,6 +213,21 @@ public interface IcHouseDao extends BaseDao { List selectListForRenFangStats(@Param("buildingId") String buildingId); + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * + * @param customerId + * @param agencyId + * @param neighborHoodName + * @param buildingName + * @return + */ + List selectListPartyCenterHouse(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("neighborHoodName") String neighborHoodName, + @Param("buildingName") String buildingName); + /** * 群租房列表 * 群租房:出租状态并超过5人(≥5) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java new file mode 100644 index 0000000000..7fb9c42711 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java @@ -0,0 +1,24 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.LingshanPartyCenterHouseLianhuEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 灵山_党员中心户联户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-16 + */ +@Mapper +public interface LingshanPartyCenterHouseLianhuDao extends BaseDao { + + /** + * 查询党员中心对应的联户房屋id + * @param partyCenterHouseId + * @return + */ + List queryLianHuHouseId(String partyCenterHouseId); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java index 89cd6e224c..2b6ce66028 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java @@ -147,4 +147,8 @@ public class IcHouseEntity extends BaseEpmetEntity { private String longitude; private String latitude; + /** + * 灵山项目:是否党员中心户:1是;0不是 + */ + private String partyCenterHouseFlag; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/LingshanPartyCenterHouseLianhuEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/LingshanPartyCenterHouseLianhuEntity.java new file mode 100644 index 0000000000..58026cb462 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/LingshanPartyCenterHouseLianhuEntity.java @@ -0,0 +1,66 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 灵山_党员中心户联户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("lingshan_party_center_house_lianhu") +public class LingshanPartyCenterHouseLianhuEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 党员中心户房屋id:lingshan_party_center_house.HOUSE_ID + */ + private String partyCenterHouseId; + + /** + * 联户:房屋所属组织id + */ + private String agencyId; + + /** + * 联户:房屋所属网格id + */ + private String gridId; + + /** + * 联户:grid_id的path。包含grid_id + */ + private String gridIdPath; + + /** + * 联户:小区id + */ + private String neighborHoodId; + + /** + * 联户:楼栋id + */ + private String buildingId; + + /** + * 联户:单元id + */ + private String buildingUnitId; + + /** + * 联户:联户房屋id + */ + private String houseId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java index 72fa7d2674..fa0f4a8d8b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java @@ -11,7 +11,12 @@ import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.DetailByTypeFormDTO; import com.epmet.dto.form.HouseCountPictureFormDTO; import com.epmet.dto.form.HouseFormDTO; -import com.epmet.dto.result.*; +import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; +import com.epmet.dto.result.HouseAgencyInfoResultDTO; +import com.epmet.dto.result.HouseInfoDTO; +import com.epmet.dto.result.HouseListResultDTO; +import com.epmet.dto.result.HousesNameResultDTO; +import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.IcHouseEntity; import java.util.List; @@ -140,10 +145,29 @@ public interface IcHouseService extends BaseService { */ Result checkHomeInfo(CheckHouseInfoFormDTO formDTO); + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * @return + */ + PageData queryPartyCenterHouseList(PartyCenterHousePageFormDTO formDTO); HouseCountPictureResultDTO getHousePurposeCount(HouseCountPictureFormDTO dto); HouseCountPictureResultDTO getHouseStatusCount(HouseCountPictureFormDTO dto); PageData getHousePictureList(HouseCountPictureFormDTO dto); + /** + * 灵山项目-党员中心户,绑定联户 + * @param partyCenterHouseId + * @param lianHuHouseIdList + */ + void bingLianHu(String partyCenterHouseId, List lianHuHouseIdList); + + /** + * 灵山项目-查询联户房屋列表 + * @param partyCenterHouseId + * @return + */ + List queryLianHuHouseId(String partyCenterHouseId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index 9c844639ec..577bc8dc67 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -5,26 +5,35 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.PidUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.*; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.ImportGeneralDTO; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.dao.*; +import com.epmet.dto.*; import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.HouseCountPictureFormDTO; import com.epmet.dto.form.HouseFormDTO; +import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; import com.epmet.dto.region.LogOperationResultDTO; import com.epmet.dto.result.*; +import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; +import com.epmet.entity.*; import com.epmet.entity.*; import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HouseRentFlagEnums; @@ -34,6 +43,7 @@ import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.redis.IcHouseRedis; import com.epmet.service.CustomerAgencyService; +import com.epmet.service.CustomerGridService; import com.epmet.service.IcHouseService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -78,6 +88,9 @@ public class IcHouseServiceImpl extends BaseServiceImpl(list,pageInfo.getTotal()); } + + + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * + * @return + */ + @Override + public PageData queryPartyCenterHouseList(PartyCenterHousePageFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); + PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize()); + List list=baseDao.selectListPartyCenterHouse(formDTO.getCustomerId(),staffInfoCacheResult.getAgencyId(), + formDTO.getNeighborHoodName(),formDTO.getBuildingName()); + list.forEach(item -> { + item.setHouseTypeName(HouseTypeEnums.getTypeValue(item.getHouseType())); + item.setPurposeName(HousePurposeEnums.getTypeValue(item.getPurpose())); + }); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal(),formDTO.getPageSize()); + } + + /** + * 灵山项目-党员中心户,绑定联户 + * + * @param partyCenterHouseId + * @param lianHuHouseIdList + */ + @Override + public void bingLianHu(String partyCenterHouseId, List lianHuHouseIdList) { + IcHouseEntity partyCenterHouse=baseDao.selectById(partyCenterHouseId); + IcNeighborHoodEntity neighborHoodEntity=icNeighborHoodDao.selectById(partyCenterHouse.getNeighborHoodId()); + CustomerGridDTO gridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(neighborHoodEntity.getGridId()); + // 先删除 + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + queryWrapper.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId,partyCenterHouseId); + partyCenterHouseLianhuDao.delete(queryWrapper); + // 后插入 + lianHuHouseIdList.forEach(lianHuHouseId->{ + IcHouseEntity icHouseEntity=baseDao.selectById(lianHuHouseId); + if(null!=icHouseEntity){ + LingshanPartyCenterHouseLianhuEntity entity=new LingshanPartyCenterHouseLianhuEntity(); + entity.setCustomerId(neighborHoodEntity.getCustomerId()); + entity.setPartyCenterHouseId(partyCenterHouseId); + entity.setAgencyId(neighborHoodEntity.getAgencyId()); + entity.setGridId(neighborHoodEntity.getGridId()); + entity.setGridIdPath(PidUtils.convertPid2OrgIdPath(gridDTO.getId(), gridDTO.getPids())); + entity.setNeighborHoodId(icHouseEntity.getNeighborHoodId()); + entity.setBuildingId(icHouseEntity.getBuildingId()); + entity.setBuildingUnitId(icHouseEntity.getBuildingUnitId()); + entity.setHouseId(lianHuHouseId); + partyCenterHouseLianhuDao.insert(entity); + } + }); + } + + + /** + * 灵山项目-查询联户房屋列表 + * + * @param partyCenterHouseId + * @return + */ + @Override + public List queryLianHuHouseId(String partyCenterHouseId) { + if(StringUtils.isBlank(partyCenterHouseId)){ + return new ArrayList<>(); + } + return partyCenterHouseLianhuDao.queryLianHuHouseId(partyCenterHouseId); + } + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index ea96aab3a1..ef3046cd3e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -918,5 +918,56 @@ + + + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml new file mode 100644 index 0000000000..dec2563774 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java index 74332828cd..274ebff387 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java @@ -159,15 +159,19 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD if (partyOrg == null) { String baseErrorMsg = "【灵山大屏】党组织下的党员列表-未找到党组织信息。"; throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format(baseErrorMsg + "partyOrgId:" + partyOrg), baseErrorMsg); - } else if (Integer.valueOf(partyOrg.getPartyOrgType()) >= 4) { + } else if (Integer.valueOf(partyOrg.getPartyOrgType()) <= 4) { // 0省委,1市委,2区委,3党工委,4党委,5支部。党委以上,除了支部 query = new LambdaQueryWrapper<>(); - query.eq(IcPartyMemberEntity::getOrgPids, PidUtils.convertPid2OrgIdPath(partyOrgId, partyOrg.getOrgPids())); + // query.eq(IcPartyMemberEntity::getOrgPids, PidUtils.convertPid2OrgIdPath(partyOrgId, partyOrg.getOrgPids())); + + String orgIdPath = PidUtils.convertPid2OrgIdPath(partyOrgId, partyOrg.getOrgPids()); + query.eq(IcPartyMemberEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId()); + query.and(c1 -> c1.eq(IcPartyMemberEntity::getAgencyId, partyOrg.getAgencyId()).or(c2 -> c2.likeRight(IcPartyMemberEntity::getAgencyPids, orgIdPath))); } else { // 5支部 query = new LambdaQueryWrapper<>(); - query.eq(IcPartyMemberEntity::getOrgPids, partyOrg.getOrgPids()); + query.eq(IcPartyMemberEntity::getSszb, partyOrg.getId()); // 直接用所属支部 query.eq(IcPartyMemberEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId()); }