作者 朱兆平

增加金二验放规则及金二放行指令

... ... @@ -77,7 +77,9 @@ feign.httpclient.enabled=true
# 是否启用hystrix
feign.hystrix.enabled=true
# 请求连接超时时间(毫秒)
feign.httpclient.connection-timeout=3000
feign.httpclient.connection-timeout=5000
# 设置 Hystrix 的超时时间为 5000 毫秒
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000
#logback日志配置
... ...
... ... @@ -2,6 +2,7 @@ package com.sy.feign;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextHolder;
... ... @@ -12,6 +13,17 @@ import javax.servlet.http.HttpServletRequest;
@Configuration
public class NmmsInterceptor {
/**
* 设置feign重试次数
* @return
*/
@Bean
public Retryer feignRetryer() {
// 设置最大重试次数为3次
return new Retryer.Default(1000, 5000, 3);
}
@Bean
public RequestInterceptor requestInterceptor() {
return new RequestInterceptor() {
... ...
... ... @@ -9,6 +9,7 @@ import com.sy.model.LandBusinessTypeList
import com.sy.model.LandRoadVe
import com.sy.response.ResultJson
import com.sy.service.CommandLogService
import com.sy.service.EnginCheckService
import com.sy.service.RedisService
import com.sy.service.feigin.G2X81FeignService
import com.sy.service.feigin.StationManageFeignService
... ... @@ -47,9 +48,19 @@ class G2X81Notice extends Script implements ChannelCheckScript{
*/
GatherInfo info = (GatherInfo) executeParams.get("GatherInfo");
LandRoadVe ve = (LandRoadVe) executeParams.get("LandRoadVe");
ApplicationContext context = getContext();
G2X81FeignService g2X81FeignService = context.getBean(G2X81FeignService.class);
EnginCheckService enginCheckService = context.getBean(EnginCheckService.class);
/**
* 写入本地验放通过信息
*/
enginCheckService.commandlog(info,true,"双验放:本地验放通过:等待金二验放指令",executeParams);
if (info!=null){
//缓存X21 的 seqn 需要作为异步X82回执验放时用到的信息
cacheWithSeqno(info);
... ... @@ -92,6 +103,8 @@ class G2X81Notice extends Script implements ChannelCheckScript{
commandLogService.commandlog(info,result,reason,landBusinessTypeList,null,0.0,0.0,0.0,0.0);
}
String x22TransToX81(GatherInfo gatherInfo,LandRoadVe ve){
log.info("[SEQN]-处理X21报文:{}",gatherInfo.getSeqno());
//当前时间作为X81申报时间
... ... @@ -115,15 +128,15 @@ class G2X81Notice extends Script implements ChannelCheckScript{
JSONObject yard = chanel.getJSONObject("yard");
String stationG2 = yard.getString("stationIdG2");
log.info("[G2-YARD]-{}",stationG2);
log.info("[VE-RFID-NO]:车辆电子车牌号:{}",ve.getVeCustomsNo());
log.info("[G2-TEMPLATE]-{}",G2X81Template.template)
String x81XML= G2X81Template.template.replace("#{ie_flag}",gatherInfo.getIetype())
.replace("#{area_id}",stationG2)
.replace("#{chnl_no}",channelG2)
.replace("#{session_id}",gatherInfo.getSeqno())
.replace("#{ve_license_no}",gatherInfo.getVename())
.replace("#{gross_wt}",gatherInfo.getGrosswt().toString())
.replace("#{rfid_id}",gatherInfo.getCarecno())
.replace("#{rfid_id}",ve.getVeCustomsNo())
.replace("#{ve_wt}",ve.getSelfWt())
.replace("#{operate_time}",startTime);
log.info("[X21-TO-X81]-{}",x81XML);
... ...
... ... @@ -5,11 +5,9 @@ import com.sy.model.GatherInfo;
import com.sy.model.X82Feedback;
import com.sy.service.X82Service;
import com.sy.service.router.MessageRouterG2;
import com.sy.socket.CommandClient;
import com.sy.utils.Base64Tool;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
... ...
... ... @@ -121,6 +121,14 @@ public class LandRoadVe {
private Date updateDate;
private String veState;
private String veCustomsNo;
private String icCode;
private String lockNum;
public String getVeState() {
return veState;
}
... ... @@ -129,8 +137,6 @@ public class LandRoadVe {
this.veState = veState;
}
private String veState;
public String getId() {
return id;
}
... ... @@ -602,4 +608,28 @@ public class LandRoadVe {
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getVeCustomsNo() {
return veCustomsNo;
}
public void setVeCustomsNo(String veCustomsNo) {
this.veCustomsNo = veCustomsNo;
}
public String getIcCode() {
return icCode;
}
public void setIcCode(String icCode) {
this.icCode = icCode;
}
public String getLockNum() {
return lockNum;
}
public void setLockNum(String lockNum) {
this.lockNum = lockNum;
}
}
... ...
... ... @@ -84,7 +84,7 @@ public class EnginCheckServiceImpl implements EnginCheckService {
* 核销判定需要另外执行.这里需要跳过.
*/
if (ruleChannelConfigs.get(i).ruleConfig != null && "核销判定".equals(ruleChannelConfigs.get(i).ruleConfig.getRuleType())){
return true;
continue;
}
// 执行脚本中指定的方法 changeProduct
EngineExecutorResult executorResult = engineExecutor.execute(
... ...
... ... @@ -62,6 +62,9 @@
<result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" />
<result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate" />
<result column="VE_STATE" jdbcType="VARCHAR" property="veState" />
<result column="VE_CUSTOMS_NO" jdbcType="VARCHAR" property="veCustomsNo" />
<result column="IC_CODE" jdbcType="VARCHAR" property="icCode" />
<result column="LOCK_NUM" jdbcType="VARCHAR" property="lockNum" />
</resultMap>
<sql id="Base_Column_List">
ID, EPORT_ID, MAIN_PORT, CO_CODE, VE_TARGET_NO, DOMESTIC_LISENCE_NO, DOMESTIC_LICENSE_COLOR,
... ... @@ -73,7 +76,7 @@
FRONT_45C_PIC, BACK_45C_PIC, OIL_BOX_PIC, VE_BOTTOM_PIC, MEMO, PROPOSER, PROPOSE_TIME,
VE_CLASS_FLAG, OPERATION_TYPE, TRAILER_LICENSE_NO, TRAILER_FRAME_NO, APPRO_NO_PIC,
VE_FRAME_NO_PIC, MOTOR_NO_PIC, FOREIGN_LICENSE_PIC, NATIONALITY, RETURNMESSAGE, CREATE_BY,
CREATE_DATE, UPDATE_BY, UPDATE_DATE,VE_STATE
CREATE_DATE, UPDATE_BY, UPDATE_DATE,VE_STATE,VE_CUSTOMS_NO,IC_CODE,LOCK_NUM
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
... ...
... ... @@ -47,7 +47,7 @@
- rule_config、
- rule_channel_config、
- land_business_type_config
3. 打开二维码正式环境获取接口,申请接口\取消申请接口\异常处理接口
3. 打开二维码正式环境获取接口,申请接口\取消申请接口\异常处理接口\车辆备案接口
4. 打包编译
5. 上传正式服务器
7. 备份正在运行版本
... ... @@ -73,3 +73,16 @@
- 配置业务类型管理权限
- 重新配置验放端规则信息到redis
# VER 6.1 Date:2023-08-21 周三
- 功能
## 新增金二验放规则
## 新增金二回执处理接口
## 针对双验放规则进行升级改造
## 做一线进出口业务的需要备案电子车牌信息
- 数据库
1. 车辆备案表新增电子车牌字段
- 验放服务
1. 增加熔断器配置项
# 设置 Hystrix 的超时时间为 5000 毫秒
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000
... ...