|
|
@ -1100,8 +1100,18 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
|
|
|
|
houses2Dispose.stream().forEach(h -> { |
|
|
|
IcNeighborHoodDTO neighborhood = neighborHoodService.get(h.getNeighborHoodId()); |
|
|
|
if (neighborhood == null) { |
|
|
|
log.warn("为house初始化orgIdPath失败,指定ID的小区未找到。小区id:{}, 房屋id:{}", h.getNeighborHoodId(), h.getId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
ArrayList<String> pidList = new ArrayList<>(); |
|
|
|
recureAppendParentAgencyId(neighborhood.getAgencyId(), pidList); |
|
|
|
try { |
|
|
|
recureAppendParentAgencyId(neighborhood.getAgencyId(), pidList); |
|
|
|
} catch (Exception e) { |
|
|
|
String errorMsg = ExceptionUtils.getErrorStackTrace(e); |
|
|
|
log.warn(errorMsg); |
|
|
|
return; |
|
|
|
} |
|
|
|
String orgIdPath = String.join(":", pidList); |
|
|
|
|
|
|
|
// 更新
|
|
|
@ -1122,6 +1132,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
|
private void recureAppendParentAgencyId(String agencyId, List result) { |
|
|
|
result.add(0, agencyId); |
|
|
|
CustomerAgencyEntity agency = customerAgencyDao.selectById(agencyId); |
|
|
|
if (agency == null) { |
|
|
|
throw new EpmetException(String.format("为house初始化orgIdPath失败,agency为号到。agencyId:%s", agencyId)); |
|
|
|
} |
|
|
|
String pid = agency.getPid(); |
|
|
|
if (StringUtils.isBlank(pid) || "0".equals(pid)) { |
|
|
|
return; |
|
|
|