作者 shenhailong

生成报文 预配 新增修改删除 海关备案编码 企业代码 tcs 编码

@@ -131,5 +131,10 @@ jwt: @@ -131,5 +131,10 @@ jwt:
131 max-alive: 300 131 max-alive: 300
132 custom: 132 custom:
133 send-path: ./send/ 133 send-path: ./send/
  134 + #海关备案编码
  135 + custom-code: 460470678920X
  136 + org-code: 9141010070678920XJ
134 tcs: 137 tcs:
135 mq-number: DXPENT0000460002 138 mq-number: DXPENT0000460002
  139 +
  140 +
@@ -3,10 +3,7 @@ package com.sunyo.wlpt.message.builder.controller; @@ -3,10 +3,7 @@ package com.sunyo.wlpt.message.builder.controller;
3 import com.sunyo.wlpt.message.builder.service.MT2201Service; 3 import com.sunyo.wlpt.message.builder.service.MT2201Service;
4 import io.swagger.annotations.ApiOperation; 4 import io.swagger.annotations.ApiOperation;
5 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
6 -import org.springframework.web.bind.annotation.RequestBody;  
7 -import org.springframework.web.bind.annotation.RequestMapping;  
8 -import org.springframework.web.bind.annotation.ResponseBody;  
9 -import org.springframework.web.bind.annotation.RestController; 6 +import org.springframework.web.bind.annotation.*;
10 7
11 import java.io.IOException; 8 import java.io.IOException;
12 import java.util.Map; 9 import java.util.Map;
@@ -23,14 +20,28 @@ public class MT2201Controller { @@ -23,14 +20,28 @@ public class MT2201Controller {
23 * @param map 20 * @param map
24 * @return 21 * @return
25 */ 22 */
26 - @RequestMapping("/creatMt2201") 23 + @PostMapping("/creatMt2201")
27 @ApiOperation(value = "生成报文") 24 @ApiOperation(value = "生成报文")
28 @ResponseBody 25 @ResponseBody
29 public int creatMt2201(@RequestBody Map<String, Object> map) throws IOException { 26 public int creatMt2201(@RequestBody Map<String, Object> map) throws IOException {
30 27
31 - int i = mt2201Service.creatMt2201(map); 28 + return mt2201Service.creatMt2201(map);
  29 + }
  30 +
  31 + @PutMapping("/editMt2201")
  32 + @ApiOperation(value = "修改报文")
  33 + @ResponseBody
  34 + public int editMt2201(@RequestBody Map<String, Object> map) throws IOException {
  35 +
  36 + return mt2201Service.editMt2201(map);
  37 + }
  38 +
  39 + @PutMapping("/removeMt2201")
  40 + @ApiOperation(value = "删除报文")
  41 + @ResponseBody
  42 + public int removeMt2201(@RequestBody Map<String, Object> map) throws IOException {
32 43
33 - return i; 44 + return mt2201Service.removeMt2201(map);
34 } 45 }
35 46
36 } 47 }
@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestBody; @@ -6,6 +6,7 @@ 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.RestController; 7 import org.springframework.web.bind.annotation.RestController;
8 8
  9 +import java.io.IOException;
