FWBTest.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
import com.sunyo.wlpt.base.model.efreight.fwb.*;
import com.sunyo.wlpt.base.model.efreight.fwb.exception.FWBException;
public class FWBTest {
public static void main(String[] args) {
FWB_WAYBILL_TEST();
// FWB_FLT_TEST();
FWB_RTG_TEST();
REF_TEST();
// OCI_TEST();
}
static void OCI_TEST(){
FWB_OCI fwb_oci = new FWB_OCI();
fwb_oci.setOci_csrc_id("T");
fwb_oci.setOci_csrc_info("USCI91440101MA9Y9E79XG");
fwb_oci.setOci_country_code("CN");
fwb_oci.setOci_information_id("SHP");
try {
String oci = fwb_oci.getFWBNodeText();
System.out.println(oci);
} catch (FWBException e) {
e.printStackTrace();
}
}
static void REF_TEST(){
FWB_REF fwb_ref = new FWB_REF();
fwb_ref.setRef_address("CGOFDIE");
fwb_ref.setRef_file_reference("EC1A2C4CBC3D1");
fwb_ref.setRef_participant_id("AGT");
fwb_ref.setRef_participant_code("MECCGO01");
fwb_ref.setRef_participant_airport("CGO");
try {
String oci = fwb_ref.getNodeName() + fwb_ref.getFWBNodeText();
System.out.println(oci);
} catch (FWBException e) {
e.printStackTrace();
}
}
static String FWB_WAYBILL_TEST(){
FWB fwb = new FWB();
fwb.setWaybillNum("804-31118393");
fwb.setOrigin("CGO");
fwb.setDestination("ICN");
fwb.setQuantity_picecs("1");
fwb.setQuantity_weight("102.22");
fwb.setQuantity_weight_code("L");
fwb.setQuantity_volume("20.22");
fwb.setQuantity_volume_code("MC");
fwb.setQuantity_density("22");
try {
fwb.getWaybillNum();
String nodeText = fwb.getNodeName() + fwb.getFWBNodeText();
// System.out.println(nodeText);
return nodeText;
} catch (FWBException e) {
e.printStackTrace();
}
return "";
}
static void FWB_FLT_TEST(){
FWB_FLT flt = new FWB_FLT();
flt.setCariier("CV");
flt.setFlightNumber("732");
flt.setDay("29");
try {
String nodeText = flt.getNodeName() + flt.getFWBNodeText() + "\n";
System.out.println(FWB_WAYBILL_TEST()+nodeText);
} catch (FWBException e) {
e.printStackTrace();
}
}
static void FWB_RTG_TEST(){
FWB_RTG var = new FWB_RTG();
// var.setDestinationAirport("ICN");
var.setDestinationCarrier("F5");
var.setOnwardAirport("SIN");
// var.setOnwardCarrier("K9");
try {
String nodeText = var.getNodeName() + var.getFWBNodeText() + "\n";
System.out.println(FWB_WAYBILL_TEST()+nodeText);
} catch (FWBException e) {
e.printStackTrace();
}
}
}