|
|
|
@ -67,7 +67,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
/** |
|
|
|
* 本次导入涉及到的楼宇id 用于更新住户数 |
|
|
|
*/ |
|
|
|
private Set<String> buildingIdSet = new ConcurrentHashSet<>(); |
|
|
|
// private Set<String> buildingIdSet = new ConcurrentHashSet<>();
|
|
|
|
|
|
|
|
private ImportInfoFormDTO formDTO; |
|
|
|
private IcBuildingDao icBuildingDao; |
|
|
|
@ -96,6 +96,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class); |
|
|
|
dto.setNum(num); |
|
|
|
dto.setCustomerId(formDTO.getCustomerId()); |
|
|
|
info.setNum(num); |
|
|
|
if(StringUtils.isBlank(data.getAgencyName())){ |
|
|
|
nums.add(num); |
|
|
|
disposeErrorMsg(info, "所属组织的值未填写"); |
|
|
|
@ -136,7 +137,10 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
disposeErrorMsg(info, "门牌号的值未填写"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(null == data.getBuildingUnit()){ |
|
|
|
/** |
|
|
|
* 2022-03-29 需求改动,单元号修改 eg 1 改为 1单元 |
|
|
|
*/ |
|
|
|
if(StringUtils.isBlank(data.getBuildingUnit())){ |
|
|
|
nums.add(num); |
|
|
|
disposeErrorMsg(info, "单元号的值未填写"); |
|
|
|
return; |
|
|
|
@ -535,13 +539,13 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
public void doAfterAllAnalysed(AnalysisContext context) { |
|
|
|
finalDispose(); |
|
|
|
// 更新ic_building户数
|
|
|
|
if (!CollectionUtils.isEmpty(buildingIdSet)){ |
|
|
|
/*if (!CollectionUtils.isEmpty(buildingIdSet)){ |
|
|
|
List<UpdateBuildingHouseNumResultDTO> houseNum = icBuildingDao.selectHouseNum(buildingIdSet); |
|
|
|
if (!CollectionUtils.isEmpty(houseNum)){ |
|
|
|
icBuildingDao.allUpdateHouseNum(houseNum); |
|
|
|
} |
|
|
|
buildingIdSet = null; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
// 删除缓存
|
|
|
|
icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); |
|
|
|
icHouseRedis.delTemporaryCacheNeighBorHood(formDTO.getCustomerId(), formDTO.getUserId()); |
|
|
|
@ -582,7 +586,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
public void houseInsert(List<ImportGeneralDTO> houses){ |
|
|
|
if (!CollectionUtils.isEmpty(houses)){ |
|
|
|
icHouseService.insertBatch(ConvertUtils.sourceToTarget(houses, IcHouseEntity.class)); |
|
|
|
buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet())); |
|
|
|
// buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -590,7 +594,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
public void houseUpdate(List<ImportGeneralDTO> houses){ |
|
|
|
if (!CollectionUtils.isEmpty(houses)){ |
|
|
|
icHouseService.houseUpdate(houses); |
|
|
|
buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet())); |
|
|
|
// buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|