From 1b1a0cc5ecb2fb622853fb285824aa0a9afdac8d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Mar 2022 16:47:01 +0800 Subject: [PATCH] @EnableAsync --- .../src/main/java/com/epmet/GovOrgApplication.java | 2 ++ .../com/epmet/service/impl/BuildingServiceImpl.java | 1 - .../java/com/epmet/service/impl/HouseServiceImpl.java | 1 - .../epmet/service/impl/IcNeighborHoodServiceImpl.java | 10 ++++------ 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java index ff43e6542c..348a7b67b0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java +++ b/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) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index 7d3bbe9602..091ef5dd1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/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 { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index fa623a8950..6130bd49c1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/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 @Service -@EnableAsync public class HouseServiceImpl implements HouseService, ResultDataResolver { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 5a42822c69..a615372862 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/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 implements IcNeighborHoodService { @Autowired @@ -248,16 +249,13 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl