|
|
@ -20,6 +20,7 @@ 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; |
|
|
@ -147,6 +148,16 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
areaCode = numberAfterFillZero(areaCode, NumConstant.TWELVE); |
|
|
|
icHouseDTO.setHouseCode(createHouseCode(customerId, formDTO.getBuildingId(), areaCode)); |
|
|
|
} |
|
|
|
// 补充orgIdPath
|
|
|
|
IcNeighborHoodEntity icNeighborHoodEntity = icNeighborHoodDao.selectById(icHouseDTO.getNeighborHoodId()); |
|
|
|
if (null == icNeighborHoodEntity){ |
|
|
|
throw new EpmetException("小区不存在:"+icHouseDTO.getNeighborHoodId()); |
|
|
|
} |
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(icNeighborHoodEntity.getGridId()); |
|
|
|
if (null == gridInfo){ |
|
|
|
throw new EpmetException("网格信息不存在:"+icNeighborHoodEntity.getId()); |
|
|
|
} |
|
|
|
icHouseDTO.setOrgIdPath(gridInfo.getPids().concat(":").concat(gridInfo.getId())); |
|
|
|
icHouseDao.insert(icHouseDTO); |
|
|
|
IcHouseEntity entity = new IcHouseEntity(); |
|
|
|
entity.setId(icHouseDTO.getId()); |
|
|
|