diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index bb960749f5..ebe0a4ae1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -523,7 +523,7 @@ public class HouseController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("createBatchHouseCodeAndUrl") public Result createBatchHouseCodeAndUrl(@LoginUser TokenDto loginUser) { - return houseService.createBatchHouseCodeAndUrl(loginUser); + return houseService.createBatchHouseCodeAndUrl(loginUser.getCustomerId()); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 701f164790..6316690b89 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -162,5 +162,5 @@ public interface HouseService { * @params [] * @return com.epmet.commons.tools.utils.Result */ - Result createBatchHouseCodeAndUrl(TokenDto loginUser); + Result createBatchHouseCodeAndUrl(String customerId); } 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 3887f57c1b..1bacf11513 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 @@ -987,8 +987,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override - public Result createBatchHouseCodeAndUrl(TokenDto loginUser) { - List houseList = icHouseDao.selectBatchHouseCodeAndUrl(loginUser.getCustomerId()); + public Result createBatchHouseCodeAndUrl(String customerId) { + List houseList = icHouseDao.selectBatchHouseCodeAndUrl(customerId); houseList.forEach(house->{ IcHouseEntity entity = icHouseDao.selectById(house.getHouseId()); if(StringUtils.isNotBlank(house.getAreaCode())){ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java index ed2bd8e05d..dcd75a7d99 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java @@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.enums.GenderEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -139,7 +138,7 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl getMemberDetail(IcResiUserConfirmGetDTO dto) { IcResiUserConfirmDTO result = icResiUserDao.selectMemberDetail(dto.getIcResiUserId()); if (null != result && StringUtils.isBlank(result.getGender())) { - result.setGender(GenderEnum.UN_KNOWN.getCode()); + result.setGender(""); } return new Result().ok(result); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index b167e98c14..b6e143d986 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; -import com.epmet.commons.tools.redis.common.CustomerOrgRedis; -import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -96,7 +94,9 @@ public class MyHomeServiceImpl implements MyHomeService { IcResiUserEntity icUser = icResiUserDao.selectOne(userWrapper); if (null != icUser && !icUser.getHomeId().equals(formDTO.getHomeId())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "已绑定其他房屋", "已绑定其他房屋"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "人员与房屋信息不匹配,请与工作人员联系。", + "人员与房屋信息不匹配,请与工作人员联系。"); } //进入网格(entergrid)流程 @@ -152,25 +152,6 @@ public class MyHomeServiceImpl implements MyHomeService { userResiInfoDTO.setApp("resi"); userResiInfoService.saveResiInfo(userResiInfoDTO); } - //2.添加ic_resi_user信息 - HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), formDTO.getHomeId()); - if (null == houseInfo) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); - } - AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); - if (null == agencyInfo) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取组织信息失败", "获取组织信息失败"); - } - IcResiUserEntity icUserEntity = ConvertUtils.sourceToTarget(formDTO, IcResiUserEntity.class); - icUserEntity.setName(formDTO.getSurname() + formDTO.getName()); - icUserEntity.setAgencyId(houseInfo.getAgencyId()); - icUserEntity.setPids(agencyInfo.getPids()); - if (null != icUser) { - icUserEntity.setId(icUser.getId()); - icResiUserDao.updateById(icUserEntity); - } else { - icResiUserDao.insert(icUserEntity); - } } /**