作者 shenhailong

controller 方法添加 try catch

正在显示 30 个修改的文件 包含 195 行增加94 行删除
@@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT1201Service; @@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT1201Service;
4 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.web.bind.annotation.*; 5 import org.springframework.web.bind.annotation.*;
6 6
  7 +import java.util.HashMap;
7 import java.util.Map; 8 import java.util.Map;
8 9
9 @RestController 10 @RestController
@@ -27,7 +28,9 @@ public class MT1201Controller { @@ -27,7 +28,9 @@ public class MT1201Controller {
27 return mt1201Service.ffmcreate(map); 28 return mt1201Service.ffmcreate(map);
28 }catch (Exception e){ 29 }catch (Exception e){
29 e.printStackTrace(); 30 e.printStackTrace();
30 - return null; 31 + Map<String, Object> maps = new HashMap<>();
  32 + maps.put("status", "0");
  33 + return maps;
31 } 34 }
32 } 35 }
33 36
@@ -46,7 +49,9 @@ public class MT1201Controller { @@ -46,7 +49,9 @@ public class MT1201Controller {
46 return mt1201Service.editMt1201(map); 49 return mt1201Service.editMt1201(map);
47 }catch (Exception e){ 50 }catch (Exception e){
48 e.printStackTrace(); 51 e.printStackTrace();
49 - return null; 52 + Map<String, Object> maps = new HashMap<>();
  53 + maps.put("status", "0");
  54 + return maps;
50 } 55 }
51 } 56 }
52 57
@@ -60,7 +65,9 @@ public class MT1201Controller { @@ -60,7 +65,9 @@ public class MT1201Controller {
60 return mt1201Service.removeMt1201(map); 65 return mt1201Service.removeMt1201(map);
61 }catch (Exception e){ 66 }catch (Exception e){
62 e.printStackTrace(); 67 e.printStackTrace();
63 - return null; 68 + Map<String, Object> maps = new HashMap<>();
  69 + maps.put("status", "0");
  70 + return maps;
64 } 71 }
65 } 72 }
66 73
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.*; @@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.*;
7 7
8 import java.io.IOException; 8 import java.io.IOException;
9 import java.text.ParseException; 9 import java.text.ParseException;
  10 +import java.util.HashMap;
10 import java.util.Map; 11 import java.util.Map;
11 12
12 @RestController 13 @RestController
@@ -24,25 +25,52 @@ public class MT2201Controller { @@ -24,25 +25,52 @@ public class MT2201Controller {
24 @PostMapping("/creatMt2201") 25 @PostMapping("/creatMt2201")
25 @ApiOperation(value = "生成报文") 26 @ApiOperation(value = "生成报文")
26 @ResponseBody 27 @ResponseBody
27 - public Map<String, Object> creatMt2201(@RequestBody Map<String, Object> map) throws IOException, ParseException { 28 + public Map<String, Object> creatMt2201(@RequestBody Map<String, Object> map) {
  29 +
  30 + try {
  31 +
  32 + return mt2201Service.creatMt2201(map);
  33 + }catch (Exception e){
  34 + e.printStackTrace();
  35 + Map<String, Object> maps = new HashMap<>();
  36 + maps.put("status", "0");
  37 + return maps;
  38 + }
28 39
29 - return mt2201Service.creatMt2201(map);  
30 } 40 }
31 41
32 @PutMapping("/editMt2201") 42 @PutMapping("/editMt2201")
33 @ApiOperation(value = "修改报文") 43 @ApiOperation(value = "修改报文")
34 @ResponseBody 44 @ResponseBody
35 - public Map<String, Object> editMt2201(@RequestBody Map<String, Object> map) throws IOException, ParseException { 45 + public Map<String, Object> editMt2201(@RequestBody Map<String, Object> map) {
  46 +
  47 + try {
  48 +
  49 + return mt2201Service.editMt2201(map);
  50 + }catch (Exception e){
  51 + e.printStackTrace();
  52 + Map<String, Object> maps = new HashMap<>();
  53 + maps.put("status", "0");
  54 + return maps;
  55 + }
36 56
37 - return mt2201Service.editMt2201(map);  
38 } 57 }
39 58
40 @PutMapping("/removeMt2201") 59 @PutMapping("/removeMt2201")
41 @ApiOperation(value = "删除报文") 60 @ApiOperation(value = "删除报文")
42 @ResponseBody 61 @ResponseBody
43 - public Map<String, Object> removeMt2201(@RequestBody Map<String, Object> map) throws IOException, ParseException { 62 + public Map<String, Object> removeMt2201(@RequestBody Map<String, Object> map) {
  63 +
  64 + try {
  65 +
  66 + return mt2201Service.removeMt2201(map);
  67 + }catch (Exception e){
  68 + e.printStackTrace();
  69 + Map<String, Object> maps = new HashMap<>();
  70 + maps.put("status", "0");
  71 + return maps;
  72 + }
44 73
45 - return mt2201Service.removeMt2201(map);  
46 } 74 }
47 75
48 } 76 }
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel; @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel;
6 import org.springframework.beans.factory.annotation.Autowired; 6 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.web.bind.annotation.*; 7 import org.springframework.web.bind.annotation.*;
8 8
  9 +import java.util.HashMap;
