作者 zhuzhaoping

合并分支 'long_dev' 到 'master'

Long dev



查看合并请求 !1
正在显示 66 个修改的文件 包含 3518 行增加202 行删除
... ... @@ -2,7 +2,7 @@
web:
upload-path: upload/
server:
port: 7003
port: 4559
servlet:
context-path: ${SERVER_CONTEXTPATH:}
spring:
... ... @@ -11,7 +11,6 @@ spring:
mvc:
#静态资源,设置上传文件的访问,
static-path-pattern: /**
resources:
static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}
... ... @@ -86,17 +85,18 @@ spring:
eureka:
instance:
#eureka服务器页面中status的请求路径
status-page-url: http://${eureka.instance.hostname}:${server.port}/index
status-page-url: http://${eureka.instance.hostname}:${server.port}/
prefer-ip-address: true
instance-id: ${spring.cloud.client.ip-address}:${server.port}
hostname: ${spring.cloud.client.ip-address}
lease-renewal-interval-in-seconds: 15
lease-expiration-duration-in-seconds: 45
client:
#eureka注册中心服务器地址
service-url:
defaultZone: http://10.50.3.82:19527/eureka/
# defaultZone: http://127.0.0.1:12345/eureka/
defaultZone: http://192.168.1.53:12345/eureka/
registry-fetch-interval-seconds: 30
lease-renewal-interval-in-seconds: 15
lease-expiration-duration-in-seconds: 45
... ... @@ -110,7 +110,6 @@ pagehelper:
reasonable: true
support-methods-arguments: true
params: count=countSql
#debug配置,debug或者为true的时候,logback才会记录和写入日志文件
trace: false
debug: true
... ... @@ -131,5 +130,10 @@ jwt:
max-alive: 300
custom:
send-path: ./send/
#海关备案编码
custom-code: 460470678920X
#企业备案编码
org-code: 9141010070678920XJ
tcs:
mq-number: DXPENT0000460002
... ...
2020-03-05 08:05:03.175 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:05:03.384 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:05:11.663 [DiscoveryClient-CacheRefreshExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 30 common frames omitted
2020-03-05 08:05:11.666 [DiscoveryClient-CacheRefreshExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to refresh its cache! status = Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:05:23.403 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:05:23.410 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:46:23.818 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:46:23.819 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:46:27.078 [DiscoveryClient-CacheRefreshExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 30 common frames omitted
2020-03-05 08:46:27.082 [DiscoveryClient-CacheRefreshExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to refresh its cache! status = Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:46:38.831 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:46:38.834 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:46:53.839 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:46:53.845 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:46:57.085 [DiscoveryClient-CacheRefreshExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 30 common frames omitted
2020-03-05 08:46:57.098 [DiscoveryClient-CacheRefreshExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to refresh its cache! status = Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149)
at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985)
at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-03-05 08:59:54.825 [DiscoveryClient-HeartbeatExecutor-0] ERROR c.n.d.s.t.decorator.RedirectingEurekaHttpClient - Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://192.168.1.53:12345/eureka/}
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 27 common frames omitted
2020-03-05 08:59:54.827 [DiscoveryClient-HeartbeatExecutor-0] ERROR com.netflix.discovery.DiscoveryClient - DiscoveryClient_WLPT-MESSAGEBUILDER/192.168.1.49:4559 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864)
at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
... ...
... ... @@ -29,14 +29,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
... ... @@ -108,6 +101,16 @@
<artifactId>base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!--feign的依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
... ...
... ... @@ -2,10 +2,14 @@ package com.sunyo.wlpt.message.builder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableDiscoveryClient
//@EnableDiscoveryClient
@EnableEurekaClient
@EnableFeignClients
public class BuilderApplication {
public static void main(String[] args) {
... ...
package com.sunyo.wlpt.message.builder.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/")
public class IndexController {
@GetMapping("index")
public String index(){
return "11";
// return "数据仓库接收,落地报文给新舱单";
}
}
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import freemarker.template.Configuration;
import com.sunyo.wlpt.message.builder.service.MT1201Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mt1201")
public class MT1201Controller extends CustomXmlMaker {
private static String businessType = "MT1201";
public class MT1201Controller {
@Autowired
private Configuration freemakerTemplate;
private MT1201Service mt1201Service;
/**
* 原始 FFm
* @param map
* @return
*/
@RequestMapping("/createMt1201")
@ResponseBody
public Map<String, Object> ffmcreate(@RequestBody Map<String, Object> map){
try {
return mt1201Service.ffmcreate(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
/**
* 原始 FFm
* @param map
* @return
*/
@PutMapping("/editMt1201")
@ResponseBody
public Map<String, Object> editMt1201(@RequestBody Map<String, Object> map){
try {
@RequestMapping("/send")
public Boolean mt1201New(@RequestBody Map awb_manifest) throws Exception{
return mt1201Service.editMt1201(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/removeMt1201")
@ResponseBody
public Map<String, Object> removeMt1201(@RequestBody Map<String, Object> map){
try {
return mt1201Service.removeMt1201(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.model.CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import freemarker.template.Configuration;
import com.sunyo.wlpt.message.builder.service.MT2201Service;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mt2201")
public class MT2201Controller extends CustomXmlMaker {
@RequestMapping(value = "/mt2201")
public class MT2201Controller {
@Autowired
private Configuration freemakerTemplate;
private static String businessType = "MT2201";
private MT2201Service mt2201Service;
/**
* MAP包含运单实体与舱单实体
* @param awb_manifest {awb:AWB_AWBINFO,man:}
* 生成报文
* @param map
* @return
* @throws Exception
*/
@RequestMapping("/send")
public Boolean mt1201New(@RequestBody Map awb_manifest) throws Exception{
@PostMapping("/creatMt2201")
@ApiOperation(value = "生成报文")
@ResponseBody
public Map<String, Object> creatMt2201(@RequestBody Map<String, Object> map) {
try {
return mt2201Service.creatMt2201(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/editMt2201")
@ApiOperation(value = "修改报文")
@ResponseBody
public Map<String, Object> editMt2201(@RequestBody Map<String, Object> map) {
try {
CUSTOM_RESPONSE response = new CUSTOM_RESPONSE();
response.setAwbano("17212345678");
response.setCusfunctioncode("2");
response.setCusreciverid("4604");
response.setCusversion("1.2");
response.setBusdate(new Date());
response.setBustype(businessType);
return mt2201Service.editMt2201(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/removeMt2201")
@ApiOperation(value = "删除报文")
@ResponseBody
public Map<String, Object> removeMt2201(@RequestBody Map<String, Object> map) {
String msgId = makeMsgID(businessType,"460470678920X","17212345678");
response.setCusmsgid(msgId);
response.setCussenderid(makeSenderID("4604","460470678920X"));
try {
String filename = response.getCusmsgid()+".xml";
makeXmlToFile("/manifest/MT2201.ftlx",filename,awb_manifest);
return mt2201Service.removeMt2201(map);
}catch (Exception e){
e.printStackTrace();
return false;
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
return true;
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT3201Service;
import io.swagger.annotations.ApiModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mt3201")
public class MT3201Controller {
@Autowired
MT3201Service mt3201Service;
@RequestMapping("/createMt3201")
@ResponseBody
public Map<String, Object> fohcreate(@RequestBody Map<String, Object> map){
try {
return mt3201Service.fohcreate(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/removeMt3201")
@ResponseBody
public Map<String, Object> remove(@RequestBody Map<String, Object> map){
try {
return mt3201Service.remove(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT3202Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping(value = "/mt3202")
public class MT3202Controller {
@Autowired
private MT3202Service mt3202Service;
@PostMapping("/createMt3202")
@ResponseBody
public Map<String, Object> createMt3201(@RequestBody Map<String, Object> map){
try {
return mt3202Service.createMt3202(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/removeMt3202")
@ResponseBody
public Map<String, Object> remove(@RequestBody Map<String, Object> map){
try {
return mt3202Service.removeMt3202(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT4201Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mt4201")
public class MT4201Controller {
@Autowired
MT4201Service mt4201Service;
@PostMapping("/createMt4201")
@ResponseBody
public Map<String, Object> pffmcreate(@RequestBody Map<String, Object> map) {
try {
return mt4201Service.pffmcreate(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping("/removeMt4201")
@ResponseBody
public Map<String, Object> remove4201(@RequestBody Map<String, Object> map) {
try {
return mt4201Service.remove4201(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT520XService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/mt520x")
public class MT520XController {
@Autowired
MT520XService mt520XService;
/**
* 进出港理货
* @param map
* @return
*/
@PostMapping("/createMt520x")
@ResponseBody
public Map<String, Object> create(@RequestBody Map<String, Object> map){
try {
return mt520XService.create(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
/**
* 进出港理货
* @param map
* @return
*/
@PutMapping("/removeMt520x")
@ResponseBody
public Map<String, Object> remove520x(@RequestBody Map<String, Object> map){
try {
return mt520XService.remove520x(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT6202Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@RequestMapping(value = "/mt6202")
@RestController
public class MT6202Controller {
@Autowired
private MT6202Service mt6202Service;
@PostMapping(value = "/createMt6202")
@ResponseBody
public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map) {
try {
return mt6202Service.creatMt6202(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
@PutMapping(value = "/removeMt6202")
@ResponseBody
public Map<String, Object> removeMt6202(@RequestBody Map<String, Object> map) {
try {
return mt6202Service.removeMt6202(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.controller;
import com.sunyo.wlpt.message.builder.service.MT8205Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@RequestMapping(value = "/mt8205")
@RestController
public class MT8205Controller {
@Autowired
private MT8205Service mt8205Service;
@PostMapping(value = "/creatMt8205")
@ResponseBody
public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map){
try {
return mt8205Service.create8205(map);
}catch (Exception e){
e.printStackTrace();
Map<String, Object> maps = new HashMap<>();
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
import com.sunyo.wlpt.message.builder.service.imp.FeignServiceImp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
@Component
@FeignClient(value = "nmms-server-export", fallback = FeignServiceImp.class)
public interface FeignService {
@RequestMapping("/jx/result")
String jxvalue(NMMS_CUSTOM_MT2201 nmms_custom_mt2201);
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT1201Service {
Map<String, Object> ffmcreate (Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> editMt1201 (Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> removeMt1201 (Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
import org.omg.CORBA.OBJECT_NOT_EXIST;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT2201Service {
int deleteByPrimaryKey(String uuid);
int insert(NMMS_CUSTOM_MT2201 record);
int insertSelective(NMMS_CUSTOM_MT2201 record);
NMMS_CUSTOM_MT2201 selectByPrimaryKey(String uuid);
int updateByPrimaryKeySelective(NMMS_CUSTOM_MT2201 record);
int updateByPrimaryKey(NMMS_CUSTOM_MT2201 record);
Map<String, Object> creatMt2201(Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> editMt2201(Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> removeMt2201(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import sun.jvm.hotspot.oops.ObjectHeap;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT3201Service {
Map<String, Object> fohcreate(Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> remove(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT3202Service {
Map<String, Object> createMt3202(Map<String, Object> map) throws ParseException, IOException;
Map<String, Object> removeMt3202(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT4201Service {
Map<String, Object> pffmcreate(Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> remove4201(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT520XService {
public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException;
public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT6202Service {
Map<String, Object> creatMt6202(Map<String, Object> map) throws IOException, ParseException;
Map<String, Object> removeMt6202(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;
public interface MT8205Service {
Map<String, Object> create8205(Map<String, Object> map) throws IOException, ParseException;
}
... ...
package com.sunyo.wlpt.message.builder.service;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Map;
public interface MakeXml1201Service {
boolean makeXml1201_new(@RequestBody Map awb_manifest) throws Exception;
}
package com.sunyo.wlpt.message.builder.service.imp;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
import com.sunyo.wlpt.message.builder.service.FeignService;
import org.springframework.stereotype.Component;
import java.util.Map;
@Component
public class FeignServiceImp implements FeignService{
@Override
public String jxvalue(NMMS_CUSTOM_MT2201 nmms_custom_mt2201) {
System.out.println("服务调用失败");
return "服务调用失败";
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.AWB_AWBINFO;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MT1201Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{
@Value("${custom.custom-code}")
private String orgsn;
@Value("${custom.org-code}")
private String orgCode;
@Override
public Map<String, Object> ffmcreate(Map<String, Object> map) throws IOException, ParseException {
map.put("templatePath", "/manifest/MT1201.ftlx");
map.put("sendPath", "./send/add/");
return mt1201(map);
}
@Override
public Map<String, Object> editMt1201(Map<String, Object> map) throws IOException, ParseException {
map.put("templatePath", "/edit/MT1201.ftlx");
map.put("sendPath", "./send/edit/");
return mt1201(map);
}
@Override
public Map<String, Object> removeMt1201(Map<String, Object> map) throws IOException, ParseException {
String customCode = map.get("customCode").toString();
// 生成报文头部
String msgId = makeMsgID("MT1201", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 舱单传输人名称
map.put("orgCode", orgCode);
// 处理主单号 -
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/MT1201.ftlx", msgId+".xml", map, "./send/remove/")>0){
map.put("functionCode", "3");
map.put("busType","MT1201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
hashMap.put("status", "1");
hashMap.put("customResponse", nmmsCustomResponse);
return hashMap;
}else {
hashMap.put("status", "0");
return hashMap;
}
}
public Map<String, Object> mt1201(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
// 预配
NMMS_CUSTOM_MT1201 customMt1201 = objectMapper.convertValue(map.get("mt1201"), NMMS_CUSTOM_MT1201.class);
// 运单
AWB_AWBINFO awbAwbinfo = customMt1201.getAwbinfo();
// 关区代码
String customCode = customMt1201.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 航班起飞时间 sendTime(海关接受时间) + 1小时
String s = DateUtil.addDateMinut(new Date(), 1);
// 航班到达时间 航班起飞时间 + 2小时/+当前是间加3个小时
String ss = DateUtil.addDateMinut(new Date(), 3);
map.put("departureDateTime", s);
map.put("arrivalDateTime", ss);
// 到达卸货地时间
String arrival = ss.substring(0, 8);
map.put("arrival", arrival);
// 封装实体
map.put("mt", customMt1201);
map.put("awbAwbinfo", awbAwbinfo);
// 处理主单号-
String awba = ReturnUtil.awbaReplace(customMt1201.getAwba());
map.put("awba", awba);
// 生成报文头部
String msgId = makeMsgID("MT1201", orgsn, customMt1201.getAwba());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 舱单传输人名称
map.put("orgCode", orgCode);
Map<String, Object> maps = new HashMap<>();
// 生成报文
if (makeXmlToFile(map.get("templatePath").toString(), msgId+".xml", map, map.get("sendPath").toString())>0){
if (!map.containsKey("reason")){
map.put("functionCode", "9");
map.put("busType","MT1201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt1201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt1201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt1201.getAwba());
if (!"".equals(customMt1201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt1201.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
map.put("functionCode", "5");
map.put("busType","MT1201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt1201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt1201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt1201.getAwba());
if (!"".equals(customMt1201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt1201.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("修改");
nmmsCustomResponse.setCusrescode("25");
nmmsCustomResponse.setCusrestext("修改报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}
}else {
maps.put("status", "0");
return maps;
}
}
}
... ...
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.message.builder.service.MT2201Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service {
@Override
public int deleteByPrimaryKey(String uuid) {
return 0;
}
@Override
public int insert(NMMS_CUSTOM_MT2201 record) {
return 0;
}
@Override
public int insertSelective(NMMS_CUSTOM_MT2201 record) {
return 0;
}
@Override
public NMMS_CUSTOM_MT2201 selectByPrimaryKey(String uuid) {
return null;
}
@Override
public int updateByPrimaryKeySelective(NMMS_CUSTOM_MT2201 record) {
return 0;
}
@Override
public int updateByPrimaryKey(NMMS_CUSTOM_MT2201 record) {
return 0;
}
@Value("${custom.custom-code}")
private String orgsn;
@Value("${custom.org-code}")
private String orgCode;
@Override
public Map<String, Object> creatMt2201(Map<String, Object> map) throws IOException, ParseException {
map.put("templatePath", "/manifest/MT2201.ftlx");
map.put("sendPath", "./send/add/");
return mt2201(map);
}
@Override
public Map<String, Object> editMt2201(Map<String, Object> map) throws IOException, ParseException {
map.put("templatePath", "/edit/MT2201.ftlx");
map.put("sendPath", "./send/edit/");
return mt2201(map);
}
@Override
public Map<String, Object> removeMt2201(Map<String, Object> map) throws IOException, ParseException {
String customCode = map.get("customCode").toString();
// 生成报文头部
String msgId = makeMsgID("MT2201", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 舱单传输人名称
map.put("orgCode", orgCode);
// 处理主单号-
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){
map.put("functionCode", "3");
map.put("busType","MT2201");
System.out.println();
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
hashMap.put("status", "1");
hashMap.put("customResponse", nmmsCustomResponse);
return hashMap;
}else {
hashMap.put("status", "0");
return hashMap;
}
}
public Map<String, Object> mt2201(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
// 预配
NMMS_CUSTOM_MT2201 custom_mt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class);
// 运单
AWB_AWBINFO awbAwbinfo = custom_mt2201.getAwbinfo();
// 关区代码
String customCode = custom_mt2201.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
map.put("mt", custom_mt2201);
map.put("awbAwbinfo", awbAwbinfo);
// 处理主单号-
String awba = ReturnUtil.awbaReplace(custom_mt2201.getAwba());
map.put("awba", awba);
// 生成报文头部
String msgId = makeMsgID("MT2201", orgsn, custom_mt2201.getAwba());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
String s = DateUtil.addDateMinut(new Date(), 6);
// 货物装卸时间
map.put("loadingDate",s);
// 舱单传输人名称
map.put("orgCode", orgCode);
Map<String, Object> maps = new HashMap<>();
// 生成报文
if (makeXmlToFile(map.get("templatePath").toString(), msgId+".xml", map, map.get("sendPath").toString())>0){
if (!map.containsKey("reason")){
map.put("functionCode", "9");
map.put("busType","MT2201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(custom_mt2201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(custom_mt2201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(custom_mt2201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(custom_mt2201.getAwba());
if (!"".equals(custom_mt2201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(custom_mt2201.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(custom_mt2201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(custom_mt2201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
map.put("functionCode", "5");
map.put("busType","MT2201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(custom_mt2201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(custom_mt2201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(custom_mt2201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(custom_mt2201.getAwba());
if (!"".equals(custom_mt2201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(custom_mt2201.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(custom_mt2201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(custom_mt2201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("修改");
nmmsCustomResponse.setCusrescode("25");
nmmsCustomResponse.setCusrestext("修改报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}
}else {
maps.put("status", "0");
return maps;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT3201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MT3201Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service {
@Value("${custom.custom-code}")
private String orgsn;
@Value("${custom.org-code}")
private String orgCode;
@Override
public Map<String, Object> fohcreate(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
NMMS_CUSTOM_MT3201 customMt3201 = objectMapper.convertValue(map.get("mt3201"), NMMS_CUSTOM_MT3201.class);
// 关区代码
String customCode = customMt3201.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
String awba = ReturnUtil.awbaReplace(customMt3201.getAwba());
map.put("awba", awba);
// 封装实体
map.put("mt", customMt3201);
// 生成报文头部
String msgId = makeMsgID("MT3201", orgsn, customMt3201.getAwba());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> map3201= new HashMap<>();
if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map,"./send/add/")>0){
map.put("functionCode", "9");
map.put("busType","MT3201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
System.out.println();
// 航班日期
nmmsCustomResponse.setFlightdate(customMt3201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt3201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt3201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt3201.getAwba());
if (!"".equals(customMt3201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt3201.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt3201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(customMt3201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
map3201.put("status", "1");
map3201.put("customResponse", nmmsCustomResponse);
return map3201;
}else {
map3201.put("status", "0");
return map3201;
}
}
@Override
public Map<String, Object> remove(Map<String, Object> map) throws IOException, ParseException {
// 关区代码
String customCode = map.get("customCode").toString();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 生成报文头部
String msgId = makeMsgID("MT3201", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
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");
map.put("busType","MT3201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
map3201.put("status", "1");
map3201.put("customResponse", nmmsCustomResponse);
return map3201;
}else {
map3201.put("status", "0");
return map3201;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_TRANS;
import com.sunyo.wlpt.message.builder.service.MT3202Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT3202ServiceImp extends CustomXmlMaker implements MT3202Service {
@Value("${custom.custom-code}")
private String orgsn;
@Override
public Map<String, Object> createMt3202(Map<String, Object> map) throws ParseException, IOException {
ObjectMapper objectMapper = new ObjectMapper();
// 转运记录
NMMS_CUSTOM_TRANS nmmsCustomTrans = objectMapper.convertValue(map.get("mt3202"), NMMS_CUSTOM_TRANS.class);
// 关区代码
String customCode = nmmsCustomTrans.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
map.put("mt", nmmsCustomTrans);
// 处理主单号 -
String awba = ReturnUtil.awbaReplace(nmmsCustomTrans.getAwba());
map.put("awba", awba);
// 生成报文头部
String msgId = makeMsgID("MT3202", orgsn, nmmsCustomTrans.getAwba());
String msessageType = "MT3202";
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("msessageType", msessageType);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> map3202 = new HashMap<>();
if (makeXmlToFile("/manifest/MT3202.ftlx", msgId+".xml", map, "./send/add/")>0){
map.put("functionCode", "2");
map.put("busType","MT3202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(nmmsCustomTrans.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(nmmsCustomTrans.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(nmmsCustomTrans.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(nmmsCustomTrans.getAwba());
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(nmmsCustomTrans.getTurnpiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(nmmsCustomTrans.getTurnweight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
map3202.put("status", "1");
map3202.put("customResponse", nmmsCustomResponse);
return map3202;
}else {
map3202.put("status", "0");
return map3202;
}
}
@Override
public Map<String, Object> removeMt3202(Map<String, Object> map) throws IOException, ParseException {
// 关区代码
String customCode = map.get("customCode").toString();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 生成报文头部
String msgId = makeMsgID("MT3202", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 处理主单号 -
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");
map.put("busType","MT3202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
map3201.put("status", "1");
map3201.put("customResponse", nmmsCustomResponse);
return map3201;
}else {
map3201.put("status", "0");
return map3201;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MT4201Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.xml.crypto.Data;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service {
@Value("${custom.custom-code}")
private String orgsn;
@Override
public Map<String, Object> pffmcreate(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
NMMS_CUSTOM_MT4201 customMt4201 = objectMapper.convertValue(map.get("mt4201"), NMMS_CUSTOM_MT4201.class);
// 关区代码
String customCode = customMt4201.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
map.put("mt", customMt4201);
// 处理主单号 -
String awba = ReturnUtil.awbaReplace(customMt4201.getAwba());
map.put("awba", awba);
// 生成报文头部
String msgId = makeMsgID("MT4201", orgsn, customMt4201.getAwba());
String senderId = makeSenderID(customCode, orgsn);
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> map4201 = new HashMap<>();
if (makeXmlToFile("/manifest/MT4201.ftlx", msgId+".xml", map, "./send/add/")>0){
map.put("functionCode", "2");
map.put("busType","MT4201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
System.out.println();
// 航班日期
nmmsCustomResponse.setFlightdate(customMt4201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt4201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt4201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt4201.getAwba());
if (!"".equals(customMt4201.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt4201.getAwbh());
}else {
// 分单号
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt4201.getLodingpiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(customMt4201.getLodingweight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
map4201.put("status", "1");
map4201.put("customResponse", nmmsCustomResponse);
return map4201;
}else {
map4201.put("status", "0");
return map4201;
}
}
@Override
public Map<String, Object> remove4201(Map<String, Object> map) throws IOException, ParseException {
// 关区代码
String customCode = map.get("customCode").toString();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 生成报文头部
String msgId = makeMsgID("MT4201", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn);
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 处理主单号 -
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");
map.put("busType","MT4201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
map4201.put("status", "1");
map4201.put("customResponse", nmmsCustomResponse);
return map4201;
}else {
map4201.put("status", "0");
return map4201;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT520X;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MT520XService;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{
@Value("${custom.custom-code}")
private String orgsn;
@Value("${custom.org-code}")
private String orgCode;
@Override
public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
NMMS_CUSTOM_MT520X customMt520X = objectMapper.convertValue(map.get("mt520x"), NMMS_CUSTOM_MT520X.class);
Map<String, Object> hashMap = new HashMap();
// 处理主单号-
String awba = ReturnUtil.awbaReplace(customMt520X.getAwba());
hashMap.put("awba", awba);
// 关区代码
String customCode = customMt520X.getCustomcode();
// 报文头时间 精确到毫秒
hashMap.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
hashMap.put("mt", customMt520X);
hashMap.put("orgCode", orgCode);
if ("MT5201".equals(customMt520X.getRcfdep())){
// 生成报文头部
String msgId = makeMsgID("MT5201", orgsn, customMt520X.getAwba());
String msessageType = "MT5201";
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
hashMap.put("msgId", msgId);
hashMap.put("msessageType", msessageType);
hashMap.put("senderId", senderId);
hashMap.put("receiverID", receiverID);
Map<String, Object> maps = new HashMap<>();
if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap, "./send/add/")>0){
hashMap.put("functionCode", "2");
hashMap.put("busType","MT5201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(hashMap);
// 航班日期
nmmsCustomResponse.setFlightdate(customMt520X.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt520X.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt520X.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt520X.getAwba());
if (!"".equals(customMt520X.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt520X.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(customMt520X.getPiece());
// 重量
nmmsCustomResponse.setBusweight(customMt520X.getWeight());
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
maps.put("status", "0");
return maps;
}
}else {
// 生成报文头部
String msgId = makeMsgID("MT5202", orgsn, customMt520X.getAwba());
String msessageType = "MT5202";
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
hashMap.put("msgId", msgId);
hashMap.put("msessageType", msessageType);
hashMap.put("senderId", senderId);
hashMap.put("receiverID", receiverID);
Map<String, Object> maps = new HashMap<>();
if (makeXmlToFile("/manifest/MT5202.ftlx", msgId+".xml", hashMap, "./send/add/")>0){
hashMap.put("functionCode", "2");
hashMap.put("busType","MT5202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(hashMap);
// 航班日期
nmmsCustomResponse.setFlightdate(customMt520X.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt520X.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt520X.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt520X.getAwba());
if (!"".equals(customMt520X.getAwbh())){
// 分单号
nmmsCustomResponse.setAwbhno(customMt520X.getAwbh());
}else {
nmmsCustomResponse.setAwbhno(null);
}
// 件数
nmmsCustomResponse.setBuspiece(customMt520X.getPiece());
// 重量
nmmsCustomResponse.setBusweight(customMt520X.getWeight());
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
maps.put("status", "0");
return maps;
}
}
}
@Override
public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException {
String customCode = map.get("customCode").toString();
map.put("customCode", customCode);
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 处理主单号-
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());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> maps = new HashMap<>();
if (makeXmlToFile("/remove/MT5201.ftlx", msgId+".xml", map, "./send/remove/")>0){
map.put("functionCode", "3");
map.put("busType","MT5201");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
// 操作类型
nmmsCustomResponse.setOpertype("删除");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
maps.put("status", "0");
return maps;
}
}else {
// 生成报文头部
String msgId = makeMsgID("MT5202", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> maps = new HashMap<>();
if (makeXmlToFile("/remove/MT5202.ftlx", msgId+".xml", map, "./send/remove/")>0){
map.put("functionCode", "3");
map.put("busType","MT5202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
// 操作类型
nmmsCustomResponse.setOpertype("删除");
maps.put("status", "1");
maps.put("customResponse", nmmsCustomResponse);
return maps;
}else {
maps.put("status", "0");
return maps;
}
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_TRANS;
import com.sunyo.wlpt.message.builder.service.MT6202Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT6202ServiceImp extends CustomXmlMaker implements MT6202Service{
@Value("${custom.custom-code}")
private String orgsn;
@Override
public Map<String, Object> creatMt6202(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
// 转运记录
NMMS_CUSTOM_TRANS nmmsCustomTrans = objectMapper.convertValue(map.get("mt6202"), NMMS_CUSTOM_TRANS.class);
// 关区代码
String customCode = nmmsCustomTrans.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
map.put("mt", nmmsCustomTrans);
// 处理主单号 -
String awba = ReturnUtil.awbaReplace(nmmsCustomTrans.getAwba());
map.put("awba", awba);
// 生成报文头部
String msgId = makeMsgID("MT6202", orgsn, nmmsCustomTrans.getAwba());
String msessageType = "MT6202";
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("msessageType", msessageType);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> map6202 = new HashMap<>();
if (makeXmlToFile("/manifest/MT6202.ftlx", msgId+".xml", map, "./send/add/")>0){
map.put("functionCode", "2");
map.put("busType","MT6202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 航班日期
nmmsCustomResponse.setFlightdate(nmmsCustomTrans.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(nmmsCustomTrans.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(nmmsCustomTrans.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(nmmsCustomTrans.getAwba());
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(nmmsCustomTrans.getTurnpiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(nmmsCustomTrans.getTurnweight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
map6202.put("status", "1");
map6202.put("customResponse", nmmsCustomResponse);
return map6202;
}else {
map6202.put("status", "0");
return map6202;
}
}
@Override
public Map<String, Object> removeMt6202(Map<String, Object> map) throws IOException, ParseException {
// 关区代码
String customCode = map.get("customCode").toString();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 生成报文头部
String msgId = makeMsgID("MT6202", orgsn, map.get("awba").toString());
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
// 处理主单号 -
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");
map.put("busType","MT6202");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
// 操作类型
nmmsCustomResponse.setOpertype("删除");
nmmsCustomResponse.setCusrescode("24");
nmmsCustomResponse.setCusrestext("删除报发送成功");
map3201.put("status", "1");
map3201.put("customResponse", nmmsCustomResponse);
return map3201;
}else {
map3201.put("status", "0");
return map3201;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT8205;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MT8205Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import com.sunyo.wlpt.message.builder.util.ReturnUtil;
import com.tianbo.util.Date.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
@Service
public class MT8205ServiceImp extends CustomXmlMaker implements MT8205Service {
@Value("${custom.custom-code}")
private String orgsn;
@Value("${custom.org-code}")
private String orgCode;
@Override
public Map<String, Object> create8205(Map<String, Object> map) throws IOException, ParseException {
ObjectMapper objectMapper = new ObjectMapper();
// 转运记录
NMMS_CUSTOM_MT8205 customMt8205 = objectMapper.convertValue(map.get("mt8205"), NMMS_CUSTOM_MT8205.class);
// 进港原始
NMMS_CUSTOM_MT1201 customMt1201 = objectMapper.convertValue(map.get("mt1201"), NMMS_CUSTOM_MT1201.class);
// 出港预配
NMMS_CUSTOM_MT2201 customMt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class);
// 关区代码
String customCode = customMt8205.getCustomcode();
// 报文头时间 精确到毫秒
map.put("sendTime", DateUtil.getCurrentTime17());
// 封装实体
map.put("mt8205", customMt8205);
map.put("mt1201", customMt1201);
map.put("mt2201", customMt2201);
map.put("orgCode", orgCode);
// 处理主单号 -
String mt1201 = ReturnUtil.awbaReplace(customMt1201.getAwba());
map.put("mt1201", mt1201);
// 处理主单号 -
String mt2201 = ReturnUtil.awbaReplace(customMt2201.getAwba());
map.put("mt2201", mt2201);
// 生成报文头部
String msgId = makeMsgID("MT8205", orgsn, customMt1201.getAwba());
String msessageType = "MT8205";
String senderId = makeSenderID(customCode, orgsn, "");
String receiverID = customCode;
map.put("msgId", msgId);
map.put("msessageType", msessageType);
map.put("senderId", senderId);
map.put("receiverID", receiverID);
Map<String, Object> map8205 = new HashMap<>();
if (makeXmlToFile("/manifest/MT8205.ftlx", msgId+".xml", map, "./send/add/")>0){
map.put("functionCode", "2");
map.put("busType","MT8205");
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map);
System.out.println();
// 航班日期
nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate());
// 航班号
nmmsCustomResponse.setFlightno(customMt1201.getFlightno());
// 航班承运人
nmmsCustomResponse.setCarrier(customMt1201.getCarrier());
// 主单号
nmmsCustomResponse.setAwbano(customMt1201.getAwba());
// 分单号
nmmsCustomResponse.setAwbhno(customMt1201.getAwbh());
// 件数
nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString()));
// 重量
nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString()));
// 操作类型
nmmsCustomResponse.setOpertype("新增");
nmmsCustomResponse.setCusrescode("23");
nmmsCustomResponse.setCusrestext("新增报发送成功");
map8205.put("status", "1");
map8205.put("customResponse", nmmsCustomResponse);
return map8205;
}else {
map8205.put("status", "0");
return map8205;
}
}
}
... ...
package com.sunyo.wlpt.message.builder.service.imp;
import com.sunyo.wlpt.base.model.AWB_AWBINFO;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.model.CUSTOM_RESPONSE;
import com.sunyo.wlpt.message.builder.service.MakeXml1201Service;
import com.sunyo.wlpt.message.builder.util.CustomXmlMaker;
import freemarker.template.Configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class MakeXml1201ServiceImp extends CustomXmlMaker implements MakeXml1201Service {
private static String businessType = "MT1201";
@Autowired
private Configuration freemakerTemplate;
/**
* MAP包含运单实体与舱单实体
* @param awb_manifest {awb:AWB_AWBINFO,man:NMMS_CUSTOM_MT1201}
* @return
* @throws Exception
*/
@Override
public boolean makeXml1201_new(@RequestBody Map awb_manifest) throws Exception{
try {
NMMS_CUSTOM_MT1201 mt1201 = new NMMS_CUSTOM_MT1201();
AWB_AWBINFO awb = new AWB_AWBINFO();
NMMS_CUSTOM_RESPONSE customResponse = new NMMS_CUSTOM_RESPONSE();
Map<String,Object> xmlmap = new HashMap<>();
xmlmap.put("awb",awb);
xmlmap.put("man",mt1201);
xmlmap.put("res",customResponse);
mt1201.setAwba("17212345678");
mt1201.setCarrier("CV");
mt1201.setCustomcode("4604");
mt1201.setFlightno("9733");
mt1201.setFlightdate(new Date());
mt1201.setDestinationstation("CGO");
String msgId = makeMsgID(businessType,"460470678920X","17212345678");
makeXmlToFile("/manifest/MT2201.ftlx",filename,awb_manifest);
}catch (Exception e){
e.printStackTrace();
return false;
}
return true;
}
}
... ... @@ -12,7 +12,6 @@ import org.springframework.ui.freemarker.FreeMarkerTemplateUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
@Component
public class CustomXmlMaker {
... ... @@ -20,10 +19,22 @@ public class CustomXmlMaker {
private Configuration freemakerTemplate;
@Value("${custom.send-path}")
private static String sendPath;
private String sendPath;
@Value("${tcs.mq-number}")
private static String TCSMQNumber;
private String TCSMQNumber;
@Value("${custom.custom-code}")
private String customCode;
@Value("${custom.org-code}")
private String orgCode;
public CustomXmlMaker() {
if (freemakerTemplate==null){
this.freemakerTemplate = new Configuration();
}
}
/**
* 所有填制项中不得出现“<”、“&”符号,如有实际需要,请填写对应的转义符“&lt;”、“&amp;”。
... ... @@ -31,10 +42,11 @@ public class CustomXmlMaker {
* @param tplName 模板名称
* @param fileName 生成的报文名称
* @param manifestMap 数据实体
* @param sendPath 生成路径
* @return 0失败,1成功
* @throws IOException
*/
public int makeXmlToFile(String tplName,String fileName,Map manifestMap) throws IOException{
public int makeXmlToFile(String tplName,String fileName,Object manifestMap, String sendPath) throws IOException{
try {
Template template = freemakerTemplate.getTemplate(tplName);
String content = FreeMarkerTemplateUtils.processTemplateIntoString(template,manifestMap);
... ... @@ -91,10 +103,11 @@ public class CustomXmlMaker {
sb.append(customCode)
.append(ORGSN)
.append("_")
.append(TCSSN);
.append(TCSMQNumber);
return sb.toString();
}
public String makeSenderID(String customCode,String ORGSN){
return makeSenderID(customCode,ORGSN,TCSMQNumber);
}
}
... ...
package com.sunyo.wlpt.message.builder.util;
import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
public class ReturnUtil {
/**
* 报文发送序号
* 回执发送者id
* 回执接送者id
* 对应海关的functioncode业务代码
* 业务件数
* 报文发送时间
* 业务重量
* 业务类型
* 主单号
* 分单号
* 航班号
* 航班日期
* @param map
* @return
* @throws ParseException
*/
public static NMMS_CUSTOM_RESPONSE nmmsCustomResponse(Map<String, Object> map) throws ParseException {
NMMS_CUSTOM_RESPONSE nmmsCustomResponse = new NMMS_CUSTOM_RESPONSE();
if (map.containsKey("msgId")){
nmmsCustomResponse.setCusmsgid(map.get("msgId").toString());
}
if (map.containsKey("senderId")){
nmmsCustomResponse.setCussenderid(map.get("senderId").toString());
}
if (map.containsKey("receiverID")){
nmmsCustomResponse.setCusreciverid(map.get("receiverID").toString());
}
if (map.containsKey("functionCode")){
nmmsCustomResponse.setCusfunctioncode(map.get("functionCode").toString());
}
nmmsCustomResponse.setCusversion("1.0");
nmmsCustomResponse.setBusdate(new Date());
if (map.containsKey("piece")){
nmmsCustomResponse.setBuspiece(Integer.valueOf(map.get("piece").toString()));
}
if (map.containsKey("weight")){
nmmsCustomResponse.setBusweight(new BigDecimal(map.get("weight").toString()));
}
nmmsCustomResponse.setBustype(map.get("busType").toString());
if (map.containsKey("awba")){
nmmsCustomResponse.setAwbano(map.get("awba").toString());
}
if (map.containsKey("awbh")){
if (!"".equals(map.get("awbh").toString())){
// 分单号
nmmsCustomResponse.setAwbhno(map.get("awbh").toString());
}else {
// 分单号
nmmsCustomResponse.setAwbhno(null);
}
}
if (map.containsKey("flightNo")){
nmmsCustomResponse.setFlightno(map.get("flightNo").toString());
}
if (map.containsKey("carrier")){
nmmsCustomResponse.setCarrier(map.get("carrier").toString());
}
if (map.containsKey("flightDate")){
String flightDate = map.get("flightDate").toString();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date parse = simpleDateFormat.parse(flightDate);
nmmsCustomResponse.setFlightdate(parse);
}
if (map.containsKey("reason")){
nmmsCustomResponse.setOperreason(map.get("reason").toString());
}
if (map.containsKey("contactName")){
nmmsCustomResponse.setOperperson(map.get("contactName").toString());
}
if (map.containsKey("contactTel")) {
nmmsCustomResponse.setOpertel(map.get("contactTel").toString());
}
return nmmsCustomResponse;
}
/**
* 替换主单号带-
* @param awba
* @return
*/
public static String awbaReplace(String awba){
return awba.replaceAll("-","");
}
}
... ...
package com.sunyo.wlpt.message.builder.util;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* @ProjectName:
* @Package: com.backstage.config
* @ClassName: ApplicationContextProvider
* @Description: 获取bean对象的工具类
* @Author: wangzhilong
* @CreateDate: 2018/8/31 13:26
* @Version: 1.0
*/
/**
* Author:ZhuShangJin
* Date:2018/7/3
*/
@Component
public class SpringBeanUtitl implements ApplicationContextAware{
private static ApplicationContext applicationContext = null;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws
BeansException {
// TODO Auto-generated method stub
SpringBeanUtitl.applicationContext = applicationContext;
}
/**
* 从静态变量applicationContext中得到Bean, 自动转型为所赋值对象的类型.
*/
@SuppressWarnings("unchecked")
public static <T> T getBean(String name) {
if(name == null || applicationContext == null){
return null;
}
return (T) applicationContext.getBean(name);
}
/**
* 从静态变量applicationContext中得到Bean, 自动转型为所赋值对象的类型.
*/
public static <T> T getBean(Class<T> clazz) {
return applicationContext.getBean(clazz);
}
}
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${t.awba}</MessageID>
<FunctionCode>${t.customeCode}</FunctionCode>
<MessageType>MT5202</MessageType>
<SenderID>460470678920X_DXPENT0000460002</SenderID>
<ReceiverID>4620</ReceiverID>
<SendTime>20190523103927763</SendTime>
<Version>1.0</Version>
</Head>
<!--<Declaration>-->
<!--<DeclarationOfficeID>4620</DeclarationOfficeID>-->
<!--<BorderTransportMeans>-->
<!--<JourneyID>CX051/20190523</JourneyID>-->
<!--<TypeCode>4</TypeCode>-->
<!--<ID>CX051</ID>-->
<!--<Name>CX051</Name>-->
<!--<ActualDateTime>201905230820086</ActualDateTime>-->
<!--<CompletedDateTime>201905230835086</CompletedDateTime>-->
<!--<LoadingLocation>-->
<!--<ID>CGO/4620</ID>-->
<!--</LoadingLocation>-->
<!--</BorderTransportMeans>-->
<!--<TallyParty>-->
<!--<ID>70678920X</ID>-->
<!--</TallyParty>-->
<!--<Consignment>-->
<!--<TransportContractDocument>-->
<!--<ID>16006939951</ID>-->
<!--</TransportContractDocument>-->
<!--<AssociatedTransportDocument>-->
<!--<ID>16006939951_TYN00072745</ID>-->
<!--</AssociatedTransportDocument>-->
<!--<ConsignmentPackaging>-->
<!--<QuantityQuantity>1</QuantityQuantity>-->
<!--</ConsignmentPackaging>-->
<!--<TotalGrossMassMeasure>26</TotalGrossMassMeasure>-->
<!--</Consignment>-->
<!--</Declaration>-->
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>5</FunctionCode>
<MessageType>MT1201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<ExitCustomsOffice>
<ID>${mt.originstation}</ID>
</ExitCustomsOffice>
<Carrier>
<ID>${mt.carrier}</ID>
</Carrier>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<FirstArrivalLocationID>${mt.destinationstation}</FirstArrivalLocationID>
<ArrivalDateTime>${arrivalDateTime}</ArrivalDateTime>
<DepartureDateTime>${departureDateTime}</DepartureDateTime>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
<ChangeReasonCode>999</ChangeReasonCode>
<ConditionCode>10</ConditionCode>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<LoadingLocation>
<ID>${mt.originstation}</ID>
</LoadingLocation>
<UnloadingLocation>
<ID>${mt.destinationstation}/${mt.customcode}</ID>
<ArrivalDate>${arrival}</ArrivalDate>
</UnloadingLocation>
<GoodsConsignedPlace>
<ID>${mt.destinationstation}</ID>
</GoodsConsignedPlace>
<TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator>
<FreightPayment>
<MethodCode>${awbAwbinfo.paymodel}</MethodCode>
</FreightPayment>
<ConsignmentPackaging>
<QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure>
<Consignee>
<Name>${awbAwbinfo.cnsnname}</Name>
<Address>
<Line>${awbAwbinfo.cnsnaddress}</Line>
<CountryCode>${awbAwbinfo.cnscountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.cnsntel}</ID>
<TypeID>TE</TypeID>
</Communication>
</Consignee>
<Consignor>
<Name>${awbAwbinfo.shprname}</Name>
<Address>
<Line>${awbAwbinfo.shpraddress}</Line>
<CountryCode>${awbAwbinfo.shprcountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.shprtel}</ID>
<TypeID>FX</TypeID>
</Communication>
</Consignor>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<ConsignmentItemPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentItemPackaging>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
<GoodsMeasure>
<GrossMassMeasure>${mt.weight?c}</GrossMassMeasure>
</GoodsMeasure>
</ConsignmentItem>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>5</FunctionCode>
<MessageType>MT2201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<ExitCustomsOffice>
<ID>${mt.originstation}????</ID>
</ExitCustomsOffice>
<Carrier>
<ID>${mt.carrier}</ID>
</Carrier>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
<ChangeReasonCode>9999</ChangeReasonCode>
<ConditionCode>10</ConditionCode>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<LoadingLocation>
<ID>${mt.originstation}/${mt.customcode}</ID>
<LoadingDate>${loadingDate}</LoadingDate>
</LoadingLocation>
<UnloadingLocation>
<ID>${mt.destinationstation}</ID>
</UnloadingLocation>
<TransitDestination>
<ID>$TransitDestination$</ID>
</TransitDestination>
<GoodsConsignedPlace>
<ID>${mt.originstation}</ID>
</GoodsConsignedPlace>
<TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator>
<FreightPayment>
<MethodCode>${awbAwbinfo.collected}</MethodCode>
</FreightPayment>
<ConsignmentPackaging>
<QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure>
<Consignee>
<Name>${awbAwbinfo.cnsnname}</Name>
<Address>
<Line>${awbAwbinfo.cnsnaddress}</Line>
<CountryCode>${awbAwbinfo.cnscountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.cnsntel}</ID>
</Communication>
</Consignee>
<Consignor>
<Name>${awbAwbinfo.shprname}</Name>
<Address>
<Line>${awbAwbinfo.shpraddress}</Line>
<CityName>$ConsignorCityName$</CityName>
<CountryCode>${awbAwbinfo.shprcountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.shprtel}</ID>
</Communication>
</Consignor>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<ConsignmentItemPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentItemPackaging>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
<GoodsMeasure>
<GrossMassMeasure>${mt.weight?c}</GrossMassMeasure>
</GoodsMeasure>
</ConsignmentItem>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1">
<Head>
<MessageID>CN_MT1201_1P0_460470678920X_20190918220458427</MessageID>
<MessageID>${msgId}</MessageID>
<FunctionCode>9</FunctionCode>
<MessageType>MT1201</MessageType>
<SenderID>460470678920X_DXPENT0000460002</SenderID>
<ReceiverID>4604</ReceiverID>
<SendTime>20190918220458427</SendTime>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<RepresentativePerson>
<Name>9141010070678920XJ</Name>
<Name>${orgCode}</Name>
</RepresentativePerson>
<ExitCustomsOffice>
<ID>KUL</ID>
<ID>${mt.originstation}</ID>
</ExitCustomsOffice>
<Carrier>
<ID>CV</ID>
<ID>${mt.carrier}</ID>
</Carrier>
<BorderTransportMeans>
<JourneyID>CV7303/20190919</JourneyID>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<FirstArrivalLocationID>CGO</FirstArrivalLocationID>
<ArrivalDateTime>20190919010458086</ArrivalDateTime>
<DepartureDateTime>20190918230458086</DepartureDateTime>
<FirstArrivalLocationID>${mt.destinationstation}</FirstArrivalLocationID>
<ArrivalDateTime>${arrivalDateTime}</ArrivalDateTime>
<DepartureDateTime>${departureDateTime}</DepartureDateTime>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>17236633273</ID>
<ID>${awba}</ID>
<ConditionCode>10</ConditionCode>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<LoadingLocation>
<ID>KUL</ID>
<ID>${mt.originstation}</ID>
</LoadingLocation>
<UnloadingLocation>
<ID>CGO/4604</ID>
<ArrivalDate>20190919</ArrivalDate>
<ID>${mt.destinationstation}/${mt.customcode}</ID>
<ArrivalDate>${arrival}</ArrivalDate>
</UnloadingLocation>
<TransitDestination>
<ID>CGN</ID>
</TransitDestination>
<CustomsStatusCode>002</CustomsStatusCode>
<TransportSplitIndicator>0</TransportSplitIndicator>
<GoodsConsignedPlace>
<ID>${mt.destinationstation}</ID>
</GoodsConsignedPlace>
<CustomsStatusCode>${awbAwbinfo.awbtype}</CustomsStatusCode>
<TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator>
<FreightPayment>
<MethodCode>PP</MethodCode>
<MethodCode>${awbAwbinfo.paymodel}</MethodCode>
</FreightPayment>
<ConsignmentPackaging>
<QuantityQuantity>3</QuantityQuantity>
<QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>24.0</TotalGrossMassMeasure>
<TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure>
<Consignee>
<ID>8888+NONE</ID>
<Name>SCHENKER DEUTSCHLAND AG</Name>
<Name>${awbAwbinfo.cnsnname}</Name>
<Address>
<Line>NEUER WEYERSTRASSERWEG 120 122</Line>
<CountryCode>CN</CountryCode>
<Line>${awbAwbinfo.cnsnaddress}</Line>
<CountryCode>${awbAwbinfo.cnscountyr}</CountryCode>
</Address>
<Communication>
<ID>00000000</ID>
<ID>${awbAwbinfo.cnsntel}</ID>
<TypeID>TE</TypeID>
</Communication>
<Contact>
<Name>NONE</Name>
<Communication>
<ID>00000000</ID>
<TypeID>TE</TypeID>
</Communication>
</Contact>
</Consignee>
<Consignor>
<ID>9999+NONE</ID>
<Name>SCHENKER LOGISTICS MALAYSIA SDN BHD</Name>
<Name>${awbAwbinfo.shprname}</Name>
<Address>
<Line>B 10 MAS FREIGHT FOWARDERS COMPLEX</Line>
<CountryCode>MY</CountryCode>
<Line>${awbAwbinfo.shpraddress}</Line>
<CountryCode>${awbAwbinfo.shprcountyr}</CountryCode>
</Address>
<Communication>
<ID>60387757888</ID>
<ID>${awbAwbinfo.shprtel}</ID>
<TypeID>TE</TypeID>
</Communication>
</Consignor>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<ConsignmentItemPackaging>
<QuantityQuantity>3</QuantityQuantity>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentItemPackaging>
<Commodity>
<CargoDescription>CONSOL</CargoDescription>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
<GoodsMeasure>
<GrossMassMeasure>24</GrossMassMeasure>
<GrossMassMeasure>${mt.weight?c}</GrossMassMeasure>
</GoodsMeasure>
</ConsignmentItem>
</Consignment>
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1">
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${cusmsgid}</MessageID>
<FunctionCode>${cusfunctioncode}</FunctionCode>
<MessageType>${bustype}</MessageType>
<SenderID>${cussenderid}</SenderID>
<ReceiverID>${cusreciverid}</ReceiverID>
<SendTime>${busdate?string('ddMMyyyyHHmmssSSS')}</SendTime>
<Version>${cusversion}</Version>
<MessageID>${msgId}</MessageID>
<FunctionCode>9</FunctionCode>
<MessageType>MT2201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
</Manifest>
<Declaration>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<ExitCustomsOffice>
<ID>${mt.originstation}</ID>
</ExitCustomsOffice>
<Carrier>
<ID>${mt.carrier}</ID>
</Carrier>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
<ConditionCode>10</ConditionCode>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<LoadingLocation>
<ID>${mt.originstation}/${mt.customcode}</ID>
<LoadingDate>${loadingDate}</LoadingDate>
</LoadingLocation>
<UnloadingLocation>
<ID>${mt.destinationstation}</ID>
</UnloadingLocation>
<GoodsConsignedPlace>
<ID>${mt.originstation}</ID>
</GoodsConsignedPlace>
<CustomsStatusCode>${awbAwbinfo.awbtype}</CustomsStatusCode>
<TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator>
<FreightPayment>
<MethodCode>${awbAwbinfo.collected}</MethodCode>
</FreightPayment>
<ConsignmentPackaging>
<QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure>
<Consignee>
<Name>${awbAwbinfo.cnsnname}</Name>
<Address>
<Line>${awbAwbinfo.cnsnaddress}</Line>
<CountryCode>${awbAwbinfo.cnscountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.cnsntel}</ID>
</Communication>
</Consignee>
<Consignor>
<Name>${awbAwbinfo.shprname}</Name>
<Address>
<Line>${awbAwbinfo.shpraddress}</Line>
<CountryCode>${awbAwbinfo.shprcountyr}</CountryCode>
</Address>
<Communication>
<ID>${awbAwbinfo.shprtel}</ID>
</Communication>
</Consignor>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<ConsignmentItemPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentItemPackaging>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
<GoodsMeasure>
<GrossMassMeasure>${mt.weight?c}</GrossMassMeasure>
</GoodsMeasure>
</ConsignmentItem>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT3201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<ID>${mt.carrier}${mt.flightno}</ID>
<Name>${mt.carrier}${mt.flightno}</Name>
</BorderTransportMeans>
<UnloadingLocation>
<ID>${mt.destinationstation}/${mt.customcode}</ID>
<ArrivalDate>${mt.arrivetime?string("yyyyMMdd")}</ArrivalDate>
</UnloadingLocation>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<ConsignmentPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
</ConsignmentItem>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3202:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT3202</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
</BorderTransportMeans>
<UnloadingLocation>
<ID>${mt.turnunloading}</ID>
<ArrivalDate>${mt.flightno}</ArrivalDate>
</UnloadingLocation>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<ConsignmentPackaging>
<QuantityQuantity>${mt.turnpiece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.turnweight?c}</TotalGrossMassMeasure>
<ConsignmentItem>
<SequenceNumeric>1</SequenceNumeric>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
</ConsignmentItem>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT4201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT4201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<Carrier>
<ID>${mt.carrier}</ID>
</Carrier>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<ID>${mt.carrier}${mt.flightno}</ID>
<Name>${mt.carrier}${mt.flightno}</Name>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<LoadingLocation>
<ID>${mt.originstation}/${mt.customcode}</ID>
<LoadingDate>${mt.loadingtime?string('yyyyMMddHHmmss')}</LoadingDate>
</LoadingLocation>
<ConsignmentPackaging>
<QuantityQuantity>${mt.lodingpiece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.lodingweight?c}</TotalGrossMassMeasure>
<TransportSplitIndicator>0</TransportSplitIndicator>
<ConsignmentItem>
<Commodity>
<CargoDescription>${mt.goodsname}</CargoDescription>
</Commodity>
</ConsignmentItem>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT5201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<ID>${mt.carrier}${mt.flightno}</ID>
<Name>${mt.carrier}${mt.flightno}</Name>
<ActualDateTime>${mt.starttime?string('yyyyMMddHHmmss')}</ActualDateTime>
<CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmss')}</CompletedDateTime>
<UnloadingLocation>
<ID>${mt.destinationstation}/${mt.customcode}</ID>
</UnloadingLocation>
</BorderTransportMeans>
<TallyParty>
<ID>${orgCode}</ID>
</TallyParty>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<ConsignmentPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT5202</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<ID>${mt.carrier}${mt.flightno}</ID>
<Name>${mt.carrier}${mt.flightno}</Name>
<ActualDateTime>${mt.starttime?string('yyyyMMddHHmmss')}</ActualDateTime>
<CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmss')}</CompletedDateTime>
<LoadingLocation>
<ID>${mt.originstation}/${mt.customcode}</ID>
</LoadingLocation>
</BorderTransportMeans>
<TallyParty>
<ID>${orgCode}</ID>
</TallyParty>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<#if mt['awbh']??>
<#if mt.awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awba}_${mt.awbh}</ID>
</AssociatedTransportDocument>
</#if>
</#if>
<ConsignmentPackaging>
<QuantityQuantity>${mt.piece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT6202:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT8205</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID>
<TypeCode>4</TypeCode>
<CargoFacilityLocation>${mt.turnunloading}</CargoFacilityLocation>
<UnloadingLocation>
<ID>${mt.ext2}</ID>
</UnloadingLocation>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awba}</ID>
</TransportContractDocument>
<ConsignmentPackaging>
<QuantityQuantity>${mt.turnpiece}</QuantityQuantity>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt.turnweight?c}</TotalGrossMassMeasure>
<BorderTransportMeans>
<JourneyID>${mt.pno}</JourneyID>
<TypeCode>3</TypeCode>
<Carrier>
<Name>${mt.ext1}</Name>
</Carrier>
</BorderTransportMeans>
</Consignment>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT8205:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>2</FunctionCode>
<MessageType>MT8205</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${mt8205.customcode}</DeclarationOfficeID>
<Relation>
<ImportInformation>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${mt1201.carrier}${mt1201.flightno}/${mt1201.flightdate?string('yyyyMMdd')}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${mt1201awba}</ID>
</TransportContractDocument>
<LoadingLocation>
<ID>${mt8205.awboriginstation}</ID>
</LoadingLocation>
<ConsignmentPackaging>
<QuantityQuantity>${mt1201.piece}</QuantityQuantity>
<TypeCode>PK</TypeCode>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt1201.weight?c}</TotalGrossMassMeasure>
<ConsignmentItem>
<Commodity>
<CargoDescription>${mt1201.goodsname}</CargoDescription>
</Commodity>
</ConsignmentItem>
</Consignment>
</ImportInformation>
<ExportInformation>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${mt2201.carrier}${mt2201.flightno}/${mt2201.flightdate?string('yyyyMMdd')}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${mt2201awba}</ID>
</TransportContractDocument>
<UnloadingLocation>
<ID>${mt8205.awbdesstation}</ID>
</UnloadingLocation>
<ConsignmentPackaging>
<QuantityQuantity>${mt2201.piece}</QuantityQuantity>
<TypeCode>PK</TypeCode>
</ConsignmentPackaging>
<TotalGrossMassMeasure>${mt2201.weight?c}</TotalGrossMassMeasure>
</Consignment>
</ExportInformation>
</Relation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT1201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
<ChangeReasonCode>999</ChangeReasonCode>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT2201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<RepresentativePerson>
<Name>${orgCode}</Name>
</RepresentativePerson>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
<ChangeReasonCode>9999</ChangeReasonCode>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
<#if content?length gt 1>
<Content>${content}</Content>
</#if>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT3201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
<#if content?length gt 1>
<Content>${content}</Content>
</#if>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT3202</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT4201:1">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT4201</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
<#if content?length gt 1>
<Content>${content}</Content>
</#if>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT5021</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
<#if content?length gt 1>
<Content>${content}</Content>
</#if>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT5202</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<DeclarationOfficeID>${customCode}</DeclarationOfficeID>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
<#if awbh?default("")?length gt 1>
<AssociatedTransportDocument>
<ID>${awbas}_${awbh}</ID>
</AssociatedTransportDocument>
</#if>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
<#if content?length gt 1>
<Content>${content}</Content>
</#if>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...
<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Head>
<MessageID>${msgId}</MessageID>
<FunctionCode>3</FunctionCode>
<MessageType>MT6202</MessageType>
<SenderID>${senderId}</SenderID>
<ReceiverID>${receiverID}</ReceiverID>
<SendTime>${sendTime}</SendTime>
<Version>1.0</Version>
</Head>
<Declaration>
<BorderTransportMeans>
<JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID>
</BorderTransportMeans>
<Consignment>
<TransportContractDocument>
<ID>${awbas}</ID>
</TransportContractDocument>
</Consignment>
<AdditionalInformation>
<Reason>${reason}</Reason>
<ContactName>${contactName}</ContactName>
<ContactTel>${contactTel}</ContactTel>
</AdditionalInformation>
</Declaration>
</Manifest>
\ No newline at end of file
... ...