正在显示
1 个修改的文件
包含
19 行增加
和
1 行删除
@@ -3,6 +3,7 @@ package com.sy.service.router; | @@ -3,6 +3,7 @@ package com.sy.service.router; | ||
3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
4 | import com.sy.bwAnalysis.CommandInfoAnalysis; | 4 | import com.sy.bwAnalysis.CommandInfoAnalysis; |
5 | import com.sy.bwAssist.Message; | 5 | import com.sy.bwAssist.Message; |
6 | +import com.sy.model.G2Bean; | ||
6 | import com.sy.model.GatherInfo; | 7 | import com.sy.model.GatherInfo; |
7 | import com.sy.model.LandBusinessTypeList; | 8 | import com.sy.model.LandBusinessTypeList; |
8 | import com.sy.model.CommandInfoX22; | 9 | import com.sy.model.CommandInfoX22; |
@@ -20,6 +21,14 @@ import org.springframework.stereotype.Service; | @@ -20,6 +21,14 @@ import org.springframework.stereotype.Service; | ||
20 | @Slf4j | 21 | @Slf4j |
21 | public class MessageRouterX22 implements MessageRouter { | 22 | public class MessageRouterX22 implements MessageRouter { |
22 | 23 | ||
24 | + /** | ||
25 | + * 金二与本地认证兼容性开关 | ||
26 | + * Y 是金二业务必须走金二 | ||
27 | + * N 车辆扫二维码或本地和金二都可进出区验放 | ||
28 | + */ | ||
29 | + @Autowired | ||
30 | + private G2Bean g2Bean; | ||
31 | + | ||
23 | @Autowired | 32 | @Autowired |
24 | private RedisService redisService; | 33 | private RedisService redisService; |
25 | 34 | ||
@@ -44,10 +53,14 @@ public class MessageRouterX22 implements MessageRouter { | @@ -44,10 +53,14 @@ public class MessageRouterX22 implements MessageRouter { | ||
44 | @Override | 53 | @Override |
45 | public void route(Message message) { | 54 | public void route(Message message) { |
46 | try { | 55 | try { |
47 | - log.info("处理X22:CommandInfo"); | 56 | + log.info("[X22]-处理CommandInfo;\n[switch]-G2开关状态:[{}]",g2Bean.getOnoff()); |
48 | CommandInfoAnalysis commandInfoAnalysis = new CommandInfoAnalysis(); | 57 | CommandInfoAnalysis commandInfoAnalysis = new CommandInfoAnalysis(); |
49 | CommandInfoX22 commandInfoX22 = commandInfoAnalysis.toJavaBean(message); | 58 | CommandInfoX22 commandInfoX22 = commandInfoAnalysis.toJavaBean(message); |
50 | 59 | ||
60 | + /** | ||
61 | + * 如果金二验放关闭,则不用再处理X22指令报文. | ||
62 | + */ | ||
63 | + if (g2Bean.getOnoff()) { | ||
51 | if (commandInfoX22!=null){ | 64 | if (commandInfoX22!=null){ |
52 | /** | 65 | /** |
53 | * 根据SEQNO 读取缓存 确定是否金二指令 | 66 | * 根据SEQNO 读取缓存 确定是否金二指令 |
@@ -85,6 +98,11 @@ public class MessageRouterX22 implements MessageRouter { | @@ -85,6 +98,11 @@ public class MessageRouterX22 implements MessageRouter { | ||
85 | log.info("[X22-ERROR]:未找到对应的SEQNO:[{}]及通道的过卡缓存数据,不属于金二验放指令,不进行处理",commandInfoX22.getSeqNo()); | 98 | log.info("[X22-ERROR]:未找到对应的SEQNO:[{}]及通道的过卡缓存数据,不属于金二验放指令,不进行处理",commandInfoX22.getSeqNo()); |
86 | } | 99 | } |
87 | } | 100 | } |
101 | + }else{ | ||
102 | + log.info("[X22]-金二开关状态为{}关闭,本地验放不处理X22指令.",g2Bean.getOnoff()); | ||
103 | + } | ||
104 | + | ||
105 | + | ||
88 | }catch (Exception e){ | 106 | }catch (Exception e){ |
89 | log.error("[X22-ERROR]:",e); | 107 | log.error("[X22-ERROR]:",e); |
90 | } | 108 | } |
-
请 注册 或 登录 后发表评论