...
|
...
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.sy.bwAnalysis.GatherInfoAnalysis;
|
|
|
import com.sy.bwAssist.Message;
|
|
|
import com.sy.mapper.LandRouterConfigDao;
|
|
|
import com.sy.model.G2Bean;
|
|
|
import com.sy.model.GatherInfo;
|
|
|
import com.sy.model.LandBusinessTypeList;
|
|
|
import com.sy.model.LandRouterConfig;
|
...
|
...
|
@@ -15,7 +16,6 @@ import com.sy.socket.CommandClient; |
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
...
|
...
|
@@ -34,8 +34,8 @@ public class MessageRouterX21 implements MessageRouter { |
|
|
* Y 是金二业务必须走金二
|
|
|
* N 车辆扫二维码或本地和金二都可进出区验放
|
|
|
*/
|
|
|
@Value("${g2.switch}")
|
|
|
private boolean g2Switch;
|
|
|
@Autowired
|
|
|
private G2Bean g2Bean;
|
|
|
|
|
|
@Resource
|
|
|
private LandRouterConfigDao landRouterConfigDao;
|
...
|
...
|
@@ -51,11 +51,10 @@ public class MessageRouterX21 implements MessageRouter { |
|
|
|
|
|
@Override
|
|
|
public void route(Message message) {
|
|
|
log.info("处理X21:gatherInfo");
|
|
|
log.info("处理X21:gatherInfo,[switch]-G2开关状态:[{}]",g2Bean.getOnoff());
|
|
|
GatherInfoAnalysis gatherInfoAnalysis = new GatherInfoAnalysis();
|
|
|
GatherInfo info = gatherInfoAnalysis.toJavaBean(message);
|
|
|
|
|
|
if (g2Switch){
|
|
|
if (g2Bean.getOnoff()){
|
|
|
//金二判断,业务类型,通道,路由目的地
|
|
|
routerCheckG2(info);
|
|
|
}else {
|
...
|
...
|
|