9 import java.util.Map; 10 import java.util.Map;
10 11
11 @RestController 12 @RestController
@@ -25,7 +26,9 @@ public class MT3201Controller { @@ -25,7 +26,9 @@ public class MT3201Controller {
25 return mt3201Service.fohcreate(map); 26 return mt3201Service.fohcreate(map);
26 }catch (Exception e){ 27 }catch (Exception e){
27 e.printStackTrace(); 28 e.printStackTrace();
28 - return null; 29 + Map<String, Object> maps = new HashMap<>();
  30 + maps.put("status", "0");
  31 + return maps;
29 } 32 }
30 33
31 } 34 }
@@ -39,7 +42,9 @@ public class MT3201Controller { @@ -39,7 +42,9 @@ public class MT3201Controller {
39 return mt3201Service.remove(map); 42 return mt3201Service.remove(map);
40 }catch (Exception e){ 43 }catch (Exception e){
41 e.printStackTrace(); 44 e.printStackTrace();
42 - return null; 45 + Map<String, Object> maps = new HashMap<>();
  46 + maps.put("status", "0");
  47 + return maps;
43 } 48 }
44 49
45 } 50 }
@@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT3202Service; @@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT3202Service;
4 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.web.bind.annotation.*; 5 import org.springframework.web.bind.annotation.*;
6 6
  7 +import java.util.HashMap;
7 import java.util.Map; 8 import java.util.Map;
8 9
9 @RestController 10 @RestController
@@ -22,7 +23,9 @@ public class MT3202Controller { @@ -22,7 +23,9 @@ public class MT3202Controller {
22 return mt3202Service.createMt3202(map); 23 return mt3202Service.createMt3202(map);
23 }catch (Exception e){ 24 }catch (Exception e){
24 e.printStackTrace(); 25 e.printStackTrace();
25 - return null; 26 + Map<String, Object> maps = new HashMap<>();
  27 + maps.put("status", "0");
  28 + return maps;
26 } 29 }
27 30
28 } 31 }
@@ -36,7 +39,9 @@ public class MT3202Controller { @@ -36,7 +39,9 @@ public class MT3202Controller {
36 return mt3202Service.removeMt3202(map); 39 return mt3202Service.removeMt3202(map);
37 }catch (Exception e){ 40 }catch (Exception e){
38 e.printStackTrace(); 41 e.printStackTrace();
39 - return null; 42 + Map<String, Object> maps = new HashMap<>();
  43 + maps.put("status", "0");
  44 + return maps;
40 } 45 }
41 46
42 } 47 }
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*; @@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.text.ParseException; 8 import java.text.ParseException;
  9 +import java.util.HashMap;
