Browse Source

Merge branch 'feature/dev_sunjiatan'

master
zhaoqifeng 3 years ago
parent
commit
3b675b4c68
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  3. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  4. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java
  5. 25
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java

2
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());
}

2
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);
}

4
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<CreateHouseCodeAndUrlDTO> houseList = icHouseDao.selectBatchHouseCodeAndUrl(loginUser.getCustomerId());
public Result createBatchHouseCodeAndUrl(String customerId) {
List<CreateHouseCodeAndUrlDTO> houseList = icHouseDao.selectBatchHouseCodeAndUrl(customerId);
houseList.forEach(house->{
IcHouseEntity entity = icHouseDao.selectById(house.getHouseId());
if(StringUtils.isNotBlank(house.getAreaCode())){

3
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<IcResiUserConf
public Result<IcResiUserConfirmDTO> 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);
}

25
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);
}
}
/**

Loading…
Cancel
Save