引擎动态验放全流程业务测试通过.
优化关锁通知针对包含综保区的场站业务的自动施封通知 单进单出核销规则完善
正在显示
11 个修改的文件
包含
239 行增加
和
96 行删除
@@ -102,7 +102,7 @@ enhance.groovy.engine.polling-cycle=10000 | @@ -102,7 +102,7 @@ enhance.groovy.engine.polling-cycle=10000 | ||
102 | # 开启功能 | 102 | # 开启功能 |
103 | enhance.groovy.engine.enable=true | 103 | enhance.groovy.engine.enable=true |
104 | # 缓存过期时间(默认600L分钟) | 104 | # 缓存过期时间(默认600L分钟) |
105 | -enhance.groovy.engine.cache-expire-after-write=20 | 105 | +enhance.groovy.engine.cache-expire-after-write=600 |
106 | #缓存初始容量(默认100) | 106 | #缓存初始容量(默认100) |
107 | enhance.groovy.engine.cache-initial-capacity=50 | 107 | enhance.groovy.engine.cache-initial-capacity=50 |
108 | # 缓存最大容量(默认500) | 108 | # 缓存最大容量(默认500) |
@@ -115,9 +115,9 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | @@ -115,9 +115,9 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | ||
115 | return true; | 115 | return true; |
116 | 116 | ||
117 | }else { | 117 | }else { |
118 | + log.error("[LockNoticeCheck-ERR]:流转业务-未申请关锁号"); | ||
118 | CommandClient.Client(info,"流转业务-未申请关锁号"); | 119 | CommandClient.Client(info,"流转业务-未申请关锁号"); |
119 | record(info,false,"业务异常:流转业务-未申请关锁号",null); | 120 | record(info,false,"业务异常:流转业务-未申请关锁号",null); |
120 | - log.error("[LockNoticeCheck-ERR]:流转业务-未申请关锁号"); | ||
121 | //这里需要返回true,是关锁业务,但是中断,不抬杆不放行,给予关锁业务异常通知 | 121 | //这里需要返回true,是关锁业务,但是中断,不抬杆不放行,给予关锁业务异常通知 |
122 | return false; | 122 | return false; |
123 | } | 123 | } |
@@ -168,6 +168,18 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | @@ -168,6 +168,18 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | ||
168 | String sfAreaid = "4600541001"; | 168 | String sfAreaid = "4600541001"; |
169 | String zbqAreaid = "4600329012"; | 169 | String zbqAreaid = "4600329012"; |
170 | String zbqN3Areaid = "4612199001"; | 170 | String zbqN3Areaid = "4612199001"; |
171 | + String xhAreaid = "4604000000"; | ||
172 | + | ||
173 | + //北货三号卡口出通道 | ||
174 | + String bh_3_out = "4604600030"; | ||
175 | + //北货三号卡口进通道1 | ||
176 | + String bh_3_in1= "4604601030"; | ||
177 | + //北货三号卡口进通道2 | ||
178 | + String bh_3_in2= "4604601031"; | ||
179 | + // 西货站出通道1 | ||
180 | + String xh_1_out = "4604333312"; | ||
181 | + // 西货站出通道2 | ||
182 | + String xh_2_out = "4604333322"; | ||
171 | 183 | ||
172 | ApplicationContext context = getContext(); | 184 | ApplicationContext context = getContext(); |
173 | // 获取容器中的bean | 185 | // 获取容器中的bean |
@@ -178,7 +190,30 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | @@ -178,7 +190,30 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | ||
178 | 190 | ||
179 | //涉及综保区场站的申请不核验关锁业务. | 191 | //涉及综保区场站的申请不核验关锁业务. |
180 | if (carEndstationList.contains(zbqAreaid)) { | 192 | if (carEndstationList.contains(zbqAreaid)) { |
181 | - log.info("[LOCK-CHECK]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation()); | 193 | + if ("分拨业务".equals(landBusinessTypeList.getBusinesstype())){ |
194 | + if (info.getChnlno().equals(bh_3_out)) { | ||
195 | + log.info("[LOCK-CHECK-TRUE]-分拨业务-综保区北货流转业务,北货区域关锁通知,当前场站北货站"); | ||
196 | + return NEED_NOTICE; | ||
197 | + } | ||
198 | + if (info.getAreaid().equals(xhAreaid)) { | ||
199 | + log.info("[LOCK-CHECK-TRUE]-分拨业务-西货综保区流转业务,西货区域关锁通知,当前场站西货站"); | ||
200 | + return NEED_NOTICE; | ||
201 | + } | ||
202 | + } | ||
203 | + if ("调拨业务".equals(landBusinessTypeList.getBusinesstype())){ | ||
204 | + //申请设计综保区的流转场站,除了综保区不通知,其他场站正常通知 | ||
205 | + /** | ||
206 | + * 从综保区往北货或者西货调拨时,都不进行关锁通知,因为从综保区出来没有关锁施封记录无法到北货解封.没关锁秘钥,采用人工解封 | ||
207 | + * 从西货或者北货往综保区调拨的话,进行施封通知,到综保区后不进行解封通知,采用人工解封 | ||
208 | + */ | ||
209 | + | ||
210 | + | ||
211 | + if (info.getChnlno().equals(bh_3_out) || info.getChnlno().equals(xh_1_out) || info.getChnlno().equals(xh_2_out)){ | ||
212 | + log.info("[LOCK-CHECK]-含综保区调拨业务-关锁施封通知,当前通道:{}",info.getChnlno()); | ||
213 | + return NEED_NOTICE; | ||
214 | + } | ||
215 | + } | ||
216 | + log.info("[LOCK-CHECK-NOTICE]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation()); | ||
182 | return DOT_NOTICE; | 217 | return DOT_NOTICE; |
183 | } | 218 | } |
184 | 219 | ||
@@ -191,21 +226,6 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | @@ -191,21 +226,6 @@ class LockNoticeCheck extends Script implements ChannelCheckScript { | ||
191 | return DOT_NOTICE; | 226 | return DOT_NOTICE; |
192 | }else { | 227 | }else { |
193 | return NEED_NOTICE; | 228 | return NEED_NOTICE; |
194 | - /** | ||
195 | - * 单证验证-取消 | ||
196 | - */ | ||
197 | -// List<LAND_BUSINEESTYPE_LIST_INFO> land_busineestype_list_infos = landBusinessTypeList.getLandBusineestypeListInfoList(); | ||
198 | -// if (!land_busineestype_list_infos.isEmpty()){ | ||
199 | -// LAND_BUSINEESTYPE_LIST_INFO list_info = land_busineestype_list_infos.stream().parallel() | ||
200 | -// .filter(item -> "B".equals(item.getExt4())) | ||
201 | -// .findAny().orElse(null); | ||
202 | -// | ||
203 | -// //包含单证 | ||
204 | -// if (list_info!=null){ | ||
205 | -// log.info("[LOCK-CHECK]-包含单证,开始关锁通知"); | ||
206 | -// return true; | ||
207 | -// } | ||
208 | -// } | ||
209 | } | 229 | } |
210 | }else { | 230 | }else { |
211 | return FAIL_NOTICE; | 231 | return FAIL_NOTICE; |
@@ -89,9 +89,9 @@ class WeightCheckEmpty extends Script implements ChannelCheckScript { | @@ -89,9 +89,9 @@ class WeightCheckEmpty extends Script implements ChannelCheckScript { | ||
89 | emptyIN = Double.parseDouble(df.format(Math.abs((wt - grossWt)) / wt)); | 89 | emptyIN = Double.parseDouble(df.format(Math.abs((wt - grossWt)) / wt)); |
90 | 90 | ||
91 | double range = weightCheckHandleService.valueDob(); | 91 | double range = weightCheckHandleService.valueDob(); |
92 | - | 92 | + logger.info("[WEIGHT-CHECK]-进口提货入口重量验放:入场重量{},车辆备案重量:{},差值:{}",grossWt,wt,emptyIN); |
93 | if (emptyIN <= range) { | 93 | if (emptyIN <= range) { |
94 | - logger.info("[WEIGHT-CHECK]-进口提货入口重量验放:入场重量{},车辆备案重量:{},差值:{}",grossWt,wt,emptyIN); | 94 | + |
95 | return true; | 95 | return true; |
96 | } | 96 | } |
97 | } | 97 | } |
1 | package com.sy.groovy | 1 | package com.sy.groovy |
2 | 2 | ||
3 | +import com.sy.crossDomain.BuildBarCode | ||
4 | +import com.sy.mapper.LandListDao | ||
3 | import com.sy.model.GatherInfo | 5 | import com.sy.model.GatherInfo |
4 | import com.sy.model.LandBusinessTypeList | 6 | import com.sy.model.LandBusinessTypeList |
7 | +import com.sy.service.CommandLogService | ||
8 | +import com.sy.service.LandBusListService | ||
9 | +import com.sy.service.RedisService | ||
5 | import com.sy.service.impl.GatherInfoHandle | 10 | import com.sy.service.impl.GatherInfoHandle |
6 | import org.basis.enhance.groovy.entity.ExecuteParams | 11 | import org.basis.enhance.groovy.entity.ExecuteParams |
7 | import org.slf4j.Logger | 12 | import org.slf4j.Logger |
@@ -14,10 +19,11 @@ import java.util.stream.Collectors | @@ -14,10 +19,11 @@ import java.util.stream.Collectors | ||
14 | * 流转申请-核销 | 19 | * 流转申请-核销 |
15 | * 1. 单进单出即核销判定 | 20 | * 1. 单进单出即核销判定 |
16 | * 2. 根据申请单中的通道类型及通道信息判定没有未走完的通道类型,可以核销.比如 申请单证的通道只有进通道,车可以走进一,进二,进二入场,走完进一,即可核销.(一线进) | 21 | * 2. 根据申请单中的通道类型及通道信息判定没有未走完的通道类型,可以核销.比如 申请单证的通道只有进通道,车可以走进一,进二,进二入场,走完进一,即可核销.(一线进) |
22 | + * 3. 只要有进记录或者出记录 就核销 | ||
17 | */ | 23 | */ |
18 | class X21FormSingileReleaseCheck extends Script { | 24 | class X21FormSingileReleaseCheck extends Script { |
19 | 25 | ||
20 | - private final Logger logger = LoggerFactory.getLogger(getClass()); | 26 | + private final Logger log = LoggerFactory.getLogger(getClass()); |
21 | 27 | ||
22 | 28 | ||
23 | /**x21指令判定 | 29 | /**x21指令判定 |
@@ -27,59 +33,28 @@ class X21FormSingileReleaseCheck extends Script { | @@ -27,59 +33,28 @@ class X21FormSingileReleaseCheck extends Script { | ||
27 | * 进行通道比对 | 33 | * 进行通道比对 |
28 | */ | 34 | */ |
29 | void check(ExecuteParams executeParams) { | 35 | void check(ExecuteParams executeParams) { |
30 | - try{ | 36 | + try { |
37 | + int count = 0; | ||
31 | // 获取product对象 | 38 | // 获取product对象 |
32 | GatherInfo gatherInfo = (GatherInfo) executeParams.get("GatherInfo"); | 39 | GatherInfo gatherInfo = (GatherInfo) executeParams.get("GatherInfo"); |
33 | - List<LandBusinessTypeList> formList = (List<LandBusinessTypeList>) executeParams.get("FormList"); | ||
34 | - | ||
35 | - // 调用方法 | ||
36 | - ApplicationContext context = getContext(); | ||
37 | - // 获取容器中的bean | ||
38 | - GatherInfoHandle gatherInfoHandle = context.getBean(GatherInfoHandle.class); | ||
39 | - | ||
40 | - List<LandBusinessTypeList> temp = new ArrayList<>(formList); | ||
41 | - //二维码已出区的记录 | ||
42 | - List<LandBusinessTypeList> havenCrossList = gatherInfoHandle.listService.selectByBarcodeWithE(gatherInfo.getBarcode()); | ||
43 | - | ||
44 | - if (formList == null && formList.isEmpty() ){ | ||
45 | - logger.error("[FORM-RELEASE-CHECK]-车辆进出场对应申请缓存数据为空:{}",gatherInfo.getBarcode()); | ||
46 | - return; | 40 | + if (gatherInfo!=null){ |
41 | + // 调用方法 | ||
42 | + ApplicationContext context = getContext(); | ||
43 | + LandBusListService landBusListService = context.getBean(LandBusListService.class) | ||
44 | + count = landBusListService.selectHistoryCount(gatherInfo.getBarcode()); | ||
45 | + if (count>0){ | ||
46 | + log.info("[Singile-Release-Success]-{}-{}",gatherInfo.getBarcode(),gatherInfo.getVename()) | ||
47 | + releaseBarCode(gatherInfo,executeParams); | ||
48 | + }else { | ||
49 | + log.error("[Singile-Release-Faild]-{}-{}",gatherInfo.getBarcode(),gatherInfo.getVename()) | ||
50 | + } | ||
51 | + }else { | ||
52 | + log.error("[Singile-Release-Faild]-核销失败,缺少关键过卡信息"); | ||
47 | } | 53 | } |
48 | 54 | ||
49 | - if (havenCrossList.isEmpty()){ | ||
50 | - logger.error("[FORM-RELEASE-CHECK]{}:车辆无离场数据,不核销",gatherInfo.getVename()); | ||
51 | - return; | ||
52 | - } | ||
53 | - logger.info("[FORM-RELEASE-CHECK]:已过卡数量:[{}]",havenCrossList.size()) | ||
54 | - //申请核销判定,已出区的记录与流转申请数据核碰.如果流转申请列表核碰完,还剩下的需要出区的场站则不核销. | ||
55 | - for (LandBusinessTypeList businessTypeList : havenCrossList) { | ||
56 | - List<LandBusinessTypeList> r = formList.stream().filter({item -> | ||
57 | - //判断还有没有没有出区的场站,还有没有出区的场站就不核销 | ||
58 | - logger.debug("[releaseFormCheck-Stream-loop]-缓存与已出核碰,缓存元素场站:[{}],已出记录场站:[{}]",item.getEndstation(),businessTypeList.getEndstation()); | ||
59 | - //解决缓存那里存储有不一样的把人错的的有问题的点,二维码不一致也把缓存删除 | ||
60 | - if (!item.getBarcode().equals(businessTypeList.getBarcode())){ | ||
61 | - return true; | ||
62 | - } | ||
63 | - if(item.getEndstation().equals(businessTypeList.getEndstation())) { | ||
64 | - logger.info("[releaseFormCheck-Stream-loop]-缓存元素场站:[{}],已出记录场站:[{}]-核销判定对碰成功",item.getEndstation(),businessTypeList.getEndstation()); | ||
65 | - return true; | ||
66 | - }else { | ||
67 | - return false; | ||
68 | - } | ||
69 | - }).collect(Collectors.toList()); | ||
70 | - temp.removeAll(r); | ||
71 | - } | ||
72 | - logger.info("[FORM-RELEASE-CHECK]-核销判定结果:{}",temp.size()); | ||
73 | - if (temp.isEmpty()){ | ||
74 | - //todo:流转申请状态核销 | ||
75 | - logger.info("[进出场申请]-流转申请开始核销:"+gatherInfo.getVename()); | ||
76 | - //二维码核销 | ||
77 | -// gatherInfoHandle.releaseBarCode(); | ||
78 | - logger.info("[进出场申请]-流转申请已核销:"+gatherInfo.getVename()); | ||
79 | - } | ||
80 | - }catch (Exception e){ | 55 | + } catch (Exception e){ |
81 | e.printStackTrace(); | 56 | e.printStackTrace(); |
82 | - logger.error("[FORM-RELEASE-ERROR]:",e); | 57 | + log.error("[LockNoticeCheck-ERR]:",e); |
83 | } | 58 | } |
84 | } | 59 | } |
85 | 60 | ||
@@ -95,4 +70,53 @@ class X21FormSingileReleaseCheck extends Script { | @@ -95,4 +70,53 @@ class X21FormSingileReleaseCheck extends Script { | ||
95 | return context; | 70 | return context; |
96 | } | 71 | } |
97 | 72 | ||
73 | + void releaseBarCode(GatherInfo info,ExecuteParams executeParams){ | ||
74 | + ApplicationContext context = getContext(); | ||
75 | + // 获取容器中的bean | ||
76 | + LandListDao landListDao = context.getBean(LandListDao.class); | ||
77 | + Boolean devdebug = (Boolean)context.getBean("devdebug"); | ||
78 | + | ||
79 | + if (!devdebug){ | ||
80 | + BuildBarCode.cancleBarCode(info.getVename()); | ||
81 | + log.info("[流转申请]-二维码已释放:"+info.getVename()); | ||
82 | + } | ||
83 | + | ||
84 | + int rc = landListDao.releaseBarcode(info.getBarcode()); | ||
85 | + if (rc>0) { | ||
86 | + log.info("[进出场核销]-{}流转已核销:{}",info.getVename(),info.getBarcode()); | ||
87 | + }else{ | ||
88 | + log.error("[进出场核销-ERROR]-{}流转未核销成功:{}",info.getVename(),info.getBarcode()); | ||
89 | + } | ||
90 | + //车辆流转申请缓存删除 | ||
91 | + releaseCache(info,executeParams); | ||
92 | + | ||
93 | + } | ||
94 | + | ||
95 | + void releaseCache(GatherInfo info,ExecuteParams executeParams){ | ||
96 | + | ||
97 | + ApplicationContext context = getContext(); | ||
98 | + // 获取容器中的bean | ||
99 | + RedisService redisService = context.getBean(RedisService.class); | ||
100 | + | ||
101 | + //车辆流转申请缓存删除 | ||
102 | + redisService.del(info.getVename()); | ||
103 | + //流转申请时生成的临时核碰场站代码列表 | ||
104 | + redisService.del(info.getVename()+"_endstationList"); | ||
105 | + //车辆过卡信息缓存删除-X22金二判定时候生成的这个缓存 | ||
106 | + redisService.del(info.getSeqno()); | ||
107 | + log.info("[流转缓存]-{}缓存已核销",info.getVename()); | ||
108 | + //核销记录 | ||
109 | + releaseRecord(info,executeParams); | ||
110 | + } | ||
111 | + | ||
112 | + /** | ||
113 | + * 核销记录 | ||
114 | + */ | ||
115 | + void releaseRecord(GatherInfo info,ExecuteParams executeParams){ | ||
116 | + LandBusinessTypeList chanelFormInfo = (LandBusinessTypeList) executeParams.get("ChanelFormInfo"); | ||
117 | + ApplicationContext context = getContext(); | ||
118 | + CommandLogService commandLogService = context.getBean(CommandLogService.class); | ||
119 | + commandLogService.commandlog(info,true,"流转核销",chanelFormInfo,null,0.0,0.0,0.0,0.0); | ||
120 | + } | ||
121 | + | ||
98 | } | 122 | } |
@@ -77,4 +77,11 @@ public interface LandBusinessTypeListMapper { | @@ -77,4 +77,11 @@ public interface LandBusinessTypeListMapper { | ||
77 | */ | 77 | */ |
78 | List<LandBusinessTypeList> selectHistory (@Param("trailerFrameNo") String trailerFrameNo, @Param("barcode") String barcode); | 78 | List<LandBusinessTypeList> selectHistory (@Param("trailerFrameNo") String trailerFrameNo, @Param("barcode") String barcode); |
79 | 79 | ||
80 | + /** | ||
81 | + * 车辆已进出区的记录数 | ||
82 | + * @param barcode 二维码 | ||
83 | + * @return 进出区记录数 | ||
84 | + */ | ||
85 | + int selectHistoryCount(@Param("barcode")String barcode); | ||
86 | + | ||
80 | } | 87 | } |
@@ -56,4 +56,11 @@ public interface LandBusListService { | @@ -56,4 +56,11 @@ public interface LandBusListService { | ||
56 | */ | 56 | */ |
57 | int selectFirstLeave(String trailerFrameNo, String barcode, String turnoverflag); | 57 | int selectFirstLeave(String trailerFrameNo, String barcode, String turnoverflag); |
58 | 58 | ||
59 | + /** | ||
60 | + * 根据二维码查询车辆所有进出总记录 | ||
61 | + * @param barcode 二维码 | ||
62 | + * @return 进出记录总数量 | ||
63 | + */ | ||
64 | + int selectHistoryCount(String barcode); | ||
65 | + | ||
59 | } | 66 | } |
@@ -230,7 +230,7 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -230,7 +230,7 @@ public class GatherInfoHandle implements GatherInfoService { | ||
230 | inStationInfo(); //入场信息获取 | 230 | inStationInfo(); //入场信息获取 |
231 | setListinfos(); //流转申请表体获取 | 231 | setListinfos(); //流转申请表体获取 |
232 | 232 | ||
233 | - if (goodsWhiteListCheck()){ //货物类型白名单 | 233 | + if (goodsWhiteListCheck() && !"调拨业务".equals(landBusinessTypeList.getBusinesstype()) && !"分拨业务".equals(landBusinessTypeList.getBusinesstype())){ //货物类型白名单 |
234 | pass(); | 234 | pass(); |
235 | log.info("[SPECIAL]-特殊业务出区验放通过:{}",landBusinessTypeList.getCocode()); | 235 | log.info("[SPECIAL]-特殊业务出区验放通过:{}",landBusinessTypeList.getCocode()); |
236 | releaseFormCheck(); //流转申请单核销 | 236 | releaseFormCheck(); //流转申请单核销 |
@@ -306,15 +306,20 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -306,15 +306,20 @@ public class GatherInfoHandle implements GatherInfoService { | ||
306 | } | 306 | } |
307 | 307 | ||
308 | case "调拨业务": | 308 | case "调拨业务": |
309 | - //检查运单放行,拉板可出 | ||
310 | - if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | 309 | + if (goodsWhiteListCheck()){ |
311 | return true; | 310 | return true; |
312 | }else { | 311 | }else { |
313 | - //有运单未放行 | ||
314 | - log.error("[调拨业务]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
315 | - sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
316 | - return false; | 312 | + //检查运单放行,拉板可出 |
313 | + if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | ||
314 | + return true; | ||
315 | + }else { | ||
316 | + //有运单未放行 | ||
317 | + log.error("[调拨业务]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
318 | + sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
319 | + return false; | ||
320 | + } | ||
317 | } | 321 | } |
322 | + | ||
318 | default: | 323 | default: |
319 | return true; | 324 | return true; |
320 | } | 325 | } |
@@ -606,22 +611,29 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -606,22 +611,29 @@ public class GatherInfoHandle implements GatherInfoService { | ||
606 | case "调拨业务": | 611 | case "调拨业务": |
607 | if (gatherInfoHandle.weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){ | 612 | if (gatherInfoHandle.weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){ |
608 | /** | 613 | /** |
609 | - * 调拨业务如果空车出,可出.(就是申请不带运单的,比如综保区的车辆) | 614 | + * 调拨业务如果空车出,可出.(就是申请不带运单的) |
610 | */ | 615 | */ |
611 | if (listinfos!=null && listinfos.isEmpty()){ | 616 | if (listinfos!=null && listinfos.isEmpty()){ |
612 | log.info("[调拨-空车]-{}空车离场",info.getVename()); | 617 | log.info("[调拨-空车]-{}空车离场",info.getVename()); |
613 | return true; | 618 | return true; |
614 | } | 619 | } |
615 | - //检查运单放行,拉板可出 | ||
616 | - if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | 620 | + |
621 | + //白名单货物不检查放行 | ||
622 | + if (goodsWhiteListCheck()) { | ||
617 | return true; | 623 | return true; |
618 | - }else { | ||
619 | - //有运单未放行 | ||
620 | - log.error("[调拨业务]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
621 | - sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
622 | - return false; | 624 | + }else{ |
625 | + //检查运单放行,拉板可出 | ||
626 | + if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | ||
627 | + return true; | ||
628 | + }else { | ||
629 | + //有运单未放行 | ||
630 | + log.error("[调拨业务]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
631 | + sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
632 | + return false; | ||
633 | + } | ||
634 | + //todo:检查ULD放行. | ||
623 | } | 635 | } |
624 | - //todo:检查ULD放行. | 636 | + |
625 | }else{ | 637 | }else{ |
626 | log.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION); | 638 | log.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION); |
627 | sendBw(info,false,GROWSSEXCETION,landBusinessTypeList,listinfos); | 639 | sendBw(info,false,GROWSSEXCETION,landBusinessTypeList,listinfos); |
@@ -871,6 +883,9 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -871,6 +883,9 @@ public class GatherInfoHandle implements GatherInfoService { | ||
871 | if (waybill.length() < 1) { | 883 | if (waybill.length() < 1) { |
872 | return false; | 884 | return false; |
873 | } | 885 | } |
886 | + if (gatherInfoHandle.debug){ | ||
887 | + return true; | ||
888 | + } | ||
874 | waybill = waybill.replace("-", ""); | 889 | waybill = waybill.replace("-", ""); |
875 | //中文逗号替换 | 890 | //中文逗号替换 |
876 | waybill = waybill.replace(",", ","); | 891 | waybill = waybill.replace(",", ","); |
@@ -192,4 +192,9 @@ public class LandBusListServiceImpl implements LandBusListService { | @@ -192,4 +192,9 @@ public class LandBusListServiceImpl implements LandBusListService { | ||
192 | return listMapper.selectFirstLeave(trailerFrameNo, barcode, turnoverflag); | 192 | return listMapper.selectFirstLeave(trailerFrameNo, barcode, turnoverflag); |
193 | } | 193 | } |
194 | 194 | ||
195 | + @Override | ||
196 | + public int selectHistoryCount(String barcode){ | ||
197 | + return listMapper.selectHistoryCount(barcode); | ||
198 | + } | ||
199 | + | ||
195 | } | 200 | } |
@@ -96,14 +96,48 @@ public class CustomsLockServiceImpl implements CustomsLockService { | @@ -96,14 +96,48 @@ public class CustomsLockServiceImpl implements CustomsLockService { | ||
96 | String sfAreaid = "4600541001"; | 96 | String sfAreaid = "4600541001"; |
97 | String zbqAreaid = "4600329012"; | 97 | String zbqAreaid = "4600329012"; |
98 | String zbqN3Areaid = "4612199001"; | 98 | String zbqN3Areaid = "4612199001"; |
99 | - | 99 | + String xhAreaid = "4604000000"; |
100 | + String bhAreaid = "4604600000"; | ||
101 | + | ||
102 | + //北货三号卡口出通道 | ||
103 | + String bh_3_out = "4604600030"; | ||
104 | + //北货三号卡口进通道1 | ||
105 | + String bh_3_in1= "4604601030"; | ||
106 | + //北货三号卡口进通道2 | ||
107 | + String bh_3_in2= "4604601031"; | ||
108 | + // 西货站出通道1 | ||
109 | + String xh_1_out = "4604333312"; | ||
110 | + // 西货站出通道2 | ||
111 | + String xh_2_out = "4604333322"; | ||
100 | 112 | ||
101 | String carEndstationList = redisService.get(info.getVename() + "_endstationList"); | 113 | String carEndstationList = redisService.get(info.getVename() + "_endstationList"); |
102 | if (StringUtils.isNotEmpty(info.getVename()) && StringUtils.isNotEmpty(carEndstationList)){ | 114 | if (StringUtils.isNotEmpty(info.getVename()) && StringUtils.isNotEmpty(carEndstationList)){ |
103 | - | ||
104 | //涉及综保区场站的申请不核验关锁业务. | 115 | //涉及综保区场站的申请不核验关锁业务. |
105 | if (carEndstationList.contains(zbqAreaid)) { | 116 | if (carEndstationList.contains(zbqAreaid)) { |
106 | - log.info("[LOCK-CHECK]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation()); | 117 | + if ("分拨业务".equals(landBusinessTypeList.getBusinesstype())){ |
118 | + if (info.getChnlno().equals(bh_3_out)) { | ||
119 | + log.info("[LOCK-CHECK-TRUE]-分拨业务-综保区北货流转业务,北货区域关锁通知,当前场站北货站"); | ||
120 | + return true; | ||
121 | + } | ||
122 | + if (info.getAreaid().equals(xhAreaid)) { | ||
123 | + log.info("[LOCK-CHECK-TRUE]-分拨业务-西货综保区流转业务,西货区域关锁通知,当前场站西货站"); | ||
124 | + return true; | ||
125 | + } | ||
126 | + } | ||
127 | + if ("调拨业务".equals(landBusinessTypeList.getBusinesstype())){ | ||
128 | + //申请设计综保区的流转场站,除了综保区不通知,其他场站正常通知 | ||
129 | + /** | ||
130 | + * 从综保区往北货或者西货调拨时,都不进行关锁通知,因为从综保区出来没有关锁施封记录无法到北货解封.没关锁秘钥,采用人工解封 | ||
131 | + * 从西货或者北货往综保区调拨的话,进行施封通知,到综保区后不进行解封通知,采用人工解封 | ||
132 | + */ | ||
133 | + | ||
134 | + | ||
135 | + if (info.getChnlno().equals(bh_3_out) || info.getChnlno().equals(xh_1_out) || info.getChnlno().equals(xh_2_out)){ | ||
136 | + log.info("[LOCK-CHECK]-含综保区调拨业务-关锁施封通知,当前通道:{}",info.getChnlno()); | ||
137 | + return true; | ||
138 | + } | ||
139 | + } | ||
140 | + log.info("[LOCK-CHECK-NOTICE]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation()); | ||
107 | return false; | 141 | return false; |
108 | } | 142 | } |
109 | 143 |
@@ -6,15 +6,13 @@ import com.sy.bwAssist.Message; | @@ -6,15 +6,13 @@ import com.sy.bwAssist.Message; | ||
6 | import com.sy.mapper.LandListDao; | 6 | import com.sy.mapper.LandListDao; |
7 | import com.sy.mapper.LandRouterConfigDao; | 7 | import com.sy.mapper.LandRouterConfigDao; |
8 | import com.sy.model.*; | 8 | import com.sy.model.*; |
9 | -import com.sy.service.CommandLogService; | ||
10 | -import com.sy.service.CustomsLockService; | ||
11 | -import com.sy.service.LandBusListService; | ||
12 | -import com.sy.service.RedisService; | 9 | +import com.sy.service.*; |
13 | import com.sy.service.feigin.LockFeignService; | 10 | import com.sy.service.feigin.LockFeignService; |
14 | import com.sy.service.impl.GatherInfoHandle; | 11 | import com.sy.service.impl.GatherInfoHandle; |
15 | import com.sy.socket.CommandClient; | 12 | import com.sy.socket.CommandClient; |
16 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
17 | import org.apache.commons.lang.StringUtils; | 14 | import org.apache.commons.lang.StringUtils; |
15 | +import org.basis.enhance.groovy.entity.ExecuteParams; | ||
18 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
19 | import org.springframework.stereotype.Service; | 17 | import org.springframework.stereotype.Service; |
20 | 18 | ||
@@ -56,6 +54,9 @@ public class MessageRouterX21 implements MessageRouter { | @@ -56,6 +54,9 @@ public class MessageRouterX21 implements MessageRouter { | ||
56 | @Autowired | 54 | @Autowired |
57 | private LockFeignService lockFeignService; | 55 | private LockFeignService lockFeignService; |
58 | 56 | ||
57 | + @Autowired | ||
58 | + private EnginCheckService enginCheckService; | ||
59 | + | ||
59 | @Resource | 60 | @Resource |
60 | private LandListDao landListDao; | 61 | private LandListDao landListDao; |
61 | 62 | ||
@@ -77,7 +78,12 @@ public class MessageRouterX21 implements MessageRouter { | @@ -77,7 +78,12 @@ public class MessageRouterX21 implements MessageRouter { | ||
77 | //金二判断,业务类型,通道,路由目的地 | 78 | //金二判断,业务类型,通道,路由目的地 |
78 | routerCheckG2(info); | 79 | routerCheckG2(info); |
79 | }else { | 80 | }else { |
80 | - X21Local(info); | 81 | + /** |
82 | + * 取消原来验放模式,改为动态规则引擎验放 | ||
83 | + */ | ||
84 | +// X21Local(info); | ||
85 | + | ||
86 | + enginCheck(info); | ||
81 | } | 87 | } |
82 | 88 | ||
83 | } | 89 | } |
@@ -191,12 +197,14 @@ public class MessageRouterX21 implements MessageRouter { | @@ -191,12 +197,14 @@ public class MessageRouterX21 implements MessageRouter { | ||
191 | */ | 197 | */ |
192 | else{ | 198 | else{ |
193 | //没有金二配置,走本地 | 199 | //没有金二配置,走本地 |
194 | - X21Local(info); | 200 | +// X21Local(info); |
201 | + enginCheck(info); | ||
195 | } | 202 | } |
196 | }else { | 203 | }else { |
197 | 204 | ||
198 | //没有金二配置,走本地 | 205 | //没有金二配置,走本地 |
199 | - X21Local(info); | 206 | +// X21Local(info); |
207 | + enginCheck(info); | ||
200 | } | 208 | } |
201 | 209 | ||
202 | } | 210 | } |
@@ -231,6 +239,19 @@ public class MessageRouterX21 implements MessageRouter { | @@ -231,6 +239,19 @@ public class MessageRouterX21 implements MessageRouter { | ||
231 | 239 | ||
232 | } | 240 | } |
233 | 241 | ||
242 | + private void enginCheck(GatherInfo gatherInfo){ | ||
243 | + ExecuteParams executeParams = enginCheckService.makeParaByGagherInfo(gatherInfo); | ||
244 | + Boolean check = enginCheckService.enginCheckByGatherInfo(gatherInfo,executeParams); | ||
245 | + if (check){ | ||
246 | + enginCheckService.pass(gatherInfo,executeParams); | ||
247 | + | ||
248 | + enginCheckService.formRelease(gatherInfo,executeParams); | ||
249 | + }else { | ||
250 | + log.error("脚本验放测试失败或等待关锁施解封"); | ||
251 | + } | ||
252 | + log.info("引擎验放完结"); | ||
253 | + } | ||
254 | + | ||
234 | /** | 255 | /** |
235 | * 车辆过卡指令日志记录 | 256 | * 车辆过卡指令日志记录 |
236 | */ | 257 | */ |
@@ -282,8 +303,9 @@ public class MessageRouterX21 implements MessageRouter { | @@ -282,8 +303,9 @@ public class MessageRouterX21 implements MessageRouter { | ||
282 | } | 303 | } |
283 | } | 304 | } |
284 | }else { | 305 | }else { |
285 | - CommandClient.Client(info,"流转业务-未申请关锁号"); | 306 | + log.error("[LOCK-ERROR]-流转业务未申请关锁号"); |
286 | record(info,false,"业务异常:流转业务-未申请关锁号",null); | 307 | record(info,false,"业务异常:流转业务-未申请关锁号",null); |
308 | + CommandClient.Client(info,"流转业务-未申请关锁号"); | ||
287 | //这里需要返回true,是关锁业务,但是中断,不抬杆不放行,给予关锁业务异常通知 | 309 | //这里需要返回true,是关锁业务,但是中断,不抬杆不放行,给予关锁业务异常通知 |
288 | return true; | 310 | return true; |
289 | } | 311 | } |
@@ -103,6 +103,15 @@ | @@ -103,6 +103,15 @@ | ||
103 | and TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR} | 103 | and TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR} |
104 | and ISVALID = '1' | 104 | and ISVALID = '1' |
105 | </select> | 105 | </select> |
106 | + | ||
107 | + <select id="selectHistoryCount" parameterType="java.lang.String" resultType="java.lang.Integer"> | ||
108 | + select | ||
109 | + count(BARCODE) | ||
110 | + from land_businesstype_list | ||
111 | + where | ||
112 | + BARCODE = #{barcode,jdbcType=VARCHAR} | ||
113 | + and ISVALID = '1' | ||
114 | + </select> | ||
106 | <update id="updateisvalid" parameterType="java.lang.String"> | 115 | <update id="updateisvalid" parameterType="java.lang.String"> |
107 | update land_businesstype_list set ISVALID = '1' where | 116 | update land_businesstype_list set ISVALID = '1' where |
108 | TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR} | 117 | TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR} |
-
请 注册 或 登录 后发表评论