作者 朱兆平

update:

1. 增加运抵批量删除接口

Signed-off-by: mrz <17966059@qq.com>
... ... @@ -28,3 +28,4 @@ kakoRevice/
/dist/
/nbdist/
/.nb-gradle/
/customTemplate/
... ...
... ... @@ -2,10 +2,12 @@ package com.tianbo.analysis.controller;
import com.tianbo.analysis.model.AdvanceArrive;
import com.tianbo.analysis.model.BatchSend;
import com.tianbo.analysis.model.ResultJson;
import com.tianbo.analysis.service.ArriveMasterService;
import com.tianbo.analysis.tools.WaybillTools;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
... ... @@ -39,4 +41,30 @@ public class ArrivedAMasterController {
return result>0? new ResultJson("200","提前运抵状态已更新"):new ResultJson("提前运抵状态更新失败");
}
@PostMapping("batchDel")
public ResultJson batchDel(@RequestBody BatchSend batchSend, @CookieValue("username") String username, @CookieValue("userid") String userid){
if (StringUtils.isEmpty(batchSend.businessAlterLog.getAlterReason())){
return new ResultJson("400","未提交删除申请原因");
}
if (StringUtils.isEmpty(batchSend.businessAlterLog.getContantname())){
return new ResultJson("400","未提交删除申请联系人或电话");
}
if (StringUtils.isEmpty(batchSend.businessAlterLog.getContenttel())){
return new ResultJson("400","未提交删除申请电话");
}
if (batchSend.billListDes==null || batchSend.billListDes.isEmpty()){
return new ResultJson("400","未选择运单");
}
boolean b = arriveMasterService.batchDel(batchSend, username);
if (b){
return new ResultJson("200","批量删除申请发送成功");
}else {
return new ResultJson("400","批量删除申请发送失败");
}
}
}
... ...
... ... @@ -18,4 +18,6 @@ public interface ARRIVEDMASTERMapper {
int updateByPrimaryKeySelective(ARRIVEDMASTER record);
int updateByPrimaryKey(ARRIVEDMASTER record);
int updateDelStatusByPrimaryKey(List<ARRIVEDMASTER> record);
}
... ...
... ... @@ -18,4 +18,6 @@ public interface ARRIVEDSECONDARYMapper {
int updateByPrimaryKeySelective(ARRIVEDSECONDARY record);
int updateByPrimaryKey(ARRIVEDSECONDARY record);
int updateDelStatusByPrimaryKey(List<ARRIVEDSECONDARY> record);
}
... ...
package com.tianbo.analysis.service;
import com.tianbo.analysis.model.AdvanceArrive;
import com.tianbo.analysis.model.BatchSend;
import com.tianbo.analysis.model.PREPAREMASTER;
import org.jetbrains.annotations.NotNull;
... ... @@ -25,4 +26,6 @@ public interface ArriveMasterService {
* todo: 提前运抵货代管理
*/
boolean checkSender(String wayBillno);
boolean batchDel(BatchSend batchSend, String username);
}
... ...
... ... @@ -4,16 +4,23 @@ import com.tianbo.analysis.dao.*;
import com.tianbo.analysis.model.*;
import com.tianbo.analysis.service.ArriveMasterService;
import com.tianbo.analysis.tools.WaybillTools;
import com.tianbo.analysis.tools.XSDValidateWithXML;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
import javax.annotation.Resource;
import java.io.File;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.nio.charset.StandardCharsets;
import java.util.*;
@Service
@Slf4j
... ... @@ -34,6 +41,15 @@ public class ArriveMasterServiceImpl implements ArriveMasterService {
@Resource
SENDLOGMapper sendlogMapper;
@Autowired
private TemplateEngine templateEngine;
@Value("${customs.xml-path}")
private String saveXmlDir;
@Value("${customs.transport-number}")
private String transportNo;
@Override
public boolean arrivedAhead(AdvanceArrive carAndWayBill) {
try {
... ... @@ -234,4 +250,151 @@ public class ArriveMasterServiceImpl implements ArriveMasterService {
public boolean checkSender(String wayBillno) {
return false;
}
@Override
public boolean batchDel(BatchSend batchSend, String username) {
CustomsHead customsHead = new CustomsHead();
String nowStr = DateUtil.getCurrentTime17();
String messageID = "CN_"
+ "MT3201"
+ "_1P0_"
+ transportNo+
"_" + nowStr;
customsHead.setMessageId(messageID);
customsHead.setSendTime(nowStr);
//航班信息存储
HashMap<String, String> flightMap = new HashMap<>();
ArrayList<Map> bills = new ArrayList<>();
/**
* noList: master;fc68f797-58f9-4276-850d-f772ab54e041;Y87489;2018/7/16 0:00:00;871-52149624;NO;4620
* noList: sub;e430bacf-d34d-49c4-a646-c6bab53245d9;Y87489;2018/7/16 0:00:00;871-52149624;5758599033;4620
* noList: sub;4ff7853f-0315-4632-ad0f-6a028054513d;Y87489;2018/7/16 0:00:00;871-52149624;5758599022;4620
* noList: sub;52dc1407-d686-42ac-87cd-ddacdb84ca18;Y87489;2018/7/16 0:00:00;871-52149624;5758599044;4620
* noList: sub;26bf643c-cf5b-4af2-8394-51585c02d88d;Y87489;2018/7/16 0:00:00;871-52149624;5758599077;4620
*/
if (batchSend.billListDes!=null && !batchSend.billListDes.isEmpty() && batchSend.businessAlterLog!=null){
for (String item : batchSend.billListDes) {
HashMap<String, String> billsMap = new HashMap<>();
String[] split = item.split(";");
//单证类别:master为主单,sub为分单
String billType = split[0];
String billAutoId = split[1];
//航班号
String flightNo = split[2];
//航班日期
String flightDateString = split[3];
// 主单号
String billMasterNo = split[4].replace("-","");
// 分单号
String billSecNo = split[5];
// 申报关区
String customCode = split[6];
flightMap.put("flightNo",flightNo);
flightMap.put("flightDate",flightDateString);
//设置关区
customsHead.setReceiverID(customCode);
billsMap.put("billAutoId",billAutoId);
billsMap.put("billMasterNo",billMasterNo);
billsMap.put("billSecNo",billMasterNo +"_" +billSecNo);
billsMap.put("billType",billType);
bills.add(billsMap);
}
}
Context context = new Context();
context.setVariable("bills",bills);
context.setVariable("head",customsHead);
context.setVariable("flight",flightMap);
context.setVariable("reason",batchSend.businessAlterLog);
context.setLocale(Locale.SIMPLIFIED_CHINESE);
//生成的文件名
String fileName = messageID + ".xml";
//生成的报文路径,带斜杠
String filePath = saveXmlDir+fileName;
try {
File file = ResourceUtils.getFile(filePath);
/**
* 中文的地方在模板中要用utext,否则中文会被 escape 转义
*/
String xmlStr = templateEngine.process("mt3201/MT3201_D.xml",context);
System.out.println("xmlStr = " + xmlStr);
boolean valied = XSDValidateWithXML.validateXMLSchema("xsd/Manifest_Arrival_Air_Delete_3201_3.xsd",xmlStr);
if (valied){
// 生成报文
FileUtils.writeStringToFile(file,xmlStr, StandardCharsets.UTF_8);
log.info("[PRE-BATCH-SEND]-SUCCESS,批量删除发送成功");
// 更新运单状态,含主单表和分单表
Boolean b = updateBatchStatus(batchSend, bills, username);
return b;
}else {
return false;
}
} catch (Exception e) {
log.error("[PRE-BATCH-DEL]-批量删除发生异常,{}",e.getMessage());
return false;
}
}
private Boolean updateBatchStatus(BatchSend batchSend,ArrayList<Map> bills,String username) {
//存储更新主单状态的列表
ArrayList<ARRIVEDMASTER> masters = new ArrayList<>();
ArrayList<ARRIVEDSECONDARY> subs = new ArrayList<>();
List<SENDLOG> sendlogList = new ArrayList<>();
for (Map<String,String> item : bills) {
// 批量插入发送日志
SENDLOG sendlog = new SENDLOG();
sendlog.setAutoid(UUID.randomUUID().toString());
sendlog.setMessageautoid(item.get("billAutoId"));
sendlog.setMessagetype(batchSend.businessAlterLog.getBusinesstype());
sendlog.setCreatedate(new Date());
sendlog.setReceiption("新舱单系统发送运抵舱单批量删除报");
sendlog.setOpauthor(username);
sendlog.setSendpeice(new Long(0));
sendlog.setSendweight(new BigDecimal(0));
sendlogList.add(sendlog);
if ("master".equals(item.get("billType"))){
ARRIVEDMASTER master = new ARRIVEDMASTER();
master.setAutoid(item.get("billAutoId"));
masters.add(master);
}else {
ARRIVEDSECONDARY scondary = new ARRIVEDSECONDARY();
scondary.setAutoid(item.get("billAutoId"));
subs.add(scondary);
}
}
int i = sendlogMapper.batchInsert(sendlogList);
if (i>0){
log.info("[PRE-BATCH-DEL-LOG-INSERT]-SUCCESS");
}else {
log.error("[PRE-BATCH-DEL-LOG-INSERT]-FAILD");
return false;
}
/**
* 以下两个批量更新语句无法返回具体影响行数,返回为-1
* 要么得配置在mybatis-config.xml,如下
* <configuration>
* <settings>
* <setting name="defaultExecutorType" value="SIMPLE"/>
* <setting name="defaultExecutorType" value="BATCH"/>
* </settings>
* </configuration>
*/
int i1 = arrivedmasterMapper.updateDelStatusByPrimaryKey(masters);
int i2 = arrivedsecondaryMapper.updateDelStatusByPrimaryKey(subs);
return true;
}
}
... ...
... ... @@ -360,4 +360,14 @@
ARRIVED_AHEAD = #{arrivedAhead,jdbcType=VARCHAR}
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<update id="updateDelStatusByPrimaryKey" parameterType="java.util.List">
BEGIN
<foreach collection="list" item="item" index="index" separator=";">
UPDATE CGONMS.ARRIVEDMASTER
SET STATUS = '08'
WHERE AUTOID = #{item.autoid,jdbcType=VARCHAR}
</foreach>
;END;
</update>
</mapper>
... ...
... ... @@ -372,4 +372,14 @@
STATUS = #{status,jdbcType=VARCHAR}
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<update id="updateDelStatusByPrimaryKey" parameterType="java.util.List">
BEGIN
<foreach collection="list" item="item" index="index" separator=";">
UPDATE CGONMS.ARRIVEDSECONDARY
SET STATUS = '08'
WHERE AUTOID = #{item.autoid,jdbcType=VARCHAR}
</foreach>
;END;
</update>
</mapper>
... ...
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1">
<Head th:object="${head}">
<MessageID th:text="*{messageId}"></MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT3201</MessageType>
<SenderID>460470678920X_DXPENT0000460002</SenderID>
<ReceiverID th:text="*{receiverID}"></ReceiverID>
<SendTime th:text="*{sendTime}"></SendTime>
<Version>1.0</Version>
</Head>
<Declaration th:object="${flight}">
<DeclarationOfficeID th:text="${head.receiverID}"></DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID th:text="|*{flightNo}/*{#dates.format(flightDate,'yyyyMMdd')}|"></JourneyID>
</BorderTransportMeans>
<th:block th:each="bill : ${bills}">
<Consignment>
<TransportContractDocument>
<ID th:text="${bill.billMasterNo}"></ID>
</TransportContractDocument>
<th:block th:if="${bill.billType == 'sub'}">
<AssociatedTransportDocument>
<ID th:text="${bill.billSecNo}"></ID>
</AssociatedTransportDocument>
</th:block>
</Consignment>
</th:block>
<AdditionalInformation th:object="${reason}">
<Reason th:utext="*{alterReason}"></Reason>
<ContactName th:utext="*{contantname}"></ContactName>
<ContactTel th:text="*{contenttel}"></ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 (http://www.altova.com) by lei_ying (szc) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="urn:Declaration:datamodel:standard:CN:MT3201:1" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!--******中国海关空运出口运抵报告删除报文定义文档******-->
<!--命名空间:urn:Declaration:datamodel:standard:CN:MT3201:1-->
<!--******根元素定义******-->
<!--运抵报告以Manifest作为根节点-->
<xs:element name="Manifest" type="Manifest">
<xs:annotation>
<xs:documentation>空运出口运抵报告删除</xs:documentation>
</xs:annotation>
</xs:element>
<!--******根元素结构定义******-->
<xs:complexType name="Manifest">
<xs:annotation>
<xs:documentation>空运出口运抵报告删除</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Head" type="Head">
<xs:annotation>
<xs:documentation>报文头(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Declaration">
<xs:annotation>
<xs:documentation>报文体(循环次数:1)</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="Declaration"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******报文头结构定义******-->
<!--MessageType/报文类型代码:MT3201-->
<!--FunctionCode/报文功能代码:3-->
<xs:complexType name="Head">
<xs:annotation>
<xs:documentation>报文头</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="MessageID" >
<xs:annotation>
<xs:documentation>报文编号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FunctionCode" fixed="3">
<xs:annotation>
<xs:documentation>报文功能代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MessageType" fixed="MT3201">
<xs:annotation>
<xs:documentation>报文类型代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SenderID" >
<xs:annotation>
<xs:documentation>发送方代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ReceiverID" >
<xs:annotation>
<xs:documentation>接受方代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SendTime" >
<xs:annotation>
<xs:documentation>发送时间(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Version" >
<xs:annotation>
<xs:documentation>报文版本号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******报文体结构定义******-->
<xs:complexType name="Declaration">
<xs:annotation>
<xs:documentation>报文体</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DeclarationOfficeID" >
<xs:annotation>
<xs:documentation>065 Customs office of declaration,coded 申报地海关代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BorderTransportMeans" type="BorderTransportMeans">
<xs:annotation>
<xs:documentation>运输工具数据段(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UnloadingLocation" type="UnloadingLocation" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>卸货地数据段(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Consignment" type="Consignment" maxOccurs="4999">
<xs:annotation>
<xs:documentation>提(运)单数据段(循环次数:1-9999)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TransportEquipment" type="TransportEquipment" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>集装箱数据段(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AdditionalInformation" type="AdditionalInformation" minOccurs="0">
<xs:annotation>
<xs:documentation>备注(循环次数:0-1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******茎元素结构定义******-->
<!--******运输工具数据段******-->
<xs:complexType name="BorderTransportMeans">
<xs:annotation>
<xs:documentation>运输工具数据段</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="JourneyID" >
<xs:annotation>
<xs:documentation>149 Conveyance reference number 航次航班编号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TypeCode" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>183 Mode/type of means of transport crossing the border code 运输方式代码(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ID" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>167 Identification of means of transport crossing the border code 运输工具代码(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Name" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>160 Identification of means of transport crossing the border 运输工具名称(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******卸货地数据段******-->
<xs:complexType name="UnloadingLocation">
<xs:annotation>
<xs:documentation>卸货地数据段</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ID" >
<xs:annotation>
<xs:documentation>080 Place of discharge code 卸货地代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ArrivalDate" >
<xs:annotation>
<xs:documentation>173 Date of arrival at place of discharge 到达卸货地日期(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******提(运)单数据段******-->
<xs:complexType name="Consignment">
<xs:annotation>
<xs:documentation>提(运)单数据段</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TransportContractDocument" type="TransportContractDocument">
<xs:annotation>
<xs:documentation>运输合同信息(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AssociatedTransportDocument" type="AssociatedTransportDocument" minOccurs="0">
<xs:annotation>
<xs:documentation>运输合同附加信息(循环次数:0-1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConsignmentPackaging" type="ConsignmentPackaging" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>货物总件数+包装种类代码(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TotalGrossMassMeasure" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>131 Total gross weight 货物总毛重(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConsignmentItem" type="ConsignmentItem" minOccurs="0" maxOccurs="0">
<xs:annotation>
<xs:documentation>商品项信息(循环次数:0)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--运输合同信息-->
<xs:complexType name="TransportContractDocument">
<xs:annotation>
<xs:documentation>运输合同信息</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ID" >
<xs:annotation>
<xs:documentation>015 Transport document number 总提(运)单号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--运输合同附加信息-->
<xs:complexType name="AssociatedTransportDocument">
<xs:annotation>
<xs:documentation>运输合同附加信息</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ID" >
<xs:annotation>
<xs:documentation>189 Associated transport document number 分提(运)单号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--货物总件数/包装种类代码-->
<xs:complexType name="ConsignmentPackaging">
<xs:annotation>
<xs:documentation>货物总件数/包装种类代码</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="QuantityQuantity" >
<xs:annotation>
<xs:documentation>146 Total number of packages 货物总件数(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TypeCode" >
<xs:annotation>
<xs:documentation>141 Type of packages identification 包装种类代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--商品项信息-->
<xs:complexType name="ConsignmentItem">
<xs:annotation>
<xs:documentation>商品项信息</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="SequenceNumeric" >
<xs:annotation>
<xs:documentation>006 Consignment item sequence number 商品项序号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConsignmentItemPackaging" type="ConsignmentItemPackaging">
<xs:annotation>
<xs:documentation>商品项包装信息(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Commodity" type="Commodity">
<xs:annotation>
<xs:documentation>商品项简要描述(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AdditionalInformation" type="AdditionalInformation">
<xs:annotation>
<xs:documentation>商品项补充描述(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--商品项详细包装信息-->
<xs:complexType name="ConsignmentItemPackaging">
<xs:annotation>
<xs:documentation>商品项详细包装信息</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="MarksNumbers" >
<xs:annotation>
<xs:documentation>142 Shipping marks 唛头(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--商品项简要描述-->
<xs:complexType name="Commodity">
<xs:annotation>
<xs:documentation>商品项简要描述</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="CargoDescription" >
<xs:annotation>
<xs:documentation>138 Brief cargo description 商品项简要描述(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******集装箱数据段******-->
<xs:complexType name="TransportEquipment">
<xs:annotation>
<xs:documentation>集装箱数据段</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="EquipmentIdentification" type="EquipmentIdentification">
<xs:annotation>
<xs:documentation>集装箱(器)编号信息(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CharacteristicCode" >
<xs:annotation>
<xs:documentation>152 Equipment size and type identification 集装箱(器)尺寸和类型(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FullnessCode" >
<xs:annotation>
<xs:documentation>154 Transport equipment loaded status 重箱或者空箱标识代码(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SealID" maxOccurs="9">
<xs:annotation>
<xs:documentation>165 Seal number 封志类型/号码和施加封志人类型(循环次数:1-9)</xs:documentation>
</xs:annotation><xs:complexType>
<xs:attribute name="AgencyCode">
<xs:annotation>
<xs:documentation>230 Seal agency,coded 施加封志人类型</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--集装箱(器)编号信息-->
<xs:complexType name="EquipmentIdentification">
<xs:annotation>
<xs:documentation>集装箱(器)编号信息</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ID" >
<xs:annotation>
<xs:documentation>159 Equipment identification number 集装箱(器)编号(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--******补充信息数据段******-->
<xs:complexType name="AdditionalInformation">
<xs:annotation>
<xs:documentation>补充信息数据段</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Reason" minOccurs="0">
<xs:annotation>
<xs:documentation>变更原因描述</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ContactName" minOccurs="0">
<xs:annotation>
<xs:documentation>变更申请联系人姓名</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ContactTel" minOccurs="0">
<xs:annotation>
<xs:documentation>变更申请联系人电话</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Content" minOccurs="0">
<xs:annotation>
<xs:documentation>105 Free text 备注(循环次数:1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
... ...