9 import java.util.Map; 10 import java.util.Map;
10 11
11 12
@@ -17,16 +18,10 @@ public class MT4201Controller { @@ -17,16 +18,10 @@ public class MT4201Controller {
17 MT4201Service mt4201Service; 18 MT4201Service mt4201Service;
18 19
19 20
20 - @RequestMapping("/4201create")  
21 - public Boolean pffmcreate(@RequestBody Map<String, Object> map){ 21 + @RequestMapping("/create4201")
  22 + public int pffmcreate(@RequestBody Map<String, Object> map) throws IOException {
22 23
23 - try {  
24 -  
25 - return mt4201Service.pffmcreate(map);  
26 - }catch (Exception e){  
27 - e.printStackTrace();  
28 - return false;  
29 - } 24 + return mt4201Service.pffmcreate(map);
30 25
31 } 26 }
32 27
1 package com.sunyo.wlpt.message.builder.service; 1 package com.sunyo.wlpt.message.builder.service;
2 2
3 import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; 3 import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
  4 +import org.omg.CORBA.OBJECT_NOT_EXIST;
4 5
5 import java.io.IOException; 6 import java.io.IOException;
6 import java.util.Map; 7 import java.util.Map;
@@ -21,4 +22,8 @@ public interface MT2201Service { @@ -21,4 +22,8 @@ public interface MT2201Service {
21 22
22 int creatMt2201(Map<String, Object> map) throws IOException; 23 int creatMt2201(Map<String, Object> map) throws IOException;
23 24
  25 + int editMt2201(Map<String, Object> map) throws IOException;
  26 +
  27 + int removeMt2201(Map<String, Object> map) throws IOException;
  28 +
24 } 29 }
@@ -5,6 +5,6 @@ import java.util.Map; @@ -5,6 +5,6 @@ import java.util.Map;
5 5
6 public interface MT4201Service { 6 public interface MT4201Service {
7 7
8 - Boolean pffmcreate(Map<String, Object> map) throws IOException; 8 + int pffmcreate(Map<String, Object> map) throws IOException;
9 9
10 } 10 }
@@ -45,10 +45,11 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{ @@ -45,10 +45,11 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{
45 hashMap.put("msessageType", msessageType); 45 hashMap.put("msessageType", msessageType);
46 hashMap.put("senderId", senderId); 46 hashMap.put("senderId", senderId);
47 hashMap.put("receiverID", receiverID); 47 hashMap.put("receiverID", receiverID);
48 - if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap)>0){  
49 - return 200;  
50 - }else {  
51 - return 201;  
52 - } 48 +// if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap)>0){
  49 +// return 200;
  50 +// }else {
  51 +// return 201;
  52 +// }
  53 + return 0;
53 } 54 }
54 } 55 }
@@ -8,6 +8,7 @@ import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201; @@ -8,6 +8,7 @@ import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201;
8 import com.sunyo.wlpt.message.builder.service.MT2201Service; 8 import com.sunyo.wlpt.message.builder.service.MT2201Service;
9 import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; 9 import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
10 import com.tianbo.util.Date.DateUtil; 10 import com.tianbo.util.Date.DateUtil;
  11 +import org.springframework.beans.factory.annotation.Value;
11 import org.springframework.cglib.beans.BeanMap; 12 import org.springframework.cglib.beans.BeanMap;
12 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
13 14
@@ -47,9 +48,53 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service { @@ -47,9 +48,53 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service {
47 return 0; 48 return 0;
48 } 49 }
49 50
  51 + @Value("${custom.custom-code}")
  52 + private String customCode;
  53 +
  54 + @Value("${custom.org-code}")
  55 + private String orgCode;
  56 +