9 import java.util.Map; 10 import java.util.Map;
10 11
11 12
@@ -19,19 +20,35 @@ public class MT4201Controller { @@ -19,19 +20,35 @@ public class MT4201Controller {
19 20
20 @PostMapping("/createMt4201") 21 @PostMapping("/createMt4201")
21 @ResponseBody 22 @ResponseBody
22 - public Map<String, Object> pffmcreate(@RequestBody Map<String, Object> map) throws IOException, ParseException { 23 + public Map<String, Object> pffmcreate(@RequestBody Map<String, Object> map) {
  24 +
  25 + try {
  26 +
  27 + return mt4201Service.pffmcreate(map);
  28 + }catch (Exception e){
  29 + e.printStackTrace();
  30 + Map<String, Object> maps = new HashMap<>();
  31 + maps.put("status", "0");
  32 + return maps;
  33 + }
23 34
24 - return mt4201Service.pffmcreate(map);  
25 35
26 } 36 }
27 37
28 38
29 @PutMapping("/removeMt4201") 39 @PutMapping("/removeMt4201")
30 @ResponseBody 40 @ResponseBody
31 - public Map<String, Object> remove4201(@RequestBody Map<String, Object> map) throws IOException, ParseException { 41 + public Map<String, Object> remove4201(@RequestBody Map<String, Object> map) {
32 42
33 - return mt4201Service.remove4201(map); 43 + try {
34 44
  45 + return mt4201Service.remove4201(map);
  46 + }catch (Exception e){
  47 + e.printStackTrace();
  48 + Map<String, Object> maps = new HashMap<>();
  49 + maps.put("status", "0");
  50 + return maps;
  51 + }
35 } 52 }
36 53
37 54
@@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT520XService; @@ -4,6 +4,7 @@ import com.sunyo.wlpt.message.builder.service.MT520XService;
4 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.web.bind.annotation.*; 5 import org.springframework.web.bind.annotation.*;
6 6
  7 +import java.util.HashMap;
7 import java.util.Map; 8 import java.util.Map;
8 9
9 10
@@ -30,7 +31,9 @@ public class MT520XController { @@ -30,7 +31,9 @@ public class MT520XController {
30 31
31 }catch (Exception e){ 32 }catch (Exception e){
32 e.printStackTrace(); 33 e.printStackTrace();
33 - return null; 34 + Map<String, Object> maps = new HashMap<>();
  35 + maps.put("status", "0");
  36 + return maps;
34 } 37 }
35 38
36 } 39 }
@@ -50,7 +53,9 @@ public class MT520XController { @@ -50,7 +53,9 @@ public class MT520XController {
50 53
51 }catch (Exception e){ 54 }catch (Exception e){
52 e.printStackTrace(); 55 e.printStackTrace();
53 - return null; 56 + Map<String, Object> maps = new HashMap<>();
  57 + maps.put("status", "0");
  58 + return maps;
54 } 59 }
55 60
56 } 61 }
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*; @@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.text.ParseException; 8 import java.text.ParseException;
  9 +import java.util.HashMap;
9 import java.util.Map; 10 import java.util.Map;
10 11
11 @RequestMapping(value = "/mt6202") 12 @RequestMapping(value = "/mt6202")
@@ -17,16 +18,32 @@ public class MT6202Controller { @@ -17,16 +18,32 @@ public class MT6202Controller {
17 18
18 @PostMapping(value = "/createMt6202") 19 @PostMapping(value = "/createMt6202")
19 @ResponseBody 20 @ResponseBody
20 - public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map) throws IOException, ParseException { 21 + public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map) {
21 22
22 - return mt6202Service.creatMt6202(map); 23 + try {
  24 +
  25 + return mt6202Service.creatMt6202(map);
  26 + }catch (Exception e){
  27 + e.printStackTrace();
  28 + Map<String, Object> maps = new HashMap<>();
  29 + maps.put("status", "0");
  30 + return maps;
  31 + }
23 } 32 }
24 33
25 @PutMapping(value = "/removeMt6202") 34 @PutMapping(value = "/removeMt6202")
26 @ResponseBody 35 @ResponseBody
27 - public Map<String, Object> removeMt6202(@RequestBody Map<String, Object> map) throws IOException, ParseException { 36 + public Map<String, Object> removeMt6202(@RequestBody Map<String, Object> map) {
  37 +
  38 + try {
28 39
29 - return mt6202Service.removeMt6202(map); 40 + return mt6202Service.removeMt6202(map);
  41 + }catch (Exception e){
  42 + e.printStackTrace();
  43 + Map<String, Object> maps = new HashMap<>();
  44 + maps.put("status", "0");
  45 + return maps;
  46 + }
30 } 47 }
31 48
32 } 49 }
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*; @@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.text.ParseException; 8 import java.text.ParseException;
  9 +import java.util.HashMap;
