Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

dev
zxc 3 years ago
parent
commit
377c340bd0
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java
  2. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  3. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java

@ -13,7 +13,7 @@ import org.hibernate.validator.constraints.Length;
@Data
public class HouseErrorInfoModel {
@Excel(name = "行号", width = 10)
@Excel(name = "行号(不计算表头)", width = 20)
private Integer num;
@Excel(name = "所属小区", width = 20)

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

@ -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;
@ -539,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());
@ -586,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()));
}
}
@ -594,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()));
}
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -24,6 +24,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper;
import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -486,6 +487,15 @@ public class IcResiUserController implements ResultDataResolver {
} catch (IOException e) {
log.error("【导入居民信息失败】清理上传的文件失败:{}", ExceptionUtils.getErrorStackTrace(e));
}
//推送MQ事件
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg();
mqMsg.setCustomerId(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID));
//mqMsg.setIcResiUser(resiUserId);
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.IC_RESI_USER_ADD);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
}
});

Loading…
Cancel
Save