ruoyi-api/ruoyi-api-dataInterchange/src/main/java/com/ruoyi/dataInterchange/api/feignClient/UPWarnMsgOperationInfoClient.java
@@ -21,7 +21,7 @@ * @param infoId * @return */ @PostMapping("/getUPWarnMsgOperationInfo") @PostMapping("/uPWarnMsgOperationInfo/getUPWarnMsgOperationInfo") R<UPWarnMsgOperationInfoVo> getUPWarnMsgOperationInfo(@RequestParam("infoId") String infoId); } ruoyi-auth/src/main/resources/bootstrap.yml
@@ -6,8 +6,8 @@ spring: profiles: # 环境配置 active: dev # active: prod # active: dev active: prod application: # 应用名称 name: ruoyi-auth @@ -54,13 +54,13 @@ server-addr: 127.0.0.1:8848 service: ${spring.application.name} group: DEFAULT_GROUP namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos config: # 配置中心地址 server-addr: 127.0.0.1:8848 namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos group: DEFAULT_GROUP ruoyi-auth/src/main/resources/logback.xml
@@ -9,6 +9,7 @@ <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> @@ -24,6 +25,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> @@ -46,6 +48,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> ruoyi-gateway/src/main/resources/bootstrap.yml
@@ -12,8 +12,8 @@ allow-bean-definition-overriding: true profiles: # 环境配置 active: dev # active: prod # active: dev active: prod --- spring: @@ -72,13 +72,13 @@ server-addr: 127.0.0.1:8848 service: ${spring.application.name} group: DEFAULT_GROUP namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos config: # 配置中心地址 server-addr: 127.0.0.1:8848 namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos group: DEFAULT_GROUP ruoyi-gateway/src/main/resources/logback.xml
@@ -9,6 +9,7 @@ <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> @@ -24,6 +25,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> @@ -46,6 +48,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java
@@ -123,6 +123,30 @@ warn.setTreatmentState("将来处理"); break; } if(0x00 != vo.getResult() && null == warn.getTreatmentTime()){ UPWarnMsgOperationInfoVo upWarnMsgOperationInfoVo = upWarnMsgOperationInfoClient.getUPWarnMsgOperationInfo(warn.getObjectId()).getData(); if(null != upWarnMsgOperationInfoVo){ warn.setTreatmentUser(upWarnMsgOperationInfoVo.getOperator()); warn.setTreatmentTime(LocalDateTime.ofEpochSecond(upWarnMsgOperationInfoVo.getCreateTime(), 0, ZoneOffset.ofHours(8)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); switch (upWarnMsgOperationInfoVo.getMethod()) { case 0x01: warn.setTreatmentRemark("快速拍照"); break; case 0x02: warn.setTreatmentRemark("语音下发"); break; case 0x03: warn.setTreatmentRemark("不做处理"); break; case 0x04: warn.setTreatmentRemark("其他"); break; default: warn.setTreatmentRemark("其他"); break; } } } warn.setCreateTime(LocalDateTime.now()); warn.setObjectId(vo.getInfoId()); warn.setVehicleNumber(vo.getVehicleNo()); @@ -189,7 +213,7 @@ if(null == warn.getPicUrl()){ warn.setPicUrl(vo.getPicUrl()); } if(null == warn.getTreatmentTime()){ if(0x00 != vo.getResult() && null == warn.getTreatmentTime()){ UPWarnMsgOperationInfoVo upWarnMsgOperationInfoVo = upWarnMsgOperationInfoClient.getUPWarnMsgOperationInfo(warn.getObjectId()).getData(); if(null != upWarnMsgOperationInfoVo){ warn.setTreatmentUser(upWarnMsgOperationInfoVo.getOperator()); ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
@@ -12,8 +12,8 @@ allow-circular-references: true profiles: # 环境配置 active: dev # active: prod # active: dev active: prod mybatis-plus: mapper-locations: classpath:mapping/system/*.xml @@ -27,8 +27,8 @@ ip: 192.168.110.169 port: 80 output-path: F:\nginx 1.7.11.3 Gryphon\html\ --- spring: config: @@ -70,13 +70,13 @@ server-addr: 127.0.0.1:8848 service: ${spring.application.name} group: DEFAULT_GROUP namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos config: # 配置中心地址 server-addr: 127.0.0.1:8848 namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos group: DEFAULT_GROUP ruoyi-modules/ruoyi-system/src/main/resources/logback.xml
@@ -9,6 +9,7 @@ <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> @@ -24,6 +25,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> @@ -46,6 +48,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> ruoyi-service/ruoyi-dataInterchange/pom.xml
@@ -119,9 +119,10 @@ <artifactId>ruoyi-api-dataInterchange</artifactId> </dependency> <dependency> <groupId>com.hikvision.ga</groupId> <groupId>com.hikvision</groupId> <artifactId>artemis-http-client</artifactId> <version>1.1.13.RELEASE</version> <scope>system</scope> <systemPath>${project.basedir}/lib/artemis-http-client-1.1.13.RELEASE.jar</systemPath> </dependency> <!--mqtt依赖--> @@ -141,18 +142,15 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> <configuration> <fork>true</fork><!-- 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart --> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> <resources> <resource> <directory>lib</directory> <directory>${project.basedir}/lib</directory> <targetPath>/BOOT-INF/lib/</targetPath> <includes> <include>**/*.jar</include> ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/WarnMsgService.java
@@ -60,9 +60,17 @@ @Resource private UPExgMsgRealLocationDao upExgMsgRealLocationDao; //走川标的公司 private List<Integer> enterprise = Arrays.asList(17458936, 43984060, 13914394); //固定报警类型 private List<Integer> warnType = Arrays.asList(0x0201, 0x0202, 0x0301, 0x000B, 0x0012, 0x0203, 0x0208, 0x0002, 0x0211, 0x0212, 0x0214, 0x0213, 0x0215, 0x0217, 0x0307); private List<Integer> enterprise = Arrays.asList(17458936,13914394,43984060,25439966); //富临报警类型 private List<Integer> fl_warnType = Arrays.asList(0x0201, 0x0012, 0x0202, 0x0203, 0x0208, 0x0002, 0x0212, 0x0214, 0x0213, 0x0215, 0x0217); //均辉报警类型 private List<Integer> jh_warnType = Arrays.asList(0x0201, 0x0012, 0x0202, 0x0203, 0x0208, 0x0002, 0x0212, 0x0214, 0x0213, 0x0215, 0x0217, 0x0307); //出租车报警类型 private List<Integer> cz_warnType = Arrays.asList(0x0001, 0x0005); //公交报警类型 private List<Integer> gj_warnType = Arrays.asList(0x0002, 0x0212, 0x0214, 0x0213, 0x0215, 0x0217, 0x0001); //平安报警类型 private List<Integer> pa_warnType = Arrays.asList(0x0201, 0x0012, 0x0202, 0x0208, 0x0002, 0x0212, 0x0214, 0x0213, 0x0215, 0x0217, 0x0307); public void up_warn_msg(ChannelHandlerContext ctx, OuterPacket out) { @@ -147,8 +155,31 @@ */ public void up_warn_msg_adpt_info(ChannelHandlerContext ctx, int inferiorPlatformId, WarnMsg warnMsg) { UPWarnMsgAdptInfo upWarnMsgAdptInfo = enterprise.contains(inferiorPlatformId) ? new UPWarnMsgAdptInfo().decode2(warnMsg) : new UPWarnMsgAdptInfo().decode1(warnMsg); if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; switch (inferiorPlatformId) { case 17458936: if(!fl_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } case 43984060: if(!jh_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } case 17235341: if(!cz_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } case 82296583: if(!cz_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } case 25439966: if(!gj_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } case 13914394: if(!pa_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } } upWarnMsgAdptInfo.setResult(0x00); upWarnMsgAdptInfo.setInferiorPlatformId(inferiorPlatformId); @@ -377,7 +408,7 @@ upWarnMsgAdptInfo.setInfoContent(data.getAlarmInfo()); upWarnMsgAdptInfo.setInferiorPlatformId(25439966); upWarnMsgAdptInfo.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8))); if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){ if(!gj_warnType.contains(upWarnMsgAdptInfo.getWarnType())){ return; } upWarnMsgAdptInfo.setResult(0x00); ruoyi-service/ruoyi-dataInterchange/src/main/resources/bootstrap.yml
@@ -12,8 +12,8 @@ allow-circular-references: true profiles: # 环境配置 active: dev # active: prod # active: dev active: prod --- spring: @@ -56,13 +56,13 @@ server-addr: 127.0.0.1:8848 service: ${spring.application.name} group: DEFAULT_GROUP namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos config: # 配置中心地址 server-addr: 127.0.0.1:8848 namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a namespace: 80fe0aae-8657-48b0-a9bc-95405f5dacdc username: nacos password: nacos group: DEFAULT_GROUP ruoyi-service/ruoyi-dataInterchange/src/main/resources/logback.xml
@@ -9,6 +9,7 @@ <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> @@ -24,6 +25,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 --> @@ -46,6 +48,7 @@ </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> <charset>UTF-8</charset> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <!-- 过滤的级别 -->