作者 shenhailong

生成报文删除报 航班日期格式 修改

... ... @@ -63,6 +63,9 @@ public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
// 生成报文
Map<String, Object> hashMap = new HashMap<>();
// 生成报文
... ...
... ... @@ -92,6 +92,10 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service {
// 处理主单号-
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
Map<String, Object> hashMap = new HashMap<>();
// 生成报文
if (makeXmlToFile("/remove/MT2201.ftlx", msgId+".xml", map, "./send/remove/")>0){
... ...
... ... @@ -104,6 +104,9 @@ public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service {
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
Map<String, Object> map3201 = new HashMap<>();
if (makeXmlToFile("/remove/MT3201.ftlx", msgId+".xml", map,"./send/remove/")>0){
map.put("functionCode", "3");
... ...
... ... @@ -99,6 +99,9 @@ public class MT3202ServiceImp extends CustomXmlMaker implements MT3202Service {
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
Map<String, Object> map3201 = new HashMap<>();
if (makeXmlToFile("/remove/MT3202.ftlx", msgId+".xml", map,"./send/remove/")>0){
map.put("functionCode", "3");
... ...
... ... @@ -104,6 +104,10 @@ public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
// 处理主单号 -
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
Map<String, Object> map4201 = new HashMap<>();
if (makeXmlToFile("/remove/MT4201.ftlx", msgId+".xml", map, "./send/remove/")>0){
map.put("functionCode", "3");
... ...
... ... @@ -153,6 +153,9 @@ public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
if ("MT5201".equals(map.get("rcfdep").toString())){
// 生成报文头部
String msgId = makeMsgID("MT5201", orgsn, map.get("awba").toString());
... ...
... ... @@ -98,6 +98,9 @@ public class MT6202ServiceImp extends CustomXmlMaker implements MT6202Service{
String awba = ReturnUtil.awbaReplace(map.get("awba").toString());
map.put("awbas", awba);
String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString());
map.put("flightDates",flightDate);
Map<String, Object> map3201 = new HashMap<>();
if (makeXmlToFile("/remove/MT6202.ftlx", msgId+".xml", map,"./send/remove/")>0){
map.put("functionCode", "3");
... ...
... ... @@ -96,7 +96,7 @@ public class ReturnUtil {
*/
public static String awbaReplace(String awba){
return awba.replace("-","");
return awba.replaceAll("-","");
}
}
... ...
... ... @@ -13,7 +13,7 @@
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -14,7 +14,7 @@
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDate}</JourneyID>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -11,7 +11,7 @@
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -10,7 +10,7 @@
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -10,7 +10,7 @@
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -11,7 +11,7 @@
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -11,7 +11,7 @@
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...
... ... @@ -10,7 +10,7 @@
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDate}</JourneyID>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
... ...