...
|
...
|
@@ -2,10 +2,7 @@ package com.sunyo.wlpt.message.builder.service.imp; |
|
|
|
|
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.sunyo.wlpt.base.model.AWB_AWBINFO;
|
|
|
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
|
|
|
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201;
|
|
|
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
|
|
|
import com.sunyo.wlpt.base.model.*;
|
|
|
import com.sunyo.wlpt.message.builder.factory.CustomsXmlFactory;
|
|
|
import com.sunyo.wlpt.message.builder.factory.CustomsXmlHeader;
|
|
|
import com.sunyo.wlpt.message.builder.service.MT2201Service;
|
...
|
...
|
@@ -20,6 +17,7 @@ import org.springframework.stereotype.Service; |
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
...
|
...
|
@@ -115,6 +113,20 @@ public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service { |
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int securityBuilder(Map<String, Object> map) throws IOException, ParseException {
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
SecurityDeclaration security = objectMapper.convertValue(map.get("security"), SecurityDeclaration.class);
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
String format = simpleDateFormat.format(new Date());
|
|
|
map.put("format", format);
|
|
|
map.put("security", security);
|
|
|
if (makeXmlToFile("/manifest/SecurityDeclaration.ftlx",security.getSdWaybill()+".xml",map,"./send")>0){
|
|
|
return 1;
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
public Map<String, Object> mt2201(Map<String, Object> map) throws IOException, ParseException {
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
...
|
...
|
|