diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java index ea570175ef..4678542a56 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class AdminApplication { public static void main(String[] args) { diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-auth/src/main/java/com/epmet/AuthApplication.java b/epmet-auth/src/main/java/com/epmet/AuthApplication.java index 2c14a7792b..0bf685bd5b 100644 --- a/epmet-auth/src/main/java/com/epmet/AuthApplication.java +++ b/epmet-auth/src/main/java/com/epmet/AuthApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan // 开启Servlet容器扫描,扫描@WebFilter等注解 +@ServletComponentScan(basePackages = "com.epmet") // 开启Servlet容器扫描,扫描@WebFilter等注解 public class AuthApplication { public static void main(String[] args) { diff --git a/epmet-auth/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-auth/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-auth/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-auth/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java index 8c42570bc3..95741eb813 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java @@ -14,6 +14,7 @@ import java.util.List; public class OptionResultDTO implements Serializable { private static final long serialVersionUID = 8618231166600518980L; private String label; + private String code; private String value; private String pValue; private String sysDictDataId; diff --git a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java index 064b59610e..cf7493a300 100644 --- a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java +++ b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java @@ -27,7 +27,7 @@ import org.springframework.context.annotation.FilterType; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -//@ServletComponentScan +//@ServletComponentScan(basePackages = "com.epmet") @ComponentScan(basePackages = {"com.epmet.*"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {RedissonConfig.class, ThreadDispatcherConfig.class, ServletExceptionHandler.class})) public class GatewayApplication { diff --git a/epmet-gateway/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-gateway/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-gateway/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-gateway/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java index 5e8d7c4788..a3eac596ae 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java @@ -10,7 +10,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication(scanBasePackages = {"com.epmet"}, exclude = {DataSourceAutoConfiguration.class}) @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class DataAggregatorApplication { public static void main(String[] args) { SpringApplication.run(DataAggregatorApplication.class, args); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/config/NacosServiceListListenerRegisterer.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/config/NacosServiceListListenerRegisterer.java index 800f23a357..036f1e0189 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java index 3fccfa8b6e..f6c1856a1a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java @@ -11,7 +11,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @EnableDiscoveryClient @EnableFeignClients @EnableAsync -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class DataReportApplication { public static void main(String[] args) { SpringApplication.run(DataReportApplication.class, args); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/NacosServiceListListenerRegisterer.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/NacosServiceListListenerRegisterer.java index 915724e664..d89aeb1f67 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java index 4a572b4889..15bb6ee2a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java @@ -12,7 +12,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @EnableFeignClients @SpringBootApplication (exclude = {DataSourceAutoConfiguration.class}) @EnableAsync -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class DataStatsApplication { public static void main(String[] args) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java index 46ee097f8d..a70a296b59 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java +++ b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java @@ -26,7 +26,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; }) @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ActivitiApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java index 486ac4bf21..76b6eb744b 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class EpmetCommonServiceApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index c14a7efa4d..98da5bf4d4 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java index 5e83208c30..ba87427ca1 100644 --- a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java +++ b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class DemoApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java index 04b9410c8b..a14d433a84 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java @@ -9,7 +9,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class EpmetExtApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java index 38a41f919e..236d81d8d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java @@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class EpmetHeartApplication { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java index 5f4ba905ef..b9fdb8722e 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class JobApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java index 9affe3659b..5a2a928d7a 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java @@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class MessageApplication { diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java index 3600e58cd3..c8598e45cc 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class OssApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java index 79d5713a34..7315813d90 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java @@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class EpmetPointApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java index 3a7ba889a3..3efd642c87 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java @@ -12,7 +12,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class EpmetThirdApplication { public static void main(String[] args) { diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java index 6068061b0b..edd7756e54 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java @@ -13,7 +13,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") //@EnableConfigurationProperties(value = {DatabaseProperties.class}) public class GovAccessApplication { public static void main(String[] args) { diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java index 6190a7c4c0..911e42f59a 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java @@ -17,6 +17,7 @@ package com.epmet.redis; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; @@ -25,6 +26,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; import java.util.List; @@ -46,7 +48,7 @@ public class GovCustomerMenuRedis { * @see com.epmet.enums.MenuTypeEnum */ public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS) { - if (checkParam(customerId, type)) { + if (checkParam(customerId, type) && !CollectionUtils.isEmpty(govMenuDTOS) && StringUtils.isNotBlank(govMenuDTOS.get(NumConstant.ZERO).getName())) { String key = RedisKeys.getCustomerMenuList(customerId, type); redisUtils.set(key, govMenuDTOS, RedisUtils.DEFAULT_EXPIRE); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java index 875c62f1eb..04d6c9d7e5 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java @@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class GovGridApplication { public static void main(String[] args) { diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java index ef94eca399..fd9e212221 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java @@ -14,7 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class GovIssueApplication { public static void main(String[] args) { SpringApplication.run(GovIssueApplication.class, args); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java index 5dad0a50c8..a6c36c40e8 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java @@ -9,7 +9,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class GovMineApplication { public static void main(String[] args) { diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } 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 348a7b67b0..3dda2f6217 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 @@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class GovOrgApplication { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java index 1d54c3c314..2c764b63db 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java @@ -9,12 +9,17 @@ public interface ImportErrorMsgConstants { String EXIST_ERROR = "数据已存在"; - String HOUSE_ERROR = "所属组织、所属网格、所属小区、所属楼栋、单元号、房屋类型、房屋用途、出租的值未填写,或者所填写信息在系统中未找到"; + String DOCUMENT_EXIST_ERROR = "文件中存在重复数据"; - String BUILDING_ERROR = "所属组织、所属网格、所属小区、楼栋类型、单元数的值未填写,或者所填写信息在系统中未找到"; + String BELONG_GRID_ERROR = "所属网格的值未填写或者所填写信息在系统中未找到"; - String NEIGHBOR_HOOD_ERROR = "所属组织、所属网格、详细地址的值未填写,或者所填写信息在系统中未找到"; + String BELONG_AGENCY_ERROR = "所属组织的值未填写或者所填写信息在系统中未找到"; + String HOUSE_TYPE_ERROR = "房屋类型的值未填写或者所填写信息在系统中未找到"; + + String BUILDING_TYPE_ERROR = "楼栋类型的值未填写或者所填写信息在系统中未找到"; + + String NEIGHBORHOOD_TYPE_ERROR = "小区名称的值未填写或者所填写信息在系统中未找到"; String HOUSE_ERROR_NAME = "导入失败的列表-房屋"; String BUILDING_ERROR_NAME = "导入失败的列表-楼栋"; String NEIGHBORHOOD_ERROR_NAME = "导入失败的列表-小区"; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 7451f1f996..47681e15d1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -30,6 +30,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import static com.epmet.constant.ImportErrorMsgConstants.*; + /** * @Author zxc * @DateTime 2022/2/15 10:06 上午 @@ -117,7 +119,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener=unit){ - //新增单元 - List unitList = new ArrayList<>(); - for(int i =unit ;i units = icBuildingUnitService.getUnitOptions(icBuilding.getId()); + Map unitMap = units.stream().collect(Collectors.toMap(OptionResultDTO::getCode, OptionResultDTO::getLabel)); + List unitList = new ArrayList<>(); + for (int i = 1; i <= nowUnit; i++) { + String unitNum = String.valueOf(i); + if (!unitMap.containsKey(unitNum)) { + IcBuildingUnitEntity icBuildingUnit = new IcBuildingUnitEntity(); icBuildingUnit.setBuildingId(icBuilding.getId()); icBuildingUnit.setCustomerId(customerId); - icBuildingUnit.setUnitName((i + 1) +"单元"); - icBuildingUnit.setUnitNum(String.valueOf(i+1)); + icBuildingUnit.setUnitName(unitNum + "单元"); + icBuildingUnit.setUnitNum(unitNum); unitList.add(icBuildingUnit); } icBuildingUnitService.insertBatch(unitList); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java index ae1fd471a9..2e800bbda5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java @@ -128,6 +128,7 @@ public class IcBuildingUnitServiceImpl extends BaseServiceImpl { OptionResultDTO dto = new OptionResultDTO(); dto.setValue(item.getId()); + dto.setCode(item.getUnitNum()); dto.setLabel(item.getUnitName()); return dto; }).collect(Collectors.toList()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java index 47fa0b89ac..ce723e7f97 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java @@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @EnableDiscoveryClient @EnableFeignClients @EnableAsync -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class GovProjectApplication { public static void main(String[] args) { SpringApplication.run(GovProjectApplication.class, args); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java index 630690be40..8721b47429 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java @@ -15,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @EnableDiscoveryClient @EnableFeignClients @EnableAsync -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class GovVoiceApplication { public static void main(String[] args) { SpringApplication.run(GovVoiceApplication.class, args); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/OpenDataApplication.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/OpenDataApplication.java index c786abb9ba..8332bdca9e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/OpenDataApplication.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/OpenDataApplication.java @@ -18,7 +18,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") //@ComponentScan(value = { "com.epmet" }) public class OpenDataApplication { public static void main(String[] args) { diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/config/NacosServiceListListenerRegisterer.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/config/NacosServiceListListenerRegisterer.java index 33aa03c9ab..baa6dc0a57 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/task/ExtractBizDataToOpenData.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/task/ExtractBizDataToOpenData.java index ebcd5aa27d..bed579f907 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/task/ExtractBizDataToOpenData.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/task/ExtractBizDataToOpenData.java @@ -48,10 +48,11 @@ public class ExtractBizDataToOpenData { do { //StrConstant.PY_ROOT_AGENCY patrolCountResult = griderOnlineNumService.insertData(StrConstant.PY_ROOT_AGENCY); - if (!patrolCountResult) { + //如果成功 则跳出循环 + if (patrolCountResult) { break; } - //如果 重试次数为1了 就让歇个 5分钟 + //如果失败 待重试次数剩为1时 就让歇个 5分钟 if (retryTime == 1) { Thread.sleep(NumConstant.FIVE * NumConstant.SIXTY * NumConstant.ONE_THOUSAND); } @@ -59,7 +60,8 @@ public class ExtractBizDataToOpenData { if (!patrolCountResult) { log.error("插入网格员在线人数失败,请检查原因,时间:{}", currentTime); } - + //休眠10s + Thread.sleep( NumConstant.TEN * NumConstant.ONE_THOUSAND); } catch (Exception e) { log.warn("tryLock method extractGridMemberPatrollingCount fail"); } finally { diff --git a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java index 4f8a0d8279..a45df8b18d 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java +++ b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java @@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class OperAccessApplication { public static void main(String[] args) { SpringApplication.run(OperAccessApplication.class, args); diff --git a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java index 37d5036585..b0f6a32087 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class OperCrmApplication { public static void main(String[] args) { diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java index d69216a53d..8b60526acf 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class OperCustomizeApplication { public static void main(String[] args) { diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java index eafe96e728..0e3a138491 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java @@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class ResiGroupApplication { diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java index 204b468868..10351a6ae1 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ResiGuideApplication { public static void main(String[] args) { diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java index c8d91862ce..ac372c5b99 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java @@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ResiHallApplication { public static void main(String[] args) { diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java index 43f8938fc8..3b760c667b 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java +++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java @@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ResiHomeApplication { public static void main(String[] args) { diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java index f179e70961..a07559c90c 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java @@ -23,7 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ResiMineApplication { public static void main(String[] args) { diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java index 2ddef94968..74e592b898 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java @@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") @EnableAsync public class ResiPartyMemberApplication { diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java index 8dcdc0c704..e39d5ff738 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java +++ b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java @@ -14,7 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ResiVoiceApplication { public static void main(String[] args) { SpringApplication.run(ResiVoiceApplication.class, args); diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java index 7b088fe970..1efda9e506 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java @@ -22,7 +22,7 @@ import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan(basePackages = "com.epmet") -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class ScanApplication { public static void main(String[] args) { diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/NacosServiceListListenerRegisterer.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/NacosServiceListListenerRegisterer.java index a2de9963fa..6de20ad631 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/NacosServiceListListenerRegisterer.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java index cee27d28b8..cb87edbc15 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java @@ -68,7 +68,7 @@ public class ScanController { /** * @description 语音异步检测 - * @Date 2020/12/9 9:14 + * @Date 2020/12/9 9:14 **/ @PostMapping("voiceAsyncScan") public Result voiceAsyncScan(@RequestBody VoiceAsyncScanParam param){ @@ -80,7 +80,7 @@ public class ScanController { * @param taskIds 要查询的异步检测任务的taskId列表。数组中的元素个数不超过100个 * @author yinzuomei * @description 语音异步检测结果查询 - * @Date 2020/12/9 11:16 + * @Date 2020/12/9 11:16 **/ @PostMapping("voiceResults") public Result> voiceResults(@RequestBody List taskIds){ diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml b/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml index fb1ff2cf82..49b85a6b0c 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/logback-spring.xml @@ -142,9 +142,8 @@ - - + diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java index caf839f79a..4f9b736afb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java @@ -26,7 +26,7 @@ import org.springframework.scheduling.annotation.EnableAsync; @EnableDiscoveryClient @EnableFeignClients @EnableAsync -@ServletComponentScan +@ServletComponentScan(basePackages = "com.epmet") public class UserApplication { public static void main(String[] args) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java index 2c5aee3369..da054b5052 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java @@ -105,7 +105,7 @@ public class NacosServiceListListenerRegisterer { public void onEvent(Event event) { if (event instanceof NamingEvent) { NamingEvent namingEvent = (NamingEvent) event; - log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); + log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); doRefreshServerList(service); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 722fb93cd2..ee23c3f7d1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -75,10 +75,17 @@ import java.util.stream.Collectors; @Service public class IcResiUserImportServiceImpl implements IcResiUserImportService, ResultDataResolver { + public static final List controlGroup1 = Arrays.asList("input", "textarea", "datepicker", "daterange"); + public static final List controlGroup2 = Arrays.asList("select", "radio"); + /** * 身份证号列序号 */ public static final Integer ID_CARD_COLUMN_NO = 9; + /** + * 姓名列序号 + */ + public static final Integer ID_NAME_COLUMN_NO = 6; // 错误和跳过excel行暂存 public static final ThreadLocal>> errorRows = new ThreadLocal<>(); @@ -163,9 +170,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private Integer required; private List colIndex; //private List colContents; - // 单元格内容 + // 单元格内容。多选框没有该列,因为多选框对应着excel的多列 private String cellContent; - // 数据库中列的值 + // 单元格内容对应的数据库中值 private String colValue; // key:label,value:value @@ -425,11 +432,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res try { convertColumnWrappers2Map4Persist(itemIdAndColumnWrapper, row, currUserAgencyId, checkBoxOptionColumnIdxAndLabel, columnAndValues, true); - String idCard = columnAndValues.get("ID_CARD"); - // 执行指定的检查 specifiedCheck(columnAndValues); + String idCard = columnAndValues.get("ID_CARD"); Map existingResiMap = icResiUserDao.selectResiInfoMap(idCard, null); if (existingResiMap == null) { @@ -596,7 +602,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res if (resiName == null) { resiName = ""; } - throw new RenException(EpmetErrorCode.IDCARDNO_ERROR.getCode(), String.format("用户【%s】身份证号未填写或格式错误", resiName)); + throw new RenException(EpmetErrorCode.IDCARDNO_ERROR.getCode(), String.format("居民【%s】身份证号未填写或格式错误", resiName)); } // 检查用户是否存在 @@ -719,111 +725,195 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res /** * 将当前行数据转化成LinkedHashMap,供后续插入 - * @param itemIdAndColumnWrappers 当前行的ColumnWrapper,每一个ColumnWrapper元素都是当前行中的一个列,key:itemId + * @param dbMetadataItemIdAndColumnWrappers 当前行的ColumnWrapper,每一条都是数据库中的一个列的源数据,对应到excel中可能是多个列(多选)。每一个ColumnWrapper元素都是当前行中的一个列,key:itemId * @param row 当前行数据 * @param currUserAgencyId 当前用户所属机构ID * @param checkBoxOptionColumnIdxAndLabel 复选框options列表。key:列号,value:复选框中文 - * @param target 要将数据放到哪个对象中 + * @param target2Insert 要用来insert到db的数据 * @param isPrimaryTable 是否是主表 */ - private void convertColumnWrappers2Map4Persist(Map itemIdAndColumnWrappers, Map row, + private void convertColumnWrappers2Map4Persist(Map dbMetadataItemIdAndColumnWrappers, Map row, String currUserAgencyId, Map checkBoxOptionColumnIdxAndLabel, - LinkedHashMap target, boolean isPrimaryTable) { + LinkedHashMap target2Insert, boolean isPrimaryTable) { - boolean interupt = false; + // 本行中是否有必填但未填,或者填了但填错了系统中找不到的列,那后面的数据可能就没办法通过前面填写的值去关联查询,因此只做必填检查,提示出来就行了,仁至义尽 + boolean hasError = false; - List errorColumnNames = new LinkedList<>(); + String notFoundColumnName = null; + List emptyColumnNames = new ArrayList<>(); - for (Map.Entry itemIdAndColumnWrapper : itemIdAndColumnWrappers.entrySet()) { + // 这两列要提前放进去,因为有的列未填写的话,会抛异常出去,需要用这两列来做描述 + target2Insert.put("ID_CARD", row.get(ID_CARD_COLUMN_NO)); + target2Insert.put("NAME", row.get(ID_NAME_COLUMN_NO)); - String itemId = itemIdAndColumnWrapper.getKey(); - ColumnWrapper columnWrapper = itemIdAndColumnWrapper.getValue(); + for (Map.Entry dbColumnMetadata : dbMetadataItemIdAndColumnWrappers.entrySet()) { - if ("input".equals(columnWrapper.getItemType()) - || "textarea".equals(columnWrapper.getItemType()) - || "datepicker".equals(columnWrapper.getItemType()) - || "daterange".equals(columnWrapper.getItemType()) - ) { + String currentItemId = dbColumnMetadata.getKey(); + ColumnWrapper columnWrapper = dbColumnMetadata.getValue(); + // "input", "textarea", "datepicker", "daterange" + if (controlGroup1.contains(columnWrapper.getItemType())) { + + // 输入的控件,不会横跨多个单元格,所以只取一列就可以了 String cellContent = row.get(columnWrapper.getColIndex().get(0)); + columnWrapper.setCellContent(cellContent); columnWrapper.setColValue(cellContent); - } else if ("select".equals(columnWrapper.getItemType()) - || "radio".equals(columnWrapper.getItemType())){ + // 必填检查 + boolean hasEmptyError = requiredButEmptyCheck(isPrimaryTable, columnWrapper); + if (hasEmptyError) { + emptyColumnNames.add(columnWrapper.combinedLabel); + hasError = true; + continue; + } + + if (hasError) { + continue; + } + + // "select", "radio" + } else if (controlGroup2.contains(columnWrapper.getItemType())){ - String optionSourceType = columnWrapper.getOptionSourceType(); // 取单元格的内容 String cellContent = row.get(columnWrapper.getColIndex().get(0)); columnWrapper.setCellContent(cellContent); - if ("local".equals(optionSourceType)) { + // 必填检查 + boolean hasEmptyError = requiredButEmptyCheck(isPrimaryTable, columnWrapper); + if (hasEmptyError) { + emptyColumnNames.add(columnWrapper.combinedLabel); + hasError = true; + continue; + } + + if (hasError) { + continue; + } + + if ("local".equals(columnWrapper.getOptionSourceType())) { // 根据单元格内容,取到指定的option - Map options = columnWrapper.getOptions(); - String colValue = options.get(cellContent); + Map itemOptions = columnWrapper.getOptions(); + String colValue = itemOptions.get(cellContent); columnWrapper.setColValue(colValue); } else { - // remote类型。优先从缓存取 String fullUri = columnWrapper.getOptionSourceValue(); String[] uriParts = splitOptionSourceUrl(fullUri); String pureUri = uriParts[0]; String superItemId = uriParts[1]; - String superColumValue; + String superColumnValue; + // 获取父item的值 if (StringUtils.isNotBlank(superItemId)) { - superColumValue = itemIdAndColumnWrappers.get(superItemId).getColValue(); + superColumnValue = dbMetadataItemIdAndColumnWrappers.get(superItemId).getColValue(); } else { - superColumValue = "-"; + superColumnValue = "-"; } - Map> superOptions = itemIdAndOptionsCache.getIfPresent(itemId); + // 通过接口调用,计算出colValue,放到columnWrapper中 + Map> superOptions = itemIdAndOptionsCache.getIfPresent(currentItemId); if (superOptions != null && superOptions.size() > 0) { - Map options = superOptions.get(superColumValue); + Map options = superOptions.get(superColumnValue); if (options == null || options.size() == 0) { - options = listRemoteOptions(pureUri, superItemId, itemIdAndColumnWrappers, currUserAgencyId, "saveorupdate"); - superOptions.put(superColumValue, options); + options = listRemoteOptions(pureUri, superItemId, dbMetadataItemIdAndColumnWrappers, currUserAgencyId, "saveorupdate"); + superOptions.put(superColumnValue, options); } String colValue = options.get(cellContent); columnWrapper.setColValue(colValue); } else { - Map options = listRemoteOptions(pureUri, superItemId, itemIdAndColumnWrappers, currUserAgencyId, "saveorupdate"); + // 父item的options。例如当前遍历的是小区列,那查出来的就是网格下的小区 + // 然后把 > 放到缓存里 + Map options = listRemoteOptions(pureUri, superItemId, dbMetadataItemIdAndColumnWrappers, currUserAgencyId, "saveorupdate"); superOptions = new HashMap<>(); - superOptions.put(superColumValue, options); - itemIdAndOptionsCache.put(itemId, superOptions); + superOptions.put(superColumnValue, options); + itemIdAndOptionsCache.put(currentItemId, superOptions); String colValue = options.get(cellContent); columnWrapper.setColValue(colValue); } } } else if ("checkbox".equals(columnWrapper.getItemType())) { + //多选框没有具体的cellContent,因为多选框对应着excel的多列。并且复选框,为空就是否,所以不需要做必填检查 String checkBoxColValue = getCheckBoxColValue(columnWrapper, row, checkBoxOptionColumnIdxAndLabel); columnWrapper.setColValue(checkBoxColValue); - } - // requiredColumns中的值不在排除字段中 && 是必填 && 未填写 - if (isPrimaryTable) { - // 主表没有需要排除的列 - if (columnWrapper.getRequired() == 1 && StringUtils.isBlank(columnWrapper.colValue)) { - interupt = true; - errorColumnNames.add(columnWrapper.combinedLabel); - } - } else { - // 从表需要排除掉一些不必要校验的列 - if (!subTableNeedlessColumns.contains(columnWrapper.columnName) - && columnWrapper.getRequired() == 1 - && StringUtils.isBlank(columnWrapper.colValue)) { - interupt = true; - errorColumnNames.add(columnWrapper.combinedLabel); + if (hasError) { + continue; } } - target.put(columnWrapper.columnName, columnWrapper.colValue); + // 填了,但找不到对应数据的检查 + boolean hasNotFoundError = notFoundCheck(isPrimaryTable, columnWrapper); + if (hasNotFoundError) { + notFoundColumnName = columnWrapper.combinedLabel; + hasError = true; + } + + target2Insert.put(columnWrapper.columnName, columnWrapper.colValue); + } + + if (hasError) { + StringBuilder sb = new StringBuilder(); + + // 组织报错信息 + if (CollectionUtils.isNotEmpty(emptyColumnNames)) { + sb.append(String.join(",", emptyColumnNames)).append("的值未填写;"); + } + + if (StringUtils.isNotBlank(notFoundColumnName)) { + sb.append(notFoundColumnName).append("填写的值在系统中未找到"); + } + + throw new EpmetException(sb.toString()); + } + } + + /** + * 必填,但是用户没填的,放到list中 + * @param isPrimaryTable 是否是主表。true:是主表,false:从表 + * @param columnWrapper 数据库列包装对象 + */ + public boolean requiredButEmptyCheck(Boolean isPrimaryTable, ColumnWrapper columnWrapper) { + // requiredColumns中的值不在排除字段中 && 是必填 && 未填写 + if (isPrimaryTable) { + // 主表没有需要排除的列 + if (columnWrapper.getRequired() == 1 && StringUtils.isBlank(columnWrapper.cellContent)) { + return true; + } + } else { + // 从表需要排除掉一些不必要校验的列 + if (!subTableNeedlessColumns.contains(columnWrapper.columnName) + && columnWrapper.getRequired() == 1 + && StringUtils.isBlank(columnWrapper.cellContent)) { + return true; + } } - if (interupt) { - throw new RenException(String.join(",", errorColumnNames) + "的值未填写,或者所填写信息在系统中未找到"); + return false; + } + + /** + * 必填,并且在系统中没找到值的,放到list中 + * @param isPrimaryTable 是否是主表。true:是主表,false:从表 + * @param columnWrapper 数据库列包装对象 + */ + public boolean notFoundCheck(Boolean isPrimaryTable, ColumnWrapper columnWrapper) { + // requiredColumns中的值不在排除字段中 && 是必填 && 未填写 + if (isPrimaryTable) { + // 主表没有需要排除的列 + if (columnWrapper.getRequired() == 1 && StringUtils.isBlank(columnWrapper.colValue)) { + return true; + } + } else { + // 从表需要排除掉一些不必要校验的列 + if (!subTableNeedlessColumns.contains(columnWrapper.columnName) + && columnWrapper.getRequired() == 1 + && StringUtils.isBlank(columnWrapper.colValue)) { + return true; + } } + return false; } /** diff --git a/pom.xml b/pom.xml index 2a30af4cf9..ff15bf358e 100644 --- a/pom.xml +++ b/pom.xml @@ -97,11 +97,6 @@ - public aliyun nexus @@ -110,6 +105,11 @@ true + + epmet + maven-releases + https://nexus.elinkservice.cn/repository/maven-releases/ + @@ -124,5 +124,11 @@ + + + epmet + https://nexus.elinkservice.cn/repository/maven-releases/ + +