正在显示
6 个修改的文件
包含
9 行增加
和
10 行删除
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | 国际货运物流平台开发脚手架 | 4 | 国际货运物流平台开发脚手架 |
5 | #集成 | 5 | #集成 |
6 | * 已集成IMF,基于IMF的xml报文格式。在master的git主分支上 | 6 | * 已集成IMF,基于IMF的xml报文格式。在master的git主分支上 |
7 | + * POM文件包含本地包 | ||
7 | * 接收IMF的消息 | 8 | * 接收IMF的消息 |
8 | * 报文类型识别 | 9 | * 报文类型识别 |
9 | * 报文分类本地存储 | 10 | * 报文分类本地存储 |
@@ -15,6 +16,7 @@ | @@ -15,6 +16,7 @@ | ||
15 | * menu与权限关联 | 16 | * menu与权限关联 |
16 | * 已集成mybatis、mybatisGenerator、pageHelper | 17 | * 已集成mybatis、mybatisGenerator、pageHelper |
17 | * 集成定时任务框架 | 18 | * 集成定时任务框架 |
18 | - * 目前在IMF框架中使用 | 19 | + * 目前在IMF框架中使用,打开IMF_Task里面的定时任务注释就可以启动IMF客户端功能 |
19 | * 集成Spring Cloud | 20 | * 集成Spring Cloud |
21 | +* 集成websocket | ||
20 | 22 |
1 | package com.tianbo.warehouse.imf; | 1 | package com.tianbo.warehouse.imf; |
2 | 2 | ||
3 | import com.caac.imf.api.IMFClient; | 3 | import com.caac.imf.api.IMFClient; |
4 | -import com.tianbo.warehouse.handle.IMFSaveHandle; | ||
5 | -import com.tianbo.warehouse.schedul.IMF_Task; | ||
6 | -import com.tianbo.warehouse.util.IO.FileTool; | 4 | +import com.tianbo.warehouse.imf.handle.IMFSaveHandle; |
5 | +import com.tianbo.warehouse.imf.schedul.IMF_Task; | ||
7 | import org.apache.log4j.Logger; | 6 | import org.apache.log4j.Logger; |
8 | 7 | ||
9 | public class IMF_Reader extends Thread{ | 8 | public class IMF_Reader extends Thread{ |
1 | package com.tianbo.warehouse.imf; | 1 | package com.tianbo.warehouse.imf; |
2 | 2 | ||
3 | import com.caac.imf.api.IMFClient; | 3 | import com.caac.imf.api.IMFClient; |
4 | -import com.tianbo.warehouse.schedul.IMF_Task; | 4 | +import com.tianbo.warehouse.imf.schedul.IMF_Task; |
5 | import com.tianbo.warehouse.util.Date.DateUtil; | 5 | import com.tianbo.warehouse.util.Date.DateUtil; |
6 | import com.tianbo.warehouse.util.IO.FileTool; | 6 | import com.tianbo.warehouse.util.IO.FileTool; |
7 | import com.tianbo.warehouse.util.XML.MakeImfMeta; | 7 | import com.tianbo.warehouse.util.XML.MakeImfMeta; |
8 | import org.apache.commons.io.FileUtils; | 8 | import org.apache.commons.io.FileUtils; |
9 | import org.apache.log4j.Logger; | 9 | import org.apache.log4j.Logger; |
10 | -import org.xml.sax.SAXParseException; | ||
11 | 10 | ||
12 | import java.io.*; | 11 | import java.io.*; |
13 | import java.util.Iterator; | 12 | import java.util.Iterator; |
1 | -package com.tianbo.warehouse.handle; | 1 | +package com.tianbo.warehouse.imf.handle; |
2 | 2 | ||
3 | import com.tianbo.warehouse.model.T_ETL_MESSAGE; | 3 | import com.tianbo.warehouse.model.T_ETL_MESSAGE; |
4 | import com.tianbo.warehouse.service.T_ETL_MESSAGEService; | 4 | import com.tianbo.warehouse.service.T_ETL_MESSAGEService; |
1 | -package com.tianbo.warehouse.schedul; | 1 | +package com.tianbo.warehouse.imf.schedul; |
2 | 2 | ||
3 | import com.caac.imf.api.IMFClient; | 3 | import com.caac.imf.api.IMFClient; |
4 | import com.caac.imf.api.IMFClientFactory; | 4 | import com.caac.imf.api.IMFClientFactory; |
@@ -7,7 +7,6 @@ import com.tianbo.warehouse.imf.IMF_Sender; | @@ -7,7 +7,6 @@ import com.tianbo.warehouse.imf.IMF_Sender; | ||
7 | import com.tianbo.warehouse.util.IO.FileTool; | 7 | import com.tianbo.warehouse.util.IO.FileTool; |
8 | import org.apache.log4j.Logger; | 8 | import org.apache.log4j.Logger; |
9 | import org.apache.log4j.PropertyConfigurator; | 9 | import org.apache.log4j.PropertyConfigurator; |
10 | -import org.springframework.scheduling.annotation.Scheduled; | ||
11 | import org.springframework.stereotype.Component; | 10 | import org.springframework.stereotype.Component; |
12 | 11 | ||
13 | import java.text.SimpleDateFormat; | 12 | import java.text.SimpleDateFormat; |
1 | package com.tianbo.warehouse; | 1 | package com.tianbo.warehouse; |
2 | 2 | ||
3 | -import com.tianbo.warehouse.handle.IMFSaveHandle; | 3 | +import com.tianbo.warehouse.imf.handle.IMFSaveHandle; |
4 | 4 | ||
5 | public class handleTest { | 5 | public class handleTest { |
6 | private static String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Msg> <META> <SNDR>NDLR</SNDR> <RCVR></RCVR> <SEQN>172-33519102</SEQN> <DDTM>20181229124530224</DDTM> <TYPE>HYXX</TYPE> <STYP>NDLR</STYP> </META> <DECLAREPREPAREMASTERXMLBODY> <Head> <MessageID>CN_MT2201_1P0_460470678920X_20181229124530224</MessageID> <FunctionCode>9</FunctionCode> <MessageType>MT2201MASTER</MessageType> <SenderID>460470678920X_DXPENT0000460002_20181229124530224</SenderID> <ReceiverID>4604_20181229124530224</ReceiverID> <SendTime>20181229124530224</SendTime> <Version>1.0</Version> </Head> <Declaration> <Carrier> <ID>CV</ID> </Carrier> <ORG> <ID>CGO</ID> </ORG> <DES> <ID>CDG</ID> </DES> <BorderTransportMeans> <JourneyID>9732/2019-01-01</JourneyID> </BorderTransportMeans> <Consignment> <TransportContractDocument> <ID>172-33519102</ID> </TransportContractDocument> <LoadingLocation> <ID>CGO/4604</ID> <LoadingDate>2018-12-29 12:45</LoadingDate> </LoadingLocation> <UnloadingLocation> <ID>CGO/4604</ID> </UnloadingLocation> <TransportSplitIndicator>0</TransportSplitIndicator> <ConsignmentPackaging> <QuantityQuantity>337</QuantityQuantity> </ConsignmentPackaging> <TotalGrossMassMeasure>3192</TotalGrossMassMeasure> <PreQuantityQuantity>337</PreQuantityQuantity> <PreTotalGrossMassMeasure>3192</PreTotalGrossMassMeasure> <CustomsStatus>001</CustomsStatus> <FreightPayment> <MethodCode>PP</MethodCode> </FreightPayment> <ProductName>IMITATION JEWELRY</ProductName> <PrepareTime>2018-12-29 12:45</PrepareTime> <CustomsCode>4604</CustomsCode> <AgentName>ZRP</AgentName> <AgentCompany>郑州睿鹏物流有限公司</AgentCompany> <NameOfgoods>IMITATION JEWELRY</NameOfgoods> <DeliveryStation>001</DeliveryStation> <UNnumber></UNnumber> <Category></Category> <Consignee> <Name>QUALITAIR SEA INTERNATIONAL</Name> <Address> <Line>4 RUE DU MEUNIER BP 19622 95724 ROISSY CDG</Line> <CityName>CDG</CityName> <CountryCode>FR</CountryCode> <ZipCode></ZipCode> <PROVINCECODE></PROVINCECODE> <PROVINCENAME></PROVINCENAME> <Deltaname></Deltaname> <TelePhone>33 1 34 38 58 13</TelePhone> <Fax></Fax> <CNECUSID>EUROPEAN VAT NUMBER+FR93392293635</CNECUSID> <CNEAEO></CNEAEO> <Unlodingcode>CDG</Unlodingcode> </Address> </Consignee> <Consignor> <name>ON TIME EXPRESS LIMITED</name> <Address> <Line>ROOM 1102 FINANCIAL STREET HAI LUN CENTER NO 440 HAI LUN ROAD</Line> <CountryCode>CN</CountryCode> <ZipCode></ZipCode> <Deltaname></Deltaname> <TelePhone>862163642582</TelePhone> <Fax></Fax> <SHPAEO></SHPAEO> <SHPCUSID>USCI+91310000717852489D</SHPCUSID> </Address> </Consignor> </Consignment> </Declaration> </DECLAREPREPAREMASTERXMLBODY></Msg>"; | 6 | private static String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Msg> <META> <SNDR>NDLR</SNDR> <RCVR></RCVR> <SEQN>172-33519102</SEQN> <DDTM>20181229124530224</DDTM> <TYPE>HYXX</TYPE> <STYP>NDLR</STYP> </META> <DECLAREPREPAREMASTERXMLBODY> <Head> <MessageID>CN_MT2201_1P0_460470678920X_20181229124530224</MessageID> <FunctionCode>9</FunctionCode> <MessageType>MT2201MASTER</MessageType> <SenderID>460470678920X_DXPENT0000460002_20181229124530224</SenderID> <ReceiverID>4604_20181229124530224</ReceiverID> <SendTime>20181229124530224</SendTime> <Version>1.0</Version> </Head> <Declaration> <Carrier> <ID>CV</ID> </Carrier> <ORG> <ID>CGO</ID> </ORG> <DES> <ID>CDG</ID> </DES> <BorderTransportMeans> <JourneyID>9732/2019-01-01</JourneyID> </BorderTransportMeans> <Consignment> <TransportContractDocument> <ID>172-33519102</ID> </TransportContractDocument> <LoadingLocation> <ID>CGO/4604</ID> <LoadingDate>2018-12-29 12:45</LoadingDate> </LoadingLocation> <UnloadingLocation> <ID>CGO/4604</ID> </UnloadingLocation> <TransportSplitIndicator>0</TransportSplitIndicator> <ConsignmentPackaging> <QuantityQuantity>337</QuantityQuantity> </ConsignmentPackaging> <TotalGrossMassMeasure>3192</TotalGrossMassMeasure> <PreQuantityQuantity>337</PreQuantityQuantity> <PreTotalGrossMassMeasure>3192</PreTotalGrossMassMeasure> <CustomsStatus>001</CustomsStatus> <FreightPayment> <MethodCode>PP</MethodCode> </FreightPayment> <ProductName>IMITATION JEWELRY</ProductName> <PrepareTime>2018-12-29 12:45</PrepareTime> <CustomsCode>4604</CustomsCode> <AgentName>ZRP</AgentName> <AgentCompany>郑州睿鹏物流有限公司</AgentCompany> <NameOfgoods>IMITATION JEWELRY</NameOfgoods> <DeliveryStation>001</DeliveryStation> <UNnumber></UNnumber> <Category></Category> <Consignee> <Name>QUALITAIR SEA INTERNATIONAL</Name> <Address> <Line>4 RUE DU MEUNIER BP 19622 95724 ROISSY CDG</Line> <CityName>CDG</CityName> <CountryCode>FR</CountryCode> <ZipCode></ZipCode> <PROVINCECODE></PROVINCECODE> <PROVINCENAME></PROVINCENAME> <Deltaname></Deltaname> <TelePhone>33 1 34 38 58 13</TelePhone> <Fax></Fax> <CNECUSID>EUROPEAN VAT NUMBER+FR93392293635</CNECUSID> <CNEAEO></CNEAEO> <Unlodingcode>CDG</Unlodingcode> </Address> </Consignee> <Consignor> <name>ON TIME EXPRESS LIMITED</name> <Address> <Line>ROOM 1102 FINANCIAL STREET HAI LUN CENTER NO 440 HAI LUN ROAD</Line> <CountryCode>CN</CountryCode> <ZipCode></ZipCode> <Deltaname></Deltaname> <TelePhone>862163642582</TelePhone> <Fax></Fax> <SHPAEO></SHPAEO> <SHPCUSID>USCI+91310000717852489D</SHPCUSID> </Address> </Consignor> </Consignment> </Declaration> </DECLAREPREPAREMASTERXMLBODY></Msg>"; |
-
请 注册 或 登录 后发表评论