9 import java.util.Map; 10 import java.util.Map;
10 11
11 @RequestMapping(value = "/mt8205") 12 @RequestMapping(value = "/mt8205")
@@ -17,9 +18,17 @@ public class MT8205Controller { @@ -17,9 +18,17 @@ public class MT8205Controller {
17 18
18 @PostMapping(value = "/creatMt8205") 19 @PostMapping(value = "/creatMt8205")
19 @ResponseBody 20 @ResponseBody
20 - public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map) throws IOException, ParseException { 21 + public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map){
21 22
22 - return mt8205Service.create8205(map); 23 + try {
  24 +
  25 + return mt8205Service.create8205(map);
  26 + }catch (Exception e){
  27 + e.printStackTrace();
  28 + Map<String, Object> maps = new HashMap<>();
  29 + maps.put("status", "0");
  30 + return maps;
  31 + }
23 } 32 }
24 33
25 } 34 }
@@ -9,7 +9,7 @@ import java.util.Map; @@ -9,7 +9,7 @@ import java.util.Map;
9 public interface MT520XService { 9 public interface MT520XService {
10 10
11 11
12 - public Map<String, Object> create(Map<String, Object> map); 12 + public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException;
13 13
14 public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException; 14 public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException;
15 15
@@ -73,7 +73,7 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{ @@ -73,7 +73,7 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{
73 hashMap.put("customResponse", nmmsCustomResponse); 73 hashMap.put("customResponse", nmmsCustomResponse);
74 return hashMap; 74 return hashMap;
75 }else { 75 }else {
76 - hashMap.put("staus", "0"); 76 + hashMap.put("status", "0");
77 return hashMap; 77 return hashMap;
78 } 78 }
79 } 79 }
@@ -91,11 +91,13 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{ @@ -91,11 +91,13 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{
91 map.put("sendTime", DateUtil.getCurrentTime17()); 91 map.put("sendTime", DateUtil.getCurrentTime17());
92 // 航班起飞时间 sendTime(海关接受时间) + 1小时 92 // 航班起飞时间 sendTime(海关接受时间) + 1小时
93 String s = DateUtil.addDateMinut(new Date(), 1); 93 String s = DateUtil.addDateMinut(new Date(), 1);
94 - // 航班到达时间 航班起飞时间 + 2小时 94 + // 航班到达时间 航班起飞时间 + 2小时/+当前是间加3个小时
95 String ss = DateUtil.addDateMinut(new Date(), 3); 95 String ss = DateUtil.addDateMinut(new Date(), 3);
96 - map.put("arrivalDateTime", s);  
97 - map.put("departureDateTime", ss);  
98 - 96 + map.put("departureDateTime", s);
  97 + map.put("arrivalDateTime", ss);
  98 + // 到达卸货地时间
  99 + String arrival = ss.substring(0, 8);
  100 + map.put("arrival", arrival);
99 // 封装实体 101 // 封装实体
100 map.put("mt", customMt1201); 102 map.put("mt", customMt1201);
101 map.put("awbAwbinfo", awbAwbinfo); 103 map.put("awbAwbinfo", awbAwbinfo);
@@ -105,7 +105,7 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service { @@ -105,7 +105,7 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service {
105 hashMap.put("customResponse", nmmsCustomResponse); 105 hashMap.put("customResponse", nmmsCustomResponse);
106 return hashMap; 106 return hashMap;
107 }else { 107 }else {
108 - hashMap.put("staus", "0"); 108 + hashMap.put("status", "0");
109 return hashMap; 109 return hashMap;
110 } 110 }
111 } 111 }
@@ -110,7 +110,7 @@ public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service { @@ -110,7 +110,7 @@ public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service {
110 map3201.put("customResponse", nmmsCustomResponse); 110 map3201.put("customResponse", nmmsCustomResponse);
111 return map3201; 111 return map3201;
112 }else { 112 }else {
113 - map3201.put("staus", "0"); 113 + map3201.put("status", "0");
114 return map3201; 114 return map3201;
115 } 115 }
116 } 116 }
@@ -102,7 +102,7 @@ public class MT3202ServiceImp extends CustomXmlMaker implements MT3202Service { @@ -102,7 +102,7 @@ public class MT3202ServiceImp extends CustomXmlMaker implements MT3202Service {
102 map3201.put("customResponse", nmmsCustomResponse); 102 map3201.put("customResponse", nmmsCustomResponse);
103 return map3201; 103 return map3201;
104 }else { 104 }else {
105 - map3201.put("staus", "0"); 105 + map3201.put("status", "0");
106 return map3201; 106 return map3201;
107 } 107 }
108 } 108 }
@@ -112,7 +112,7 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service { @@ -112,7 +112,7 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
112 map4201.put("customResponse", nmmsCustomResponse); 112 map4201.put("customResponse", nmmsCustomResponse);
113 return map4201; 113 return map4201;
114 }else { 114 }else {
115 - map4201.put("staus", "0"); 115 + map4201.put("status", "0");
116 return map4201; 116 return map4201;
117 } 117 }
118 } 118 }
@@ -26,9 +26,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -26,9 +26,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
26 private String orgCode; 26 private String orgCode;
27 27
28 @Override 28 @Override
29 - public Map<String, Object> create(Map<String, Object> map) {  
30 -  
31 - try { 29 + public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException {
32 30
33 ObjectMapper objectMapper = new ObjectMapper(); 31 ObjectMapper objectMapper = new ObjectMapper();
34 32
@@ -85,7 +83,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -85,7 +83,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
85 maps.put("customResponse", nmmsCustomResponse); 83 maps.put("customResponse", nmmsCustomResponse);
86 return maps; 84 return maps;
87 }else { 85 }else {
88 - maps.put("staus", "0"); 86 + maps.put("status", "0");
89 return maps; 87 return maps;
90 } 88 }
91 }else { 89 }else {
@@ -132,16 +130,10 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -132,16 +130,10 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
132 130
133 return maps; 131 return maps;
134 }else { 132 }else {
135 - maps.put("staus", "0"); 133 + maps.put("status", "0");
136 return maps; 134 return maps;
137 } 135 }
138 } 136 }
139 - }catch (Exception e){  
140 -  
141 - e.printStackTrace();  
142 - return null;  
143 - }  
144 -  
145 } 137 }
146 138
147 @Override 139 @Override
@@ -173,7 +165,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -173,7 +165,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
173 maps.put("customResponse", nmmsCustomResponse); 165 maps.put("customResponse", nmmsCustomResponse);
174 return maps; 166 return maps;
175 }else { 167 }else {
176 - maps.put("staus", "0"); 168 + maps.put("status", "0");
177 return maps; 169 return maps;
178 } 170 }
179 }else { 171 }else {
@@ -198,7 +190,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -198,7 +190,7 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
198 maps.put("customResponse", nmmsCustomResponse); 190 maps.put("customResponse", nmmsCustomResponse);
199 return maps; 191 return maps;
200 }else { 192 }else {
201 - maps.put("staus", "0"); 193 + maps.put("status", "0");
202 return maps; 194 return maps;
203 } 195 }
204 } 196 }
@@ -101,7 +101,7 @@ public class MT6202ServiceImp extends CustomXmlMaker implements MT6202Service{ @@ -101,7 +101,7 @@ public class MT6202ServiceImp extends CustomXmlMaker implements MT6202Service{
101 map3201.put("customResponse", nmmsCustomResponse); 101 map3201.put("customResponse", nmmsCustomResponse);
102 return map3201; 102 return map3201;
103 }else { 103 }else {
104 - map3201.put("staus", "0"); 104 + map3201.put("status", "0");
105 return map3201; 105 return map3201;
106 } 106 }
107 } 107 }
@@ -31,17 +31,19 @@ @@ -31,17 +31,19 @@
31 <ChangeReasonCode>999</ChangeReasonCode> 31 <ChangeReasonCode>999</ChangeReasonCode>
32 <ConditionCode>10</ConditionCode> 32 <ConditionCode>10</ConditionCode>
33 </TransportContractDocument> 33 </TransportContractDocument>
34 - <#if mt.awbh?length gt 1>  
35 - <AssociatedTransportDocument>  
36 - <ID>${mt.awba}_${mt.awbh}</ID>  
37 - </AssociatedTransportDocument> 34 + <#if mt['awbh']??>
  35 + <#if mt.awbh?default("")?length gt 1>
  36 + <AssociatedTransportDocument>
  37 + <ID>${mt.awba}_${mt.awbh}</ID>
  38 + </AssociatedTransportDocument>
  39 + </#if>
