zxc 4 years ago
parent
commit
1b1a0cc5ec
  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.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
/** /**
* *
@ -24,6 +25,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableFeignClients @EnableFeignClients
@ServletComponentScan @ServletComponentScan
@EnableAsync
public class GovOrgApplication { public class GovOrgApplication {
public static void main(String[] args) { 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 @Slf4j
@Service @Service
@EnableAsync
public class BuildingServiceImpl implements BuildingService { public class BuildingServiceImpl implements BuildingService {

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

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

Loading…
Cancel
Save