Browse Source

Merge remote-tracking branch 'remotes/origin/wxz_resiimport_temp' into develop

# Conflicts:
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java
dev
jianjun 3 years ago
parent
commit
e17287fda5
  1. 1
      epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml
  2. 1
      epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml
  3. 1
      epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java
  5. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
  6. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

1
epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml

@ -2,7 +2,6 @@ version: "3.7"
services:
epmet-oss-server:
container_name: epmet-oss-server-dev
# image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-oss-server:0.3.2
image: 192.168.1.140:5000/epmet-cloud-dev/epmet-oss-server:version_placeholder
ports:
- "8083:8083"

1
epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml

@ -2,7 +2,6 @@ version: "3.7"
services:
epmet-oss-server:
container_name: epmet-oss-server-prod
# image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-test/epmet-oss-server:0.3.2
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-oss-server:0.3.40
ports:
- "8083:8083"

1
epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml

@ -2,7 +2,6 @@ version: "3.7"
services:
epmet-oss-server:
container_name: epmet-oss-server-test
# image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-test/epmet-oss-server:0.3.2
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-oss-server:version_placeholder
ports:
- "8083:8083"

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java

@ -9,7 +9,7 @@ public interface ImportErrorMsgConstants {
String EXIST_ERROR = "数据已存在";
String HOUSE_ERROR = "所属组织、所属网格、所属小区、所属楼栋、单元号、房屋类型、房屋用途、出租、房主姓名、房主电话、房主身份证的值未填写,或者所填写信息在系统中未找到";
String HOUSE_ERROR = "所属组织、所属网格、所属小区、所属楼栋、单元号、房屋类型、房屋用途、出租的值未填写,或者所填写信息在系统中未找到";
String BUILDING_ERROR = "所属组织、所属网格、所属小区、楼栋类型、单元数的值未填写,或者所填写信息在系统中未找到";

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java

@ -34,6 +34,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 楼栋信息
@ -178,7 +179,7 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
* @author zxc
* @date 2022/3/3 5:26 下午
*/
List<UpdateBuildingHouseNumResultDTO> selectHouseNum(@Param("ids")List<String> ids);
List<UpdateBuildingHouseNumResultDTO> selectHouseNum(@Param("ids") Set<String> ids);
/**
* Desc: 批量更新楼栋户数
@ -188,4 +189,4 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
*/
void allUpdateHouseNum(@Param("nums") List<UpdateBuildingHouseNumResultDTO> nums);
}
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -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,12 +535,12 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
public void doAfterAllAnalysed(AnalysisContext context) {
finalDispose();
// 更新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());
@ -578,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()));
}
}
@ -585,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()));
}
}

Loading…
Cancel
Save