38 </#if> 40 </#if>
39 <LoadingLocation> 41 <LoadingLocation>
40 <ID>${mt.originstation}</ID> 42 <ID>${mt.originstation}</ID>
41 </LoadingLocation> 43 </LoadingLocation>
42 <UnloadingLocation> 44 <UnloadingLocation>
43 <ID>${mt.destinationstation}/${mt.customcode}</ID> 45 <ID>${mt.destinationstation}/${mt.customcode}</ID>
44 - <ArrivalDate>20200121</ArrivalDate> 46 + <ArrivalDate>${arrival}</ArrivalDate>
45 </UnloadingLocation> 47 </UnloadingLocation>
46 <GoodsConsignedPlace> 48 <GoodsConsignedPlace>
47 <ID>${mt.destinationstation}</ID> 49 <ID>${mt.destinationstation}</ID>
@@ -29,10 +29,12 @@ @@ -29,10 +29,12 @@
29 <ChangeReasonCode>9999</ChangeReasonCode> 29 <ChangeReasonCode>9999</ChangeReasonCode>
30 <ConditionCode>10</ConditionCode> 30 <ConditionCode>10</ConditionCode>
31 </TransportContractDocument> 31 </TransportContractDocument>
32 - <#if mt.awbh?length gt 1>  
33 - <AssociatedTransportDocument>  
34 - <ID>${mt.awba}_${mt.awbh}</ID>  
35 - </AssociatedTransportDocument> 32 + <#if mt['awbh']??>
  33 + <#if mt.awbh?default("")?length gt 1>
  34 + <AssociatedTransportDocument>
  35 + <ID>${mt.awba}_${mt.awbh}</ID>
  36 + </AssociatedTransportDocument>
  37 + </#if>
