|
@@ -31,10 +31,9 @@ import java.io.InputStreamReader; |
|
@@ -31,10 +31,9 @@ import java.io.InputStreamReader; |
31
|
import java.net.MalformedURLException;
|
31
|
import java.net.MalformedURLException;
|
32
|
import java.net.URL;
|
32
|
import java.net.URL;
|
33
|
import java.net.URLConnection;
|
33
|
import java.net.URLConnection;
|
34
|
-import java.util.Date;
|
|
|
35
|
-import java.util.List;
|
|
|
36
|
-import java.util.Map;
|
|
|
37
|
-import java.util.UUID;
|
34
|
+import java.util.*;
|
|
|
35
|
+
|
|
|
36
|
+import static com.sy.service.impl.ResMessageServiceImpl.toStrArry;
|
38
|
|
37
|
|
39
|
|
38
|
|
40
|
@Component
|
39
|
@Component
|
|
@@ -85,7 +84,8 @@ public class LiftBar { |
|
@@ -85,7 +84,8 @@ public class LiftBar { |
85
|
private static String ALLOCATE_04 = "39103 分拨申请重复传输,海关审核不通过。";
|
84
|
private static String ALLOCATE_04 = "39103 分拨申请重复传输,海关审核不通过。";
|
86
|
|
85
|
|
87
|
//初始化装载货物重量
|
86
|
//初始化装载货物重量
|
88
|
- private double goodsWt=0.0,inWt=0.0,diffVal=0.0,selfWt=0.0;
|
87
|
+ private static double goodsWt=0.0,inWt=0.0,diffVal=0.0,selfWt=0.0;
|
|
|
88
|
+ private List<LAND_BUSINEESTYPE_LIST_INFO> listinfos;
|
89
|
|
89
|
|
90
|
@Autowired
|
90
|
@Autowired
|
91
|
private FeignService feignService;
|
91
|
private FeignService feignService;
|
|
@@ -128,7 +128,7 @@ public class LiftBar { |
|
@@ -128,7 +128,7 @@ public class LiftBar { |
128
|
//1. 若无车牌号,返回未识别错误
|
128
|
//1. 若无车牌号,返回未识别错误
|
129
|
if (vaName.length() <= 0) {
|
129
|
if (vaName.length() <= 0) {
|
130
|
logger.error(NO_CHEPAI+vaName);
|
130
|
logger.error(NO_CHEPAI+vaName);
|
131
|
- logic.sendBw(info,false,NO_CHEPAI + vaName,new LandBusinessTypeList());
|
131
|
+ logic.sendBw(info,false,NO_CHEPAI + vaName,new LandBusinessTypeList(),listinfos);
|
132
|
//CommandClient.Client(info, NO_CHEPAI + vaName);
|
132
|
//CommandClient.Client(info, NO_CHEPAI + vaName);
|
133
|
return result;
|
133
|
return result;
|
134
|
}
|
134
|
}
|
|
@@ -138,14 +138,12 @@ public class LiftBar { |
|
@@ -138,14 +138,12 @@ public class LiftBar { |
138
|
//若无备案信息,返回车辆未备案或者识别错误
|
138
|
//若无备案信息,返回车辆未备案或者识别错误
|
139
|
if (ve == null) {
|
139
|
if (ve == null) {
|
140
|
logger.error(NORECORD+vaName);
|
140
|
logger.error(NORECORD+vaName);
|
141
|
- logic.sendBw(info,false,NORECORD + vaName,new LandBusinessTypeList());
|
141
|
+ logic.sendBw(info,false,NORECORD + vaName,new LandBusinessTypeList(),listinfos);
|
142
|
//CommandClient.Client(info, NORECORD + vaName);
|
142
|
//CommandClient.Client(info, NORECORD + vaName);
|
143
|
return result;
|
143
|
return result;
|
144
|
}
|
144
|
}
|
145
|
selfWt=Double.parseDouble(ve.getSelfWt());//车辆备案我不是
|
145
|
selfWt=Double.parseDouble(ve.getSelfWt());//车辆备案我不是
|
146
|
|
146
|
|
147
|
- List<LAND_BUSINEESTYPE_LIST_INFO> listinfos=logic.busnesslistinfoService.selectmanilist(info.getBarcode());
|
|
|
148
|
-
|
|
|
149
|
/**
|
147
|
/**
|
150
|
* 3. 车牌号,二维码,场站ID/号,通道ID/号,进出业务类型标识I/E
|
148
|
* 3. 车牌号,二维码,场站ID/号,通道ID/号,进出业务类型标识I/E
|
151
|
* 查询是否已有此场站通道的申请
|
149
|
* 查询是否已有此场站通道的申请
|
|
@@ -155,7 +153,7 @@ public class LiftBar { |
|
@@ -155,7 +153,7 @@ public class LiftBar { |
155
|
//4. 若查询结果为null,返回无相对应进出场申请
|
153
|
//4. 若查询结果为null,返回无相对应进出场申请
|
156
|
if (list == null) {
|
154
|
if (list == null) {
|
157
|
logger.error(vaName+IEPORSE);
|
155
|
logger.error(vaName+IEPORSE);
|
158
|
- logic.sendBw(info,false,vaName+IEPORSE,list);
|
156
|
+ logic.sendBw(info,false,vaName+IEPORSE,list,listinfos);
|
159
|
//CommandClient.Client(info, IEPORSE);
|
157
|
//CommandClient.Client(info, IEPORSE);
|
160
|
return result;
|
158
|
return result;
|
161
|
}
|
159
|
}
|
|
@@ -166,6 +164,8 @@ public class LiftBar { |
|
@@ -166,6 +164,8 @@ public class LiftBar { |
166
|
boolean checkResult = false;
|
164
|
boolean checkResult = false;
|
167
|
boolean check = false;
|
165
|
boolean check = false;
|
168
|
boolean checkMainfest =false;
|
166
|
boolean checkMainfest =false;
|
|
|
167
|
+ //查询运单列表
|
|
|
168
|
+ listinfos=logic.busnesslistinfoService.selectmanilist(info.getBarcode());
|
169
|
//7. 判断是进场申请还是出场申请
|
169
|
//7. 判断是进场申请还是出场申请
|
170
|
if("I".equals(info.getIetype())){
|
170
|
if("I".equals(info.getIetype())){
|
171
|
//进场申请宽进
|
171
|
//进场申请宽进
|
|
@@ -221,7 +221,7 @@ public class LiftBar { |
|
@@ -221,7 +221,7 @@ public class LiftBar { |
221
|
checkResult=true;
|
221
|
checkResult=true;
|
222
|
}else{
|
222
|
}else{
|
223
|
logger.error("[出口送货]-出场重量未通过校验:"+GROWSSEXCETION);
|
223
|
logger.error("[出口送货]-出场重量未通过校验:"+GROWSSEXCETION);
|
224
|
- logic.sendBw(info,false,GROWSSEXCETION,list);
|
224
|
+ logic.sendBw(info,false,GROWSSEXCETION,list,listinfos);
|
225
|
//CommandClient.Client(info, GROWSSEXCETION);
|
225
|
//CommandClient.Client(info, GROWSSEXCETION);
|
226
|
return false;
|
226
|
return false;
|
227
|
}
|
227
|
}
|
|
@@ -236,7 +236,7 @@ public class LiftBar { |
|
@@ -236,7 +236,7 @@ public class LiftBar { |
236
|
}else {
|
236
|
}else {
|
237
|
//有运单未放行
|
237
|
//有运单未放行
|
238
|
logger.error("[进口提货]-出场未通过校验:"+FANGXING+list.getMasterList());
|
238
|
logger.error("[进口提货]-出场未通过校验:"+FANGXING+list.getMasterList());
|
239
|
- logic.sendBw(info,false,FANGXING+list.getMasterList(),list);
|
239
|
+ logic.sendBw(info,false,FANGXING+list.getMasterList(),list,listinfos);
|
240
|
//CommandClient.Client(info, FANGXING);
|
240
|
//CommandClient.Client(info, FANGXING);
|
241
|
return false;
|
241
|
return false;
|
242
|
}
|
242
|
}
|
|
@@ -244,7 +244,7 @@ public class LiftBar { |
|
@@ -244,7 +244,7 @@ public class LiftBar { |
244
|
//todo:装载运单历史数据累加超重判定
|
244
|
//todo:装载运单历史数据累加超重判定
|
245
|
}else{
|
245
|
}else{
|
246
|
logger.error("[进口提货]-出场重量未通过校验:"+GROWSSEXCETION);
|
246
|
logger.error("[进口提货]-出场重量未通过校验:"+GROWSSEXCETION);
|
247
|
- logic.sendBw(info,false,GROWSSEXCETION,list);
|
247
|
+ logic.sendBw(info,false,GROWSSEXCETION,list,listinfos);
|
248
|
//CommandClient.Client(info, GROWSSEXCETION);
|
248
|
//CommandClient.Client(info, GROWSSEXCETION);
|
249
|
return false;
|
249
|
return false;
|
250
|
}
|
250
|
}
|
|
@@ -255,7 +255,7 @@ public class LiftBar { |
|
@@ -255,7 +255,7 @@ public class LiftBar { |
255
|
boolean allocatCheck = checkNmmsAllocate(list.getMasterList());
|
255
|
boolean allocatCheck = checkNmmsAllocate(list.getMasterList());
|
256
|
if(!allocatCheck){
|
256
|
if(!allocatCheck){
|
257
|
logger.error("[分拨业务]-分拨申请舱单未通过校验:"+FENBO);
|
257
|
logger.error("[分拨业务]-分拨申请舱单未通过校验:"+FENBO);
|
258
|
- logic.sendBw(info,false,FENBO,list);
|
258
|
+ logic.sendBw(info,false,FENBO,list,listinfos);
|
259
|
//CommandClient.Client(info, FENBO);
|
259
|
//CommandClient.Client(info, FENBO);
|
260
|
return false;
|
260
|
return false;
|
261
|
}
|
261
|
}
|
|
@@ -263,7 +263,7 @@ public class LiftBar { |
|
@@ -263,7 +263,7 @@ public class LiftBar { |
263
|
//todo:分拨运抵通知,重车入场视为运抵
|
263
|
//todo:分拨运抵通知,重车入场视为运抵
|
264
|
}else{
|
264
|
}else{
|
265
|
logger.error("[分拨业务]-出场重量未通过校验:"+GROWSSEXCETION);
|
265
|
logger.error("[分拨业务]-出场重量未通过校验:"+GROWSSEXCETION);
|
266
|
- logic.sendBw(info,false,GROWSSEXCETION,list);
|
266
|
+ logic.sendBw(info,false,GROWSSEXCETION,list,listinfos);
|
267
|
//CommandClient.Client(info, GROWSSEXCETION);
|
267
|
//CommandClient.Client(info, GROWSSEXCETION);
|
268
|
return false;
|
268
|
return false;
|
269
|
}
|
269
|
}
|
|
@@ -277,14 +277,14 @@ public class LiftBar { |
|
@@ -277,14 +277,14 @@ public class LiftBar { |
277
|
}else {
|
277
|
}else {
|
278
|
//有运单未放行
|
278
|
//有运单未放行
|
279
|
logger.error("[调拨业务]-出场未通过校验:"+FANGXING+list.getMasterList());
|
279
|
logger.error("[调拨业务]-出场未通过校验:"+FANGXING+list.getMasterList());
|
280
|
- logic.sendBw(info,false,FANGXING,list);
|
280
|
+ logic.sendBw(info,false,FANGXING,list,listinfos);
|
281
|
//CommandClient.Client(info, FANGXING);
|
281
|
//CommandClient.Client(info, FANGXING);
|
282
|
return false;
|
282
|
return false;
|
283
|
}
|
283
|
}
|
284
|
//todo:检查ULD放行.
|
284
|
//todo:检查ULD放行.
|
285
|
}else{
|
285
|
}else{
|
286
|
logger.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION);
|
286
|
logger.error("[调拨业务]-出场未通过校验:"+GROWSSEXCETION);
|
287
|
- logic.sendBw(info,false,GROWSSEXCETION,list);
|
287
|
+ logic.sendBw(info,false,GROWSSEXCETION,list,listinfos);
|
288
|
//CommandClient.Client(info, GROWSSEXCETION);
|
288
|
//CommandClient.Client(info, GROWSSEXCETION);
|
289
|
return false;
|
289
|
return false;
|
290
|
}
|
290
|
}
|
|
@@ -319,7 +319,7 @@ public class LiftBar { |
|
@@ -319,7 +319,7 @@ public class LiftBar { |
319
|
}
|
319
|
}
|
320
|
|
320
|
|
321
|
//发送抬杆指令,todo:生产环境去掉下面注释
|
321
|
//发送抬杆指令,todo:生产环境去掉下面注释
|
322
|
- boolean commandResult = logic.sendBw(info, checkResult,null,list);
|
322
|
+ boolean commandResult = logic.sendBw(info, checkResult,PERMITTHOUGH,list,listinfos);
|
323
|
//fortest 正式环境删除
|
323
|
//fortest 正式环境删除
|
324
|
// boolean commandResult = true;
|
324
|
// boolean commandResult = true;
|
325
|
if(commandResult){//发送抬杆儿报文
|
325
|
if(commandResult){//发送抬杆儿报文
|
|
@@ -420,28 +420,30 @@ public class LiftBar { |
|
@@ -420,28 +420,30 @@ public class LiftBar { |
420
|
* @param info 车辆过卡信息
|
420
|
* @param info 车辆过卡信息
|
421
|
* @param check 是否放行抬杆
|
421
|
* @param check 是否放行抬杆
|
422
|
*/
|
422
|
*/
|
423
|
- public boolean sendBw(GatherInfo info, boolean check,String reason,LandBusinessTypeList land) {
|
423
|
+ public boolean sendBw(GatherInfo info, boolean check,String reason,LandBusinessTypeList land,List<LAND_BUSINEESTYPE_LIST_INFO> list_infos) {
|
424
|
logger.info(String.format("开始发送指令:车牌%s,场站%s,通道%s,重量%s",info.getVename(),info.getAreaid(),info.getChnlno(),info.getGrosswt()));
|
424
|
logger.info(String.format("开始发送指令:车牌%s,场站%s,通道%s,重量%s",info.getVename(),info.getAreaid(),info.getChnlno(),info.getGrosswt()));
|
425
|
boolean flag = false;
|
425
|
boolean flag = false;
|
426
|
if (check) {
|
426
|
if (check) {
|
427
|
- CommandClient.Client(info, PERMITTHOUGH);
|
427
|
+ //CommandClient.Client(info, PERMITTHOUGH);
|
428
|
logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<==============");
|
428
|
logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<==============");
|
429
|
flag = true;
|
429
|
flag = true;
|
430
|
} else {
|
430
|
} else {
|
431
|
- CommandClient.Client(info, reason);
|
431
|
+ //CommandClient.Client(info, reason);
|
432
|
logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<==============");
|
432
|
logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<==============");
|
433
|
}
|
433
|
}
|
434
|
- logic.commandlog(info,check,reason,land);
|
434
|
+ commandlog(info,check,reason,land,list_infos);
|
435
|
return flag;
|
435
|
return flag;
|
436
|
}
|
436
|
}
|
437
|
- public void commandlog(GatherInfo info,boolean check,String reason,LandBusinessTypeList land){
|
437
|
+ public void commandlog(GatherInfo info,boolean check,String reason,LandBusinessTypeList land,List<LAND_BUSINEESTYPE_LIST_INFO> list_infos){
|
438
|
String flag="",type="";
|
438
|
String flag="",type="";
|
439
|
commandLog command=new commandLog();
|
439
|
commandLog command=new commandLog();
|
440
|
command.setId(UUID.randomUUID().toString());
|
440
|
command.setId(UUID.randomUUID().toString());
|
|
|
441
|
+ if(land!=null){
|
441
|
command.setBarcode(land.getBarcode());
|
442
|
command.setBarcode(land.getBarcode());
|
|
|
443
|
+ command.setBusnessType(land.getBusinesstype());
|
|
|
444
|
+ }
|
442
|
command.setAreaId(info.getAreaid());
|
445
|
command.setAreaId(info.getAreaid());
|
443
|
command.setChnlNo(info.getChnlno());
|
446
|
command.setChnlNo(info.getChnlno());
|
444
|
- command.setBusnessType(land.getBusinesstype());
|
|
|
445
|
if (check){
|
447
|
if (check){
|
446
|
flag = "00";
|
448
|
flag = "00";
|
447
|
} else{
|
449
|
} else{
|
|
@@ -461,7 +463,7 @@ public class LiftBar { |
|
@@ -461,7 +463,7 @@ public class LiftBar { |
461
|
command.setInGrossWeight(inWt);
|
463
|
command.setInGrossWeight(inWt);
|
462
|
command.setGoodsWeight(goodsWt);
|
464
|
command.setGoodsWeight(goodsWt);
|
463
|
command.setActualGoodsWeight(diffVal);
|
465
|
command.setActualGoodsWeight(diffVal);
|
464
|
- command.setMasterList(land.getMasterList());
|
466
|
+ command.setMasterList(Arrays.toString(toStrArry(list_infos)));
|
465
|
logic.commandLogService.insert(command);
|
467
|
logic.commandLogService.insert(command);
|
466
|
}
|
468
|
}
|
467
|
/**
|
469
|
/**
|