From f07dc734e44dfa0832fb5050679dfdf32f4c8179 Mon Sep 17 00:00:00 2001 From: liuyunhu <3286117488@qq.com> Date: Thu, 4 Apr 2024 08:50:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=B0=83=E7=94=A8=20?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=8A=A8=E9=85=8D=E7=BD=AE=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....springframework.boot.autoconfigure.AutoConfiguration.imports | 1 + 1 file changed, 1 insertion(+) create mode 100644 couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..7a358b3 --- /dev/null +++ b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.couplet.remote.factory.RemoteVehicleFallbackFactory From ad5626f0afc6724f05359627a77570d990f401b0 Mon Sep 17 00:00:00 2001 From: lijiayao <13831655+xiao-yao-charge-forward@user.noreply.gitee.com> Date: Thu, 4 Apr 2024 08:58:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- couplet-auth/src/main/resources/bootstrap.yml | 2 - .../src/main/resources/bootstrap.yml | 2 - .../analyze/msg/model/ModelMessage.java | 2 +- .../service/impl/BreakdownServiceImpl.java | 76 +++++++++---------- .../impl/ElectronicFenceServiceImpl.java | 73 ++++++++++-------- .../service/impl/RealTimeDataServiceImpl.java | 71 +++++++++-------- ...ot.autoconfigure.AutoConfiguration.imports | 1 - .../mapper/incident/SysIncidentMapper.xml | 2 +- .../src/main/resources/bootstrap.yml | 2 - 9 files changed, 118 insertions(+), 113 deletions(-) delete mode 100644 couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/couplet-auth/src/main/resources/bootstrap.yml b/couplet-auth/src/main/resources/bootstrap.yml index 68c3c25..427f682 100644 --- a/couplet-auth/src/main/resources/bootstrap.yml +++ b/couplet-auth/src/main/resources/bootstrap.yml @@ -17,11 +17,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-gateway/src/main/resources/bootstrap.yml b/couplet-gateway/src/main/resources/bootstrap.yml index 6dc39fe..091e68a 100644 --- a/couplet-gateway/src/main/resources/bootstrap.yml +++ b/couplet-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java index 0a53f09..c992ddc 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java @@ -108,7 +108,7 @@ public class ModelMessage { }); mqttClient.subscribe("test",0); - Thread.sleep(1000*60*10); + Thread.sleep(1000*6*10); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java index 18323de..3a5ca25 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java @@ -1,38 +1,38 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import com.couplet.common.log.annotation.Log; -//import lombok.extern.log4j.Log4j2; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 故障事件 -// */ -//@Service("breakdown") -//@Log4j2 -//public class BreakdownServiceImpl implements IncidentService { -// /** -// * 故障事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// log.info("故障事件开始....."); -// log.info("故障事件结束....."); -// -// -// } -// -// /** -// * @return 获取事件名称 -// */ -// @Override -// public String getName() { -// return "breakdown"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import com.couplet.common.log.annotation.Log; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 故障事件 + */ +@Service("breakdown") +@Log4j2 +public class BreakdownServiceImpl implements IncidentService { + /** + * 故障事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("故障事件开始....."); + log.info("故障事件结束....."); + + + } + + /** + * @return 获取事件名称 + */ + @Override + public String getName() { + return "breakdown"; + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java index 50b62c2..bed51e1 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java @@ -1,33 +1,40 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 电子围栏事件服务实现类 -// */ -//@Service("electronic-fence") -//public class ElectronicFenceServiceImpl implements IncidentService { -// -// -// /** -// * 电子围栏事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// } -// -// /** -// * @return 电子围栏service 名称 -// */ -// @Override -// public String getName() { -// return "electronic-fence"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 电子围栏事件服务实现类 + */ +@Service("electronic-fence") +@Log4j2 +public class ElectronicFenceServiceImpl implements IncidentService { + + + /** + * 电子围栏事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("电子围栏事件开始......."); + log.info("电子围栏事件结束......."); + + + + } + + /** + * @return 电子围栏service 名称 + */ + @Override + public String getName() { + return "electronic-fence"; + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java index 193ac3a..971e428 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java @@ -1,33 +1,38 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 实时数据事件 -// */ -//@Service("real-time-data") -//public class RealTimeDataServiceImpl implements IncidentService { -// -// /** -// * 实时数据事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// } -// -// /** -// * 实时数据事件 -// * @return -// */ -// @Override -// public String getName() { -// return "real-time-data"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 实时数据事件 + */ +@Service("real-time-data") +@Log4j2 +public class RealTimeDataServiceImpl implements IncidentService { + + /** + * 实时数据事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("实时数据事件开始....."); + log.info("实时数据事件结束....."); + + } + + /** + * 实时数据事件 + * @return + */ + @Override + public String getName() { + return "real-time-data"; + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 210211d..0000000 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.couplet.analyze.msg.config.RabbitMQConfig diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml index 2e8d8a1..3b863a6 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml @@ -6,7 +6,7 @@ - INSERT INTO `vehicle-resolver`.`resolver_report_data` + INSERT INTO `couplet-cloud`.`couplet_msg_data` (`vin`, `create_time`, `longitude`, `latitude`, `speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`, `acceleration_pedal`, `fuel_consumption_rate`, diff --git a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml index 62d5318..aeddeaa 100644 --- a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml @@ -16,11 +16,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置 From 562deda30a19427f90c747ee69d6fa9afbd8187f Mon Sep 17 00:00:00 2001 From: liuyunhu <3286117488@qq.com> Date: Thu, 4 Apr 2024 09:43:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=B0=83=E7=94=A8=20=20=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E5=8F=98=E9=87=8F=E6=B2=A1=E6=94=B9=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E4=B8=8D=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/couplet/remote/RemoteVehicleService.java | 2 +- .../couplet/remote/factory/RemoteVehicleFallbackFactory.java | 1 + .../couplet/common/core/constant/ServiceNameConstants.java | 4 ++-- .../src/main/java/com/couplet/mq/CoupletMqApplatcaion.java | 2 +- .../{OnlineApplication.java => CoupletOnlineApplication.java} | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) rename couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/{OnlineApplication.java => CoupletOnlineApplication.java} (87%) diff --git a/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/RemoteVehicleService.java b/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/RemoteVehicleService.java index 7e8a46b..c953032 100644 --- a/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/RemoteVehicleService.java +++ b/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/RemoteVehicleService.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; @FeignClient(contextId = "remoteVehicleService" , - value = ServiceNameConstants.VEHICLE_SERVICE, + value = ServiceNameConstants.BUSINESS_SERVICE, fallbackFactory = RemoteVehicleFallbackFactory.class, path = "/vehicle" ) diff --git a/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/factory/RemoteVehicleFallbackFactory.java b/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/factory/RemoteVehicleFallbackFactory.java index 58fa254..8084062 100644 --- a/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/factory/RemoteVehicleFallbackFactory.java +++ b/couplet-common/couplet-common-business/src/main/java/com/couplet/remote/factory/RemoteVehicleFallbackFactory.java @@ -48,6 +48,7 @@ public class RemoteVehicleFallbackFactory implements FallbackFactory> findByVIN(String vin) { + log.error("车辆服务调用失败:"+cause.getMessage()); return Result.error("车辆服务调用失败:" + cause.getMessage()); } }; diff --git a/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/constant/ServiceNameConstants.java b/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/constant/ServiceNameConstants.java index ed65064..e6fc17d 100644 --- a/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/constant/ServiceNameConstants.java +++ b/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/constant/ServiceNameConstants.java @@ -26,8 +26,8 @@ public class ServiceNameConstants { * @param null: * @return null * @author 付凡芮 - * @description 车辆管理模块 + * @description couplet-business * @date */ - public static final String VEHICLE_SERVICE = "couplet-vehicle"; + public static final String BUSINESS_SERVICE = "couplet-business"; } diff --git a/couplet-modules/couplet-modules-mq/src/main/java/com/couplet/mq/CoupletMqApplatcaion.java b/couplet-modules/couplet-modules-mq/src/main/java/com/couplet/mq/CoupletMqApplatcaion.java index d1c309f..c96528a 100644 --- a/couplet-modules/couplet-modules-mq/src/main/java/com/couplet/mq/CoupletMqApplatcaion.java +++ b/couplet-modules/couplet-modules-mq/src/main/java/com/couplet/mq/CoupletMqApplatcaion.java @@ -19,6 +19,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class CoupletMqApplatcaion { public static void main(String[] args) { SpringApplication.run(CoupletMqApplatcaion.class, args); - System.out.println("获取报文、RabbitMQ模块启动成功"); + System.out.println("RabbitMQ模块启动成功"); } } diff --git a/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/OnlineApplication.java b/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/CoupletOnlineApplication.java similarity index 87% rename from couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/OnlineApplication.java rename to couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/CoupletOnlineApplication.java index e68b054..3937491 100644 --- a/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/OnlineApplication.java +++ b/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/CoupletOnlineApplication.java @@ -18,9 +18,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @EnableMyFeignClients @SpringBootApplication //@EnableFeignClients -public class OnlineApplication { +public class CoupletOnlineApplication { public static void main(String[] args) { - SpringApplication.run(OnlineApplication.class); + SpringApplication.run(CoupletOnlineApplication.class); System.out.println("车辆上线模块启动成功"); } } From 9e8106ab46dfa956bbbb49c0a84bd5dd7340cc9f Mon Sep 17 00:00:00 2001 From: lijiayao <13831655+xiao-yao-charge-forward@user.noreply.gitee.com> Date: Thu, 4 Apr 2024 09:48:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exception/analyze/AnalyzeException.java | 25 ++++++++++++ .../analyze/msg/contents/StateConstant.java | 39 +++++++++++++++++++ .../analyze/msg/model/ModelMessage.java | 3 +- .../service/impl/BreakdownServiceImpl.java | 1 + .../service/impl/RealTimeDataServiceImpl.java | 3 ++ .../mapper/incident/SysIncidentMapper.xml | 2 +- 6 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/exception/analyze/AnalyzeException.java create mode 100644 couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/contents/StateConstant.java diff --git a/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/exception/analyze/AnalyzeException.java b/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/exception/analyze/AnalyzeException.java new file mode 100644 index 0000000..d939053 --- /dev/null +++ b/couplet-common/couplet-common-core/src/main/java/com/couplet/common/core/exception/analyze/AnalyzeException.java @@ -0,0 +1,25 @@ +package com.couplet.common.core.exception.analyze; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/4 + * @Description: 解析系统统一异常 + */ +public class AnalyzeException extends RuntimeException{ + + private int code; + private String message; + + public AnalyzeException(int code, String message) { + this.code = code; + this.message = message; + } + + public AnalyzeException(String message) { + super(message); + } + + public AnalyzeException() { + + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/contents/StateConstant.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/contents/StateConstant.java new file mode 100644 index 0000000..b94c76a --- /dev/null +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/contents/StateConstant.java @@ -0,0 +1,39 @@ +package com.couplet.analyze.msg.contents; + +import org.springframework.stereotype.Component; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/4 + * @Description: + */ +@Component +public class StateConstant { + + /** + * 车辆状态 + */ + public static final Integer VEHICLE_STATUS = 0; + + /** + * 充电状态 + */ + public static final Integer CHARGING_STATUS = 0; + + /** + * 运行状态 + */ + public static final Integer OPERATING_STATUS = 0; + + /** + * soc状态 + */ + public static final Integer SOC_STATUS = 0; + + /** + * 可充电储能装置工作状态 + */ + public static final Integer CHARGING_ENERGY_STORAGE_STATUS = 0 ; + + +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java index c992ddc..2e92c39 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java @@ -2,6 +2,7 @@ package com.couplet.analyze.msg.model; import com.couplet.analyze.msg.domain.CoupletMsgData; import com.couplet.analyze.msg.service.IncidentService; +import com.couplet.common.core.exception.analyze.AnalyzeException; import com.couplet.common.core.utils.SpringUtils; import com.couplet.common.core.utils.uuid.IdUtils; import lombok.extern.slf4j.Slf4j; @@ -110,7 +111,7 @@ public class ModelMessage { Thread.sleep(1000*6*10); } catch (Exception e) { - throw new RuntimeException(e); + throw new AnalyzeException("连接断开:"+ e.getMessage()); } } diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java index 3a5ca25..721046f 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java @@ -23,6 +23,7 @@ public class BreakdownServiceImpl implements IncidentService { public void incident(CoupletMsgData coupletMsgData) { log.info("故障事件开始....."); + log.info("故障事件结束....."); diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java index 971e428..7bbcbb9 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java @@ -23,6 +23,9 @@ public class RealTimeDataServiceImpl implements IncidentService { public void incident(CoupletMsgData coupletMsgData) { log.info("实时数据事件开始....."); + + + log.info("实时数据事件结束....."); } diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml index 3b863a6..39f16ee 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml @@ -18,7 +18,7 @@ `single_battery_max_voltage`, `single_battery_min_voltage`, `single_battery_max_temperature`, `single_battery_min_temperature`, `available_battery_capacity`, `vehicle_status`, `charging_status`, - `operatingStatus`, `soc_status`, `charging_energy_storage_status`, + `operating_status`, `soc_status`, `charging_energy_storage_status`, `drive_motor_status`, `position_status`, `eas_status`, `ptc_status`, `eps_status`, `abs_status`, `mcu_status`, `heating_status`, `battery_status`, `battery_insulation_status`, `dcdc_status`, `chg_status`, `brake_pedal`)