36 </#if> 38 </#if>
37 <LoadingLocation> 39 <LoadingLocation>
38 <ID>${mt.originstation}/${mt.customcode}</ID> 40 <ID>${mt.originstation}/${mt.customcode}</ID>
@@ -30,17 +30,19 @@ @@ -30,17 +30,19 @@
30 <ID>${mt.awba}</ID> 30 <ID>${mt.awba}</ID>
31 <ConditionCode>10</ConditionCode> 31 <ConditionCode>10</ConditionCode>
32 </TransportContractDocument> 32 </TransportContractDocument>
33 - <#if mt.awbh?length gt 1>  
34 - <AssociatedTransportDocument>  
35 - <ID>${mt.awba}_${mt.awbh}</ID>  
36 - </AssociatedTransportDocument> 33 + <#if mt['awbh']??>
  34 + <#if mt.awbh?default("")?length gt 1>
  35 + <AssociatedTransportDocument>
  36 + <ID>${mt.awba}_${mt.awbh}</ID>
  37 + </AssociatedTransportDocument>
  38 + </#if>
37 </#if> 39 </#if>
38 <LoadingLocation> 40 <LoadingLocation>
39 <ID>${mt.originstation}</ID> 41 <ID>${mt.originstation}</ID>
40 </LoadingLocation> 42 </LoadingLocation>
41 <UnloadingLocation> 43 <UnloadingLocation>
42 <ID>${mt.destinationstation}/${mt.customcode}</ID> 44 <ID>${mt.destinationstation}/${mt.customcode}</ID>
43 - <ArrivalDate>20200121</ArrivalDate> 45 + <ArrivalDate>${arrival}</ArrivalDate>
44 </UnloadingLocation> 46 </UnloadingLocation>
45 <GoodsConsignedPlace> 47 <GoodsConsignedPlace>
46 <ID>${mt.destinationstation}</ID> 48 <ID>${mt.destinationstation}</ID>
@@ -27,10 +27,12 @@ @@ -27,10 +27,12 @@
27 <ID>${mt.awba}</ID> 27 <ID>${mt.awba}</ID>
28 <ConditionCode>10</ConditionCode> 28 <ConditionCode>10</ConditionCode>
29 </TransportContractDocument> 29 </TransportContractDocument>
30 - <#if mt.awbh?length gt 1>  
31 - <AssociatedTransportDocument>  
32 - <ID>${mt.awba}_${mt.awbh}</ID>  
33 - </AssociatedTransportDocument> 30 + <#if mt['awbh']??>
  31 + <#if mt.awbh?default("")?length gt 1>
  32 + <AssociatedTransportDocument>
  33 + <ID>${mt.awba}_${mt.awbh}</ID>
  34 + </AssociatedTransportDocument>
  35 + </#if>
