From 7698e0592b6b4abd8253c6f8ac08136535db4238 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 16 May 2023 17:42:53 +0800 Subject: [PATCH 01/14] =?UTF-8?q?ic=5Fhouse=E6=88=BF=E5=B1=8B=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9APARTY=5FCENTER=5FHOUSE=5FFLAG?= =?UTF-8?q?=EF=BC=9A=E7=81=B5=E5=B1=B1=E9=A1=B9=E7=9B=AE=EF=BC=9A=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=85=9A=E5=91=98=E4=B8=AD=E5=BF=83=E6=88=B7=EF=BC=9A?= =?UTF-8?q?1=E6=98=AF=EF=BC=9B0=E4=B8=8D=E6=98=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcHouseDTO.java | 4 ++++ .../src/main/java/com/epmet/entity/IcHouseEntity.java | 4 ++++ 2 files changed, 8 insertions(+) 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 93735939e8..31111bbe87 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 @@ -173,4 +173,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-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 fe282a9265..4ee85491ae 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 @@ -139,4 +139,8 @@ public class IcHouseEntity extends BaseEpmetEntity { private String longitude; private String latitude; + /** + * 灵山项目:是否党员中心户:1是;0不是 + */ + private String partyCenterHouseFlag; } From defddf443f807319b550caaca7e9bc2f93269c03 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 May 2023 17:56:02 +0800 Subject: [PATCH 02/14] =?UTF-8?q?fix:=E3=80=90=E7=81=B5=E5=B1=B1=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E3=80=91=E5=85=9A=E7=BB=84=E7=BB=87=E6=A0=91=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=85=9A=E5=91=98=E6=9F=A5=E4=B8=8D=E5=88=B0=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/LingShanScreenServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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()); } From 5c9d9c29952d765486d637e7199e10c89a1c54a0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 16 May 2023 19:00:51 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E7=81=B5=E5=B1=B1=EF=BC=9A=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E8=81=94=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingshan/PartyCenterHousePageFormDTO.java | 27 +++++ .../PartyCenterHouseBindLianHuFormDTO.java | 17 +++ .../lingshan/PartyCenterHouseResultDTO.java | 86 +++++++++++++++ .../epmet/controller/IcHouseController.java | 46 ++++++++ .../main/java/com/epmet/dao/IcHouseDao.java | 16 +++ .../LingshanPartyCenterHouseLianhuDao.java | 24 +++++ .../LingshanPartyCenterHouseLianhuEntity.java | 66 ++++++++++++ .../com/epmet/service/IcHouseService.java | 28 ++++- .../service/impl/IcHouseServiceImpl.java | 100 +++++++++++++++--- .../src/main/resources/mapper/IcHouseDao.xml | 51 +++++++++ .../LingshanPartyCenterHouseLianhuDao.xml | 36 +++++++ 11 files changed, 483 insertions(+), 14 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/lingshan/PartyCenterHousePageFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/LingshanPartyCenterHouseLianhuEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml 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 c2420c0832..2eb3a2c5bc 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 @@ -21,17 +21,22 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.MaskResponse; 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.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; 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.service.IcHouseService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -161,4 +166,45 @@ public class IcHouseController { return icHouseService.checkHomeInfo(formDTO); } + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * + * @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 1f3ceacfe5..70bbd77c9c 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 @@ -7,6 +7,7 @@ import com.epmet.dto.form.GetHouseInfoToCollectFormDTO; import com.epmet.dto.form.HouseChartFormDTO; import com.epmet.dto.form.IcHouseListFormDTO; 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; @@ -213,4 +214,19 @@ public interface IcHouseDao extends BaseDao { List houseStatisListDetail(HouseChartFormDTO formDTO); 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); } 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/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 0855d78104..29a7712d8c 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 @@ -2,14 +2,19 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; -import com.epmet.dto.form.DetailByTypeFormDTO; 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; @@ -138,5 +143,24 @@ public interface IcHouseService extends BaseService { */ Result checkHomeInfo(CheckHouseInfoFormDTO formDTO); + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * @return + */ + PageData queryPartyCenterHouseList(PartyCenterHousePageFormDTO formDTO); + /** + * 灵山项目-党员中心户,绑定联户 + * @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 93322c7ed6..52473f17ba 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,30 +5,28 @@ 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.IcBuildingDao; -import com.epmet.dao.IcBuildingUnitDao; -import com.epmet.dao.IcHouseDao; -import com.epmet.dao.IcNeighborHoodDao; -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.HouseFormDTO; +import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; import com.epmet.dto.result.*; -import com.epmet.entity.IcBuildingEntity; -import com.epmet.entity.IcBuildingUnitEntity; -import com.epmet.entity.IcHouseEntity; -import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; +import com.epmet.entity.*; import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HouseRentFlagEnums; import com.epmet.enums.HouseTypeEnums; @@ -36,7 +34,10 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.redis.IcHouseRedis; +import com.epmet.service.CustomerGridService; import com.epmet.service.IcHouseService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -73,6 +74,9 @@ public class IcHouseServiceImpl extends BaseServiceImpl().ok(checkHomeInfoResultInfo); } + + + /** + * 灵山项目-联户绑定 + * 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 + * + * @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 6eac8ed9fd..26cd9e0382 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 @@ -701,4 +701,55 @@ CAST(a.DOOR_NAME AS SIGNED), CONVERT(a.DOOR_NAME using gbk) + + + 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 From 51fc695173406476f29c28b874d50d1c103e2172 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 May 2023 19:39:42 +0800 Subject: [PATCH 04/14] =?UTF-8?q?fix:=E3=80=90=E7=81=B5=E5=B1=B1=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E3=80=91=E4=BB=A3=E5=8A=9E=E6=9C=8D=E5=8A=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=88=86=E6=9E=90=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/LingShanAgentServiceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } From 1d90fde163fd0db3381ac22734db399cef7fa335 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 May 2023 20:27:55 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=9E=E7=BB=93?= =?UTF-8?q?=E7=8E=87=E6=95=B0=E5=80=BC=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AgentServiceTrendAnalysisRstDTO.java | 8 +++---- .../dao/LingshanAgentServiceRecordDao.java | 13 ++++++++++++ .../impl/LingShanAgentServiceServiceImpl.java | 21 +++++++++++++++---- .../mapper/LingshanAgentServiceRecordDao.xml | 11 ++++++++++ 4 files changed, 45 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceTrendAnalysisRstDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceTrendAnalysisRstDTO.java index effdcdb01f..f4d0b3e96b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceTrendAnalysisRstDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceTrendAnalysisRstDTO.java @@ -34,14 +34,14 @@ public class AgentServiceTrendAnalysisRstDTO { // private List data; - public static class DataObj { + public static class DataObj { private String name; - private Integer value; + private T value; public DataObj() { } - public DataObj(String name, Integer value) { + public DataObj(String name, T value) { this.name = name; this.value = value; } @@ -50,7 +50,7 @@ public class AgentServiceTrendAnalysisRstDTO { return name; } - public Integer getValue() { + public T getValue() { return value; } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/LingshanAgentServiceRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/LingshanAgentServiceRecordDao.java index 9ff7596263..84de811f72 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/LingshanAgentServiceRecordDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/LingshanAgentServiceRecordDao.java @@ -6,6 +6,7 @@ import com.epmet.entity.LingshanAgentServiceRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.Date; import java.util.List; import java.util.Set; @@ -26,4 +27,16 @@ public interface LingshanAgentServiceRecordDao extends BaseDao screenAgentListAndServiceQty(@Param("agentIds") Set agentIds); + + /** + * @Description: 办结率 + * @param timeStart: + * @param timeEnd: + * @Return java.lang.Double + * @Author: wangxianzhang + * @Date: 2023/5/16 8:17 PM + */ + Double calculateClosedRatio(@Param("timeStart") Date timeStart, + @Param("timeEnd") Date timeEnd, + @Param("orgIdPath") String orgIdPath); } \ No newline at end of file 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 95d4b4e254..bb9c85c2d7 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 @@ -570,6 +570,16 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ @Override public List serviceTrendAnalysis(String orgType, String orgId) { + String orgIdPath; + + if (OrgInfoConstant.AGENCY.equals(orgType)) { + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId); + orgIdPath = PidUtils.convertPid2OrgIdPath(agencyInfo.getId(), agencyInfo.getPids()); + } else { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(orgId); + orgIdPath = PidUtils.convertPid2OrgIdPath(gridInfo.getId(), gridInfo.getPids()); + } + // 计算得到时间列表 Map dateCatelogue = generateTimeCatelogue(); @@ -582,18 +592,21 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ // 1.受理数 // 受理数,使用processTime计算,processTime可用于表示受理时间和驳回时间。要查询受理数,要查询状态为已受理和已结案两种状态,使用processTime+processStatus结合查询 LambdaQueryWrapper rq = new LambdaQueryWrapper<>(); + rq.likeRight(LingshanAgentServiceRecordEntity::getOrgIdPath, orgIdPath); rq.ge(LingshanAgentServiceRecordEntity::getProcessTime, timeStart); rq.le(LingshanAgentServiceRecordEntity::getProcessTime, timeEnd); rq.in(LingshanAgentServiceRecordEntity::getProcessStatus, LingShanAgentServiceProcessStatusEnum.ACCEPTED.getStatusCode(), LingShanAgentServiceProcessStatusEnum.CLOSED.getStatusCode()); Integer acceptCount = agentServiceRecordDao.selectCount(rq); - // 2.办结率 todo + // 2.办结率 + // 本月办结的服务/本月提交的服务 + Double closedRatio = agentServiceRecordDao.calculateClosedRatio(timeStart, timeEnd, orgIdPath); // 3.组合数据 ArrayList dataList = new ArrayList<>(); - dataList.add(new AgentServiceTrendAnalysisRstDTO.DataObj("受理数", acceptCount)); - dataList.add(new AgentServiceTrendAnalysisRstDTO.DataObj("办结率", 0)); + dataList.add(new AgentServiceTrendAnalysisRstDTO.DataObj<>("受理数", acceptCount)); + dataList.add(new AgentServiceTrendAnalysisRstDTO.DataObj<>("办结率", closedRatio)); AgentServiceTrendAnalysisRstDTO rd = new AgentServiceTrendAnalysisRstDTO(monthName, dataList); return rd; }).collect(Collectors.toList()); @@ -607,7 +620,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ * @Date: 2023/5/16 1:53 PM */ public Map generateTimeCatelogue() { - Date startDate = DateUtils.addDateMonths(new Date(), -11); + Date startDate = DateUtils.addDateMonths(new Date(), -12); HashMap rm = new LinkedHashMap<>(); for (int c = 1; c <= 12; c++) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml index c995f3532d..cea5229e87 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml @@ -58,5 +58,16 @@ group by r.AGENT_ID, r.GRID_ID + + + \ No newline at end of file From 4497b26210d3e800927083976fad59db55109cc7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 16 May 2023 20:40:26 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD?= =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingshan/PartyCenterHousePageFormDTO.java | 13 +++++++ .../PartyCenterHouseBindLianHuDetailDTO.java | 28 +++++++++++++++ .../lingshan/PartyCenterHouseResultDTO.java | 12 +++++++ .../epmet/controller/IcHouseController.java | 1 + .../main/java/com/epmet/dao/IcHouseDao.java | 4 ++- .../service/impl/IcHouseServiceImpl.java | 2 +- .../src/main/resources/mapper/IcHouseDao.xml | 34 ++++++++++++++----- 7 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java 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 index 267b23e03f..7bdd159105 100644 --- 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 @@ -19,9 +19,22 @@ public class PartyCenterHousePageFormDTO extends PageFormDTO { */ private String buildingName; + /** + * pc端默认传1 + * 灵山项目:是否党员中心户:1是;0不是 + */ + private String partyCenterHouseFlag; + + /** + * 所属楼栋id + * 大屏用 + */ + private String buildingId; + //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/PartyCenterHouseBindLianHuDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java new file mode 100644 index 0000000000..378f8fb9d9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result.lingshan; + +import lombok.Data; + +/** + * @Description 绑定联户入参明细 + * @Author yzm + * @Date 2023/5/16 20:16 + */ +@Data +public class PartyCenterHouseBindLianHuDetailDTO { + /** + * 小区id + * 楼栋id + * 单元id + * 房屋id + */ + private String id; + + /** + * 小区: + * 楼栋: + * 单元: + * 房屋 + */ + private String type; +} + 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 index d42084013a..e649184ce0 100644 --- 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 @@ -13,6 +13,7 @@ public class PartyCenterHouseResultDTO { private String houseName; /** * 门牌号 + * 房号 */ private String doorName; @@ -26,6 +27,9 @@ public class PartyCenterHouseResultDTO { * 所属单元id */ private String buildingUnitId; + /** + *单元号 + */ private String unitName; /** @@ -71,10 +75,18 @@ public class PartyCenterHouseResultDTO { * 房主电话 */ private String ownerPhone; + /** + * 加密房主电话 + */ + private String showOwnerPhone; /** * 房主身份证 */ private String ownerIdCard; + /** + * 加密房主身份证 + */ + private String showOwnerIdCard; private String remark; /** 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 2eb3a2c5bc..27ca372d06 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 @@ -173,6 +173,7 @@ public class IcHouseController { * @param formDTO * @return */ + @MaskResponse(fieldNames = { "showOwnerPhone", "showOwnerIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("party-center-house-list") public Result> queryPartyCenterHouseList(@LoginUser TokenDto tokenDto, @RequestBody PartyCenterHousePageFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); 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 70bbd77c9c..f4212b5487 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 @@ -228,5 +228,7 @@ public interface IcHouseDao extends BaseDao { List selectListPartyCenterHouse(@Param("customerId") String customerId, @Param("agencyId") String agencyId, @Param("neighborHoodName") String neighborHoodName, - @Param("buildingName") String buildingName); + @Param("buildingName") String buildingName, + @Param("buildingId") String buildingId, + @Param("partyCenterHouseFlag") String partyCenterHouseFlag); } 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 52473f17ba..7e4559b072 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 @@ -422,7 +422,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl list=baseDao.selectListPartyCenterHouse(formDTO.getCustomerId(),staffInfoCacheResult.getAgencyId(), - formDTO.getNeighborHoodName(),formDTO.getBuildingName()); + formDTO.getNeighborHoodName(),formDTO.getBuildingName(),formDTO.getBuildingId(),formDTO.getPartyCenterHouseFlag()); list.forEach(item -> { item.setHouseTypeName(HouseTypeEnums.getTypeValue(item.getHouseType())); item.setPurposeName(HousePurposeEnums.getTypeValue(item.getPurpose())); 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 26cd9e0382..1ccf5a4d65 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 @@ -721,35 +721,51 @@ ih.HOUSE_TYPE houseType, ih.PURPOSE, ih.RENT_FLAG, + (case when ih.RENT_FLAG = '0' then '自住' + when ih.RENT_FLAG = '1' then '出租' + when ih.RENT_FLAG = '2' then '闲置' + when ih.RENT_FLAG = '3' then '未出售' + else '' end) as houseStatusName, ih.OWNER_NAME, ih.OWNER_PHONE, + ih.OWNER_PHONE as showOwnerPhone, ih.OWNER_ID_CARD, + ih.OWNER_ID_CARD as showOwnerIdCard, ih.REMARK, (select count(r.ID) - from lingshan_lianhu_house_rel r + from lingshan_party_center_house_lianhu r where r.PARTY_CENTER_HOUSE_ID=ih.ID and r.DEL_FLAG='0' )as totalLianHu FROM ic_house ih - inner join ic_building_unit u - on(ih.BUILDING_UNIT_ID=u.ID) - INNER JOIN ic_building b ON ( ih.BUILDING_ID = b.ID ) - INNER JOIN ic_neighbor_hood h ON ( b.NEIGHBOR_HOOD_ID = h.ID ) - left join customer_grid cg on(h.GRID_ID=cg.ID) - left join customer_agency ca on(h.AGENCY_ID=ca.ID) + inner join ic_building_unit u + on(ih.BUILDING_UNIT_ID=u.ID) + INNER JOIN ic_building b ON ( ih.BUILDING_ID = b.ID ) + INNER JOIN ic_neighbor_hood h ON ( b.NEIGHBOR_HOOD_ID = h.ID ) + left join customer_grid cg on(h.GRID_ID=cg.ID) + left join customer_agency ca on(h.AGENCY_ID=ca.ID) WHERE ih.DEL_FLAG = '0' AND b.DEL_FLAG = '0' AND h.DEL_FLAG = '0' - AND ih.PARTY_CENTER_HOUSE_FLAG='1' - AND (h.AGENCY_ID=#{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) + + AND ih.PARTY_CENTER_HOUSE_FLAG='1' + and h.NEIGHBOR_HOOD_NAME like concat('%',#{neighborHoodName},'%') and b.BUILDING_NAME like concat('%',#{buildingName},'%') + + and b.id = #{buildingId} + + + + AND (h.AGENCY_ID=#{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) + + order by ca.CREATED_TIME asc,cg.CREATED_TIME asc,h.CREATED_TIME asc From 79167af633dd0250ccd2827f3b4ccfa98c6b6d53 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 May 2023 21:23:59 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=BC=95=E9=A2=86?= =?UTF-8?q?=EF=BC=9A=E5=A4=A7=E5=B1=8F=E4=B8=AD=E5=A4=AE=EF=BC=8C=E5=BD=93?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=AF=B9=E8=B1=A1=E7=9B=AE=E5=BD=95=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcPartyUnitServiceImpl.java | 2 +- .../epmet/service/impl/IcPartyServiceCenterServiceImpl.java | 2 +- .../partyOrg/service/impl/LingShanPartyOrgServiceImpl.java | 4 ++-- .../src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 6674005ab3..a70be9590d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -729,7 +729,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl q = new LambdaQueryWrapper<>(); - q.and(q1 -> q1.eq(IcPartyUnitEntity::getAgencyId, agencyId).or(q2 -> q2.eq(IcPartyUnitEntity::getPids, orgIdPath))); + q.and(q1 -> q1.eq(IcPartyUnitEntity::getAgencyId, agencyId).or(q2 -> q2.likeRight(IcPartyUnitEntity::getPids, orgIdPath))); return baseDao.selectCount(q); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index d7ecec82cc..f0aa18203f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -767,7 +767,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl q = new QueryWrapper().select(" org_type, count(*) qtyOfType") .lambda() - .and(c1 -> c1.eq(IcPartyServiceCenterEntity::getOrgId, orgId).or(c2 -> c2.eq(IcPartyServiceCenterEntity::getPids, orgIdPath))) + .and(c1 -> c1.eq(IcPartyServiceCenterEntity::getOrgId, orgId).or(c2 -> c2.likeRight(IcPartyServiceCenterEntity::getPids, orgIdPath))) .groupBy(IcPartyServiceCenterEntity::getOrgType); List l = icPartyServiceCenterDao.selectList(q); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/LingShanPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/LingShanPartyOrgServiceImpl.java index d869e728cf..105ba5c1d6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/LingShanPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/LingShanPartyOrgServiceImpl.java @@ -66,7 +66,7 @@ public class LingShanPartyOrgServiceImpl implements LingShanPartyOrgService, Res // 街道及以上级别,用pids,因为要从社区开始查,本级及下级 q = new QueryWrapper().select(" party_org_type, count(*) childrenQty").lambda() // 本组织下级的所有子级,不含本级 - .like(IcPartyOrgEntity::getAgencyPids, orgIdPath) + .likeRight(IcPartyOrgEntity::getAgencyPids, orgIdPath) .groupBy(IcPartyOrgEntity::getPartyOrgType); } @@ -168,7 +168,7 @@ public class LingShanPartyOrgServiceImpl implements LingShanPartyOrgService, Res } /** - * @Description: 查询支部。支部是直属的 + * @Description: 查询支部。支部是直属的!!!!!!!!!!!!!!!!!!!!!!!!!!! * @param orgId: * @param orgType: * @Return java.util.List diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml index d2592642d3..d81f18e48b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml @@ -314,9 +314,9 @@ from ic_party_org o left join ic_party_member m on (o.ID = m.SSZB and m.DEL_FLAG = 0) where o.DEL_FLAG = 0 - and o.AGENCY_ID = #{orgId} + and o.AGENCY_PIDS like #{orgId} and o.PARTY_ORG_TYPE = 5 group by o.ID, o.PARTY_ORG_NAME, o.LATITUDE, o.LONGITUDE - + \ No newline at end of file From 8c0de433b5206a83362a89d741be64c685b7d3fa Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 May 2023 09:19:01 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E8=81=94=E6=88=B7=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=BB=E6=84=8F=E5=8B=BE=E9=80=89=E5=B0=8F?= =?UTF-8?q?=E5=8C=BA/=E6=A5=BC=E6=A0=8B/=E5=8D=95=E5=85=83/=E6=88=BF?= =?UTF-8?q?=E5=B1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PartyCenterHouseBindLianHuDetailDTO.java | 8 ++-- .../PartyCenterHouseBindLianHuFormDTO.java | 2 +- .../LingshanPartyCenterHouseLianhuDao.java | 2 + .../com/epmet/service/IcHouseService.java | 3 +- .../service/impl/IcHouseServiceImpl.java | 48 +++++++++++++------ .../LingshanPartyCenterHouseLianhuDao.xml | 3 ++ 6 files changed, 45 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java index 378f8fb9d9..b9e06dce3c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/PartyCenterHouseBindLianHuDetailDTO.java @@ -18,10 +18,10 @@ public class PartyCenterHouseBindLianHuDetailDTO { private String id; /** - * 小区: - * 楼栋: - * 单元: - * 房屋 + * 小区:neighborHood + * 楼栋:building + * 单元:unit + * 房屋:house */ private String type; } 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 index ae1737f3ef..5f532f0cf2 100644 --- 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 @@ -12,6 +12,6 @@ import java.util.List; @Data public class PartyCenterHouseBindLianHuFormDTO { private String partyCenterHouseId; - private List lianHuHouseIdList; + private List lianHuHouseIdList; } 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 index 7fb9c42711..0750103ca0 100644 --- 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 @@ -21,4 +21,6 @@ public interface LingshanPartyCenterHouseLianhuDao extends BaseDao queryLianHuHouseId(String partyCenterHouseId); + + int deleteByPartyCenterHouseId(String partyCenterHouseId); } \ No newline at end of file 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 29a7712d8c..d77a7a0eab 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 @@ -14,6 +14,7 @@ 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.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.IcHouseEntity; @@ -155,7 +156,7 @@ public interface IcHouseService extends BaseService { * @param partyCenterHouseId * @param lianHuHouseIdList */ - void bingLianHu(String partyCenterHouseId, List lianHuHouseIdList); + void bingLianHu(String partyCenterHouseId, List lianHuHouseIdList); /** * 灵山项目-查询联户房屋列表 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 7e4559b072..724190b047 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 @@ -25,6 +25,7 @@ import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; import com.epmet.dto.result.*; +import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.*; import com.epmet.enums.HousePurposeEnums; @@ -438,29 +439,46 @@ public class IcHouseServiceImpl extends BaseServiceImpl lianHuHouseIdList) { + 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()); + String gridIdPath=PidUtils.convertPid2OrgIdPath(gridDTO.getId(), gridDTO.getPids()); + // 先删除 LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId,partyCenterHouseId); - partyCenterHouseLianhuDao.delete(queryWrapper); + partyCenterHouseLianhuDao.deleteByPartyCenterHouseId(partyCenterHouseId); // 后插入 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); + //根据选中类型,查询下面的房屋 + List list=new ArrayList<>(); + if(!"house".equals(lianHuHouseId.getType())){ + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq("neighborHood".equals(lianHuHouseId.getType()), IcHouseEntity::getNeighborHoodId, lianHuHouseId.getId()) + .eq("building".equals(lianHuHouseId.getType()), IcHouseEntity::getBuildingId, lianHuHouseId.getId()) + .eq("unit".equals(lianHuHouseId.getType()), IcHouseEntity::getBuildingUnitId, lianHuHouseId.getId()); + list.addAll(baseDao.selectList(query)); + }else{ + IcHouseEntity icHouseEntity=baseDao.selectById(lianHuHouseId.getId()); + list.add(icHouseEntity); + } + if(CollectionUtils.isNotEmpty(list)){ + for(IcHouseEntity houseEntity:list){ + LingshanPartyCenterHouseLianhuEntity entity=new LingshanPartyCenterHouseLianhuEntity(); + entity.setPartyCenterHouseId(partyCenterHouseId); + //目前只能绑定同一个网格下的房屋 + entity.setCustomerId(neighborHoodEntity.getCustomerId()); + entity.setAgencyId(neighborHoodEntity.getAgencyId()); + entity.setGridId(neighborHoodEntity.getGridId()); + entity.setGridIdPath(gridIdPath); + + entity.setNeighborHoodId(houseEntity.getNeighborHoodId()); + entity.setBuildingId(houseEntity.getBuildingId()); + entity.setBuildingUnitId(houseEntity.getBuildingUnitId()); + entity.setHouseId(houseEntity.getId()); + partyCenterHouseLianhuDao.insert(entity); + } } }); } 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 index dec2563774..663d63ab6c 100644 --- 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 @@ -33,4 +33,7 @@ AND h.PARTY_CENTER_HOUSE_ID = #{partyCenterHouseId} + + delete from lingshan_party_center_house_lianhu where PARTY_CENTER_HOUSE_ID=#{partyCenterHouseId} + \ No newline at end of file From 73c04875b9bddb012e28820c860d4e1a894b2040 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 17 May 2023 09:55:36 +0800 Subject: [PATCH 09/14] =?UTF-8?q?fix:=E3=80=90=E7=81=B5=E5=B1=B1-=E7=BA=A2?= =?UTF-8?q?=E8=89=B2=E5=BE=85=E5=8A=9E=E3=80=91=E5=B1=85=E6=B0=91=E7=AB=AF?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=8C=E7=BC=BA=E5=B0=91=E7=BB=8F=E7=BA=AC?= =?UTF-8?q?=E5=BA=A6=E5=AD=97=E6=AE=B5=E4=BF=9D=E5=AD=98=20fix:=E3=80=90?= =?UTF-8?q?=E7=81=B5=E5=B1=B1-=E7=BA=A2=E8=89=B2=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E3=80=91=E5=A4=A7=E5=B1=8F=E4=B8=AD=E5=A4=AE=EF=BC=8C=E4=BB=A3?= =?UTF-8?q?=E5=8A=9E=E5=91=98=EF=BC=8C=E6=9C=8D=E5=8A=A1=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/lingshan/AgentServiceResiSubmitFormDTO.java | 4 ++++ .../epmet/service/impl/LingShanAgentServiceServiceImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/lingshan/AgentServiceResiSubmitFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/lingshan/AgentServiceResiSubmitFormDTO.java index f4f914c07d..bff46b6ac1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/lingshan/AgentServiceResiSubmitFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/lingshan/AgentServiceResiSubmitFormDTO.java @@ -32,4 +32,8 @@ public class AgentServiceResiSubmitFormDTO { @NotNull(message = "预约服务时间不能为空", groups = { Create.class }) private Date exceptServeTime; private List attachmentsList; + + private String longitude; + + private String latitude; } 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 bb9c85c2d7..ae8510d524 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 @@ -409,7 +409,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ // 未办结事件 q.eq(LingshanAgentServiceRecordEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId()); q.likeRight(LingshanAgentServiceRecordEntity::getOrgIdPath, orgIdPath); - q.eq(LingshanAgentServiceRecordEntity::getProcessStatus, LingShanAgentServiceProcessStatusEnum.ACCEPTED); //已受理=未办结 + q.eq(LingshanAgentServiceRecordEntity::getProcessStatus, LingShanAgentServiceProcessStatusEnum.ACCEPTED.getStatusCode()); //已受理=未办结 rl.add(new ScreenCatalogueQtyStatsRstDTO("service_unclosed", "未办结事件", agentServiceRecordDao.selectCount(q))); @@ -417,7 +417,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ q.clear(); q.eq(LingshanAgentServiceRecordEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId()); q.likeRight(LingshanAgentServiceRecordEntity::getOrgIdPath, orgIdPath); - q.eq(LingshanAgentServiceRecordEntity::getProcessStatus, LingShanAgentServiceProcessStatusEnum.CLOSED); //已受理=未办结 + q.eq(LingshanAgentServiceRecordEntity::getProcessStatus, LingShanAgentServiceProcessStatusEnum.CLOSED.getStatusCode()); //已受理=未办结 rl.add(new ScreenCatalogueQtyStatsRstDTO("service_closed", "已办结事件", agentServiceRecordDao.selectCount(q))); From 75b5d35463a1aac4e4591c7286a4f5541044a09c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 May 2023 10:13:54 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E6=A0=91=EF=BC=9Agov/org/ichouse/housetree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/lingshan/HouseTreeDTO.java | 28 +++++++++++ .../dto/result/lingshan/HouseTreeFormDTO.java | 14 ++++++ .../epmet/controller/IcHouseController.java | 20 ++++++-- .../java/com/epmet/dao/IcBuildingDao.java | 22 ++++++++ .../com/epmet/service/IcHouseService.java | 11 ++++ .../service/impl/IcHouseServiceImpl.java | 29 +++++++++++ .../main/resources/mapper/IcBuildingDao.xml | 50 +++++++++++++++++++ 7 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeFormDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeDTO.java new file mode 100644 index 0000000000..5125ddb301 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result.lingshan; + +import lombok.Data; + +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2023/5/17 9:21 + */ +@Data +public class HouseTreeDTO { + private String id; + /** + * 小区:neighborHood + * 楼栋:building + * 单元:unit + * 房屋:house + */ + private String type; + private String name; + /** + * 下级机关组织 + */ + private List children; +} + diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeFormDTO.java new file mode 100644 index 0000000000..66fe4256f7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/HouseTreeFormDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result.lingshan; + +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/17 9:29 + */ +@Data +public class HouseTreeFormDTO { + private String gridId; +} + 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 27ca372d06..92f908004a 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,10 +29,9 @@ import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; 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.*; +import com.epmet.dto.result.lingshan.HouseTreeDTO; +import com.epmet.dto.result.lingshan.HouseTreeFormDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuFormDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.service.IcHouseService; @@ -206,6 +205,17 @@ public class IcHouseController { return new Result>().ok(list); } - + /** + * 灵山项目-绑定联户时候,选择同网格内的房屋 + * 房屋树:小区-楼栋-单元-房屋,共4级 + * 可以根据网格id的房屋 + * + * @param formDTO + * @return + */ + @PostMapping("housetree") + public Result> getOrgTreeData(@RequestBody HouseTreeFormDTO formDTO) { + return new Result>().ok(icHouseService.getOrgTreeData(formDTO.getGridId())); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index 4b10e94bf1..2275021a67 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -24,6 +24,7 @@ import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.IcBuildingListFormDTO; import com.epmet.dto.result.*; +import com.epmet.dto.result.lingshan.HouseTreeDTO; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.IcBuildingEntity; import com.epmet.entity.IcHouseEntity; @@ -255,4 +256,25 @@ public interface IcBuildingDao extends BaseDao { */ IcBuildingEntity getBuildingInfoByName(CheckHouseInfoFormDTO formDTO); + /** + * 1、楼栋节点 + * @param neighborHoodId + * @return + */ + List selectBuildingTree(@Param("neighborHoodId") String neighborHoodId); + + /** + * 2、单元节点 + * @param buildingId + * @return + */ + List selectUnit(@Param("buildingId") String buildingId); + + /** + * 3、房屋节点 + * @param unitId + * @return + */ + List selectHouseTree(@Param("unitId") String unitId); } + 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 d77a7a0eab..3c284beb00 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 @@ -14,6 +14,7 @@ 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.HouseTreeDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.IcHouseEntity; @@ -164,4 +165,14 @@ public interface IcHouseService extends BaseService { * @return */ List queryLianHuHouseId(String partyCenterHouseId); + + /** + * 灵山项目-绑定联户时候,选择同网格内的房屋 + * 房屋树:小区-楼栋-单元-房屋,共4级 + * 可以根据网格id的房屋 + * + * @param gridId + * @return + */ + List getOrgTreeData(String gridId); } 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 724190b047..28452b93db 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 @@ -25,6 +25,7 @@ import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; import com.epmet.dto.result.*; +import com.epmet.dto.result.lingshan.HouseTreeDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.*; @@ -498,5 +499,33 @@ public class IcHouseServiceImpl extends BaseServiceImpl getOrgTreeData(String gridId) { + LambdaQueryWrapper neighborHoodWrapper = new LambdaQueryWrapper<>(); + neighborHoodWrapper.eq(IcNeighborHoodEntity::getGridId, gridId) + .select(IcNeighborHoodEntity::getId,IcNeighborHoodEntity::getNeighborHoodName); + List list = icNeighborHoodDao.selectList(neighborHoodWrapper); + List resultList = new ArrayList<>(); + for (IcNeighborHoodEntity neighborHoodEntity : list) { + HouseTreeDTO houseTreeDTO = new HouseTreeDTO(); + houseTreeDTO.setId(neighborHoodEntity.getId()); + houseTreeDTO.setType("neighborHood"); + houseTreeDTO.setName(neighborHoodEntity.getNeighborHoodName()); + List buildingList=icBuildingDao.selectBuildingTree(neighborHoodEntity.getId()); + houseTreeDTO.setChildren(buildingList); + resultList.add(houseTreeDTO); + } + return resultList; + } + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index 2c8176a18f..2224b68099 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -552,4 +552,54 @@ + + + + + + + + + + + + + + + + + + + + From 88da1b9907715ab7ac7be08534726abe84234463 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 17 May 2023 10:14:19 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9:=E3=80=90=E7=81=B5?= =?UTF-8?q?=E5=B1=B1-=E7=BA=A2=E8=89=B2=E5=BE=85=E5=8A=9E=E3=80=91?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F-=E6=9C=8D=E5=8A=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0agentId=E4=BB=A3=E5=8A=9E=E5=91=98id?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/LingShanAgentServiceController.java | 5 +++-- .../java/com/epmet/service/LingShanAgentServiceService.java | 2 +- .../epmet/service/impl/LingShanAgentServiceServiceImpl.java | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java index e6cbb2311e..541462c10b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java @@ -279,9 +279,10 @@ public class LingShanAgentServiceController { @GetMapping("screen/serviceList") public Result> screenServiceList(@RequestParam("orgType") String orgType, @RequestParam("orgId") String orgId, - @RequestParam("dataType") String dataType) { + @RequestParam("dataType") String dataType, + @RequestParam(value = "agentId", required = false) String agentId) { - List rl = lingShanServiceAgentService.screenServiceList(orgType, orgId, dataType); + List rl = lingShanServiceAgentService.screenServiceList(orgType, orgId, dataType, agentId); return new Result>().ok(rl); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java index adbcb0bbcd..992244d76b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java @@ -33,7 +33,7 @@ public interface LingShanAgentServiceService { List screenAgentList(String orgType, String orgId); - List screenServiceList(String orgType, String orgId, String dataType); + List screenServiceList(String orgType, String orgId, String dataType, String agentId); List serviceCategoryAnalysis(String orgType, String orgId); 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 ae8510d524..cfa4aef5ee 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 @@ -474,7 +474,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ } @Override - public List screenServiceList(String orgType, String orgId, String dataType) { + public List screenServiceList(String orgType, String orgId, String dataType, String agentId) { String orgIdPath; if (StringUtils.isAnyBlank(orgType, orgId)) { @@ -503,6 +503,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ LambdaQueryWrapper q = new LambdaQueryWrapper<>(); q.likeRight(LingshanAgentServiceRecordEntity::getOrgIdPath, orgIdPath); q.eq(LingshanAgentServiceRecordEntity::getProcessStatus, processStatus); + q.eq(StringUtils.isNotBlank(agentId), LingshanAgentServiceRecordEntity::getAgentId, agentId); List serviceRecords = agentServiceRecordDao.selectList(q); return serviceRecords.stream().map(rec -> { From 543acebce2a32dedeef7547e70c7922020678802 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 May 2023 10:17:01 +0800 Subject: [PATCH 12/14] partyCenterHouseFlag --- .../epmet/dto/result/lingshan/PartyCenterHouseResultDTO.java | 5 ++++- .../gov-org-server/src/main/resources/mapper/IcHouseDao.xml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 index e649184ce0..9dbe05c71c 100644 --- 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 @@ -93,6 +93,9 @@ public class PartyCenterHouseResultDTO { * 联户数 */ private Integer totalLianHu; - + /** + * 灵山项目:是否党员中心户:1是;0不是 + */ + private String partyCenterHouseFlag; } 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 1ccf5a4d65..fb4e43e0bf 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 @@ -736,7 +736,8 @@ from lingshan_party_center_house_lianhu r where r.PARTY_CENTER_HOUSE_ID=ih.ID and r.DEL_FLAG='0' - )as totalLianHu + )as totalLianHu, + ih.PARTY_CENTER_HOUSE_FLAG as partyCenterHouseFlag FROM ic_house ih inner join ic_building_unit u From eda679a8d910891809cb170a81df9613b6179f5e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 May 2023 10:21:05 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=81=94=E6=88=B7?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PartyCenterHouseBindLianHuFormDTO.java | 2 +- .../com/epmet/controller/IcHouseController.java | 2 +- .../java/com/epmet/service/IcHouseService.java | 4 ++-- .../epmet/service/impl/IcHouseServiceImpl.java | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) 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 index 5f532f0cf2..1a39e04169 100644 --- 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 @@ -12,6 +12,6 @@ import java.util.List; @Data public class PartyCenterHouseBindLianHuFormDTO { private String partyCenterHouseId; - private List lianHuHouseIdList; + private List lianHuHouseList; } 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 92f908004a..6569db69cd 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 @@ -188,7 +188,7 @@ public class IcHouseController { @PostMapping("bingLianHu") public Result bingLianHu( @RequestBody PartyCenterHouseBindLianHuFormDTO formDTO) { if(StringUtils.isNotBlank(formDTO.getPartyCenterHouseId())){ - icHouseService.bingLianHu(formDTO.getPartyCenterHouseId(),formDTO.getLianHuHouseIdList()); + icHouseService.bingLianHu(formDTO.getPartyCenterHouseId(),formDTO.getLianHuHouseList()); } return new Result(); } 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 3c284beb00..98d1823a0c 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 @@ -155,9 +155,9 @@ public interface IcHouseService extends BaseService { /** * 灵山项目-党员中心户,绑定联户 * @param partyCenterHouseId - * @param lianHuHouseIdList + * @param lianHuHouseList */ - void bingLianHu(String partyCenterHouseId, List lianHuHouseIdList); + void bingLianHu(String partyCenterHouseId, List lianHuHouseList); /** * 灵山项目-查询联户房屋列表 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 28452b93db..6cbe658428 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 @@ -437,10 +437,10 @@ public class IcHouseServiceImpl extends BaseServiceImpl lianHuHouseIdList) { + public void bingLianHu(String partyCenterHouseId, List lianHuHouseList) { IcHouseEntity partyCenterHouse=baseDao.selectById(partyCenterHouseId); IcNeighborHoodEntity neighborHoodEntity=icNeighborHoodDao.selectById(partyCenterHouse.getNeighborHoodId()); CustomerGridDTO gridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(neighborHoodEntity.getGridId()); @@ -451,17 +451,17 @@ public class IcHouseServiceImpl extends BaseServiceImpl{ + lianHuHouseList.forEach(lianHuHouse->{ //根据选中类型,查询下面的房屋 List list=new ArrayList<>(); - if(!"house".equals(lianHuHouseId.getType())){ + if(!"house".equals(lianHuHouse.getType())){ LambdaQueryWrapper query = new LambdaQueryWrapper<>(); - query.eq("neighborHood".equals(lianHuHouseId.getType()), IcHouseEntity::getNeighborHoodId, lianHuHouseId.getId()) - .eq("building".equals(lianHuHouseId.getType()), IcHouseEntity::getBuildingId, lianHuHouseId.getId()) - .eq("unit".equals(lianHuHouseId.getType()), IcHouseEntity::getBuildingUnitId, lianHuHouseId.getId()); + query.eq("neighborHood".equals(lianHuHouse.getType()), IcHouseEntity::getNeighborHoodId, lianHuHouse.getId()) + .eq("building".equals(lianHuHouse.getType()), IcHouseEntity::getBuildingId, lianHuHouse.getId()) + .eq("unit".equals(lianHuHouse.getType()), IcHouseEntity::getBuildingUnitId, lianHuHouse.getId()); list.addAll(baseDao.selectList(query)); }else{ - IcHouseEntity icHouseEntity=baseDao.selectById(lianHuHouseId.getId()); + IcHouseEntity icHouseEntity=baseDao.selectById(lianHuHouse.getId()); list.add(icHouseEntity); } if(CollectionUtils.isNotEmpty(list)){ From fe5d764f2637e1835fffba3da2f223c361c315be Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 May 2023 10:34:21 +0800 Subject: [PATCH 14/14] queryLianHuHouse --- .../LingshanPartyCenterHouseLianhuDTO.java | 75 +++++++++++++++++++ .../epmet/controller/IcHouseController.java | 18 ++--- .../LingshanPartyCenterHouseLianhuDao.java | 9 --- .../com/epmet/service/IcHouseService.java | 3 +- .../service/impl/IcHouseServiceImpl.java | 8 +- .../LingshanPartyCenterHouseLianhuDao.xml | 10 --- 6 files changed, 92 insertions(+), 31 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java new file mode 100644 index 0000000000..0a7df6be25 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java @@ -0,0 +1,75 @@ +package com.epmet.dto.result.lingshan; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 灵山_党员中心户联户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-16 + */ +@Data +public class LingshanPartyCenterHouseLianhuDTO implements Serializable { + + /** + * 主键(联户记录表) + */ + @JsonIgnore + private String id; + + /** + * 客户id + */ + @JsonIgnore + private String customerId; + + /** + * 党员中心户房屋id:lingshan_party_center_house.HOUSE_ID + */ + @JsonIgnore + private String partyCenterHouseId; + + /** + * 联户:房屋所属组织id + */ + @JsonIgnore + private String agencyId; + + /** + * 联户:房屋所属网格id + */ + @JsonIgnore + private String gridId; + + /** + * 联户:grid_id的path。包含grid_id + */ + @JsonIgnore + private String gridIdPath; + + /** + * 联户:小区id + */ + private String neighborHoodId; + + /** + * 联户:楼栋id + */ + private String buildingId; + + /** + * 联户:单元id + */ + private String buildingUnitId; + + /** + * 联户:联户房屋id + */ + private String houseId; + + +} \ No newline at end of file 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 6569db69cd..e0ffaeb3e7 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,11 +29,11 @@ import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.CheckHouseInfoFormDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; -import com.epmet.dto.result.*; -import com.epmet.dto.result.lingshan.HouseTreeDTO; -import com.epmet.dto.result.lingshan.HouseTreeFormDTO; -import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuFormDTO; -import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; +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.*; import com.epmet.service.IcHouseService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -199,10 +199,10 @@ public class IcHouseController { * @param partyCenterHouseId * @return */ - @PostMapping("queryLianHuHouseId/{partyCenterHouseId}") - public Result> queryLianHuHouseId(@PathVariable("partyCenterHouseId") String partyCenterHouseId) { - List list = icHouseService.queryLianHuHouseId(partyCenterHouseId); - return new Result>().ok(list); + @PostMapping("queryLianHuHouse/{partyCenterHouseId}") + public Result> queryLianHuHouse(@PathVariable("partyCenterHouseId") String partyCenterHouseId) { + List list = icHouseService.queryLianHuHouse(partyCenterHouseId); + return new Result>().ok(list); } /** 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 index 0750103ca0..aaeb853332 100644 --- 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 @@ -4,8 +4,6 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.LingshanPartyCenterHouseLianhuEntity; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - /** * 灵山_党员中心户联户 * @@ -15,12 +13,5 @@ import java.util.List; @Mapper public interface LingshanPartyCenterHouseLianhuDao extends BaseDao { - /** - * 查询党员中心对应的联户房屋id - * @param partyCenterHouseId - * @return - */ - List queryLianHuHouseId(String partyCenterHouseId); - int deleteByPartyCenterHouseId(String partyCenterHouseId); } \ No newline at end of file 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 98d1823a0c..476ce0419a 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 @@ -15,6 +15,7 @@ import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.HouseListResultDTO; import com.epmet.dto.result.HousesNameResultDTO; import com.epmet.dto.result.lingshan.HouseTreeDTO; +import com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.IcHouseEntity; @@ -164,7 +165,7 @@ public interface IcHouseService extends BaseService { * @param partyCenterHouseId * @return */ - List queryLianHuHouseId(String partyCenterHouseId); + List queryLianHuHouse(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 6cbe658428..d0cc1468c4 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 @@ -26,6 +26,7 @@ import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; import com.epmet.dto.result.*; import com.epmet.dto.result.lingshan.HouseTreeDTO; +import com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseBindLianHuDetailDTO; import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; import com.epmet.entity.*; @@ -492,11 +493,14 @@ public class IcHouseServiceImpl extends BaseServiceImpl queryLianHuHouseId(String partyCenterHouseId) { + public List queryLianHuHouse(String partyCenterHouseId) { if(StringUtils.isBlank(partyCenterHouseId)){ return new ArrayList<>(); } - return partyCenterHouseLianhuDao.queryLianHuHouseId(partyCenterHouseId); + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + queryWrapper.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId,partyCenterHouseId); + List list=partyCenterHouseLianhuDao.selectList(queryWrapper); + return ConvertUtils.sourceToTarget(list,LingshanPartyCenterHouseLianhuDTO.class); } /** 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 index 663d63ab6c..cae8f215d7 100644 --- 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 @@ -22,16 +22,6 @@ - - delete from lingshan_party_center_house_lianhu where PARTY_CENTER_HOUSE_ID=#{partyCenterHouseId}