50 @Override 57 @Override
51 public int creatMt2201(Map<String, Object> map) throws IOException{ 58 public int creatMt2201(Map<String, Object> map) throws IOException{
  59 + map.put("templatePath", "/manifest/MT2201.ftlx");
  60 + map.put("sendPath", "./send/add/");
  61 + return mt2201(map);
  62 + }
  63 +
  64 + @Override
  65 + public int editMt2201(Map<String, Object> map) throws IOException {
  66 + map.put("templatePath", "/edit/MT2201.ftlx");
  67 + map.put("sendPath", "./send/edit/");
  68 + return mt2201(map);
  69 + }
  70 +
  71 + @Override
  72 + public int removeMt2201(Map<String, Object> map) throws IOException {
  73 +
  74 + String customCode = map.get("customCode").toString();
  75 + // 生成报文头部
  76 + String msgId = makeMsgID("MT2201", customCode, map.get("awba").toString());
  77 + String msessageType = "MT2201";
  78 + String senderId = makeSenderID(customCode, customCode, "");
  79 + String receiverID = customCode;
  80 + map.put("msgId", msgId);
  81 + map.put("msessageType", msessageType);
  82 + map.put("senderId", senderId);
  83 + map.put("receiverID", receiverID);
  84 + // 报文头时间 精确到毫秒
  85 + map.put("sendTime", DateUtil.getCurrentTime17());
  86 + // 舱单传输人名称
  87 + map.put("orgCode", orgCode);
  88 + // 生成报文
  89 + if (makeXmlToFile("/remove/MT2201.ftlx", msgId+".xml", map, "./send/remove/")>0){
  90 + return 1;
  91 + }else {
  92 + return 0;
  93 + }
  94 + }
  95 +
52 96
  97 + public int mt2201(Map<String, Object> map) throws IOException {
53 ObjectMapper objectMapper = new ObjectMapper(); 98 ObjectMapper objectMapper = new ObjectMapper();
54 // 预配 99 // 预配
55 NMMS_CUSTOM_MT2201 custom_mt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class); 100 NMMS_CUSTOM_MT2201 custom_mt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class);
@@ -63,19 +108,21 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service { @@ -63,19 +108,21 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service {
63 map.put("mt", custom_mt2201); 108 map.put("mt", custom_mt2201);
64 map.put("awbAwbinfo", awbAwbinfo); 109 map.put("awbAwbinfo", awbAwbinfo);
65 // 生成报文头部 110 // 生成报文头部
66 - String msgId = makeMsgID("MT2201", "460470678920X", custom_mt2201.getAwba()); 111 + String msgId = makeMsgID("MT2201", customCode, custom_mt2201.getAwba());
67 String msessageType = "MT2201"; 112 String msessageType = "MT2201";
68 - String senderId = makeSenderID(customCode, "460470678920X", "DXPENT0000460002"); 113 + String senderId = makeSenderID(customCode, customCode, "");
69 String receiverID = customCode; 114 String receiverID = customCode;
70 map.put("msgId", msgId); 115 map.put("msgId", msgId);
71 map.put("msessageType", msessageType); 116 map.put("msessageType", msessageType);
72 map.put("senderId", senderId); 117 map.put("senderId", senderId);
73 map.put("receiverID", receiverID); 118 map.put("receiverID", receiverID);
  119 + // 舱单传输人名称
  120 + map.put("orgCode", orgCode);
74 // 生成报文 121 // 生成报文
75 - if (makeXmlToFile("/manifest/MT2201.ftlx", msgId+".xml", map)>0){  
76 - return 200; 122 + if (makeXmlToFile(map.get("templatePath").toString(), msgId+".xml", map, map.get("sendPath").toString())>0){
  123 + return 1;
77 }else { 124 }else {
78 - return 201; 125 + return 0;
79 } 126 }
80 } 127 }
81 } 128 }
@@ -39,11 +39,12 @@ public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service { @@ -39,11 +39,12 @@ public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service {
39 map.put("msessageType", msessageType); 39 map.put("msessageType", msessageType);
40 map.put("senderId", senderId); 40 map.put("senderId", senderId);
41 map.put("receiverID", receiverID); 41 map.put("receiverID", receiverID);
42 - if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map)>0){  
43 - return true;  
44 - }else {  
45 - return false;  
46 - } 42 +// if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map)>0){
  43 +// return true;
  44 +// }else {
  45 +// return false;
  46 +// }
  47 + return null;
47 } 48 }
48 49
49 } 50 }
@@ -14,7 +14,7 @@ import java.util.Map; @@ -14,7 +14,7 @@ import java.util.Map;
14 public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service { 14 public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
15 15
16 @Override 16 @Override
17 - public Boolean pffmcreate(Map<String, Object> map) throws IOException { 17 + public int pffmcreate(Map<String, Object> map) throws IOException {
18 18
19 19
20 ObjectMapper objectMapper = new ObjectMapper(); 20 ObjectMapper objectMapper = new ObjectMapper();
@@ -23,6 +23,7 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service { @@ -23,6 +23,7 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
23 23
24 // 关区代码 24 // 关区代码
25 String customCode = customMt4201.getCustomcode(); 25 String customCode = customMt4201.getCustomcode();
  26 +
26 // 报文头时间 精确到毫秒 27 // 报文头时间 精确到毫秒
27 map.put("sendTime", DateUtil.getCurrentTime17()); 28 map.put("sendTime", DateUtil.getCurrentTime17());
28 // 封装实体 29 // 封装实体
@@ -37,10 +38,10 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service { @@ -37,10 +38,10 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
37 map.put("msessageType", msessageType); 38 map.put("msessageType", msessageType);
38 map.put("senderId", senderId); 39 map.put("senderId", senderId);
39 map.put("receiverID", receiverID); 40 map.put("receiverID", receiverID);
40 - if (makeXmlToFile("/manifest/MT4201.ftlx", msgId+".xml", map)>0){  
41 - return true; 41 + if (makeXmlToFile("/manifest/MT4201.ftlx", msgId+".xml", map, "./send/add/")>0){
  42 + return 1;
42 }else { 43 }else {
43 - return false; 44 + return 0;
44 } 45 }
45 } 46 }
46 } 47 }
@@ -43,11 +43,11 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -43,11 +43,11 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
43 hashMap.put("msessageType", msessageType); 43 hashMap.put("msessageType", msessageType);
44 hashMap.put("senderId", senderId); 44 hashMap.put("senderId", senderId);
45 hashMap.put("receiverID", receiverID); 45 hashMap.put("receiverID", receiverID);
46 - if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap)>0){  
47 - return true;  
48 - }else {  
49 - return false;  
50 - } 46 +// if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap)>0){
  47 +// return true;
  48 +// }else {
  49 +// return false;
  50 +// }