34 </#if> 36 </#if>
35 <LoadingLocation> 37 <LoadingLocation>
36 <ID>${mt.originstation}/${mt.customcode}</ID> 38 <ID>${mt.originstation}/${mt.customcode}</ID>
@@ -24,10 +24,12 @@ @@ -24,10 +24,12 @@
24 <TransportContractDocument> 24 <TransportContractDocument>
25 <ID>${mt.awba}</ID> 25 <ID>${mt.awba}</ID>
26 </TransportContractDocument> 26 </TransportContractDocument>
27 - <#if mt.awbh?length gt 1>  
28 - <AssociatedTransportDocument>  
29 - <ID>${mt.awba}_${mt.awbh}</ID>  
30 - </AssociatedTransportDocument> 27 + <#if mt['awbh']??>
  28 + <#if mt.awbh?default("")?length gt 1>
  29 + <AssociatedTransportDocument>
  30 + <ID>${mt.awba}_${mt.awbh}</ID>
  31 + </AssociatedTransportDocument>
  32 + </#if>
31 </#if> 33 </#if>
32 <ConsignmentPackaging> 34 <ConsignmentPackaging>
33 <QuantityQuantity>${mt.piece}</QuantityQuantity> 35 <QuantityQuantity>${mt.piece}</QuantityQuantity>
@@ -22,10 +22,12 @@ @@ -22,10 +22,12 @@
22 <TransportContractDocument> 22 <TransportContractDocument>
23 <ID>${mt.awba}</ID> 23 <ID>${mt.awba}</ID>
24 </TransportContractDocument> 24 </TransportContractDocument>
25 - <#if mt.awbh?length gt 1>  
26 - <AssociatedTransportDocument>  
27 - <ID>${mt.awba}_${mt.awbh}</ID>  
28 - </AssociatedTransportDocument> 25 + <#if mt['awbh']??>
  26 + <#if mt.awbh?default("")?length gt 1>
  27 + <AssociatedTransportDocument>
  28 + <ID>${mt.awba}_${mt.awbh}</ID>
  29 + </AssociatedTransportDocument>
  30 + </#if>
29 </#if> 31 </#if>
30 <LoadingLocation> 32 <LoadingLocation>
31 <ID>${mt.originstation}/${mt.customcode}</ID> 33 <ID>${mt.originstation}/${mt.customcode}</ID>
@@ -28,10 +28,12 @@ @@ -28,10 +28,12 @@
28 <TransportContractDocument> 28 <TransportContractDocument>
29 <ID>${mt.awba}</ID> 29 <ID>${mt.awba}</ID>
30 </TransportContractDocument> 30 </TransportContractDocument>
31 - <#if mt.awbh?default("")?length gt 1>  
32 - <AssociatedTransportDocument>  
33 - <ID>${mt.awba}_${mt.awbh}</ID>  
34 - </AssociatedTransportDocument> 31 + <#if mt['awbh']??>
  32 + <#if mt.awbh?default("")?length gt 1>
  33 + <AssociatedTransportDocument>
  34 + <ID>${mt.awba}_${mt.awbh}</ID>
  35 + </AssociatedTransportDocument>
  36 + </#if>
