yml 增加 海关备案编码 组织机构代码 配置 运抵 新增报 删除报 出港理货删除报 新增报 模板 分单判断空字符 删除模板 添加content
正在显示
18 个修改的文件
包含
282 行增加
和
62 行删除
@@ -133,6 +133,7 @@ custom: | @@ -133,6 +133,7 @@ custom: | ||
133 | send-path: ./send/ | 133 | send-path: ./send/ |
134 | #海关备案编码 | 134 | #海关备案编码 |
135 | custom-code: 460470678920X | 135 | custom-code: 460470678920X |
136 | + #企业备案编码 | ||
136 | org-code: 9141010070678920XJ | 137 | org-code: 9141010070678920XJ |
137 | tcs: | 138 | tcs: |
138 | mq-number: DXPENT0000460002 | 139 | mq-number: DXPENT0000460002 |
1 | -package com.sunyo.wlpt.message.builder.controller; | ||
2 | - | ||
3 | -import com.sunyo.wlpt.message.builder.service.*; | ||
4 | -import org.springframework.beans.factory.annotation.Autowired; | ||
5 | -import org.springframework.web.bind.annotation.RequestBody; | ||
6 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
7 | -import org.springframework.web.bind.annotation.RestController; | ||
8 | - | ||
9 | -import java.util.Map; | ||
10 | - | ||
11 | -@RestController | ||
12 | -@RequestMapping("/mt8205") | ||
13 | -public class CreateftlxController { | ||
14 | - | ||
15 | - @Autowired | ||
16 | - MT8205Service mt8205Service; | ||
17 | - | ||
18 | - | ||
19 | - @RequestMapping("/8205create") | ||
20 | - public Boolean create8205(@RequestBody Map<String, Object> map){ | ||
21 | - | ||
22 | - try { | ||
23 | - | ||
24 | - return mt8205Service.create8205(map); | ||
25 | - }catch (Exception e){ | ||
26 | - e.printStackTrace(); | ||
27 | - return false; | ||
28 | - } | ||
29 | - | ||
30 | - } | ||
31 | - | ||
32 | - | ||
33 | -} |
@@ -2,9 +2,11 @@ package com.sunyo.wlpt.message.builder.controller; | @@ -2,9 +2,11 @@ package com.sunyo.wlpt.message.builder.controller; | ||
2 | 2 | ||
3 | 3 | ||
4 | import com.sunyo.wlpt.message.builder.service.MT3201Service; | 4 | import com.sunyo.wlpt.message.builder.service.MT3201Service; |
5 | +import io.swagger.annotations.ApiModel; | ||
5 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
6 | import org.springframework.web.bind.annotation.RequestBody; | 7 | import org.springframework.web.bind.annotation.RequestBody; |
7 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
9 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
8 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
9 | 11 | ||
10 | import java.util.Map; | 12 | import java.util.Map; |
@@ -17,18 +19,32 @@ public class MT3201Controller { | @@ -17,18 +19,32 @@ public class MT3201Controller { | ||
17 | MT3201Service mt3201Service; | 19 | MT3201Service mt3201Service; |
18 | 20 | ||
19 | 21 | ||
20 | - @RequestMapping("/3201create") | ||
21 | - public Boolean fohcreate(@RequestBody Map<String, Object> map){ | 22 | + @RequestMapping("/createMt3201") |
23 | + @ResponseBody | ||
24 | + public int fohcreate(@RequestBody Map<String, Object> map){ | ||
22 | 25 | ||
23 | try { | 26 | try { |
24 | 27 | ||
25 | return mt3201Service.fohcreate(map); | 28 | return mt3201Service.fohcreate(map); |
26 | }catch (Exception e){ | 29 | }catch (Exception e){ |
27 | e.printStackTrace(); | 30 | e.printStackTrace(); |
28 | - return false; | 31 | + return 0; |
29 | } | 32 | } |
30 | 33 | ||
31 | } | 34 | } |
32 | 35 | ||
36 | + @RequestMapping("/removeMt3201") | ||
37 | + @ResponseBody | ||
38 | + public int remove(@RequestBody Map<String, Object> map){ | ||
39 | + | ||
40 | + try { | ||
41 | + | ||
42 | + return mt3201Service.remove(map); | ||
43 | + }catch (Exception e){ | ||
44 | + e.printStackTrace(); | ||
45 | + return 0; | ||
46 | + } | ||
47 | + | ||
48 | + } | ||
33 | 49 | ||
34 | } | 50 | } |
@@ -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.RequestBody; | 5 | import org.springframework.web.bind.annotation.RequestBody; |
6 | import org.springframework.web.bind.annotation.RequestMapping; | 6 | import org.springframework.web.bind.annotation.RequestMapping; |
7 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
7 | import org.springframework.web.bind.annotation.RestController; | 8 | import org.springframework.web.bind.annotation.RestController; |
8 | 9 | ||
9 | import java.util.Map; | 10 | import java.util.Map; |
@@ -22,7 +23,8 @@ public class MT520XController { | @@ -22,7 +23,8 @@ public class MT520XController { | ||
22 | * @param map | 23 | * @param map |
23 | * @return | 24 | * @return |
24 | */ | 25 | */ |
25 | - @RequestMapping("/520xcreate") | 26 | + @RequestMapping("/createMt520x") |
27 | + @ResponseBody | ||
26 | public int create(@RequestBody Map<String, Object> map){ | 28 | public int create(@RequestBody Map<String, Object> map){ |
27 | 29 | ||
28 | try { | 30 | try { |
@@ -35,4 +37,24 @@ public class MT520XController { | @@ -35,4 +37,24 @@ public class MT520XController { | ||
35 | } | 37 | } |
36 | 38 | ||
37 | } | 39 | } |
40 | + | ||
41 | + /** | ||
42 | + * 进出港理货 | ||
43 | + * @param map | ||
44 | + * @return | ||
45 | + */ | ||
46 | + @RequestMapping("/removeMt520x") | ||
47 | + @ResponseBody | ||
48 | + public int remove520x(@RequestBody Map<String, Object> map){ | ||
49 | + | ||
50 | + try { | ||
51 | + | ||
52 | + return mt520XService.remove520x(map); | ||
53 | + | ||
54 | + }catch (Exception e){ | ||
55 | + e.printStackTrace(); | ||
56 | + return 0; | ||
57 | + } | ||
58 | + | ||
59 | + } | ||
38 | } | 60 | } |
1 | package com.sunyo.wlpt.message.builder.service; | 1 | package com.sunyo.wlpt.message.builder.service; |
2 | 2 | ||
3 | +import sun.jvm.hotspot.oops.ObjectHeap; | ||
4 | + | ||
3 | import java.io.IOException; | 5 | import java.io.IOException; |
4 | import java.util.Map; | 6 | import java.util.Map; |
5 | 7 | ||
6 | public interface MT3201Service { | 8 | public interface MT3201Service { |
7 | 9 | ||
8 | - Boolean fohcreate(Map<String, Object> map) throws IOException; | 10 | + int fohcreate(Map<String, Object> map) throws IOException; |
11 | + | ||
12 | + int remove(Map<String, Object> map) throws IOException; | ||
9 | } | 13 | } |
@@ -2,6 +2,7 @@ package com.sunyo.wlpt.message.builder.service; | @@ -2,6 +2,7 @@ package com.sunyo.wlpt.message.builder.service; | ||
2 | 2 | ||
3 | 3 | ||
4 | 4 | ||
5 | +import java.io.IOException; | ||
5 | import java.util.Map; | 6 | import java.util.Map; |
6 | 7 | ||
7 | public interface MT520XService { | 8 | public interface MT520XService { |
@@ -9,4 +10,6 @@ public interface MT520XService { | @@ -9,4 +10,6 @@ public interface MT520XService { | ||
9 | 10 | ||
10 | public int create(Map<String, Object> map); | 11 | public int create(Map<String, Object> map); |
11 | 12 | ||
13 | + public int remove520x(Map<String, Object> map) throws IOException; | ||
14 | + | ||
12 | } | 15 | } |
@@ -5,6 +5,7 @@ import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT3201; | @@ -5,6 +5,7 @@ import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT3201; | ||
5 | import com.sunyo.wlpt.message.builder.service.MT3201Service; | 5 | import com.sunyo.wlpt.message.builder.service.MT3201Service; |
6 | import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | 6 | import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; |
7 | import com.tianbo.util.Date.DateUtil; | 7 | import com.tianbo.util.Date.DateUtil; |
8 | +import org.springframework.beans.factory.annotation.Value; | ||
8 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
9 | 10 | ||
10 | import java.io.IOException; | 11 | import java.io.IOException; |
@@ -14,37 +15,60 @@ import java.util.Map; | @@ -14,37 +15,60 @@ import java.util.Map; | ||
14 | @Service | 15 | @Service |
15 | public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service { | 16 | public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service { |
16 | 17 | ||
18 | + @Value("${custom.custom-code}") | ||
19 | + private String orgsn; | ||
17 | 20 | ||
21 | + @Value("${custom.org-code}") | ||
22 | + private String orgCode; | ||
18 | 23 | ||
19 | @Override | 24 | @Override |
20 | - public Boolean fohcreate(Map<String, Object> map) throws IOException { | 25 | + public int fohcreate(Map<String, Object> map) throws IOException { |
21 | 26 | ||
22 | ObjectMapper objectMapper = new ObjectMapper(); | 27 | ObjectMapper objectMapper = new ObjectMapper(); |
23 | 28 | ||
24 | NMMS_CUSTOM_MT3201 customMt3201 = objectMapper.convertValue(map.get("mt3201"), NMMS_CUSTOM_MT3201.class); | 29 | NMMS_CUSTOM_MT3201 customMt3201 = objectMapper.convertValue(map.get("mt3201"), NMMS_CUSTOM_MT3201.class); |
25 | - | ||
26 | // 关区代码 | 30 | // 关区代码 |
27 | String customCode = customMt3201.getCustomcode(); | 31 | String customCode = customMt3201.getCustomcode(); |
28 | // 报文头时间 精确到毫秒 | 32 | // 报文头时间 精确到毫秒 |
29 | map.put("sendTime", DateUtil.getCurrentTime17()); | 33 | map.put("sendTime", DateUtil.getCurrentTime17()); |
30 | // 封装实体 | 34 | // 封装实体 |
31 | map.put("mt", customMt3201); | 35 | map.put("mt", customMt3201); |
36 | + // 生成报文头部 | ||
37 | + String msgId = makeMsgID("MT3201", orgsn, customMt3201.getAwba()); | ||
38 | + String msessageType = "MT3201"; | ||
39 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
40 | + String receiverID = customCode; | ||
41 | + map.put("msgId", msgId); | ||
42 | + map.put("msessageType", msessageType); | ||
43 | + map.put("senderId", senderId); | ||
44 | + map.put("receiverID", receiverID); | ||
45 | + if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map,"./send/add/")>0){ | ||
46 | + return 1; | ||
47 | + }else { | ||
48 | + return 0; | ||
49 | + } | ||
50 | + } | ||
32 | 51 | ||
52 | + @Override | ||
53 | + public int remove(Map<String, Object> map) throws IOException { | ||
54 | + // 关区代码 | ||
55 | + String customCode = map.get("customCode").toString(); | ||
56 | + // 报文头时间 精确到毫秒 | ||
57 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
33 | // 生成报文头部 | 58 | // 生成报文头部 |
34 | - String msgId = makeMsgID("MT3201", "460470678920X", customMt3201.getAwba()); | 59 | + String msgId = makeMsgID("MT3201", orgsn, map.get("awba").toString()); |
35 | String msessageType = "MT3201"; | 60 | String msessageType = "MT3201"; |
36 | - String senderId = makeSenderID(customCode, "460470678920X", "DXPENT0000460002"); | 61 | + String senderId = makeSenderID(customCode, orgsn, ""); |
37 | String receiverID = customCode; | 62 | String receiverID = customCode; |
38 | map.put("msgId", msgId); | 63 | map.put("msgId", msgId); |
39 | map.put("msessageType", msessageType); | 64 | map.put("msessageType", msessageType); |
40 | map.put("senderId", senderId); | 65 | map.put("senderId", senderId); |
41 | map.put("receiverID", receiverID); | 66 | map.put("receiverID", receiverID); |
42 | -// if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map)>0){ | ||
43 | -// return true; | ||
44 | -// }else { | ||
45 | -// return false; | ||
46 | -// } | ||
47 | - return null; | 67 | + if (makeXmlToFile("/remove/MT3201.ftlx", msgId+".xml", map,"./send/remove/")>0){ |
68 | + return 1; | ||
69 | + }else { | ||
70 | + return 0; | ||
71 | + } | ||
48 | } | 72 | } |
49 | 73 | ||
50 | } | 74 | } |
@@ -18,6 +18,9 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | @@ -18,6 +18,9 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | ||
18 | @Value("${custom.custom-code}") | 18 | @Value("${custom.custom-code}") |
19 | private String orgsn; | 19 | private String orgsn; |
20 | 20 | ||
21 | + @Value("${custom.org-code}") | ||
22 | + private String orgCode; | ||
23 | + | ||
21 | @Override | 24 | @Override |
22 | public int create(Map<String, Object> map) { | 25 | public int create(Map<String, Object> map) { |
23 | 26 | ||
@@ -35,13 +38,14 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | @@ -35,13 +38,14 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | ||
35 | hashMap.put("sendTime", DateUtil.getCurrentTime17()); | 38 | hashMap.put("sendTime", DateUtil.getCurrentTime17()); |
36 | // 封装实体 | 39 | // 封装实体 |
37 | hashMap.put("mt", customMt520X); | 40 | hashMap.put("mt", customMt520X); |
41 | + hashMap.put("orgCode", orgCode); | ||
38 | 42 | ||
39 | if ("5201".equals(customMt520X.getExt1())){ | 43 | if ("5201".equals(customMt520X.getExt1())){ |
40 | 44 | ||
41 | // 生成报文头部 | 45 | // 生成报文头部 |
42 | - String msgId = makeMsgID("MT5201", "460470678920X", customMt520X.getAwba()); | 46 | + String msgId = makeMsgID("MT5201", orgsn, customMt520X.getAwba()); |
43 | String msessageType = "MT5201"; | 47 | String msessageType = "MT5201"; |
44 | - String senderId = makeSenderID(customCode, "460470678920X", "DXPENT0000460002"); | 48 | + String senderId = makeSenderID(customCode, orgsn, "DXPENT0000460002"); |
45 | String receiverID = customCode; | 49 | String receiverID = customCode; |
46 | hashMap.put("msgId", msgId); | 50 | hashMap.put("msgId", msgId); |
47 | hashMap.put("msessageType", msessageType); | 51 | hashMap.put("msessageType", msessageType); |
@@ -76,4 +80,45 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | @@ -76,4 +80,45 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | ||
76 | } | 80 | } |
77 | return 0; | 81 | return 0; |
78 | } | 82 | } |
83 | + | ||
84 | + @Override | ||
85 | + public int remove520x(Map<String, Object> map) throws IOException { | ||
86 | + | ||
87 | + String customCode = map.get("customCode").toString(); | ||
88 | + map.put("customCode", customCode); | ||
89 | + // 报文头时间 精确到毫秒 | ||
90 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
91 | + if ("5201".equals(map.get("mt520x").toString())){ | ||
92 | + // 生成报文头部 | ||
93 | + String msgId = makeMsgID("MT5201", orgsn, map.get("awba").toString()); | ||
94 | + String msessageType = "MT5201"; | ||
95 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
96 | + String receiverID = customCode; | ||
97 | + map.put("msgId", msgId); | ||
98 | + map.put("msessageType", msessageType); | ||
99 | + map.put("senderId", senderId); | ||
100 | + map.put("receiverID", receiverID); | ||
101 | + if (makeXmlToFile("/remove/MT5201.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
102 | + return 1; | ||
103 | + }else { | ||
104 | + return 0; | ||
105 | + } | ||
106 | + }else { | ||
107 | + // 生成报文头部 | ||
108 | + String msgId = makeMsgID("MT5202", orgsn, map.get("awba").toString()); | ||
109 | + String msessageType = "MT5202"; | ||
110 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
111 | + String receiverID = customCode; | ||
112 | + map.put("msgId", msgId); | ||
113 | + map.put("msessageType", msessageType); | ||
114 | + map.put("senderId", senderId); | ||
115 | + map.put("receiverID", receiverID); | ||
116 | + if (makeXmlToFile("/remove/MT5202.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
117 | + return 1; | ||
118 | + }else { | ||
119 | + return 0; | ||
120 | + } | ||
121 | + } | ||
122 | + } | ||
123 | + | ||
79 | } | 124 | } |
@@ -29,6 +29,11 @@ | @@ -29,6 +29,11 @@ | ||
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> | ||
36 | + </#if> | ||
32 | <LoadingLocation> | 37 | <LoadingLocation> |
33 | <ID>${mt.originstation}/${mt.customcode}</ID> | 38 | <ID>${mt.originstation}/${mt.customcode}</ID> |
34 | <LoadingDate>202001210605086</LoadingDate> | 39 | <LoadingDate>202001210605086</LoadingDate> |
@@ -27,6 +27,11 @@ | @@ -27,6 +27,11 @@ | ||
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> | ||
34 | + </#if> | ||
30 | <LoadingLocation> | 35 | <LoadingLocation> |
31 | <ID>${mt.originstation}/${mt.customcode}</ID> | 36 | <ID>${mt.originstation}/${mt.customcode}</ID> |
32 | <LoadingDate>202001210605086</LoadingDate> | 37 | <LoadingDate>202001210605086</LoadingDate> |
@@ -18,18 +18,23 @@ | @@ -18,18 +18,23 @@ | ||
18 | </BorderTransportMeans> | 18 | </BorderTransportMeans> |
19 | <UnloadingLocation> | 19 | <UnloadingLocation> |
20 | <ID>${mt.destinationstation}/${mt.customcode}</ID> | 20 | <ID>${mt.destinationstation}/${mt.customcode}</ID> |
21 | - <ArrivalDate>${mt.arrivetime?string('yyyyMMdd')}</ArrivalDate> | 21 | + <ArrivalDate>${mt.arrivetime?string('yyyyMMddHHmmss')}</ArrivalDate> |
22 | </UnloadingLocation> | 22 | </UnloadingLocation> |
23 | <Consignment> | 23 | <Consignment> |
24 | <TransportContractDocument> | 24 | <TransportContractDocument> |
25 | - <ID>${mt.awba}<#if (mt.awbh)??>_${mt.awbh}</#if></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> | ||
31 | + </#if> | ||
27 | <ConsignmentPackaging> | 32 | <ConsignmentPackaging> |
28 | <QuantityQuantity>${mt.piece}</QuantityQuantity> | 33 | <QuantityQuantity>${mt.piece}</QuantityQuantity> |
29 | </ConsignmentPackaging> | 34 | </ConsignmentPackaging> |
30 | <TotalGrossMassMeasure>${mt.weight}</TotalGrossMassMeasure> | 35 | <TotalGrossMassMeasure>${mt.weight}</TotalGrossMassMeasure> |
31 | <ConsignmentItem> | 36 | <ConsignmentItem> |
32 | - <SequenceNumeric>${sequencenumeric}</SequenceNumeric> | 37 | + <SequenceNumeric>1</SequenceNumeric> |
33 | <Commodity> | 38 | <Commodity> |
34 | <CargoDescription>${mt.goodsname}</CargoDescription> | 39 | <CargoDescription>${mt.goodsname}</CargoDescription> |
35 | </Commodity> | 40 | </Commodity> |
@@ -22,6 +22,11 @@ | @@ -22,6 +22,11 @@ | ||
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> | ||
29 | + </#if> | ||
25 | <LoadingLocation> | 30 | <LoadingLocation> |
26 | <ID>${mt.originstation}/${mt.customcode}</ID> | 31 | <ID>${mt.originstation}/${mt.customcode}</ID> |
27 | <LoadingDate>${mt.loadingtime?string('yyyyMMddHHmmss')}</LoadingDate> | 32 | <LoadingDate>${mt.loadingtime?string('yyyyMMddHHmmss')}</LoadingDate> |
@@ -15,22 +15,24 @@ | @@ -15,22 +15,24 @@ | ||
15 | <TypeCode>4</TypeCode> | 15 | <TypeCode>4</TypeCode> |
16 | <ID>${mt.carrier}${mt.flightno}</ID> | 16 | <ID>${mt.carrier}${mt.flightno}</ID> |
17 | <Name>${mt.carrier}${mt.flightno}</Name> | 17 | <Name>${mt.carrier}${mt.flightno}</Name> |
18 | - <ActualDateTime>${mt.starttime?string('yyyyMMddHHmmssSSS')}</ActualDateTime> | ||
19 | - <CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmssSSS')}</CompletedDateTime> | 18 | + <ActualDateTime>${mt.starttime?string('yyyyMMddHHmmss')}</ActualDateTime> |
19 | + <CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmss')}</CompletedDateTime> | ||
20 | <LoadingLocation> | 20 | <LoadingLocation> |
21 | <ID>${mt.originstation}/${mt.customcode}</ID> | 21 | <ID>${mt.originstation}/${mt.customcode}</ID> |
22 | </LoadingLocation> | 22 | </LoadingLocation> |
23 | </BorderTransportMeans> | 23 | </BorderTransportMeans> |
24 | <TallyParty> | 24 | <TallyParty> |
25 | - <ID>???</ID> | 25 | + <ID>${orgCode}</ID> |
26 | </TallyParty> | 26 | </TallyParty> |
27 | <Consignment> | 27 | <Consignment> |
28 | <TransportContractDocument> | 28 | <TransportContractDocument> |
29 | <ID>${mt.awba}</ID> | 29 | <ID>${mt.awba}</ID> |
30 | </TransportContractDocument> | 30 | </TransportContractDocument> |
31 | + <#if mt.awbh?length gt 1> | ||
31 | <AssociatedTransportDocument> | 32 | <AssociatedTransportDocument> |
32 | - <ID>${mt.awba}_${mt.awbh}</ID> | 33 | + <ID>${mt.awba}_${mtawbh}</ID> |
33 | </AssociatedTransportDocument> | 34 | </AssociatedTransportDocument> |
35 | + </#if> | ||
34 | <ConsignmentPackaging> | 36 | <ConsignmentPackaging> |
35 | <QuantityQuantity>${mt.piece}</QuantityQuantity> | 37 | <QuantityQuantity>${mt.piece}</QuantityQuantity> |
36 | </ConsignmentPackaging> | 38 | </ConsignmentPackaging> |
@@ -14,22 +14,25 @@ | @@ -14,22 +14,25 @@ | ||
14 | <Name>${orgCode}</Name> | 14 | <Name>${orgCode}</Name> |
15 | </RepresentativePerson> | 15 | </RepresentativePerson> |
16 | <BorderTransportMeans> | 16 | <BorderTransportMeans> |
17 | - <JourneyID>${flightNo}</JourneyID> | 17 | + <JourneyID>${flightNo}/${flightDate}</JourneyID> |
18 | </BorderTransportMeans> | 18 | </BorderTransportMeans> |
19 | <Consignment> | 19 | <Consignment> |
20 | <TransportContractDocument> | 20 | <TransportContractDocument> |
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> | ||
25 | + <AssociatedTransportDocument> | ||
26 | + <ID>${awba}_${awbh}</ID> | ||
27 | + </AssociatedTransportDocument> | ||
28 | + </#if> | ||
24 | </Consignment> | 29 | </Consignment> |
25 | <AdditionalInformation> | 30 | <AdditionalInformation> |
26 | <Reason>${reason}</Reason> | 31 | <Reason>${reason}</Reason> |
27 | <ContactName>${contactName}</ContactName> | 32 | <ContactName>${contactName}</ContactName> |
28 | <ContactTel>${contactTel}</ContactTel> | 33 | <ContactTel>${contactTel}</ContactTel> |
29 | - <#if content ??> | 34 | + <#if content?length gt 1> |
30 | <Content>${content}</Content> | 35 | <Content>${content}</Content> |
31 | - <#else> | ||
32 | - <Content></Content> | ||
33 | </#if> | 36 | </#if> |
34 | </AdditionalInformation> | 37 | </AdditionalInformation> |
35 | </Declaration> | 38 | </Declaration> |
1 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>${msessageType}</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${flightNo}/${flightDate}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awba}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awba}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
@@ -10,17 +10,25 @@ | @@ -10,17 +10,25 @@ | ||
10 | </Head> | 10 | </Head> |
11 | <Declaration> | 11 | <Declaration> |
12 | <BorderTransportMeans> | 12 | <BorderTransportMeans> |
13 | - <JourneyID>${carrier}${flightNo}/${flightDate}</JourneyID> | 13 | + <JourneyID>${flightNo}/${flightDate}</JourneyID> |
14 | </BorderTransportMeans> | 14 | </BorderTransportMeans> |
15 | <Consignment> | 15 | <Consignment> |
16 | <TransportContractDocument> | 16 | <TransportContractDocument> |
17 | <ID>${awba}</ID> | 17 | <ID>${awba}</ID> |
18 | </TransportContractDocument> | 18 | </TransportContractDocument> |
19 | + <#if awbh?length gt 1> | ||
20 | + <AssociatedTransportDocument> | ||
21 | + <ID>${awba}_${awbh}</ID> | ||
22 | + </AssociatedTransportDocument> | ||
23 | + </#if> | ||
19 | </Consignment> | 24 | </Consignment> |
20 | <AdditionalInformation> | 25 | <AdditionalInformation> |
21 | <Reason>${reason}</Reason> | 26 | <Reason>${reason}</Reason> |
22 | <ContactName>${contactName}</ContactName> | 27 | <ContactName>${contactName}</ContactName> |
23 | <ContactTel>${contactTel}</ContactTel> | 28 | <ContactTel>${contactTel}</ContactTel> |
29 | + <#if content?length gt 1> | ||
30 | + <Content>${content}</Content> | ||
31 | + </#if> | ||
24 | </AdditionalInformation> | 32 | </AdditionalInformation> |
25 | </Declaration> | 33 | </Declaration> |
26 | </Manifest> | 34 | </Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>${msessageType}</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${flightNo}/${flightDate}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awba}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awba}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>${msessageType}</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${flightNo}/${flightDate}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awba}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awba}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
-
请 注册 或 登录 后发表评论