51 }else { 51 }else {
52 52
53 // 生成报文头部 53 // 生成报文头部
@@ -59,16 +59,17 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ @@ -59,16 +59,17 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
59 hashMap.put("msessageType", msessageType); 59 hashMap.put("msessageType", msessageType);
60 hashMap.put("senderId", senderId); 60 hashMap.put("senderId", senderId);
61 hashMap.put("receiverID", receiverID); 61 hashMap.put("receiverID", receiverID);
62 - if (makeXmlToFile("/manifest/MT5202.ftlx", msgId+".xml", hashMap)>0){  
63 - return true;  
64 - }else {  
65 - return false;  
66 - } 62 +// if (makeXmlToFile("/manifest/MT5202.ftlx", msgId+".xml", hashMap)>0){
  63 +// return true;
  64 +// }else {
  65 +// return false;
  66 +// }
67 } 67 }
68 }catch (Exception e){ 68 }catch (Exception e){
69 69
70 e.printStackTrace(); 70 e.printStackTrace();
71 return false; 71 return false;
72 } 72 }
  73 + return null;
73 } 74 }
74 } 75 }
@@ -47,10 +47,11 @@ public class MT8205ServiceImp extends CustomXmlMaker implements MT8205Service { @@ -47,10 +47,11 @@ public class MT8205ServiceImp extends CustomXmlMaker implements MT8205Service {
47 map.put("senderId", senderId); 47 map.put("senderId", senderId);
48 map.put("receiverID", receiverID); 48 map.put("receiverID", receiverID);
49 49
50 - if (makeXmlToFile("/manifest/MT8205.ftlx", msgId+".xml", map)>0){  
51 - return true;  
52 - }else {  
53 - return false;  
54 - } 50 +// if (makeXmlToFile("/manifest/MT8205.ftlx", msgId+".xml", map)>0){
  51 +// return true;
  52 +// }else {
  53 +// return false;
  54 +// }
  55 + return null;
55 } 56 }
56 } 57 }
@@ -19,10 +19,10 @@ public class CustomXmlMaker { @@ -19,10 +19,10 @@ public class CustomXmlMaker {
19 private Configuration freemakerTemplate; 19 private Configuration freemakerTemplate;
20 20
21 @Value("${custom.send-path}") 21 @Value("${custom.send-path}")
22 - private static String sendPath; 22 + private String sendPath;
23 23
24 @Value("${tcs.mq-number}") 24 @Value("${tcs.mq-number}")
25 - private static String TCSMQNumber; 25 + private String TCSMQNumber;
26 26
27 public CustomXmlMaker() { 27 public CustomXmlMaker() {
28 if (freemakerTemplate==null){ 28 if (freemakerTemplate==null){
@@ -36,10 +36,11 @@ public class CustomXmlMaker { @@ -36,10 +36,11 @@ public class CustomXmlMaker {
36 * @param tplName 模板名称 36 * @param tplName 模板名称
37 * @param fileName 生成的报文名称 37 * @param fileName 生成的报文名称
38 * @param manifestMap 数据实体 38 * @param manifestMap 数据实体
  39 + * @param sendPath 生成路径
39 * @return 0失败,1成功 40 * @return 0失败,1成功
40 * @throws IOException 41 * @throws IOException
41 */ 42 */
42 - public int makeXmlToFile(String tplName,String fileName,Object manifestMap) throws IOException{ 43 + public int makeXmlToFile(String tplName,String fileName,Object manifestMap, String sendPath) throws IOException{
43 try { 44 try {
44 Template template = freemakerTemplate.getTemplate(tplName); 45 Template template = freemakerTemplate.getTemplate(tplName);
45 String content = FreeMarkerTemplateUtils.processTemplateIntoString(template,manifestMap); 46 String content = FreeMarkerTemplateUtils.processTemplateIntoString(template,manifestMap);
@@ -96,7 +97,7 @@ public class CustomXmlMaker { @@ -96,7 +97,7 @@ public class CustomXmlMaker {
96 sb.append(customCode) 97 sb.append(customCode)
97 .append(ORGSN) 98 .append(ORGSN)
98 .append("_") 99 .append("_")
99 - .append(TCSSN); 100 + .append(TCSMQNumber);
100 return sb.toString(); 101 return sb.toString();
101 } 102 }
102 public String makeSenderID(String customCode,String ORGSN){ 103 public String makeSenderID(String customCode,String ORGSN){
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3 + <Head>
  4 + <MessageID>${msgId}</MessageID>
  5 + <FunctionCode>5</FunctionCode>
  6 + <MessageType>${msessageType}</MessageType>
  7 + <SenderID>${senderId}</SenderID>
  8 + <ReceiverID>${receiverID}</ReceiverID>
  9 + <SendTime>${sendTime}</SendTime>
  10 + <Version>1.0</Version>
  11 + </Head>
  12 + <Declaration>
  13 + <RepresentativePerson>
  14 + <Name>${orgCode}</Name>
  15 + </RepresentativePerson>
  16 + <ExitCustomsOffice>
  17 + <ID>${mt.originstation}????</ID>
  18 + </ExitCustomsOffice>
  19 + <Carrier>
  20 + <ID>${mt.carrier}</ID>
  21 + </Carrier>
  22 + <BorderTransportMeans>
  23 + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
  24 + <TypeCode>4</TypeCode>
  25 + </BorderTransportMeans>
  26 + <Consignment>
  27 + <TransportContractDocument>
  28 + <ID>${mt.awba}</ID>
  29 + <ChangeReasonCode>9999</ChangeReasonCode>
  30 + <ConditionCode>10</ConditionCode>
  31 + </TransportContractDocument>
  32 + <LoadingLocation>
  33 + <ID>${mt.originstation}/${mt.customcode}</ID>
  34 + <LoadingDate>202001210605086</LoadingDate>
  35 + </LoadingLocation>
  36 + <UnloadingLocation>
  37 + <ID>${mt.destinationstation}</ID>
  38 + </UnloadingLocation>
  39 + <TransitDestination>
  40 + <ID>$TransitDestination$</ID>
  41 + </TransitDestination>
  42 + <GoodsConsignedPlace>
  43 + <ID>${mt.originstation}</ID>
  44 + </GoodsConsignedPlace>
  45 + <TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator>
  46 + <FreightPayment>
  47 + <MethodCode>${awbAwbinfo.paymodel}</MethodCode>
  48 + </FreightPayment>
  49 + <ConsignmentPackaging>
  50 + <QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity>
  51 + </ConsignmentPackaging>
  52 + <TotalGrossMassMeasure>${awbAwbinfo.weight}</TotalGrossMassMeasure>
  53 + <Consignee>
  54 + <Name>${awbAwbinfo.cnsnname}</Name>
  55 + <Address>
  56 + <Line>${awbAwbinfo.cnsnaddress}</Line>
  57 + <CountryCode>${awbAwbinfo.cnscountyr}</CountryCode>
  58 + </Address>
  59 + <Communication>
  60 + <ID>${awbAwbinfo.cnsntel}</ID>
  61 + </Communication>
  62 + </Consignee>
  63 + <Consignor>
  64 + <Name>${awbAwbinfo.shprname}</Name>
  65 + <Address>
  66 + <Line>${awbAwbinfo.shpraddress}</Line>
  67 + <CityName>$ConsignorCityName$</CityName>
  68 + <CountryCode>${awbAwbinfo.shprcountyr}</CountryCode>
  69 + </Address>
  70 + <Communication>
  71 + <ID>${awbAwbinfo.shprtel}</ID>
  72 + </Communication>
  73 + </Consignor>
  74 + <ConsignmentItem>
  75 + <SequenceNumeric>1</SequenceNumeric>
  76 + <ConsignmentItemPackaging>
  77 + <QuantityQuantity>${mt.piece}</QuantityQuantity>
  78 + </ConsignmentItemPackaging>
  79 + <Commodity>
  80 + <CargoDescription>${mt.goodsname}</CargoDescription>
  81 + </Commodity>
  82 + <GoodsMeasure>
  83 + <GrossMassMeasure>${mt.weight}</GrossMassMeasure>
  84 + </GoodsMeasure>
  85 + </ConsignmentItem>
  86 + </Consignment>
  87 + <AdditionalInformation>
  88 + <Reason>${reason}</Reason>
  89 + <ContactName>${contacName}</ContactName>
  90 + <ContactTel>${contacTel}</ContactTel>
  91 + </AdditionalInformation>
  92 + </Declaration>
  93 +</Manifest>
@@ -10,10 +10,10 @@ @@ -10,10 +10,10 @@
10 </Head> 10 </Head>
11 <Declaration> 11 <Declaration>
12 <RepresentativePerson> 12 <RepresentativePerson>
13 - <Name>舱单书传输人名称</Name> 13 + <Name>${orgCode}</Name>
14 </RepresentativePerson> 14 </RepresentativePerson>
15 <ExitCustomsOffice> 15 <ExitCustomsOffice>
16 - <ID>${mt.originstation}????</ID> 16 + <ID>${mt.originstation}</ID>
17 </ExitCustomsOffice> 17 </ExitCustomsOffice>
18 <Carrier> 18 <Carrier>
19 <ID>${mt.carrier}</ID> 19 <ID>${mt.carrier}</ID>
@@ -54,7 +54,6 @@ @@ -54,7 +54,6 @@
54 </Address> 54 </Address>
55 <Communication> 55 <Communication>
56 <ID>${awbAwbinfo.cnsntel}</ID> 56 <ID>${awbAwbinfo.cnsntel}</ID>
57 - <TypeID>${awbAwbinfo.cnsrmobiletype}</TypeID>  
58 </Communication> 57 </Communication>
59 </Consignee> 58 </Consignee>
60 <Consignor> 59 <Consignor>
@@ -65,7 +64,6 @@ @@ -65,7 +64,6 @@
65 </Address> 64 </Address>
66 <Communication> 65 <Communication>
67 <ID>${awbAwbinfo.shprtel}</ID> 66 <ID>${awbAwbinfo.shprtel}</ID>
68 - <TypeID>${awbAwbinfo.shprmobiletype}</TypeID>  
69 </Communication> 67 </Communication>
70 </Consignor> 68 </Consignor>
71 <ConsignmentItem> 69 <ConsignmentItem>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3 + <Head>
  4 + <MessageID>${msgId}</MessageID>
  5 + <FunctionCode>3</FunctionCode>
  6 + <MessageType>${msessageType}</MessageType>
  7 + <SenderID>${senderId}</SenderID>
  8 + <ReceiverID>${receiverID}</ReceiverID>
  9 + <SendTime>${sendTime}</SendTime>
  10 + <Version>1.0</Version>
  11 + </Head>
  12 + <Declaration>
  13 + <RepresentativePerson>
  14 + <Name>${orgCode}</Name>
  15 + </RepresentativePerson>
  16 + <BorderTransportMeans>
  17 + <JourneyID>${flightNo}</JourneyID>
  18 + </BorderTransportMeans>
  19 + <Consignment>
  20 + <TransportContractDocument>
  21 + <ID>${awba}</ID>
  22 + <ChangeReasonCode>9999</ChangeReasonCode>
  23 + </TransportContractDocument>
  24 + </Consignment>
  25 + <AdditionalInformation>
  26 + <Reason>${reason}</Reason>
  27 + <ContactName>${contactName}</ContactName>
  28 + <ContactTel>${contactTel}</ContactTel>
  29 + <Content>${content}</Content>
  30 + </AdditionalInformation>
  31 + </Declaration>
  32 +</Manifest>