作者 朱兆平

涉及综保区调拨业务的关锁通知及所有货物类型的重量验放,综保区不通知关锁可自动抬杆放行

... ... @@ -4,7 +4,7 @@
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration scan="true" scanPeriod="10 seconds">
<configuration scan="true" scanPeriod="60 seconds">
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
... ... @@ -54,7 +54,8 @@
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<maxHistory>5</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
... ... @@ -81,7 +82,8 @@
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<maxHistory>5</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
... ... @@ -108,6 +110,7 @@
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
... ... @@ -117,6 +120,33 @@
</filter>
</appender>
<!-- 时间滚动输出 level为 trace 日志 -->
<appender name="TRACE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_trace.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/trace/log-trace-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>5</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
</rollingPolicy>
<!-- 此日志文件只记录trace级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>TRACE</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
... ... @@ -134,7 +164,8 @@
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<maxHistory>5</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
... ... @@ -176,6 +207,7 @@
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
<appender-ref ref="TRACE_FILE" />
</root>
</configuration>
... ...
... ... @@ -230,7 +230,7 @@ public class GatherInfoHandle implements GatherInfoService {
inStationInfo(); //入场信息获取
setListinfos(); //流转申请表体获取
if (goodsWhiteListCheck()){ //货物类型白名单
if (goodsWhiteListCheck() && !"调拨业务".equals(landBusinessTypeList.getBusinesstype()) && !"分拨业务".equals(landBusinessTypeList.getBusinesstype())){ //货物类型白名单
pass();
log.info("[SPECIAL]-特殊业务出区验放通过:{}",landBusinessTypeList.getCocode());
releaseFormCheck(); //流转申请单核销
... ...
... ... @@ -97,6 +97,7 @@ public class CustomsLockServiceImpl implements CustomsLockService {
String zbqAreaid = "4600329012";
String zbqN3Areaid = "4612199001";
String xhAreaid = "4604000000";
String bhAreaid = "4604600000";
//北货三号卡口出通道
String bh_3_out = "4604600030";
... ... @@ -120,12 +121,13 @@ public class CustomsLockServiceImpl implements CustomsLockService {
return true;
}
}
// if ("调拨业务".equals(landBusinessTypeList.getBusinesstype())){
// if (info.getChnlno().equals(bh_3_in1) || info.getChnlno().equals(bh_3_in2)){
// log.info("[LOCK-CHECK]-调拨业务-综保区北货流转业务,北货区域关锁通知,当前通道:{}",landBusinessTypeList.getEndstation());
// return true;
// }
// }
if ("调拨业务".equals(landBusinessTypeList.getBusinesstype())){
//申请设计综保区的流转场站,除了综保区不通知,其他场站正常通知
if (!info.getAreaid().equals(zbqAreaid) && !info.getAreaid().equals(zbqN3Areaid)){
log.info("[LOCK-CHECK]-调拨业务-含综保区流转业务,北货区域关锁通知,当前通道:{}",landBusinessTypeList.getEndstation());
return true;
}
}
log.info("[LOCK-CHECK-NOTICE]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation());
return false;
}
... ...
... ... @@ -81,6 +81,7 @@ public class CommandClient {
try {
//ip+端口
socket = new Socket("10.50.7.10", 9003);
socket.setSoTimeout(5000);
log.info("socket通讯创建连接成功");
op = socket.getOutputStream();
//xml字节流
... ...