...
|
...
|
@@ -3,6 +3,7 @@ package com.sy.service.router; |
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.sy.bwAnalysis.CommandInfoAnalysis;
|
|
|
import com.sy.bwAssist.Message;
|
|
|
import com.sy.model.G2Bean;
|
|
|
import com.sy.model.GatherInfo;
|
|
|
import com.sy.model.LandBusinessTypeList;
|
|
|
import com.sy.model.CommandInfoX22;
|
...
|
...
|
@@ -20,6 +21,14 @@ import org.springframework.stereotype.Service; |
|
|
@Slf4j
|
|
|
public class MessageRouterX22 implements MessageRouter {
|
|
|
|
|
|
/**
|
|
|
* 金二与本地认证兼容性开关
|
|
|
* Y 是金二业务必须走金二
|
|
|
* N 车辆扫二维码或本地和金二都可进出区验放
|
|
|
*/
|
|
|
@Autowired
|
|
|
private G2Bean g2Bean;
|
|
|
|
|
|
@Autowired
|
|
|
private RedisService redisService;
|
|
|
|
...
|
...
|
@@ -44,10 +53,14 @@ public class MessageRouterX22 implements MessageRouter { |
|
|
@Override
|
|
|
public void route(Message message) {
|
|
|
try {
|
|
|
log.info("处理X22:CommandInfo");
|
|
|
log.info("[X22]-处理CommandInfo;\n[switch]-G2开关状态:[{}]",g2Bean.getOnoff());
|
|
|
CommandInfoAnalysis commandInfoAnalysis = new CommandInfoAnalysis();
|
|
|
CommandInfoX22 commandInfoX22 = commandInfoAnalysis.toJavaBean(message);
|
|
|
|
|
|
/**
|
|
|
* 如果金二验放关闭,则不用再处理X22指令报文.
|
|
|
*/
|
|
|
if (g2Bean.getOnoff()) {
|
|
|
if (commandInfoX22!=null){
|
|
|
/**
|
|
|
* 根据SEQNO 读取缓存 确定是否金二指令
|
...
|
...
|
@@ -85,6 +98,11 @@ public class MessageRouterX22 implements MessageRouter { |
|
|
log.info("[X22-ERROR]:未找到对应的SEQNO:[{}]及通道的过卡缓存数据,不属于金二验放指令,不进行处理",commandInfoX22.getSeqNo());
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
log.info("[X22]-金二开关状态为{}关闭,本地验放不处理X22指令.",g2Bean.getOnoff());
|
|
|
}
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.error("[X22-ERROR]:",e);
|
|
|
}
|
...
|
...
|
|