From d856a33edb8372bc0af44489947b6cdd66ef1a1c Mon Sep 17 00:00:00 2001 From: wxz Date: Sun, 23 Apr 2023 21:15:28 +0800 Subject: [PATCH 01/17] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E4=BF=A1=E6=81=AF=E5=AF=BC=E5=85=A5=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B7=B2=E5=A1=AB=E5=86=99=E7=9A=84=E3=80=81?= =?UTF-8?q?=EF=BC=88=E6=84=8F=E6=80=9D=E5=B0=B1=E6=98=AF=EF=BC=8C=E4=B8=8A?= =?UTF-8?q?=E6=AC=A1=E6=88=91=E5=A1=AB=E4=BA=86=E7=AC=AC=E4=B8=80=E5=88=97?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E5=88=97=EF=BC=8C=E6=8F=90=E4=BA=A4=E4=BA=86?= =?UTF-8?q?=E3=80=82=E8=BF=99=E6=AC=A1=E6=88=91=E5=8F=AA=E5=A1=AB=E4=BA=86?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E7=AC=AC=E5=9B=9B=E5=88=97=EF=BC=8C=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E7=AC=AC=E4=BA=8C=E5=88=97=E7=A9=BA=E7=9D=80=EF=BC=8C?= =?UTF-8?q?=E9=82=A3=E8=BF=99=E6=AC=A1=E6=88=91=E5=AF=BC=E5=85=A5=E4=B9=8B?= =?UTF-8?q?=E5=90=8E4=E5=88=97=E9=83=BD=E6=9C=89=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF=E6=8A=8A1=EF=BC=8C2=E5=88=97?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=BA=E7=A9=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcResiUserDao.java | 11 +++++++++++ .../service/impl/IcResiUserImportServiceImpl.java | 6 +++--- .../src/main/resources/mapper/IcResiUserDao.xml | 13 +++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 9930c7338f..dba99aadfa 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -61,6 +61,17 @@ public interface IcResiUserDao extends BaseDao { **/ void upTable(@Param("tableName") String tableName, @Param("id") String id, @Param("map") Map map); + /** + * @description: 选择性更新(只更新不为null的) + * @param tableName: + * @param id: + * @param map: + * @return + * @author: WangXianZhang + * @date: 2023/4/23 9:03 PM + */ + void updateTableSelective(@Param("tableName") String tableName, @Param("id") String id, @Param("map") Map map); + List> selectListResiMap(@Param("customerId") String customerId, @Param("formCode") String formCode, @Param("conditions") List conditions, diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 05e7b81853..e0b5c91837 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -547,7 +547,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if (existingResiMap != null) { // 修改居民信息 - icResiUserDao.upTable(tableName, existingResiMap.get("ID"), columnAndValues); + icResiUserDao.updateTableSelective(tableName, existingResiMap.get("ID"), columnAndValues); // 任意组织维度一个发生变化,则放到调动居民缓存中 ResiImportChangedData transferData; @@ -747,7 +747,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if (CollectionUtils.isNotEmpty(subInfos)) { Map subInfo = subInfos.get(0); // 附加信息存在,更新附加表内容 - icResiUserDao.upTable(targetTableName, subInfo.get("ID").toString(), columnAndValues); + icResiUserDao.updateTableSelective(targetTableName, subInfo.get("ID").toString(), columnAndValues); } else { // 新增附加表信息 columnAndValues.put("CREATED_BY", currentUserId); @@ -1577,7 +1577,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private void updateMainTableResiTypeFlag(IcResiUserTableEnum icResiUserTableEnum, String resiUserId) { HashMap map = new HashMap<>(); map.put(icResiUserTableEnum.getMainTableFlagColumnName(), true); - icResiUserDao.upTable(IcResiUserTableEnum.IC_RESI_USER.getTableName(), resiUserId, map); + icResiUserDao.updateTableSelective(IcResiUserTableEnum.IC_RESI_USER.getTableName(), resiUserId, map); } /** diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 2d2e30535f..118c0c3c36 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -73,6 +73,19 @@ WHERE id = #{id} + + + UPDATE ${tableName} + SET + + + ${key} = #{value} + + + ,UPDATED_TIME = NOW() + WHERE id = #{id} + + \ No newline at end of file From 6be81b4f594c309f7aa6a6a8de26aec1f950fad9 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 25 Apr 2023 15:47:25 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E5=8C=96=E9=83=A8=E7=BD=B2=E7=9A=84=E4=B8=80=E7=82=B9=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/epmet-cloud.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/epmet-cloud.md b/doc/epmet-cloud.md index 43cd0d2f63..e47ddfc70e 100644 --- a/doc/epmet-cloud.md +++ b/doc/epmet-cloud.md @@ -10,4 +10,11 @@ 例如:有A、B2个服务,并且A调用B,如果我们只需要开发A服务,那本地只启动A服务即可,A调用B的时候,会调用服务器的B服务。 如果需要开发AB2个服务,那么将A中的FeignClient的url属性指向localhost。 PS:目前正在测试通过负载均衡器和本地环境变量实现动态修改目标服务IP,成功之后就不需要再修改FeignClient的url,配置一下环境变量即可,到时候具体说 -``` \ No newline at end of file +``` + + +## 私有化部署 +##### 需要开放哪些域名 + +- epmet-cloud.elinkservice.cn 微信交互代理 +- dysmsapi.aliyuncs.com 阿里云短信 \ No newline at end of file From f18bb7b8cababf53a398f493cfaf9af1019beec9 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 25 Apr 2023 15:57:44 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E4=B8=AD?= =?UTF-8?q?=E7=9A=84customerId=EF=BC=8CstaffId=E7=9A=84=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcResiUserServiceImpl.java | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index c49ecc7554..7b9434043a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -708,7 +708,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl", resiUserId)); } //2022-1-18 信息修改判断基础信息表人员网格、小区、楼栋、单元、房屋维度数据以及十八类的类别数据是否变化,相应生成变更记录和变更明细数据 sun start - icUserChangeRecord(tokenDto, entity, map); + icUserChangeRecord(entity, map); //2022-1-18 sun end //2.更新主表数据 if (map.size() > NumConstant.ONE) { @@ -789,10 +789,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl map) { + * @description: 生成居民变更记录 + * @param null: + * @return + * @author: sun + */ + public void icUserChangeRecord(IcResiUserEntity entity, LinkedHashMap map) { + // prepare + String customerId = EpmetRequestHolder.getLoginUserCustomerId(); + String staffId = EpmetRequestHolder.getLoginUserId(); + java.util.Date date = new java.util.Date(); //1.判断维度数据是否修改【网格、小区、楼栋、单元、房间有变化则先走人员调动逻辑】 if ((map.containsKey("GRID_ID") && !entity.getGridId().equals(map.get("GRID_ID"))) || (map.containsKey("VILLAGE_ID") && !entity.getVillageId().equals(map.get("VILLAGE_ID"))) @@ -809,13 +815,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(sfdto); if (!categoryListResult.success()) { throw new RenException("居民信息修改,获取客户居民类别预警配置表数据失败"); @@ -840,7 +846,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl NumConstant.ZERO) { //变更记录 - CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); - changeRecordEntity.setCustomerId(tokenDto.getCustomerId()); - changeRecordEntity.setOperatorId(tokenDto.getUserId()); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(customerId, staffId); + changeRecordEntity.setCustomerId(customerId); + changeRecordEntity.setOperatorId(staffId); changeRecordEntity.setIcUserId(entity.getId()); changeRecordEntity.setOperatorName(staffInfoCache.getRealName()); changeRecordEntity.setIcUserName(map.containsKey("NAME") ? map.get("NAME") : entity.getName()); From da489b7150250675613c3da3c1f77d8fbdf88258 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Apr 2023 17:31:56 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E8=B0=83=E6=95=B4=EF=BC=8C=E5=BE=AE=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/HouseServiceImpl.java | 4 +- .../impl/IcResiCollectServiceImpl.java | 168 ++++++++++++------ 2 files changed, 116 insertions(+), 56 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index baf6ad7abd..92fb0d2116 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -272,10 +272,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { houseChangeRecordCollect(formDTO.getId(), formDTO.getCustomerId(), icHouseDTO); icHouseDao.updateById(entity); - IcHouseDTO houseDTO = icHouseService.get(formDTO.getId()); + // IcHouseDTO houseDTO = icHouseService.get(formDTO.getId()); //删除房屋缓存 - icHouseRedis.delHouseInfo(formDTO.getId(), houseDTO.getCustomerId()); + icHouseRedis.delHouseInfo(formDTO.getId(), formDTO.getCustomerId()); } /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java index bfecfa4671..ee5d24e8a1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java @@ -9,10 +9,12 @@ import com.epmet.commons.tools.enums.RelationshipEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +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; @@ -43,6 +45,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; @@ -421,6 +424,7 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl resultDTOResult = govOrgFeignClient.getHouseInfoToCollect(getHouseInfoToCollectFormDTO); IcHouseInfoCollectResultDTO icHouseInfoCollectResultDTO = resultDTOResult.getData(); - + if(null==icHouseInfoCollectResultDTO){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"房屋不存在","房屋不存在,请先新建同名房屋"); + } // 新增房屋后需要collect更新上房屋ID // log icResiCollectEntity.setHomeId(icHouseInfoCollectResultDTO.getId()); @@ -462,7 +468,9 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, icResiCollectEntity.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .ne(IcResiUserEntity::getIdCard,icResiCollectMemDetailDTO.getIdNum()); List entityList = icResiUserDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { - String errorMsg = "房屋下已存在户主"; - throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + String errorMsg = "当前房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); } } - AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(icResiCollectEntity.getAgencyId()); - if (null == agencyInfoCache) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所属组织查询异常,agencyId:" + icResiCollectEntity.getAgencyId(), "所属组织查询异常"); - } - // userEntity.setPids(icResiCollectEntity.getPids() + ":" + icResiCollectEntity.getAgencyId()); // ic_resi_user表的组织的pids 含agencyId本身 - userEntity.setPids(PidUtils.convertPid2OrgIdPath(icResiCollectEntity.getAgencyId(), agencyInfoCache.getPids())); - userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); - userEntity.setGridId(icResiCollectEntity.getGridId()); - userEntity.setVillageId(icResiCollectEntity.getVillageId()); - userEntity.setBuildId(icResiCollectEntity.getBuildId()); - userEntity.setUnitId(icResiCollectEntity.getUnitId()); - userEntity.setHomeId(icResiCollectEntity.getHomeId()); - userEntity.setName(icResiCollectMemDetailDTO.getName()); - userEntity.setMobile(icResiCollectMemDetailDTO.getMobile()); - userEntity.setIdCard(icResiCollectMemDetailDTO.getIdNum()); - userEntity.setYhzgx(icResiCollectMemDetailDTO.getRelationship()); - userEntity.setGzdw(icResiCollectMemDetailDTO.getWorkPlace()); - userEntity.setRemarks(icResiCollectMemDetailDTO.getRemark()); - userEntity.setHjszd(icResiCollectMemDetailDTO.getDomicilePlace()); - icResiUserDao.updateById(userEntity); - // 判断是否需要更新记录 if(isUpdateLog){ //变更记录表 IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); changeRecordEntity.setOperatorId(formDTO.getUserId()); - changeRecordEntity.setIcUserId(userEntity.getId()); + changeRecordEntity.setIcUserId(existedUserEntity.getId()); changeRecordEntity.setOperatorName(formDTO.getRealName()); - changeRecordEntity.setIcUserName(userEntity.getName()); - changeRecordEntity.setType("update"); - changeRecordEntity.setTypeName("修改"); + changeRecordEntity.setIcUserName(existedUserEntity.getName()); + changeRecordEntity.setType("transfer"); + changeRecordEntity.setTypeName("调动"); changeRecordEntity.setBeforeChangeName("-"); + HouseInfoCache originHouseInfoCache= CustomerIcHouseRedis.getHouseInfo(icResiCollectEntity.getCustomerId(),existedUserEntity.getHomeId()); + if(null!=originHouseInfoCache){ + changeRecordEntity.setBeforeChangeName(originHouseInfoCache.getAgencyPathName().concat(StrConstant.HYPHEN).concat(originHouseInfoCache.getGridName()).concat(StrConstant.HYPHEN).concat(originHouseInfoCache.getAllName())); + } changeRecordEntity.setAfterChangeName("-"); + HouseInfoCache newHouseInfoCache = CustomerIcHouseRedis.getHouseInfo(icResiCollectEntity.getCustomerId(), icResiCollectEntity.getHomeId()); + if (null != newHouseInfoCache) { + //信息采集时居民自己填写的房屋 以他填写的为准!!!!!! + changeRecordEntity.setAfterChangeName(newHouseInfoCache.getAgencyPathName().concat(StrConstant.HYPHEN).concat(newHouseInfoCache.getGridName()).concat(StrConstant.HYPHEN).concat(newHouseInfoCache.getAllName())); + } changeRecordEntity.setChangeTime(new java.util.Date()); + changeRecordEntity.setReason("来源于信息采集:更新居民所属房屋信息"); icUserChangeRecordService.insert(changeRecordEntity); } + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(icResiCollectEntity.getAgencyId()); + if (null == agencyInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所属组织查询异常,agencyId:" + icResiCollectEntity.getAgencyId(), "所属组织查询异常"); + } + // userEntity.setPids(icResiCollectEntity.getPids() + ":" + icResiCollectEntity.getAgencyId()); // ic_resi_user表的组织的pids 含agencyId本身 + existedUserEntity.setPids(PidUtils.convertPid2OrgIdPath(icResiCollectEntity.getAgencyId(), agencyInfoCache.getPids())); + // 组织Id + existedUserEntity.setAgencyId(icResiCollectEntity.getAgencyId()); + // 网格id + existedUserEntity.setGridId(icResiCollectEntity.getGridId()); + // 小区id + existedUserEntity.setVillageId(icResiCollectEntity.getVillageId()); + // 楼栋id + existedUserEntity.setBuildId(icResiCollectEntity.getBuildId()); + // 单元id + existedUserEntity.setUnitId(icResiCollectEntity.getUnitId()); + // 房屋id + existedUserEntity.setHomeId(icResiCollectEntity.getHomeId()); + // 姓名 + existedUserEntity.setName(icResiCollectMemDetailDTO.getName()); + // 手机号 + existedUserEntity.setMobile(icResiCollectMemDetailDTO.getMobile()); + // 身份证号 + existedUserEntity.setIdCard(icResiCollectMemDetailDTO.getIdNum()); + // 与户主关系 + existedUserEntity.setYhzgx(icResiCollectMemDetailDTO.getRelationship()); + // 工作单位 + existedUserEntity.setGzdw(icResiCollectMemDetailDTO.getWorkPlace()); + // 备注 + existedUserEntity.setRemarks(icResiCollectMemDetailDTO.getRemark()); + // 户籍所在地 + existedUserEntity.setHjszd(icResiCollectMemDetailDTO.getDomicilePlace()); + icResiUserDao.updateById(existedUserEntity); } /** @@ -542,49 +576,65 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, icResiCollectEntity.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .ne(IcResiUserEntity::getIdCard,icResiCollectMemDetailDTO.getIdNum()); List entityList = icResiUserDao.selectList(wrapper); + // 已经存在户主了,当前成员填写的也是户主... 暂不处理 if (CollectionUtils.isNotEmpty(entityList)) { - String errorMsg = "房屋下已存在户主"; - throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + String errorMsg = "当前房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); } } // 新增人员 - IcResiUserEntity userEntity = new IcResiUserEntity(); + IcResiUserEntity insertUserEntity = new IcResiUserEntity(); AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(icResiCollectEntity.getAgencyId()); if (null == agencyInfoCache) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所属组织查询异常,agencyId:" + icResiCollectEntity.getAgencyId(), "所属组织查询异常"); } + // 组织的pids 含agencyId本身 // userEntity.setPids(icResiCollectEntity.getPids() + ":" + icResiCollectEntity.getAgencyId()); // ic_resi_user表的组织的pids 含agencyId本身 !!! - userEntity.setPids(PidUtils.convertPid2OrgIdPath(icResiCollectEntity.getAgencyId(), agencyInfoCache.getPids())); - userEntity.setAgencyId(icResiCollectEntity.getAgencyId()); - userEntity.setGridId(icResiCollectEntity.getGridId()); - userEntity.setVillageId(icResiCollectEntity.getVillageId()); - userEntity.setBuildId(icResiCollectEntity.getBuildId()); - userEntity.setUnitId(icResiCollectEntity.getUnitId()); - userEntity.setHomeId(icResiCollectEntity.getHomeId()); - userEntity.setName(icResiCollectMemDetailDTO.getName()); - userEntity.setMobile(icResiCollectMemDetailDTO.getMobile()); - userEntity.setIdCard(icResiCollectMemDetailDTO.getIdNum()); - userEntity.setYhzgx(icResiCollectMemDetailDTO.getRelationship()); - userEntity.setGzdw(icResiCollectMemDetailDTO.getWorkPlace()); - userEntity.setRemarks(icResiCollectMemDetailDTO.getRemark()); - userEntity.setCustomerId(icResiCollectMemDetailDTO.getCustomerId()); - userEntity.setHjszd(icResiCollectMemDetailDTO.getDomicilePlace()); - icResiUserDao.insert(userEntity); + insertUserEntity.setPids(PidUtils.convertPid2OrgIdPath(icResiCollectEntity.getAgencyId(), agencyInfoCache.getPids())); + // 网格所属组织id + insertUserEntity.setAgencyId(icResiCollectEntity.getAgencyId()); + // 网格id + insertUserEntity.setGridId(icResiCollectEntity.getGridId()); + // 小区id + insertUserEntity.setVillageId(icResiCollectEntity.getVillageId()); + // 楼栋id + insertUserEntity.setBuildId(icResiCollectEntity.getBuildId()); + //单元id + insertUserEntity.setUnitId(icResiCollectEntity.getUnitId()); + //房屋id + insertUserEntity.setHomeId(icResiCollectEntity.getHomeId()); + //姓名 + insertUserEntity.setName(icResiCollectMemDetailDTO.getName()); + //手机号 + insertUserEntity.setMobile(icResiCollectMemDetailDTO.getMobile()); + insertUserEntity.setIdCard(icResiCollectMemDetailDTO.getIdNum()); + //与户主关系 + insertUserEntity.setYhzgx(icResiCollectMemDetailDTO.getRelationship()); + //工作单位 + insertUserEntity.setGzdw(icResiCollectMemDetailDTO.getWorkPlace()); + // 备注 + insertUserEntity.setRemarks(icResiCollectMemDetailDTO.getRemark()); + insertUserEntity.setCustomerId(icResiCollectMemDetailDTO.getCustomerId()); + // 户籍所在地 + insertUserEntity.setHjszd(icResiCollectMemDetailDTO.getDomicilePlace()); + icResiUserDao.insert(insertUserEntity); //变更记录表 IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); changeRecordEntity.setCustomerId(icResiCollectEntity.getCustomerId()); changeRecordEntity.setOperatorId(formDTO.getUserId()); - changeRecordEntity.setIcUserId(userEntity.getId()); + changeRecordEntity.setIcUserId(insertUserEntity.getId()); changeRecordEntity.setOperatorName(formDTO.getRealName()); - changeRecordEntity.setIcUserName(userEntity.getName()); + changeRecordEntity.setIcUserName(insertUserEntity.getName()); changeRecordEntity.setType("add"); changeRecordEntity.setTypeName("新增"); changeRecordEntity.setBeforeChangeName("-"); changeRecordEntity.setAfterChangeName("-"); + changeRecordEntity.setReason("来源于信息采集"); changeRecordEntity.setChangeTime(new java.util.Date()); icUserChangeRecordService.insert(changeRecordEntity); @@ -602,11 +652,21 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl queryOriginUserByHomeId(String homeId,String customerId) { LambdaQueryWrapper query = new LambdaQueryWrapper<>(); query.eq(IcResiUserEntity::getHomeId, homeId); query.eq(IcResiUserEntity::getCustomerId, customerId); List originUserList = icResiUserDao.selectList(query); + if(CollectionUtils.isEmpty(originUserList)){ + return new HashMap<>(); + } Map memMap = originUserList.stream().collect(Collectors.toMap(IcResiUserEntity::getIdCard, Function.identity())); return memMap; } From b83cb8ad354d30a0dc653426a97c4e6ed36eb6d2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Apr 2023 17:56:31 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E5=8A=9E=E4=BA=8B=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E5=8F=91=E5=B8=83=EF=BC=8Cpids=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/GuideDTO.java | 1 + .../epmet/service/impl/GuideServiceImpl.java | 35 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java index f5fe57d143..db7177a3fa 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java @@ -66,6 +66,7 @@ public class GuideDTO implements Serializable { /** * 所有上级组织ID,英文:隔开 + * orgId的orgIdPath */ private String pids; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index eadca17c92..661dd1a6c7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -25,21 +25,23 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.OrgTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.PidUtils; import com.epmet.commons.tools.utils.SpringContextUtils; -import com.epmet.constant.OrgInfoConstant; import com.epmet.dao.GuideDao; import com.epmet.dto.GuideDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.GuideDetailResultDTO; import com.epmet.dto.result.GuideListResultDTO; -import com.epmet.dto.result.OrgResultDTO; import com.epmet.entity.*; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; @@ -184,7 +186,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp orgFormDTO.setOrgId(formDTO.getOrgId()); orgFormDTO.setOrgType(formDTO.getOrgType()); //获取组织的pId和pIds - Result result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); + /*Result result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); if (!result.success() || null == result.getData()) { throw new RenException(result.getCode(), result.getMsg()); } @@ -193,7 +195,16 @@ public class GuideServiceImpl extends BaseServiceImpl imp } else { guideDTO.setPid(result.getData().getAgencyId()); } - guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); + guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));*/ + if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){ + GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); + guideDTO.setPid(gridInfoCache.getPid()); + guideDTO.setPids(gridInfoCache.getPids().concat(StrConstant.COLON).concat(gridInfoCache.getId())); + }else{ + AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId()); + guideDTO.setPid(agencyInfoCache.getPid()); + guideDTO.setPids(PidUtils.convertPid2OrgIdPath(agencyInfoCache.getId(),agencyInfoCache.getPids())); + } insert(guideDTO); //保存办事指南内容模块 if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { @@ -273,7 +284,7 @@ public class GuideServiceImpl extends BaseServiceImpl imp orgFormDTO.setOrgType(formDTO.getOrgType()); guideDTO.setOrgName(formDTO.getOrgName()); //获取组织的pId和pIds - Result result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); + /*Result result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); if (!result.success() || null == result.getData()) { throw new RenException(result.getCode(), result.getMsg()); } @@ -282,7 +293,17 @@ public class GuideServiceImpl extends BaseServiceImpl imp } else { guideDTO.setPid(result.getData().getAgencyId()); } - guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); + guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));*/ + + if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){ + GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); + guideDTO.setPid(gridInfoCache.getPid()); + guideDTO.setPids(gridInfoCache.getPids().concat(StrConstant.COLON).concat(gridInfoCache.getId())); + }else{ + AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId()); + guideDTO.setPid(agencyInfoCache.getPid()); + guideDTO.setPids(PidUtils.convertPid2OrgIdPath(agencyInfoCache.getId(),agencyInfoCache.getPids())); + } update(guideDTO); //保存办事指南内容模块 if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { From f8b5bad49cad389e8e2699238d48a56d8cd188e0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Apr 2023 17:58:25 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E5=8A=9E=E4=BA=8B=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E5=8F=91=E5=B8=83=EF=BC=8Cpids=E5=80=BC=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/GuideServiceImpl.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java index 661dd1a6c7..b02baa9609 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java @@ -43,7 +43,6 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.GuideDetailResultDTO; import com.epmet.dto.result.GuideListResultDTO; import com.epmet.entity.*; -import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -68,8 +67,6 @@ import java.util.stream.Collectors; @Service public class GuideServiceImpl extends BaseServiceImpl implements GuideService { - @Resource - private GovOrgOpenFeignClient govOrgOpenFeignClient; @Resource private GuideModuleService guideModuleService; @Resource From dc8d20f7de9c003d24bc4a2cf71fbfaee3da9515 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Apr 2023 11:32:33 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=87=E9=9B=86?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=94=E5=9B=9E=E4=B8=8E=E6=88=B7=E4=B8=BB?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/CollectHouseInfoResultDTO.java | 3 +- .../dto/result/CollectListResultDTO.java | 20 +++++++++-- .../impl/IcResiCollectServiceImpl.java | 34 +++++++++++++------ .../service/impl/IcResiUserServiceImpl.java | 18 ++++++---- .../resources/mapper/IcResiCollectDao.xml | 2 ++ 5 files changed, 57 insertions(+), 20 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectHouseInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectHouseInfoResultDTO.java index 6e9fa340ee..8677b71c5a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectHouseInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectHouseInfoResultDTO.java @@ -3,7 +3,6 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; -import java.util.List; /** * @Author wgf @@ -54,4 +53,6 @@ public class CollectHouseInfoResultDTO implements Serializable { * 房主姓名 */ private String ownerName; + + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java index 9851be6340..44edef865e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java @@ -1,6 +1,5 @@ package com.epmet.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -26,7 +25,8 @@ public class CollectListResultDTO implements Serializable { // 组织Id private String agencyId; - + private String gridId; + private String gridName; /** * 居住地址 */ @@ -113,7 +113,21 @@ public class CollectListResultDTO implements Serializable { * 与户主关系 */ private String relationship; - + /** + * 来源于字典表 + * 暂不清楚:0 + * 本人:1 + * 配偶:2 + * 子女:3 + * 父母:4 + * 岳父母或公婆:5 + * 祖父母:6 + * 媳婿:7 + * 孙子女:8 + * 兄弟姐妹:9 + * 其他:10 + */ + private String relationShipName; /** * 人脸照片 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java index ee5d24e8a1..47971cdf45 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java @@ -5,6 +5,7 @@ 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.enums.DictTypeEnum; import com.epmet.commons.tools.enums.RelationshipEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; @@ -29,7 +30,7 @@ import com.epmet.entity.IcResiCollectEntity; import com.epmet.entity.IcResiMemberEntity; import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.IcUserChangeRecordEntity; -import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.GovOrgFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcResiCollectService; @@ -65,19 +66,15 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl collectList = baseDao.getCollectList(formDTO); result.setList(collectList); } + result.getList().forEach(collectDTO->{ + GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(collectDTO.getGridId()); + if(null!=gridInfoCache){ + collectDTO.setGridName(gridInfoCache.getGridNamePath()); + } + }); return result; } @@ -152,7 +155,18 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl list = baseDao.getCollectList(formDTO); if (CollectionUtils.isNotEmpty(list)) { - return list.get(NumConstant.ZERO); + CollectListResultDTO resultDTO=list.get(NumConstant.ZERO); + GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(resultDTO.getGridId()); + if(null!=gridInfoCache){ + resultDTO.setGridName(gridInfoCache.getGridNamePath()); + } + Result> relationShipRes=adminOpenFeignClient.dictMap(DictTypeEnum.RELATIONSHIP.getCode()); + for(CollectListResultDTO.CollectListMemberResultDTO member:resultDTO.getList()){ + if(StringUtils.isNotBlank(member.getRelationship())&&relationShipRes.success()&&relationShipRes.getData().containsKey(member.getRelationship())){ + member.setRelationShipName(relationShipRes.getData().get(member.getRelationship())); + } + } + return resultDTO; } return null; } @@ -518,13 +532,13 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, map.get("HOME_ID")); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; @@ -597,7 +598,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, entity.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; @@ -2770,7 +2772,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, dto.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; @@ -2792,7 +2795,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, dto.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; @@ -2842,7 +2846,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, user.getHomeId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; @@ -2874,7 +2879,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserEntity::getHomeId, houseInfo.getHouseId()); - wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()) + .eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR); List entityList = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "房屋下已存在户主"; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 35090d4a12..5a1d341845 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -19,6 +19,7 @@ + @@ -32,6 +33,7 @@ c.HOME_ID as homeId, c.CHECK_STATE as checkState, c.AGENCY_ID as agencyId, + c.GRID_ID as gridId, #{domicilePlace} as domicile_place FROM ic_resi_collect c left join ic_resi_member m on(c.id=m.IC_RESI_COLLECT_ID and m.del_flag='0') From 4dadc8c3346a2c0e1588d85a6dbb845cafc82d47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Apr 2023 11:59:25 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=87=E9=9B=86?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E6=A0=B9=E6=8D=AE=E6=88=B7?= =?UTF-8?q?=E4=B8=BB=E3=80=81=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/CollectListFormDTO.java | 9 +++++++++ .../src/main/resources/mapper/IcResiCollectDao.xml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java index 99957503cf..8e0a581428 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java @@ -29,6 +29,15 @@ public class CollectListFormDTO extends PageFormDTO { */ private String domicilePlace; + /** + * 审核状态:0待审核 1审核不通过 2审核通过 + */ + private String checkState; + /** + * 户主姓名 + */ + private String houseHolderName; + private String userId; private String customerId; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 5a1d341845..ea43232174 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -56,6 +56,12 @@ AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') + + AND c.CHECK_STATE = #{checkState} + + + AND c.HOUSE_HOLDER_NAME like concat('%', #{houseHolderName},'%') + ORDER BY c.CREATED_TIME DESC