Browse Source

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

dev
zxc 4 years ago
parent
commit
e3baf10229
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java
  2. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  3. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  4. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

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

@ -13,6 +13,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
/**
*
@ -24,6 +25,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@EnableDiscoveryClient
@EnableFeignClients
@ServletComponentScan
@EnableAsync
public class GovOrgApplication {
public static void main(String[] args) {

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -63,7 +63,6 @@ import java.util.stream.Collectors;
@Slf4j
@Service
@EnableAsync
public class BuildingServiceImpl implements BuildingService {

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -74,7 +74,6 @@ import java.util.stream.Collectors;
@Slf4j
@Service
@EnableAsync
public class HouseServiceImpl implements HouseService, ResultDataResolver {

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

@ -22,7 +22,6 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -42,6 +41,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
import com.epmet.constant.ImportErrorMsgConstants;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.CustomerGridDao;
import com.epmet.dao.IcBuildingDao;
@ -50,6 +50,7 @@ import com.epmet.dao.IcPropertyManagementDao;
import com.epmet.dto.*;
import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.ImportResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.InfoByNamesResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
@ -61,6 +62,7 @@ import com.epmet.model.ImportNeighborHoodInfoListener;
import com.epmet.model.NeighborHoodInfoModel;
import com.epmet.redis.IcHouseRedis;
import com.epmet.service.*;
import com.epmet.util.ExcelPoiUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
@ -93,7 +95,6 @@ import java.util.stream.Collectors;
*/
@Slf4j
@Service
@EnableAsync
public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao, IcNeighborHoodEntity> implements IcNeighborHoodService {
@Autowired
@ -248,16 +249,13 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
ReadSheet readSheet = EasyExcel.readSheet(0).head(NeighborHoodInfoModel.class)
.registerReadListener(new ImportNeighborHoodInfoListener(formDTO,icHouseRedis,icBuildingDao,this,propertyManagementDao,epmetCommonServiceOpenFeignClient,importTask.getData().getTaskId()))
.build();
log.info("neighborhoodImport build readSheet num:{}",readSheet.getSheetNo());
excelReader.read(readSheet);
} catch (Exception e){
log.error("neighborhoodImport import exception", e);
ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO();
input.setOperatorId(formDTO.getUserId());
input.setTaskId(importTask.getData().getTaskId());
input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
Result result = epmetCommonServiceOpenFeignClient.finishImportTask(input);
log.info("neighborhoodImport finishImportTask result:{]", JSON.toJSONString(result));
epmetCommonServiceOpenFeignClient.finishImportTask(input);
} finally {
if (excelReader != null) {
excelReader.finish();

Loading…
Cancel
Save