|
|
@ -1,9 +1,9 @@ |
|
|
|
package com.epmet.model; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.ConcurrentHashSet; |
|
|
|
import com.alibaba.excel.context.AnalysisContext; |
|
|
|
import com.alibaba.excel.event.AnalysisEventListener; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
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.GridInfoCache; |
|
|
@ -64,6 +64,10 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
ImportGeneralDTO buildingGeneralDTO = null; |
|
|
|
Map<String, Object> buildingUnitInfos = null; |
|
|
|
List<ImportGeneralDTO> buildingUnitInfoDTOs = null; |
|
|
|
/** |
|
|
|
* 本次导入涉及到的楼宇id 用于更新住户数 |
|
|
|
*/ |
|
|
|
private Set<String> buildingIdSet = new ConcurrentHashSet<>(); |
|
|
|
|
|
|
|
private ImportInfoFormDTO formDTO; |
|
|
|
private IcBuildingDao icBuildingDao; |
|
|
@ -531,16 +535,13 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode |
|
|
|
public void doAfterAllAnalysed(AnalysisContext context) { |
|
|
|
finalDispose(); |
|
|
|
// 更新ic_building户数
|
|
|
|
/** |
|
|
|
* 2022-03-25 又根据要求,注释更新ic_building户数 |
|
|
|
*/ |
|
|
|
/*List<String> list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId()); |
|
|
|
if (!CollectionUtils.isEmpty(list)){ |
|
|
|
List<UpdateBuildingHouseNumResultDTO> houseNum = icBuildingDao.selectHouseNum(list); |
|
|
|
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()); |
|
|
@ -581,6 +582,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())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -588,6 +590,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())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|