35 </#if> 37 </#if>
36 <ConsignmentPackaging> 38 <ConsignmentPackaging>
37 <QuantityQuantity>${mt.piece}</QuantityQuantity> 39 <QuantityQuantity>${mt.piece}</QuantityQuantity>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <ID>${mt.awba}</ID> 29 <ID>${mt.awba}</ID>
30 </TransportContractDocument> 30 </TransportContractDocument>
31 <#if mt['awbh']??> 31 <#if mt['awbh']??>
32 - <#if mt.awbh?length gt 1> 32 + <#if mt.awbh?default("")?length gt 11>
33 <AssociatedTransportDocument> 33 <AssociatedTransportDocument>
34 <ID>${mt.awba}_${mt.awbh}</ID> 34 <ID>${mt.awba}_${mt.awbh}</ID>
35 </AssociatedTransportDocument> 35 </AssociatedTransportDocument>
@@ -20,11 +20,11 @@ @@ -20,11 +20,11 @@
20 <ID>${awba}</ID> 20 <ID>${awba}</ID>
21 <ChangeReasonCode>999</ChangeReasonCode> 21 <ChangeReasonCode>999</ChangeReasonCode>
22 </TransportContractDocument> 22 </TransportContractDocument>
23 - <#if awbh?length gt 1>  
24 - <AssociatedTransportDocument>  
25 - <ID>${awba}_${awbh}</ID>  
26 - </AssociatedTransportDocument>  
27 - </#if> 23 + <#if awbh?default("")?length gt 1>
  24 + <AssociatedTransportDocument>
  25 + <ID>${awba}_${awbh}</ID>
  26 + </AssociatedTransportDocument>
  27 + </#if>
28 </Consignment> 28 </Consignment>
29 <AdditionalInformation> 29 <AdditionalInformation>
30 <Reason>${reason}</Reason> 30 <Reason>${reason}</Reason>
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <ID>${awba}</ID> 21 <ID>${awba}</ID>
22 <ChangeReasonCode>9999</ChangeReasonCode> 22 <ChangeReasonCode>9999</ChangeReasonCode>
23 </TransportContractDocument> 23 </TransportContractDocument>
24 - <#if awbh?length gt 1> 24 + <#if awbh?default("")?length gt 1>
25 <AssociatedTransportDocument> 25 <AssociatedTransportDocument>
26 <ID>${awba}_${awbh}</ID> 26 <ID>${awba}_${awbh}</ID>
27 </AssociatedTransportDocument> 27 </AssociatedTransportDocument>
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <TransportContractDocument> 17 <TransportContractDocument>
18 <ID>${awba}</ID> 18 <ID>${awba}</ID>
19 </TransportContractDocument> 19 </TransportContractDocument>
20 - <#if awbh?length gt 1> 20 + <#if awbh?default("")?length gt 1>
21 <AssociatedTransportDocument> 21 <AssociatedTransportDocument>
22 <ID>${awba}_${awbh}</ID> 22 <ID>${awba}_${awbh}</ID>
23 </AssociatedTransportDocument> 23 </AssociatedTransportDocument>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <TransportContractDocument> 16 <TransportContractDocument>
17 <ID>${awba}</ID> 17 <ID>${awba}</ID>
18 </TransportContractDocument> 18 </TransportContractDocument>
19 - <#if awbh?length gt 1> 19 + <#if awbh?default("")?length gt 1>
20 <AssociatedTransportDocument> 20 <AssociatedTransportDocument>
21 <ID>${awba}_${awbh}</ID> 21 <ID>${awba}_${awbh}</ID>
22 </AssociatedTransportDocument> 22 </AssociatedTransportDocument>
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <TransportContractDocument> 17 <TransportContractDocument>
18 <ID>${awba}</ID> 18 <ID>${awba}</ID>
19 </TransportContractDocument> 19 </TransportContractDocument>
20 - <#if awbh?length gt 1> 20 + <#if awbh?default("")?length gt 1>
21 <AssociatedTransportDocument> 21 <AssociatedTransportDocument>
22 <ID>${awba}_${awbh}</ID> 22 <ID>${awba}_${awbh}</ID>
23 </AssociatedTransportDocument> 23 </AssociatedTransportDocument>
@@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
17 <TransportContractDocument> 17 <TransportContractDocument>
18 <ID>${awba}</ID> 18 <ID>${awba}</ID>
19 </TransportContractDocument> 19 </TransportContractDocument>
20 - <#if awbh?length gt 1>  
21 - <AssociatedTransportDocument>  
22 - <ID>${awba}_${awbh}</ID>  
23 - </AssociatedTransportDocument>  
24 - </#if> 20 + <#if awbh?default("")?length gt 1>
  21 + <AssociatedTransportDocument>
  22 + <ID>${awba}_${awbh}</ID>
  23 + </AssociatedTransportDocument>
  24 + </#if>
25 </Consignment> 25 </Consignment>
26 <AdditionalInformation> 26 <AdditionalInformation>
27 <Reason>${reason}</Reason> 27 <Reason>${reason}</Reason>