正在显示
6 个修改的文件
包含
77 行增加
和
12 行删除
@@ -17,7 +17,9 @@ STYP=CARM | @@ -17,7 +17,9 @@ STYP=CARM | ||
17 | 17 | ||
18 | #\u8F7D\u91CD\u4E0E\u79F0\u91CD\u7684\u53EF\u63A7\u8303\u56F4 ?% | 18 | #\u8F7D\u91CD\u4E0E\u79F0\u91CD\u7684\u53EF\u63A7\u8303\u56F4 ?% |
19 | grossWt=5% | 19 | grossWt=5% |
20 | -station=4600329012 | 20 | +#白名单场站列表,用逗号隔开 |
21 | +station=4600329012,4612199001 | ||
22 | +#顺丰白名单场站列表 | ||
21 | stationsf=4600541001 | 23 | stationsf=4600541001 |
22 | 24 | ||
23 | #\u4E8C\u7EF4\u7801\u5B58\u653E\u8DEF\u5F84\uFF0C\u9879\u76EE\u542F\u52A8\u65F6\u8BBE\u7F6E\uFF0C\u540E\u671F\u4E0D\u80FD\u66F4\u6539\u3002 | 25 | #\u4E8C\u7EF4\u7801\u5B58\u653E\u8DEF\u5F84\uFF0C\u9879\u76EE\u542F\u52A8\u65F6\u8BBE\u7F6E\uFF0C\u540E\u671F\u4E0D\u80FD\u66F4\u6539\u3002 |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | 5 | ||
6 | <groupId>com.sy</groupId> | 6 | <groupId>com.sy</groupId> |
7 | <artifactId>analysis_imf</artifactId> | 7 | <artifactId>analysis_imf</artifactId> |
8 | - <version>3.0-G2-SNAPSHOT</version> | 8 | + <version>4.0-LOCK-SNAPSHOT</version> |
9 | <packaging>jar</packaging> | 9 | <packaging>jar</packaging> |
10 | <name>analysis_imf</name> | 10 | <name>analysis_imf</name> |
11 | <description>北货集成金二抬杆指令判定</description> | 11 | <description>北货集成金二抬杆指令判定</description> |
@@ -32,16 +32,15 @@ public class CustomsLockController { | @@ -32,16 +32,15 @@ public class CustomsLockController { | ||
32 | 32 | ||
33 | @PostMapping("response") | 33 | @PostMapping("response") |
34 | public ResultJson lockResponse(@RequestBody LockFeedBack feedBack){ | 34 | public ResultJson lockResponse(@RequestBody LockFeedBack feedBack){ |
35 | - | 35 | + try{ |
36 | + log.info("收到关锁通知:{}",feedBack.toString()); | ||
36 | if (StringUtils.isEmpty(feedBack.barcode)){ | 37 | if (StringUtils.isEmpty(feedBack.barcode)){ |
37 | return new ResultJson("400","缺少二维码信息","缺少二维码信息"); | 38 | return new ResultJson("400","缺少二维码信息","缺少二维码信息"); |
38 | } | 39 | } |
39 | - | ||
40 | - log.info("收到关锁通知:{}",feedBack.toString()); | ||
41 | StringBuilder sb = new StringBuilder(); | 40 | StringBuilder sb = new StringBuilder(); |
42 | // sb.append("施解封时间:").append(feedBack.locktime).append("\n") | 41 | // sb.append("施解封时间:").append(feedBack.locktime).append("\n") |
43 | // .append("关锁秘钥:").append(feedBack.secret).append("\n") | 42 | // .append("关锁秘钥:").append(feedBack.secret).append("\n") |
44 | -// .append("施解封内容:").append(feedBack.feedbackconten).append("\n") | 43 | + sb.append("施解封内容:").append(feedBack.feedbackconten).append("\n"); |
45 | // .append("施解封状态:").append(feedBack.feedbackcode).append("\n"); | 44 | // .append("施解封状态:").append(feedBack.feedbackcode).append("\n"); |
46 | 45 | ||
47 | String LOCK_TYPE_UNLOCK = "2"; | 46 | String LOCK_TYPE_UNLOCK = "2"; |
@@ -82,6 +81,7 @@ public class CustomsLockController { | @@ -82,6 +81,7 @@ public class CustomsLockController { | ||
82 | gatherInfo.setGrosswt(new BigDecimal(0)); | 81 | gatherInfo.setGrosswt(new BigDecimal(0)); |
83 | commandLogService.commandlog(gatherInfo,false,sb.toString(),null,null,0.0,0.0,0.0,0.0); | 82 | commandLogService.commandlog(gatherInfo,false,sb.toString(),null,null,0.0,0.0,0.0,0.0); |
84 | log.info("[LOCK-RSP]-关锁缓存信息读取失败"); | 83 | log.info("[LOCK-RSP]-关锁缓存信息读取失败"); |
84 | + return new ResultJson("400","关锁缓存信息读取失败"); | ||
85 | } | 85 | } |
86 | }else { | 86 | }else { |
87 | sb.append("关锁施解封失败"); | 87 | sb.append("关锁施解封失败"); |
@@ -91,8 +91,12 @@ public class CustomsLockController { | @@ -91,8 +91,12 @@ public class CustomsLockController { | ||
91 | 91 | ||
92 | commandLogService.commandlog(gatherInfo,false,sb.toString(),null,null,0.0,0.0,0.0,0.0); | 92 | commandLogService.commandlog(gatherInfo,false,sb.toString(),null,null,0.0,0.0,0.0,0.0); |
93 | log.info("[LOCK-RSP]-关锁施解封失败"); | 93 | log.info("[LOCK-RSP]-关锁施解封失败"); |
94 | + | ||
94 | } | 95 | } |
95 | return new ResultJson("200","success"); | 96 | return new ResultJson("200","success"); |
97 | + }catch (Exception e){ | ||
98 | + return new ResultJson("500",e.toString()); | ||
99 | + } | ||
96 | } | 100 | } |
97 | 101 | ||
98 | } | 102 | } |
@@ -188,7 +188,7 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -188,7 +188,7 @@ public class GatherInfoHandle implements GatherInfoService { | ||
188 | log.info("[X21-SUCCESS]:[IN]-进口提货放行"); | 188 | log.info("[X21-SUCCESS]:[IN]-进口提货放行"); |
189 | }else{ | 189 | }else{ |
190 | sendBw(info,false,CHECKINNOEMPTY,landBusinessTypeList,listinfos); | 190 | sendBw(info,false,CHECKINNOEMPTY,landBusinessTypeList,listinfos); |
191 | - log.info("[X21-ERR]:[IN]-进口提货-费空车驶入"); | 191 | + log.info("[X21-ERR]:[IN]-进口提货-非空车驶入"); |
192 | } | 192 | } |
193 | break; | 193 | break; |
194 | default: | 194 | default: |
@@ -261,17 +261,72 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -261,17 +261,72 @@ public class GatherInfoHandle implements GatherInfoService { | ||
261 | 261 | ||
262 | /** | 262 | /** |
263 | * 一. | 263 | * 一. |
264 | - * 场站白名单 | 264 | + * 场站白名单,顺丰 |
265 | * @return 白名单 true. 其他走校验 | 265 | * @return 白名单 true. 其他走校验 |
266 | */ | 266 | */ |
267 | private boolean areaWhiteListCheck(){ | 267 | private boolean areaWhiteListCheck(){ |
268 | if(FileTool.readProperties("stationsf").equals(info.getAreaid())) { | 268 | if(FileTool.readProperties("stationsf").equals(info.getAreaid())) { |
269 | return true; | 269 | return true; |
270 | } | 270 | } |
271 | + if (zbqAreaWhiteListCheck()) { | ||
272 | + return true; | ||
273 | + } | ||
274 | + return false; | ||
275 | + } | ||
276 | + | ||
277 | + /** | ||
278 | + * 一. | ||
279 | + * 场站白名单,综保区白名单特殊验放 | ||
280 | + * 综保区不做重量验放,但是还要进行单证放行验放 | ||
281 | + * @return 白名单 true. 其他走校验 | ||
282 | + */ | ||
283 | + private boolean zbqAreaWhiteListCheck(){ | ||
284 | + if(FileTool.readProperties("station").contains(info.getAreaid())) { | ||
285 | + log.info("[ZBQ]-综保区核验放行"); | ||
286 | + if ("E".equals(info.getIetype())){ | ||
287 | + | ||
288 | + inStationInfo(); //入场信息获取 | ||
289 | + setListinfos(); //流转申请表体获取 | ||
290 | + | ||
291 | + //业务类型及放行判定 | ||
292 | + switch (landBusinessTypeList.getBusinesstype()){ | ||
293 | + case "进口提货": | ||
294 | + if ("退库货物".equals(landBusinessTypeList.getCocode()) || "换单货物".equals(landBusinessTypeList.getCocode())){ | ||
295 | + return true; | ||
296 | + }else { | ||
297 | + //检查运单放行 | ||
298 | + if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | ||
299 | + return true; | ||
300 | + }else { | ||
301 | + //有运单未放行 | ||
302 | + log.error("[进口提货]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
303 | + sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
304 | + return false; | ||
305 | + } | ||
306 | + } | ||
307 | + | ||
308 | + case "调拨业务": | ||
309 | + //检查运单放行,拉板可出 | ||
310 | + if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){ | ||
311 | + return true; | ||
312 | + }else { | ||
313 | + //有运单未放行 | ||
314 | + log.error("[调拨业务]-出场未通过校验:"+FANGXING+landBusinessTypeList.getMasterList()); | ||
315 | + sendBw(info,false,FANGXING,landBusinessTypeList,listinfos); | ||
316 | + return false; | ||
317 | + } | ||
318 | + default: | ||
319 | + return true; | ||
320 | + } | ||
321 | + } | ||
322 | + return true; | ||
323 | + } | ||
271 | return false; | 324 | return false; |
272 | } | 325 | } |
273 | 326 | ||
274 | 327 | ||
328 | + | ||
329 | + | ||
275 | /** | 330 | /** |
276 | * 1. 车牌信息校验 | 331 | * 1. 车牌信息校验 |
277 | */ | 332 | */ |
@@ -696,9 +751,6 @@ public class GatherInfoHandle implements GatherInfoService { | @@ -696,9 +751,6 @@ public class GatherInfoHandle implements GatherInfoService { | ||
696 | log.info("[流转缓存]-{}缓存已核销",vaName); | 751 | log.info("[流转缓存]-{}缓存已核销",vaName); |
697 | //核销记录 | 752 | //核销记录 |
698 | releaseRecord(); | 753 | releaseRecord(); |
699 | - | ||
700 | - //总业务车次计数 | ||
701 | - gatherInfoHandle.redisService.incr("kako-barcode-total",1); | ||
702 | } | 754 | } |
703 | 755 | ||
704 | /** | 756 | /** |
@@ -52,7 +52,11 @@ public class ResMessageServiceImpl implements ResMessageService { | @@ -52,7 +52,11 @@ public class ResMessageServiceImpl implements ResMessageService { | ||
52 | @Override | 52 | @Override |
53 | public boolean checkManifestRelease(GatherInfo info, List<LAND_BUSINEESTYPE_LIST_INFO> list_infos) { | 53 | public boolean checkManifestRelease(GatherInfo info, List<LAND_BUSINEESTYPE_LIST_INFO> list_infos) { |
54 | List<String> noRelease = new Vector<>(); | 54 | List<String> noRelease = new Vector<>(); |
55 | - if (list_infos.size() < 1) { | 55 | + if (list_infos==null){ |
56 | + CommandClient.Client(info, AWB_EMPTY); | ||
57 | + return false; | ||
58 | + } | ||
59 | + if (list_infos.isEmpty()) { | ||
56 | CommandClient.Client(info, AWB_EMPTY); | 60 | CommandClient.Client(info, AWB_EMPTY); |
57 | return false; | 61 | return false; |
58 | } | 62 | } |
@@ -11,6 +11,7 @@ import com.sy.service.CustomsLockService; | @@ -11,6 +11,7 @@ import com.sy.service.CustomsLockService; | ||
11 | import com.sy.service.LandBusListService; | 11 | import com.sy.service.LandBusListService; |
12 | import com.sy.service.RedisService; | 12 | import com.sy.service.RedisService; |
13 | import com.sy.service.impl.GatherInfoHandle; | 13 | import com.sy.service.impl.GatherInfoHandle; |
14 | +import com.sy.utils.FileTool; | ||
14 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
15 | import org.apache.commons.lang.StringUtils; | 16 | import org.apache.commons.lang.StringUtils; |
16 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -81,6 +82,8 @@ public class CustomsLockServiceImpl implements CustomsLockService { | @@ -81,6 +82,8 @@ public class CustomsLockServiceImpl implements CustomsLockService { | ||
81 | @Override | 82 | @Override |
82 | public boolean lockNoticeCheck(GatherInfo info) { | 83 | public boolean lockNoticeCheck(GatherInfo info) { |
83 | if (info!=null && StringUtils.isNotEmpty(info.getBarcode())) { | 84 | if (info!=null && StringUtils.isNotEmpty(info.getBarcode())) { |
85 | + //todo:这里后期判定可以复用场站白名单验证 | ||
86 | +// FileTool.readProperties("station").contains(info.getAreaid()); | ||
84 | /** | 87 | /** |
85 | * 申请业务类型检查 | 88 | * 申请业务类型检查 |
86 | * 调拨业务及分拨业务装载货物为单证的,必须有关锁号 | 89 | * 调拨业务及分拨业务装载货物为单证的,必须有关锁号 |
-
请 注册 或 登录 后发表评论