ARRIVEDMASTER.java
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package com.tianbo.analysis.model;
import com.tianbo.analysis.bean.WlptBaseModel;
import com.tianbo.analysis.tools.AWBTools;
import com.tianbo.util.Date.DateUtil;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import java.util.Date;
import java.util.List;
@Data
@Slf4j
public class ARRIVEDMASTER extends WlptBaseModel {
private String autoid;
private String waybillnomaster;
private String tcdName;
private String tcdTypecode;
private String flightno;
private Date flightDate;
private String carrier;
private String originatingstation;
private String oName;
private String destinationstation;
private String fdName;
private String arrivedtotalpiece;
private String totalpiecequantity;
private String arrivedtotalweight;
private String grossweightmeasureuc;
private String totalgrossweightmeasure;
private String totalgrossweightmeasureuc;
private String chargeableweightmeasure;
private String chargeableweightmeasureuc;
private Date arriveddate;
private String transportsplitdescription;
private String customscode;
private String productname;
private String status;
private String receiptinformation;
private Date createdate;
public ARRIVEDMASTER() {
}
public ARRIVEDMASTER(CustomReception customReception) {
this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());
String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());
this.setFlightno(flightInfo[1]);
this.setCarrier(flightInfo[0]);
if (!StringUtils.isEmpty(customReception.getFlightDate())) {
this.setFlightDate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));
}
this.status = AWBTools.transCusRspCode(customReception.getResponseCode());
this.receiptinformation = customReception.getResponseText();
}
@Override
public int masterAnalysisReception() {
//更新主单回执
int i = arrivedmasterMapper.updateRECEIPTION(this);
//获取分单autoid
List<ARRIVEDMASTER> arrivedmasterList = arrivedmasterMapper.selectAutoIdByAwb(this);
if(!arrivedmasterList.isEmpty()){
ARRIVEDMASTER originMaster = arrivedmasterList.get(0);
String autoId = originMaster.getAutoid();
//插入sendlog记录表
log.info("即将插入回执日志运单号为:"+waybillnomaster+"->autoid="+autoId);
int ii =sendLogService.insertSendlog("MT3201",receiptinformation,autoId);
if (i>0 && ii>0){
log.info("运单号 {} 运抵回执更新成功",waybillnomaster);
return 1;
}
}
return 0;
}
}