合并分支 'long_dev' 到 'master'
Long dev 查看合并请求 !1
正在显示
66 个修改的文件
包含
3517 行增加
和
201 行删除
ReadMe.md
100644 → 100755
config/application.yml
100644 → 100755
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | web: | 2 | web: |
3 | upload-path: upload/ | 3 | upload-path: upload/ |
4 | server: | 4 | server: |
5 | - port: 7003 | 5 | + port: 4559 |
6 | servlet: | 6 | servlet: |
7 | context-path: ${SERVER_CONTEXTPATH:} | 7 | context-path: ${SERVER_CONTEXTPATH:} |
8 | spring: | 8 | spring: |
@@ -11,7 +11,6 @@ spring: | @@ -11,7 +11,6 @@ spring: | ||
11 | mvc: | 11 | mvc: |
12 | #静态资源,设置上传文件的访问, | 12 | #静态资源,设置上传文件的访问, |
13 | static-path-pattern: /** | 13 | static-path-pattern: /** |
14 | - | ||
15 | resources: | 14 | resources: |
16 | static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} | 15 | static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} |
17 | 16 | ||
@@ -86,17 +85,18 @@ spring: | @@ -86,17 +85,18 @@ spring: | ||
86 | eureka: | 85 | eureka: |
87 | instance: | 86 | instance: |
88 | #eureka服务器页面中status的请求路径 | 87 | #eureka服务器页面中status的请求路径 |
89 | - status-page-url: http://${eureka.instance.hostname}:${server.port}/index | 88 | + status-page-url: http://${eureka.instance.hostname}:${server.port}/ |
90 | prefer-ip-address: true | 89 | prefer-ip-address: true |
91 | instance-id: ${spring.cloud.client.ip-address}:${server.port} | 90 | instance-id: ${spring.cloud.client.ip-address}:${server.port} |
92 | hostname: ${spring.cloud.client.ip-address} | 91 | hostname: ${spring.cloud.client.ip-address} |
92 | + lease-renewal-interval-in-seconds: 15 | ||
93 | + lease-expiration-duration-in-seconds: 45 | ||
93 | client: | 94 | client: |
94 | #eureka注册中心服务器地址 | 95 | #eureka注册中心服务器地址 |
95 | service-url: | 96 | service-url: |
96 | - defaultZone: http://10.50.3.82:19527/eureka/ | 97 | +# defaultZone: http://127.0.0.1:12345/eureka/ |
98 | + defaultZone: http://192.168.1.53:12345/eureka/ | ||
97 | registry-fetch-interval-seconds: 30 | 99 | registry-fetch-interval-seconds: 30 |
98 | - lease-renewal-interval-in-seconds: 15 | ||
99 | - lease-expiration-duration-in-seconds: 45 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | ||
@@ -110,7 +110,6 @@ pagehelper: | @@ -110,7 +110,6 @@ pagehelper: | ||
110 | reasonable: true | 110 | reasonable: true |
111 | support-methods-arguments: true | 111 | support-methods-arguments: true |
112 | params: count=countSql | 112 | params: count=countSql |
113 | - | ||
114 | #debug配置,debug或者为true的时候,logback才会记录和写入日志文件 | 113 | #debug配置,debug或者为true的时候,logback才会记录和写入日志文件 |
115 | trace: false | 114 | trace: false |
116 | debug: true | 115 | debug: true |
@@ -131,5 +130,10 @@ jwt: | @@ -131,5 +130,10 @@ jwt: | ||
131 | max-alive: 300 | 130 | max-alive: 300 |
132 | custom: | 131 | custom: |
133 | send-path: ./send/ | 132 | send-path: ./send/ |
133 | + #海关备案编码 | ||
134 | + custom-code: 460470678920X | ||
135 | + #企业备案编码 | ||
136 | + org-code: 9141010070678920XJ | ||
134 | tcs: | 137 | tcs: |
135 | mq-number: DXPENT0000460002 | 138 | mq-number: DXPENT0000460002 |
139 | + |
config/logback-dev.xml
100644 → 100755
logs/log_debug.log
0 → 100755
logs/log_error.log
0 → 100644
1 | +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/} | ||
2 | +com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
3 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
4 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
5 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
6 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
7 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
8 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
9 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
10 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
11 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
12 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
13 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
14 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
15 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
16 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
17 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
18 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
19 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
20 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
21 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
22 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
23 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
24 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
25 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
26 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
27 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
28 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
29 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
30 | + at java.lang.Thread.run(Thread.java:748) | ||
31 | +Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
32 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123) | ||
33 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
34 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
35 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
36 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
37 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
38 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
39 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
40 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
41 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
42 | + ... 27 common frames omitted | ||
43 | +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! | ||
44 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
45 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
46 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
47 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
48 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
49 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
50 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
51 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
52 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
53 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
54 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
55 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
56 | + at java.lang.Thread.run(Thread.java:748) | ||
57 | +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/} | ||
58 | +com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
59 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
60 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
61 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
62 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
63 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
64 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
65 | + at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509) | ||
66 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194) | ||
67 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170) | ||
68 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
69 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
70 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
71 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
72 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
73 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
74 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
75 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
76 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
77 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
78 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
79 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
80 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
81 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
82 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
83 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
84 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
85 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
86 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
87 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
88 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
89 | + at java.lang.Thread.run(Thread.java:748) | ||
90 | +Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
91 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123) | ||
92 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
93 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
94 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
95 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
96 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
97 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
98 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
99 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
100 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
101 | + ... 30 common frames omitted | ||
102 | +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 | ||
103 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
104 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
105 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
106 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
107 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
108 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
109 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
110 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
111 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
112 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
113 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
114 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
115 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
116 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
117 | + at java.lang.Thread.run(Thread.java:748) | ||
118 | +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/} | ||
119 | +com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
120 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
121 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
122 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
123 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
124 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
125 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
126 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
127 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
128 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
129 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
130 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
131 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
132 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
133 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
134 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
135 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
136 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
137 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
138 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
139 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
140 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
141 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
142 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
143 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
144 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
145 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
146 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
147 | + at java.lang.Thread.run(Thread.java:748) | ||
148 | +Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.53:12345 timed out | ||
149 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123) | ||
150 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
151 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
152 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
153 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
154 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
155 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
156 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
157 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
158 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
159 | + ... 27 common frames omitted | ||
160 | +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! | ||
161 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
162 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
163 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
164 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
165 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
166 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
167 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
168 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
169 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
170 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
171 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
172 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
173 | + at java.lang.Thread.run(Thread.java:748) | ||
174 | +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/} | ||
175 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
176 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
177 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
178 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
179 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
180 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
181 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
182 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
183 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
184 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
185 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
186 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
187 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
188 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
189 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
190 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
191 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
192 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
193 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
194 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
195 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
196 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
197 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
198 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
199 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
200 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
201 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
202 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
203 | + at java.lang.Thread.run(Thread.java:748) | ||
204 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
205 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
206 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
207 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
208 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
209 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
210 | + at java.net.Socket.connect(Socket.java:589) | ||
211 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
212 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
213 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
214 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
215 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
216 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
217 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
218 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
219 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
220 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
221 | + ... 27 common frames omitted | ||
222 | +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! | ||
223 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
224 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
225 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
226 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
227 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
228 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
229 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
230 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
231 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
232 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
233 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
234 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
235 | + at java.lang.Thread.run(Thread.java:748) | ||
236 | +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/} | ||
237 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
238 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
239 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
240 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
241 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
242 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
243 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
244 | + at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509) | ||
245 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194) | ||
246 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170) | ||
247 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
248 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
249 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
250 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
251 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
252 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
253 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
254 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
255 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
256 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
257 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
258 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
259 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
260 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
261 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
262 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
263 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
264 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
265 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
266 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
267 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
268 | + at java.lang.Thread.run(Thread.java:748) | ||
269 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
270 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
271 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
272 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
273 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
274 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
275 | + at java.net.Socket.connect(Socket.java:589) | ||
276 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
277 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
278 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
279 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
280 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
281 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
282 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
283 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
284 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
285 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
286 | + ... 30 common frames omitted | ||
287 | +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 | ||
288 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
289 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
290 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
291 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
292 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
293 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
294 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
295 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
296 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
297 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
298 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
299 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
300 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
301 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
302 | + at java.lang.Thread.run(Thread.java:748) | ||
303 | +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/} | ||
304 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
305 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
306 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
307 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
308 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
309 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
310 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
311 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
312 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
313 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
314 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
315 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
316 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
317 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
318 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
319 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
320 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
321 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
322 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
323 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
324 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
325 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
326 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
327 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
328 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
329 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
330 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
331 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
332 | + at java.lang.Thread.run(Thread.java:748) | ||
333 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
334 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
335 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
336 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
337 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
338 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
339 | + at java.net.Socket.connect(Socket.java:589) | ||
340 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
341 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
342 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
343 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
344 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
345 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
346 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
347 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
348 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
349 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
350 | + ... 27 common frames omitted | ||
351 | +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! | ||
352 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
353 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
354 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
355 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
356 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
357 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
358 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
359 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
360 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
361 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
362 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
363 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
364 | + at java.lang.Thread.run(Thread.java:748) | ||
365 | +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/} | ||
366 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
367 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
368 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
369 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
370 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
371 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
372 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
373 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
374 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
375 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
376 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
377 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
378 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
379 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
380 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
381 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
382 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
383 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
384 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
385 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
386 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
387 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
388 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
389 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
390 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
391 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
392 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
393 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
394 | + at java.lang.Thread.run(Thread.java:748) | ||
395 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
396 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
397 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
398 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
399 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
400 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
401 | + at java.net.Socket.connect(Socket.java:589) | ||
402 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
403 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
404 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
405 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
406 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
407 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
408 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
409 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
410 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
411 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
412 | + ... 27 common frames omitted | ||
413 | +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! | ||
414 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
415 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
416 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
417 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
418 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
419 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
420 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
421 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
422 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
423 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
424 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
425 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
426 | + at java.lang.Thread.run(Thread.java:748) | ||
427 | +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/} | ||
428 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
429 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
430 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
431 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
432 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
433 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
434 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
435 | + at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509) | ||
436 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:194) | ||
437 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getDelta(AbstractJerseyEurekaHttpClient.java:170) | ||
438 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
439 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
440 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
441 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
442 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
443 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
444 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
445 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
446 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
447 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
448 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
449 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
450 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
451 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
452 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
453 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
454 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
455 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
456 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
457 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
458 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
459 | + at java.lang.Thread.run(Thread.java:748) | ||
460 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
461 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
462 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
463 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
464 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
465 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
466 | + at java.net.Socket.connect(Socket.java:589) | ||
467 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
468 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
469 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
470 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
471 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
472 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
473 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
474 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
475 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
476 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
477 | + ... 30 common frames omitted | ||
478 | +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 | ||
479 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
480 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
481 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
482 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$7.execute(EurekaHttpClientDecorator.java:152) | ||
483 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
484 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getDelta(EurekaHttpClientDecorator.java:149) | ||
485 | + at com.netflix.discovery.DiscoveryClient.getAndUpdateDelta(DiscoveryClient.java:1103) | ||
486 | + at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:985) | ||
487 | + at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497) | ||
488 | + at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464) | ||
489 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
490 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
491 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
492 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
493 | + at java.lang.Thread.run(Thread.java:748) | ||
494 | +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/} | ||
495 | +com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Network is unreachable (connect failed) | ||
496 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) | ||
497 | + at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) | ||
498 | + at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) | ||
499 | + at com.sun.jersey.api.client.Client.handle(Client.java:652) | ||
500 | + at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) | ||
501 | + at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) | ||
502 | + at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:529) | ||
503 | + at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:102) | ||
504 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
505 | + at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) | ||
506 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
507 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
508 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) | ||
509 | + at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) | ||
510 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
511 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
512 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) | ||
513 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
514 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
515 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
516 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
517 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
518 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
519 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
520 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
521 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
522 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
523 | + at java.lang.Thread.run(Thread.java:748) | ||
524 | +Caused by: java.net.ConnectException: Network is unreachable (connect failed) | ||
525 | + at java.net.PlainSocketImpl.socketConnect(Native Method) | ||
526 | + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) | ||
527 | + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) | ||
528 | + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) | ||
529 | + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) | ||
530 | + at java.net.Socket.connect(Socket.java:589) | ||
531 | + at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) | ||
532 | + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) | ||
533 | + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) | ||
534 | + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) | ||
535 | + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605) | ||
536 | + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440) | ||
537 | + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) | ||
538 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) | ||
539 | + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) | ||
540 | + at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) | ||
541 | + ... 27 common frames omitted | ||
542 | +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! | ||
543 | +com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server | ||
544 | + at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) | ||
545 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
546 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) | ||
547 | + at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) | ||
548 | + at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) | ||
549 | + at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:864) | ||
550 | + at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1423) | ||
551 | + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | ||
552 | + at java.util.concurrent.FutureTask.run(FutureTask.java:266) | ||
553 | + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | ||
554 | + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | ||
555 | + at java.lang.Thread.run(Thread.java:748) |
logs/log_info.log
0 → 100755
logs/log_warn.log
0 → 100755
pom.xml
100644 → 100755
@@ -29,14 +29,7 @@ | @@ -29,14 +29,7 @@ | ||
29 | <groupId>org.springframework.boot</groupId> | 29 | <groupId>org.springframework.boot</groupId> |
30 | <artifactId>spring-boot-starter-web</artifactId> | 30 | <artifactId>spring-boot-starter-web</artifactId> |
31 | </dependency> | 31 | </dependency> |
32 | - <dependency> | ||
33 | - <groupId>org.springframework.cloud</groupId> | ||
34 | - <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | ||
35 | - </dependency> | ||
36 | - <dependency> | ||
37 | - <groupId>org.springframework.cloud</groupId> | ||
38 | - <artifactId>spring-cloud-starter-openfeign</artifactId> | ||
39 | - </dependency> | 32 | + |
40 | 33 | ||
41 | <dependency> | 34 | <dependency> |
42 | <groupId>org.projectlombok</groupId> | 35 | <groupId>org.projectlombok</groupId> |
@@ -108,6 +101,16 @@ | @@ -108,6 +101,16 @@ | ||
108 | <artifactId>base</artifactId> | 101 | <artifactId>base</artifactId> |
109 | <version>1.0-SNAPSHOT</version> | 102 | <version>1.0-SNAPSHOT</version> |
110 | </dependency> | 103 | </dependency> |
104 | + | ||
105 | + <dependency> | ||
106 | + <groupId>org.springframework.cloud</groupId> | ||
107 | + <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> | ||
108 | + </dependency> | ||
109 | + <!--feign的依赖--> | ||
110 | + <dependency> | ||
111 | + <groupId>org.springframework.cloud</groupId> | ||
112 | + <artifactId>spring-cloud-starter-openfeign</artifactId> | ||
113 | + </dependency> | ||
111 | </dependencies> | 114 | </dependencies> |
112 | 115 | ||
113 | <dependencyManagement> | 116 | <dependencyManagement> |
@@ -2,10 +2,14 @@ package com.sunyo.wlpt.message.builder; | @@ -2,10 +2,14 @@ package com.sunyo.wlpt.message.builder; | ||
2 | 2 | ||
3 | import org.springframework.boot.SpringApplication; | 3 | import org.springframework.boot.SpringApplication; |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
5 | -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | 5 | +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
6 | +import org.springframework.cloud.openfeign.EnableFeignClients; | ||
7 | +import org.springframework.scheduling.annotation.EnableScheduling; | ||
6 | 8 | ||
7 | @SpringBootApplication | 9 | @SpringBootApplication |
8 | -@EnableDiscoveryClient | 10 | +//@EnableDiscoveryClient |
11 | +@EnableEurekaClient | ||
12 | +@EnableFeignClients | ||
9 | public class BuilderApplication { | 13 | public class BuilderApplication { |
10 | 14 | ||
11 | public static void main(String[] args) { | 15 | public static void main(String[] args) { |
src/main/java/com/sunyo/wlpt/message/builder/Swagger2.java
100644 → 100755
1 | -package com.sunyo.wlpt.message.builder.controller; | ||
2 | - | ||
3 | -import org.springframework.web.bind.annotation.GetMapping; | ||
4 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
5 | -import org.springframework.web.bind.annotation.RestController; | ||
6 | - | ||
7 | - | ||
8 | -@RestController | ||
9 | -@RequestMapping(value = "/") | ||
10 | -public class IndexController { | ||
11 | - | ||
12 | - @GetMapping("index") | ||
13 | - public String index(){ | ||
14 | - return "11"; | ||
15 | -// return "数据仓库接收,落地报文给新舱单"; | ||
16 | - } | ||
17 | - | ||
18 | - | ||
19 | - | ||
20 | -} |
1 | package com.sunyo.wlpt.message.builder.controller; | 1 | package com.sunyo.wlpt.message.builder.controller; |
2 | 2 | ||
3 | -import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
4 | -import freemarker.template.Configuration; | 3 | +import com.sunyo.wlpt.message.builder.service.MT1201Service; |
5 | import org.springframework.beans.factory.annotation.Autowired; | 4 | import org.springframework.beans.factory.annotation.Autowired; |
6 | -import org.springframework.web.bind.annotation.RequestBody; | ||
7 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
8 | -import org.springframework.web.bind.annotation.RestController; | 5 | +import org.springframework.web.bind.annotation.*; |
9 | 6 | ||
7 | +import java.util.HashMap; | ||
10 | import java.util.Map; | 8 | import java.util.Map; |
11 | 9 | ||
12 | @RestController | 10 | @RestController |
13 | @RequestMapping("/mt1201") | 11 | @RequestMapping("/mt1201") |
14 | -public class MT1201Controller extends CustomXmlMaker { | ||
15 | - | ||
16 | - private static String businessType = "MT1201"; | 12 | +public class MT1201Controller { |
17 | 13 | ||
18 | @Autowired | 14 | @Autowired |
19 | - private Configuration freemakerTemplate; | 15 | + private MT1201Service mt1201Service; |
16 | + | ||
17 | + /** | ||
18 | + * 原始 FFm | ||
19 | + * @param map | ||
20 | + * @return | ||
21 | + */ | ||
22 | + @RequestMapping("/createMt1201") | ||
23 | + @ResponseBody | ||
24 | + public Map<String, Object> ffmcreate(@RequestBody Map<String, Object> map){ | ||
25 | + | ||
26 | + try { | ||
27 | + | ||
28 | + return mt1201Service.ffmcreate(map); | ||
29 | + }catch (Exception e){ | ||
30 | + e.printStackTrace(); | ||
31 | + Map<String, Object> maps = new HashMap<>(); | ||
32 | + maps.put("status", "0"); | ||
33 | + return maps; | ||
34 | + } | ||
35 | + } | ||
36 | + | ||
37 | + | ||
38 | + /** | ||
39 | + * 原始 FFm | ||
40 | + * @param map | ||
41 | + * @return | ||
42 | + */ | ||
43 | + @PutMapping("/editMt1201") | ||
44 | + @ResponseBody | ||
45 | + public Map<String, Object> editMt1201(@RequestBody Map<String, Object> map){ | ||
20 | 46 | ||
21 | - @RequestMapping("/send") | ||
22 | - public Boolean mt1201New(@RequestBody Map awb_manifest) throws Exception{ | 47 | + try { |
23 | 48 | ||
49 | + return mt1201Service.editMt1201(map); | ||
50 | + }catch (Exception e){ | ||
51 | + e.printStackTrace(); | ||
52 | + Map<String, Object> maps = new HashMap<>(); | ||
53 | + maps.put("status", "0"); | ||
54 | + return maps; | ||
24 | } | 55 | } |
56 | + } | ||
57 | + | ||
58 | + | ||
59 | + @PutMapping("/removeMt1201") | ||
60 | + @ResponseBody | ||
61 | + public Map<String, Object> removeMt1201(@RequestBody Map<String, Object> map){ | ||
62 | + | ||
63 | + try { | ||
64 | + | ||
65 | + return mt1201Service.removeMt1201(map); | ||
66 | + }catch (Exception e){ | ||
67 | + e.printStackTrace(); | ||
68 | + Map<String, Object> maps = new HashMap<>(); | ||
69 | + maps.put("status", "0"); | ||
70 | + return maps; | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
25 | } | 77 | } |
1 | package com.sunyo.wlpt.message.builder.controller; | 1 | package com.sunyo.wlpt.message.builder.controller; |
2 | 2 | ||
3 | -import com.sunyo.wlpt.message.builder.model.CUSTOM_RESPONSE; | ||
4 | -import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
5 | -import freemarker.template.Configuration; | 3 | +import com.sunyo.wlpt.message.builder.service.MT2201Service; |
4 | +import io.swagger.annotations.ApiOperation; | ||
6 | import org.springframework.beans.factory.annotation.Autowired; | 5 | import org.springframework.beans.factory.annotation.Autowired; |
7 | -import org.springframework.web.bind.annotation.RequestBody; | ||
8 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
9 | -import org.springframework.web.bind.annotation.RestController; | 6 | +import org.springframework.web.bind.annotation.*; |
10 | 7 | ||
11 | -import java.util.Date; | 8 | +import java.io.IOException; |
9 | +import java.text.ParseException; | ||
10 | +import java.util.HashMap; | ||
12 | import java.util.Map; | 11 | import java.util.Map; |
13 | 12 | ||
14 | @RestController | 13 | @RestController |
15 | -@RequestMapping("/mt2201") | ||
16 | -public class MT2201Controller extends CustomXmlMaker { | 14 | +@RequestMapping(value = "/mt2201") |
15 | +public class MT2201Controller { | ||
17 | 16 | ||
18 | @Autowired | 17 | @Autowired |
19 | - private Configuration freemakerTemplate; | ||
20 | - | ||
21 | - private static String businessType = "MT2201"; | 18 | + private MT2201Service mt2201Service; |
22 | 19 | ||
23 | /** | 20 | /** |
24 | - * MAP包含运单实体与舱单实体 | ||
25 | - * @param awb_manifest {awb:AWB_AWBINFO,man:} | 21 | + * 生成报文 |
22 | + * @param map | ||
26 | * @return | 23 | * @return |
27 | - * @throws Exception | ||
28 | */ | 24 | */ |
29 | - @RequestMapping("/send") | ||
30 | - public Boolean mt1201New(@RequestBody Map awb_manifest) throws Exception{ | 25 | + @PostMapping("/creatMt2201") |
26 | + @ApiOperation(value = "生成报文") | ||
27 | + @ResponseBody | ||
28 | + public Map<String, Object> creatMt2201(@RequestBody Map<String, Object> map) { | ||
29 | + | ||
30 | + try { | ||
31 | + | ||
32 | + return mt2201Service.creatMt2201(map); | ||
33 | + }catch (Exception e){ | ||
34 | + e.printStackTrace(); | ||
35 | + Map<String, Object> maps = new HashMap<>(); | ||
36 | + maps.put("status", "0"); | ||
37 | + return maps; | ||
38 | + } | ||
39 | + | ||
40 | + } | ||
41 | + | ||
42 | + @PutMapping("/editMt2201") | ||
43 | + @ApiOperation(value = "修改报文") | ||
44 | + @ResponseBody | ||
45 | + public Map<String, Object> editMt2201(@RequestBody Map<String, Object> map) { | ||
46 | + | ||
31 | try { | 47 | try { |
32 | - CUSTOM_RESPONSE response = new CUSTOM_RESPONSE(); | ||
33 | - response.setAwbano("17212345678"); | ||
34 | - response.setCusfunctioncode("2"); | ||
35 | 48 | ||
36 | - response.setCusreciverid("4604"); | ||
37 | - response.setCusversion("1.2"); | ||
38 | - response.setBusdate(new Date()); | ||
39 | - response.setBustype(businessType); | 49 | + return mt2201Service.editMt2201(map); |
50 | + }catch (Exception e){ | ||
51 | + e.printStackTrace(); | ||
52 | + Map<String, Object> maps = new HashMap<>(); | ||
53 | + maps.put("status", "0"); | ||
54 | + return maps; | ||
55 | + } | ||
56 | + | ||
57 | + } | ||
58 | + | ||
59 | + @PutMapping("/removeMt2201") | ||
60 | + @ApiOperation(value = "删除报文") | ||
61 | + @ResponseBody | ||
62 | + public Map<String, Object> removeMt2201(@RequestBody Map<String, Object> map) { | ||
40 | 63 | ||
41 | - String msgId = makeMsgID(businessType,"460470678920X","17212345678"); | ||
42 | - response.setCusmsgid(msgId); | ||
43 | - response.setCussenderid(makeSenderID("4604","460470678920X")); | 64 | + try { |
44 | 65 | ||
45 | - String filename = response.getCusmsgid()+".xml"; | ||
46 | - makeXmlToFile("/manifest/MT2201.ftlx",filename,awb_manifest); | 66 | + return mt2201Service.removeMt2201(map); |
47 | }catch (Exception e){ | 67 | }catch (Exception e){ |
48 | e.printStackTrace(); | 68 | e.printStackTrace(); |
49 | - return false; | 69 | + Map<String, Object> maps = new HashMap<>(); |
70 | + maps.put("status", "0"); | ||
71 | + return maps; | ||
50 | } | 72 | } |
51 | - return true; | 73 | + |
52 | } | 74 | } |
75 | + | ||
53 | } | 76 | } |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | + | ||
4 | +import com.sunyo.wlpt.message.builder.service.MT3201Service; | ||
5 | +import io.swagger.annotations.ApiModel; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.web.bind.annotation.*; | ||
8 | + | ||
9 | +import java.util.HashMap; | ||
10 | +import java.util.Map; | ||
11 | + | ||
12 | +@RestController | ||
13 | +@RequestMapping("/mt3201") | ||
14 | +public class MT3201Controller { | ||
15 | + | ||
16 | + @Autowired | ||
17 | + MT3201Service mt3201Service; | ||
18 | + | ||
19 | + | ||
20 | + @RequestMapping("/createMt3201") | ||
21 | + @ResponseBody | ||
22 | + public Map<String, Object> fohcreate(@RequestBody Map<String, Object> map){ | ||
23 | + | ||
24 | + try { | ||
25 | + | ||
26 | + return mt3201Service.fohcreate(map); | ||
27 | + }catch (Exception e){ | ||
28 | + e.printStackTrace(); | ||
29 | + Map<String, Object> maps = new HashMap<>(); | ||
30 | + maps.put("status", "0"); | ||
31 | + return maps; | ||
32 | + } | ||
33 | + | ||
34 | + } | ||
35 | + | ||
36 | + @PutMapping("/removeMt3201") | ||
37 | + @ResponseBody | ||
38 | + public Map<String, Object> remove(@RequestBody Map<String, Object> map){ | ||
39 | + | ||
40 | + try { | ||
41 | + | ||
42 | + return mt3201Service.remove(map); | ||
43 | + }catch (Exception e){ | ||
44 | + e.printStackTrace(); | ||
45 | + Map<String, Object> maps = new HashMap<>(); | ||
46 | + maps.put("status", "0"); | ||
47 | + return maps; | ||
48 | + } | ||
49 | + | ||
50 | + } | ||
51 | + | ||
52 | +} |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.message.builder.service.MT3202Service; | ||
4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
5 | +import org.springframework.web.bind.annotation.*; | ||
6 | + | ||
7 | +import java.util.HashMap; | ||
8 | +import java.util.Map; | ||
9 | + | ||
10 | +@RestController | ||
11 | +@RequestMapping(value = "/mt3202") | ||
12 | +public class MT3202Controller { | ||
13 | + | ||
14 | + @Autowired | ||
15 | + private MT3202Service mt3202Service; | ||
16 | + | ||
17 | + @PostMapping("/createMt3202") | ||
18 | + @ResponseBody | ||
19 | + public Map<String, Object> createMt3201(@RequestBody Map<String, Object> map){ | ||
20 | + | ||
21 | + try { | ||
22 | + | ||
23 | + return mt3202Service.createMt3202(map); | ||
24 | + }catch (Exception e){ | ||
25 | + e.printStackTrace(); | ||
26 | + Map<String, Object> maps = new HashMap<>(); | ||
27 | + maps.put("status", "0"); | ||
28 | + return maps; | ||
29 | + } | ||
30 | + | ||
31 | + } | ||
32 | + | ||
33 | + @PutMapping("/removeMt3202") | ||
34 | + @ResponseBody | ||
35 | + public Map<String, Object> remove(@RequestBody Map<String, Object> map){ | ||
36 | + | ||
37 | + try { | ||
38 | + | ||
39 | + return mt3202Service.removeMt3202(map); | ||
40 | + }catch (Exception e){ | ||
41 | + e.printStackTrace(); | ||
42 | + Map<String, Object> maps = new HashMap<>(); | ||
43 | + maps.put("status", "0"); | ||
44 | + return maps; | ||
45 | + } | ||
46 | + | ||
47 | + } | ||
48 | + | ||
49 | +} |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.message.builder.service.MT4201Service; | ||
4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
5 | +import org.springframework.web.bind.annotation.*; | ||
6 | + | ||
7 | +import java.io.IOException; | ||
8 | +import java.text.ParseException; | ||
9 | +import java.util.HashMap; | ||
10 | +import java.util.Map; | ||
11 | + | ||
12 | + | ||
13 | +@RestController | ||
14 | +@RequestMapping("/mt4201") | ||
15 | +public class MT4201Controller { | ||
16 | + | ||
17 | + @Autowired | ||
18 | + MT4201Service mt4201Service; | ||
19 | + | ||
20 | + | ||
21 | + @PostMapping("/createMt4201") | ||
22 | + @ResponseBody | ||
23 | + public Map<String, Object> pffmcreate(@RequestBody Map<String, Object> map) { | ||
24 | + | ||
25 | + try { | ||
26 | + | ||
27 | + return mt4201Service.pffmcreate(map); | ||
28 | + }catch (Exception e){ | ||
29 | + e.printStackTrace(); | ||
30 | + Map<String, Object> maps = new HashMap<>(); | ||
31 | + maps.put("status", "0"); | ||
32 | + return maps; | ||
33 | + } | ||
34 | + | ||
35 | + | ||
36 | + } | ||
37 | + | ||
38 | + | ||
39 | + @PutMapping("/removeMt4201") | ||
40 | + @ResponseBody | ||
41 | + public Map<String, Object> remove4201(@RequestBody Map<String, Object> map) { | ||
42 | + | ||
43 | + try { | ||
44 | + | ||
45 | + return mt4201Service.remove4201(map); | ||
46 | + }catch (Exception e){ | ||
47 | + e.printStackTrace(); | ||
48 | + Map<String, Object> maps = new HashMap<>(); | ||
49 | + maps.put("status", "0"); | ||
50 | + return maps; | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | +} |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.message.builder.service.MT520XService; | ||
4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
5 | +import org.springframework.web.bind.annotation.*; | ||
6 | + | ||
7 | +import java.util.HashMap; | ||
8 | +import java.util.Map; | ||
9 | + | ||
10 | + | ||
11 | +@RestController | ||
12 | +@RequestMapping("/mt520x") | ||
13 | +public class MT520XController { | ||
14 | + | ||
15 | + | ||
16 | + @Autowired | ||
17 | + MT520XService mt520XService; | ||
18 | + | ||
19 | + /** | ||
20 | + * 进出港理货 | ||
21 | + * @param map | ||
22 | + * @return | ||
23 | + */ | ||
24 | + @PostMapping("/createMt520x") | ||
25 | + @ResponseBody | ||
26 | + public Map<String, Object> create(@RequestBody Map<String, Object> map){ | ||
27 | + | ||
28 | + try { | ||
29 | + | ||
30 | + return mt520XService.create(map); | ||
31 | + | ||
32 | + }catch (Exception e){ | ||
33 | + e.printStackTrace(); | ||
34 | + Map<String, Object> maps = new HashMap<>(); | ||
35 | + maps.put("status", "0"); | ||
36 | + return maps; | ||
37 | + } | ||
38 | + | ||
39 | + } | ||
40 | + | ||
41 | + /** | ||
42 | + * 进出港理货 | ||
43 | + * @param map | ||
44 | + * @return | ||
45 | + */ | ||
46 | + @PutMapping("/removeMt520x") | ||
47 | + @ResponseBody | ||
48 | + public Map<String, Object> remove520x(@RequestBody Map<String, Object> map){ | ||
49 | + | ||
50 | + try { | ||
51 | + | ||
52 | + return mt520XService.remove520x(map); | ||
53 | + | ||
54 | + }catch (Exception e){ | ||
55 | + e.printStackTrace(); | ||
56 | + Map<String, Object> maps = new HashMap<>(); | ||
57 | + maps.put("status", "0"); | ||
58 | + return maps; | ||
59 | + } | ||
60 | + | ||
61 | + } | ||
62 | +} |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.message.builder.service.MT6202Service; | ||
4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
5 | +import org.springframework.web.bind.annotation.*; | ||
6 | + | ||
7 | +import java.io.IOException; | ||
8 | +import java.text.ParseException; | ||
9 | +import java.util.HashMap; | ||
10 | +import java.util.Map; | ||
11 | + | ||
12 | +@RequestMapping(value = "/mt6202") | ||
13 | +@RestController | ||
14 | +public class MT6202Controller { | ||
15 | + | ||
16 | + @Autowired | ||
17 | + private MT6202Service mt6202Service; | ||
18 | + | ||
19 | + @PostMapping(value = "/createMt6202") | ||
20 | + @ResponseBody | ||
21 | + public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map) { | ||
22 | + | ||
23 | + try { | ||
24 | + | ||
25 | + return mt6202Service.creatMt6202(map); | ||
26 | + }catch (Exception e){ | ||
27 | + e.printStackTrace(); | ||
28 | + Map<String, Object> maps = new HashMap<>(); | ||
29 | + maps.put("status", "0"); | ||
30 | + return maps; | ||
31 | + } | ||
32 | + } | ||
33 | + | ||
34 | + @PutMapping(value = "/removeMt6202") | ||
35 | + @ResponseBody | ||
36 | + public Map<String, Object> removeMt6202(@RequestBody Map<String, Object> map) { | ||
37 | + | ||
38 | + try { | ||
39 | + | ||
40 | + return mt6202Service.removeMt6202(map); | ||
41 | + }catch (Exception e){ | ||
42 | + e.printStackTrace(); | ||
43 | + Map<String, Object> maps = new HashMap<>(); | ||
44 | + maps.put("status", "0"); | ||
45 | + return maps; | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | +} |
1 | +package com.sunyo.wlpt.message.builder.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.message.builder.service.MT8205Service; | ||
4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
5 | +import org.springframework.web.bind.annotation.*; | ||
6 | + | ||
7 | +import java.io.IOException; | ||
8 | +import java.text.ParseException; | ||
9 | +import java.util.HashMap; | ||
10 | +import java.util.Map; | ||
11 | + | ||
12 | +@RequestMapping(value = "/mt8205") | ||
13 | +@RestController | ||
14 | +public class MT8205Controller { | ||
15 | + | ||
16 | + @Autowired | ||
17 | + private MT8205Service mt8205Service; | ||
18 | + | ||
19 | + @PostMapping(value = "/creatMt8205") | ||
20 | + @ResponseBody | ||
21 | + public Map<String, Object> creatMt8205(@RequestBody Map<String, Object> map){ | ||
22 | + | ||
23 | + try { | ||
24 | + | ||
25 | + return mt8205Service.create8205(map); | ||
26 | + }catch (Exception e){ | ||
27 | + e.printStackTrace(); | ||
28 | + Map<String, Object> maps = new HashMap<>(); | ||
29 | + maps.put("status", "0"); | ||
30 | + return maps; | ||
31 | + } | ||
32 | + } | ||
33 | + | ||
34 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; | ||
4 | +import com.sunyo.wlpt.message.builder.service.imp.FeignServiceImp; | ||
5 | +import org.springframework.cloud.openfeign.FeignClient; | ||
6 | +import org.springframework.stereotype.Component; | ||
7 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
8 | + | ||
9 | +@Component | ||
10 | +@FeignClient(value = "nmms-server-export", fallback = FeignServiceImp.class) | ||
11 | +public interface FeignService { | ||
12 | + | ||
13 | + @RequestMapping("/jx/result") | ||
14 | + String jxvalue(NMMS_CUSTOM_MT2201 nmms_custom_mt2201); | ||
15 | + | ||
16 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import java.io.IOException; | ||
4 | +import java.text.ParseException; | ||
5 | +import java.util.Map; | ||
6 | + | ||
7 | +public interface MT1201Service { | ||
8 | + | ||
9 | + | ||
10 | + Map<String, Object> ffmcreate (Map<String, Object> map) throws IOException, ParseException; | ||
11 | + | ||
12 | + Map<String, Object> editMt1201 (Map<String, Object> map) throws IOException, ParseException; | ||
13 | + | ||
14 | + Map<String, Object> removeMt1201 (Map<String, Object> map) throws IOException, ParseException; | ||
15 | + | ||
16 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; | ||
4 | +import org.omg.CORBA.OBJECT_NOT_EXIST; | ||
5 | + | ||
6 | +import java.io.IOException; | ||
7 | +import java.text.ParseException; | ||
8 | +import java.util.Map; | ||
9 | + | ||
10 | +public interface MT2201Service { | ||
11 | + | ||
12 | + int deleteByPrimaryKey(String uuid); | ||
13 | + | ||
14 | + int insert(NMMS_CUSTOM_MT2201 record); | ||
15 | + | ||
16 | + int insertSelective(NMMS_CUSTOM_MT2201 record); | ||
17 | + | ||
18 | + NMMS_CUSTOM_MT2201 selectByPrimaryKey(String uuid); | ||
19 | + | ||
20 | + int updateByPrimaryKeySelective(NMMS_CUSTOM_MT2201 record); | ||
21 | + | ||
22 | + int updateByPrimaryKey(NMMS_CUSTOM_MT2201 record); | ||
23 | + | ||
24 | + Map<String, Object> creatMt2201(Map<String, Object> map) throws IOException, ParseException; | ||
25 | + | ||
26 | + Map<String, Object> editMt2201(Map<String, Object> map) throws IOException, ParseException; | ||
27 | + | ||
28 | + Map<String, Object> removeMt2201(Map<String, Object> map) throws IOException, ParseException; | ||
29 | + | ||
30 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import sun.jvm.hotspot.oops.ObjectHeap; | ||
4 | + | ||
5 | +import java.io.IOException; | ||
6 | +import java.text.ParseException; | ||
7 | +import java.util.Map; | ||
8 | + | ||
9 | +public interface MT3201Service { | ||
10 | + | ||
11 | + Map<String, Object> fohcreate(Map<String, Object> map) throws IOException, ParseException; | ||
12 | + | ||
13 | + Map<String, Object> remove(Map<String, Object> map) throws IOException, ParseException; | ||
14 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import java.io.IOException; | ||
4 | +import java.text.ParseException; | ||
5 | +import java.util.Map; | ||
6 | + | ||
7 | +public interface MT3202Service { | ||
8 | + | ||
9 | + Map<String, Object> createMt3202(Map<String, Object> map) throws ParseException, IOException; | ||
10 | + | ||
11 | + Map<String, Object> removeMt3202(Map<String, Object> map) throws IOException, ParseException; | ||
12 | + | ||
13 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import java.io.IOException; | ||
4 | +import java.text.ParseException; | ||
5 | +import java.util.Map; | ||
6 | + | ||
7 | +public interface MT4201Service { | ||
8 | + | ||
9 | + Map<String, Object> pffmcreate(Map<String, Object> map) throws IOException, ParseException; | ||
10 | + | ||
11 | + Map<String, Object> remove4201(Map<String, Object> map) throws IOException, ParseException; | ||
12 | + | ||
13 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | +import java.io.IOException; | ||
6 | +import java.text.ParseException; | ||
7 | +import java.util.Map; | ||
8 | + | ||
9 | +public interface MT520XService { | ||
10 | + | ||
11 | + | ||
12 | + public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException; | ||
13 | + | ||
14 | + public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException; | ||
15 | + | ||
16 | +} |
1 | +package com.sunyo.wlpt.message.builder.service; | ||
2 | + | ||
3 | +import java.io.IOException; | ||
4 | +import java.text.ParseException; | ||
5 | +import java.util.Map; | ||
6 | + | ||
7 | +public interface MT6202Service { | ||
8 | + | ||
9 | + Map<String, Object> creatMt6202(Map<String, Object> map) throws IOException, ParseException; | ||
10 | + | ||
11 | + Map<String, Object> removeMt6202(Map<String, Object> map) throws IOException, ParseException; | ||
12 | + | ||
13 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; | ||
4 | +import com.sunyo.wlpt.message.builder.service.FeignService; | ||
5 | +import org.springframework.stereotype.Component; | ||
6 | + | ||
7 | +import java.util.Map; | ||
8 | + | ||
9 | +@Component | ||
10 | +public class FeignServiceImp implements FeignService{ | ||
11 | + | ||
12 | + @Override | ||
13 | + public String jxvalue(NMMS_CUSTOM_MT2201 nmms_custom_mt2201) { | ||
14 | + System.out.println("服务调用失败"); | ||
15 | + | ||
16 | + return "服务调用失败"; | ||
17 | + } | ||
18 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.AWB_AWBINFO; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201; | ||
6 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
7 | +import com.sunyo.wlpt.message.builder.service.MT1201Service; | ||
8 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
9 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
10 | +import com.tianbo.util.Date.DateUtil; | ||
11 | +import org.springframework.beans.factory.annotation.Value; | ||
12 | +import org.springframework.stereotype.Service; | ||
13 | + | ||
14 | +import java.io.IOException; | ||
15 | +import java.math.BigDecimal; | ||
16 | +import java.text.ParseException; | ||
17 | +import java.util.Date; | ||
18 | +import java.util.HashMap; | ||
19 | +import java.util.Map; | ||
20 | + | ||
21 | +@Service | ||
22 | +public class MT1201ServiceImp extends CustomXmlMaker implements MT1201Service{ | ||
23 | + | ||
24 | + @Value("${custom.custom-code}") | ||
25 | + private String orgsn; | ||
26 | + | ||
27 | + @Value("${custom.org-code}") | ||
28 | + private String orgCode; | ||
29 | + | ||
30 | + @Override | ||
31 | + public Map<String, Object> ffmcreate(Map<String, Object> map) throws IOException, ParseException { | ||
32 | + | ||
33 | + map.put("templatePath", "/manifest/MT1201.ftlx"); | ||
34 | + map.put("sendPath", "./send/add/"); | ||
35 | + return mt1201(map); | ||
36 | + } | ||
37 | + | ||
38 | + @Override | ||
39 | + public Map<String, Object> editMt1201(Map<String, Object> map) throws IOException, ParseException { | ||
40 | + | ||
41 | + map.put("templatePath", "/edit/MT1201.ftlx"); | ||
42 | + map.put("sendPath", "./send/edit/"); | ||
43 | + return mt1201(map); | ||
44 | + } | ||
45 | + | ||
46 | + @Override | ||
47 | + public Map<String, Object> removeMt1201(Map<String, Object> map) throws IOException, ParseException { | ||
48 | + | ||
49 | + String customCode = map.get("customCode").toString(); | ||
50 | + // 生成报文头部 | ||
51 | + String msgId = makeMsgID("MT1201", orgsn, map.get("awba").toString()); | ||
52 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
53 | + String receiverID = customCode; | ||
54 | + map.put("msgId", msgId); | ||
55 | + map.put("senderId", senderId); | ||
56 | + map.put("receiverID", receiverID); | ||
57 | + // 报文头时间 精确到毫秒 | ||
58 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
59 | + // 舱单传输人名称 | ||
60 | + map.put("orgCode", orgCode); | ||
61 | + | ||
62 | + // 处理主单号 - | ||
63 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
64 | + map.put("awbas", awba); | ||
65 | + | ||
66 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
67 | + map.put("flightDates",flightDate); | ||
68 | + | ||
69 | + // 生成报文 | ||
70 | + Map<String, Object> hashMap = new HashMap<>(); | ||
71 | + // 生成报文 | ||
72 | + if (makeXmlToFile("/remove/MT1201.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
73 | + map.put("functionCode", "3"); | ||
74 | + map.put("busType","MT1201"); | ||
75 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
76 | + // 操作类型 | ||
77 | + nmmsCustomResponse.setOpertype("删除"); | ||
78 | + nmmsCustomResponse.setCusrescode("24"); | ||
79 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
80 | + hashMap.put("status", "1"); | ||
81 | + hashMap.put("customResponse", nmmsCustomResponse); | ||
82 | + return hashMap; | ||
83 | + }else { | ||
84 | + hashMap.put("status", "0"); | ||
85 | + return hashMap; | ||
86 | + } | ||
87 | + } | ||
88 | + | ||
89 | + | ||
90 | + public Map<String, Object> mt1201(Map<String, Object> map) throws IOException, ParseException { | ||
91 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
92 | + // 预配 | ||
93 | + NMMS_CUSTOM_MT1201 customMt1201 = objectMapper.convertValue(map.get("mt1201"), NMMS_CUSTOM_MT1201.class); | ||
94 | + // 运单 | ||
95 | + AWB_AWBINFO awbAwbinfo = customMt1201.getAwbinfo(); | ||
96 | + // 关区代码 | ||
97 | + String customCode = customMt1201.getCustomcode(); | ||
98 | + // 报文头时间 精确到毫秒 | ||
99 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
100 | + // 航班起飞时间 sendTime(海关接受时间) + 1小时 | ||
101 | + String s = DateUtil.addDateMinut(new Date(), 1); | ||
102 | + // 航班到达时间 航班起飞时间 + 2小时/+当前是间加3个小时 | ||
103 | + String ss = DateUtil.addDateMinut(new Date(), 3); | ||
104 | + map.put("departureDateTime", s); | ||
105 | + map.put("arrivalDateTime", ss); | ||
106 | + // 到达卸货地时间 | ||
107 | + String arrival = ss.substring(0, 8); | ||
108 | + map.put("arrival", arrival); | ||
109 | + // 封装实体 | ||
110 | + map.put("mt", customMt1201); | ||
111 | + map.put("awbAwbinfo", awbAwbinfo); | ||
112 | + | ||
113 | + // 处理主单号- | ||
114 | + String awba = ReturnUtil.awbaReplace(customMt1201.getAwba()); | ||
115 | + map.put("awba", awba); | ||
116 | + | ||
117 | + // 生成报文头部 | ||
118 | + String msgId = makeMsgID("MT1201", orgsn, customMt1201.getAwba()); | ||
119 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
120 | + String receiverID = customCode; | ||
121 | + map.put("msgId", msgId); | ||
122 | + map.put("senderId", senderId); | ||
123 | + map.put("receiverID", receiverID); | ||
124 | + // 舱单传输人名称 | ||
125 | + map.put("orgCode", orgCode); | ||
126 | + Map<String, Object> maps = new HashMap<>(); | ||
127 | + // 生成报文 | ||
128 | + if (makeXmlToFile(map.get("templatePath").toString(), msgId+".xml", map, map.get("sendPath").toString())>0){ | ||
129 | + if (!map.containsKey("reason")){ | ||
130 | + map.put("functionCode", "9"); | ||
131 | + map.put("busType","MT1201"); | ||
132 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
133 | + // 航班日期 | ||
134 | + nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate()); | ||
135 | + // 航班号 | ||
136 | + nmmsCustomResponse.setFlightno(customMt1201.getFlightno()); | ||
137 | + // 航班承运人 | ||
138 | + nmmsCustomResponse.setCarrier(customMt1201.getCarrier()); | ||
139 | + // 主单号 | ||
140 | + nmmsCustomResponse.setAwbano(customMt1201.getAwba()); | ||
141 | + if (!"".equals(customMt1201.getAwbh())){ | ||
142 | + // 分单号 | ||
143 | + nmmsCustomResponse.setAwbhno(customMt1201.getAwbh()); | ||
144 | + }else { | ||
145 | + nmmsCustomResponse.setAwbhno(null); | ||
146 | + } | ||
147 | + // 件数 | ||
148 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString())); | ||
149 | + // 重量 | ||
150 | + nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString())); | ||
151 | + // 操作类型 | ||
152 | + nmmsCustomResponse.setOpertype("新增"); | ||
153 | + nmmsCustomResponse.setCusrescode("23"); | ||
154 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
155 | + maps.put("status", "1"); | ||
156 | + maps.put("customResponse", nmmsCustomResponse); | ||
157 | + | ||
158 | + return maps; | ||
159 | + }else { | ||
160 | + map.put("functionCode", "5"); | ||
161 | + map.put("busType","MT1201"); | ||
162 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
163 | + // 航班日期 | ||
164 | + nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate()); | ||
165 | + // 航班号 | ||
166 | + nmmsCustomResponse.setFlightno(customMt1201.getFlightno()); | ||
167 | + // 航班承运人 | ||
168 | + nmmsCustomResponse.setCarrier(customMt1201.getCarrier()); | ||
169 | + // 主单号 | ||
170 | + nmmsCustomResponse.setAwbano(customMt1201.getAwba()); | ||
171 | + if (!"".equals(customMt1201.getAwbh())){ | ||
172 | + // 分单号 | ||
173 | + nmmsCustomResponse.setAwbhno(customMt1201.getAwbh()); | ||
174 | + }else { | ||
175 | + nmmsCustomResponse.setAwbhno(null); | ||
176 | + } | ||
177 | + // 件数 | ||
178 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString())); | ||
179 | + // 重量 | ||
180 | + nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString())); | ||
181 | + // 操作类型 | ||
182 | + nmmsCustomResponse.setOpertype("修改"); | ||
183 | + nmmsCustomResponse.setCusrescode("25"); | ||
184 | + nmmsCustomResponse.setCusrestext("修改报发送成功"); | ||
185 | + maps.put("status", "1"); | ||
186 | + maps.put("customResponse", nmmsCustomResponse); | ||
187 | + | ||
188 | + return maps; | ||
189 | + } | ||
190 | + }else { | ||
191 | + maps.put("status", "0"); | ||
192 | + return maps; | ||
193 | + } | ||
194 | + } | ||
195 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.DeserializationFeature; | ||
4 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
5 | +import com.sunyo.wlpt.base.model.AWB_AWBINFO; | ||
6 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; | ||
7 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201; | ||
8 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
9 | +import com.sunyo.wlpt.message.builder.service.MT2201Service; | ||
10 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
11 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
12 | +import com.tianbo.util.Date.DateUtil; | ||
13 | +import org.springframework.beans.factory.annotation.Value; | ||
14 | +import org.springframework.cglib.beans.BeanMap; | ||
15 | +import org.springframework.stereotype.Service; | ||
16 | + | ||
17 | +import java.io.IOException; | ||
18 | +import java.math.BigDecimal; | ||
19 | +import java.text.ParseException; | ||
20 | +import java.util.Date; | ||
21 | +import java.util.HashMap; | ||
22 | +import java.util.Map; | ||
23 | + | ||
24 | +@Service | ||
25 | +public class MT2201ServiceImp extends CustomXmlMaker implements MT2201Service { | ||
26 | + | ||
27 | + @Override | ||
28 | + public int deleteByPrimaryKey(String uuid) { | ||
29 | + return 0; | ||
30 | + } | ||
31 | + | ||
32 | + @Override | ||
33 | + public int insert(NMMS_CUSTOM_MT2201 record) { | ||
34 | + return 0; | ||
35 | + } | ||
36 | + | ||
37 | + @Override | ||
38 | + public int insertSelective(NMMS_CUSTOM_MT2201 record) { | ||
39 | + return 0; | ||
40 | + } | ||
41 | + | ||
42 | + @Override | ||
43 | + public NMMS_CUSTOM_MT2201 selectByPrimaryKey(String uuid) { | ||
44 | + return null; | ||
45 | + } | ||
46 | + | ||
47 | + @Override | ||
48 | + public int updateByPrimaryKeySelective(NMMS_CUSTOM_MT2201 record) { | ||
49 | + return 0; | ||
50 | + } | ||
51 | + | ||
52 | + @Override | ||
53 | + public int updateByPrimaryKey(NMMS_CUSTOM_MT2201 record) { | ||
54 | + return 0; | ||
55 | + } | ||
56 | + | ||
57 | + @Value("${custom.custom-code}") | ||
58 | + private String orgsn; | ||
59 | + | ||
60 | + @Value("${custom.org-code}") | ||
61 | + private String orgCode; | ||
62 | + | ||
63 | + @Override | ||
64 | + public Map<String, Object> creatMt2201(Map<String, Object> map) throws IOException, ParseException { | ||
65 | + map.put("templatePath", "/manifest/MT2201.ftlx"); | ||
66 | + map.put("sendPath", "./send/add/"); | ||
67 | + return mt2201(map); | ||
68 | + } | ||
69 | + | ||
70 | + @Override | ||
71 | + public Map<String, Object> editMt2201(Map<String, Object> map) throws IOException, ParseException { | ||
72 | + map.put("templatePath", "/edit/MT2201.ftlx"); | ||
73 | + map.put("sendPath", "./send/edit/"); | ||
74 | + return mt2201(map); | ||
75 | + } | ||
76 | + | ||
77 | + @Override | ||
78 | + public Map<String, Object> removeMt2201(Map<String, Object> map) throws IOException, ParseException { | ||
79 | + | ||
80 | + String customCode = map.get("customCode").toString(); | ||
81 | + // 生成报文头部 | ||
82 | + String msgId = makeMsgID("MT2201", orgsn, map.get("awba").toString()); | ||
83 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
84 | + String receiverID = customCode; | ||
85 | + map.put("msgId", msgId); | ||
86 | + map.put("senderId", senderId); | ||
87 | + map.put("receiverID", receiverID); | ||
88 | + // 报文头时间 精确到毫秒 | ||
89 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
90 | + // 舱单传输人名称 | ||
91 | + map.put("orgCode", orgCode); | ||
92 | + // 处理主单号- | ||
93 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
94 | + map.put("awbas", awba); | ||
95 | + | ||
96 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
97 | + map.put("flightDates",flightDate); | ||
98 | + | ||
99 | + Map<String, Object> hashMap = new HashMap<>(); | ||
100 | + // 生成报文 | ||
101 | + if (makeXmlToFile("/remove/MT2201.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
102 | + map.put("functionCode", "3"); | ||
103 | + map.put("busType","MT2201"); | ||
104 | + System.out.println(); | ||
105 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
106 | + // 操作类型 | ||
107 | + nmmsCustomResponse.setOpertype("删除"); | ||
108 | + nmmsCustomResponse.setCusrescode("24"); | ||
109 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
110 | + hashMap.put("status", "1"); | ||
111 | + hashMap.put("customResponse", nmmsCustomResponse); | ||
112 | + return hashMap; | ||
113 | + }else { | ||
114 | + hashMap.put("status", "0"); | ||
115 | + return hashMap; | ||
116 | + } | ||
117 | + } | ||
118 | + | ||
119 | + | ||
120 | + public Map<String, Object> mt2201(Map<String, Object> map) throws IOException, ParseException { | ||
121 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
122 | + // 预配 | ||
123 | + NMMS_CUSTOM_MT2201 custom_mt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class); | ||
124 | + // 运单 | ||
125 | + AWB_AWBINFO awbAwbinfo = custom_mt2201.getAwbinfo(); | ||
126 | + // 关区代码 | ||
127 | + String customCode = custom_mt2201.getCustomcode(); | ||
128 | + // 报文头时间 精确到毫秒 | ||
129 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
130 | + // 封装实体 | ||
131 | + map.put("mt", custom_mt2201); | ||
132 | + map.put("awbAwbinfo", awbAwbinfo); | ||
133 | + | ||
134 | + // 处理主单号- | ||
135 | + String awba = ReturnUtil.awbaReplace(custom_mt2201.getAwba()); | ||
136 | + map.put("awba", awba); | ||
137 | + | ||
138 | + // 生成报文头部 | ||
139 | + String msgId = makeMsgID("MT2201", orgsn, custom_mt2201.getAwba()); | ||
140 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
141 | + String receiverID = customCode; | ||
142 | + map.put("msgId", msgId); | ||
143 | + map.put("senderId", senderId); | ||
144 | + map.put("receiverID", receiverID); | ||
145 | + String s = DateUtil.addDateMinut(new Date(), 6); | ||
146 | + // 货物装卸时间 | ||
147 | + map.put("loadingDate",s); | ||
148 | + // 舱单传输人名称 | ||
149 | + map.put("orgCode", orgCode); | ||
150 | + | ||
151 | + Map<String, Object> maps = new HashMap<>(); | ||
152 | + // 生成报文 | ||
153 | + if (makeXmlToFile(map.get("templatePath").toString(), msgId+".xml", map, map.get("sendPath").toString())>0){ | ||
154 | + if (!map.containsKey("reason")){ | ||
155 | + map.put("functionCode", "9"); | ||
156 | + map.put("busType","MT2201"); | ||
157 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
158 | + // 航班日期 | ||
159 | + nmmsCustomResponse.setFlightdate(custom_mt2201.getFlightdate()); | ||
160 | + // 航班号 | ||
161 | + nmmsCustomResponse.setFlightno(custom_mt2201.getFlightno()); | ||
162 | + // 航班承运人 | ||
163 | + nmmsCustomResponse.setCarrier(custom_mt2201.getCarrier()); | ||
164 | + // 主单号 | ||
165 | + nmmsCustomResponse.setAwbano(custom_mt2201.getAwba()); | ||
166 | + if (!"".equals(custom_mt2201.getAwbh())){ | ||
167 | + // 分单号 | ||
168 | + nmmsCustomResponse.setAwbhno(custom_mt2201.getAwbh()); | ||
169 | + }else { | ||
170 | + nmmsCustomResponse.setAwbhno(null); | ||
171 | + } | ||
172 | + // 件数 | ||
173 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(custom_mt2201.getPiece().toString())); | ||
174 | + // 重量 | ||
175 | + nmmsCustomResponse.setBusweight(new BigDecimal(custom_mt2201.getWeight().toString())); | ||
176 | + // 操作类型 | ||
177 | + nmmsCustomResponse.setOpertype("新增"); | ||
178 | + nmmsCustomResponse.setCusrescode("23"); | ||
179 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
180 | + maps.put("status", "1"); | ||
181 | + maps.put("customResponse", nmmsCustomResponse); | ||
182 | + | ||
183 | + return maps; | ||
184 | + }else { | ||
185 | + map.put("functionCode", "5"); | ||
186 | + map.put("busType","MT2201"); | ||
187 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
188 | + // 航班日期 | ||
189 | + nmmsCustomResponse.setFlightdate(custom_mt2201.getFlightdate()); | ||
190 | + // 航班号 | ||
191 | + nmmsCustomResponse.setFlightno(custom_mt2201.getFlightno()); | ||
192 | + // 航班承运人 | ||
193 | + nmmsCustomResponse.setCarrier(custom_mt2201.getCarrier()); | ||
194 | + // 主单号 | ||
195 | + nmmsCustomResponse.setAwbano(custom_mt2201.getAwba()); | ||
196 | + if (!"".equals(custom_mt2201.getAwbh())){ | ||
197 | + // 分单号 | ||
198 | + nmmsCustomResponse.setAwbhno(custom_mt2201.getAwbh()); | ||
199 | + }else { | ||
200 | + nmmsCustomResponse.setAwbhno(null); | ||
201 | + } | ||
202 | + // 件数 | ||
203 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(custom_mt2201.getPiece().toString())); | ||
204 | + // 重量 | ||
205 | + nmmsCustomResponse.setBusweight(new BigDecimal(custom_mt2201.getWeight().toString())); | ||
206 | + // 操作类型 | ||
207 | + nmmsCustomResponse.setOpertype("修改"); | ||
208 | + nmmsCustomResponse.setCusrescode("25"); | ||
209 | + nmmsCustomResponse.setCusrestext("修改报发送成功"); | ||
210 | + maps.put("status", "1"); | ||
211 | + maps.put("customResponse", nmmsCustomResponse); | ||
212 | + | ||
213 | + return maps; | ||
214 | + } | ||
215 | + }else { | ||
216 | + maps.put("status", "0"); | ||
217 | + return maps; | ||
218 | + } | ||
219 | + } | ||
220 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT3201; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
6 | +import com.sunyo.wlpt.message.builder.service.MT3201Service; | ||
7 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
8 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
9 | +import com.tianbo.util.Date.DateUtil; | ||
10 | +import org.springframework.beans.factory.annotation.Value; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import java.io.IOException; | ||
14 | +import java.math.BigDecimal; | ||
15 | +import java.text.ParseException; | ||
16 | +import java.util.HashMap; | ||
17 | +import java.util.Map; | ||
18 | + | ||
19 | +@Service | ||
20 | +public class MT3201ServiceImp extends CustomXmlMaker implements MT3201Service { | ||
21 | + | ||
22 | + @Value("${custom.custom-code}") | ||
23 | + private String orgsn; | ||
24 | + | ||
25 | + @Value("${custom.org-code}") | ||
26 | + private String orgCode; | ||
27 | + | ||
28 | + @Override | ||
29 | + public Map<String, Object> fohcreate(Map<String, Object> map) throws IOException, ParseException { | ||
30 | + | ||
31 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
32 | + | ||
33 | + NMMS_CUSTOM_MT3201 customMt3201 = objectMapper.convertValue(map.get("mt3201"), NMMS_CUSTOM_MT3201.class); | ||
34 | + // 关区代码 | ||
35 | + String customCode = customMt3201.getCustomcode(); | ||
36 | + // 报文头时间 精确到毫秒 | ||
37 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
38 | + | ||
39 | + String awba = ReturnUtil.awbaReplace(customMt3201.getAwba()); | ||
40 | + map.put("awba", awba); | ||
41 | + // 封装实体 | ||
42 | + map.put("mt", customMt3201); | ||
43 | + // 生成报文头部 | ||
44 | + String msgId = makeMsgID("MT3201", orgsn, customMt3201.getAwba()); | ||
45 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
46 | + String receiverID = customCode; | ||
47 | + map.put("msgId", msgId); | ||
48 | + map.put("senderId", senderId); | ||
49 | + map.put("receiverID", receiverID); | ||
50 | + | ||
51 | + Map<String, Object> map3201= new HashMap<>(); | ||
52 | + if (makeXmlToFile("/manifest/MT3201.ftlx", msgId+".xml", map,"./send/add/")>0){ | ||
53 | + map.put("functionCode", "9"); | ||
54 | + map.put("busType","MT3201"); | ||
55 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
56 | + System.out.println(); | ||
57 | + // 航班日期 | ||
58 | + nmmsCustomResponse.setFlightdate(customMt3201.getFlightdate()); | ||
59 | + // 航班号 | ||
60 | + nmmsCustomResponse.setFlightno(customMt3201.getFlightno()); | ||
61 | + // 航班承运人 | ||
62 | + nmmsCustomResponse.setCarrier(customMt3201.getCarrier()); | ||
63 | + // 主单号 | ||
64 | + nmmsCustomResponse.setAwbano(customMt3201.getAwba()); | ||
65 | + if (!"".equals(customMt3201.getAwbh())){ | ||
66 | + // 分单号 | ||
67 | + nmmsCustomResponse.setAwbhno(customMt3201.getAwbh()); | ||
68 | + }else { | ||
69 | + nmmsCustomResponse.setAwbhno(null); | ||
70 | + } | ||
71 | + | ||
72 | + // 件数 | ||
73 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt3201.getPiece().toString())); | ||
74 | + // 重量 | ||
75 | + nmmsCustomResponse.setBusweight(new BigDecimal(customMt3201.getWeight().toString())); | ||
76 | + // 操作类型 | ||
77 | + nmmsCustomResponse.setOpertype("新增"); | ||
78 | + nmmsCustomResponse.setCusrescode("23"); | ||
79 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
80 | + map3201.put("status", "1"); | ||
81 | + map3201.put("customResponse", nmmsCustomResponse); | ||
82 | + | ||
83 | + return map3201; | ||
84 | + }else { | ||
85 | + map3201.put("status", "0"); | ||
86 | + return map3201; | ||
87 | + } | ||
88 | + } | ||
89 | + | ||
90 | + @Override | ||
91 | + public Map<String, Object> remove(Map<String, Object> map) throws IOException, ParseException { | ||
92 | + // 关区代码 | ||
93 | + String customCode = map.get("customCode").toString(); | ||
94 | + // 报文头时间 精确到毫秒 | ||
95 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
96 | + // 生成报文头部 | ||
97 | + String msgId = makeMsgID("MT3201", orgsn, map.get("awba").toString()); | ||
98 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
99 | + String receiverID = customCode; | ||
100 | + map.put("msgId", msgId); | ||
101 | + map.put("senderId", senderId); | ||
102 | + map.put("receiverID", receiverID); | ||
103 | + | ||
104 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
105 | + map.put("awbas", awba); | ||
106 | + | ||
107 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
108 | + map.put("flightDates",flightDate); | ||
109 | + | ||
110 | + Map<String, Object> map3201 = new HashMap<>(); | ||
111 | + if (makeXmlToFile("/remove/MT3201.ftlx", msgId+".xml", map,"./send/remove/")>0){ | ||
112 | + map.put("functionCode", "3"); | ||
113 | + map.put("busType","MT3201"); | ||
114 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
115 | + // 操作类型 | ||
116 | + nmmsCustomResponse.setOpertype("删除"); | ||
117 | + nmmsCustomResponse.setCusrescode("24"); | ||
118 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
119 | + map3201.put("status", "1"); | ||
120 | + map3201.put("customResponse", nmmsCustomResponse); | ||
121 | + return map3201; | ||
122 | + }else { | ||
123 | + map3201.put("status", "0"); | ||
124 | + return map3201; | ||
125 | + } | ||
126 | + } | ||
127 | + | ||
128 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_TRANS; | ||
6 | +import com.sunyo.wlpt.message.builder.service.MT3202Service; | ||
7 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
8 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
9 | +import com.tianbo.util.Date.DateUtil; | ||
10 | +import org.springframework.beans.factory.annotation.Value; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import java.io.IOException; | ||
14 | +import java.math.BigDecimal; | ||
15 | +import java.text.ParseException; | ||
16 | +import java.util.HashMap; | ||
17 | +import java.util.Map; | ||
18 | + | ||
19 | +@Service | ||
20 | +public class MT3202ServiceImp extends CustomXmlMaker implements MT3202Service { | ||
21 | + | ||
22 | + @Value("${custom.custom-code}") | ||
23 | + private String orgsn; | ||
24 | + | ||
25 | + @Override | ||
26 | + public Map<String, Object> createMt3202(Map<String, Object> map) throws ParseException, IOException { | ||
27 | + | ||
28 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
29 | + // 转运记录 | ||
30 | + NMMS_CUSTOM_TRANS nmmsCustomTrans = objectMapper.convertValue(map.get("mt3202"), NMMS_CUSTOM_TRANS.class); | ||
31 | + // 关区代码 | ||
32 | + String customCode = nmmsCustomTrans.getCustomcode(); | ||
33 | + // 报文头时间 精确到毫秒 | ||
34 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
35 | + // 封装实体 | ||
36 | + map.put("mt", nmmsCustomTrans); | ||
37 | + | ||
38 | + // 处理主单号 - | ||
39 | + String awba = ReturnUtil.awbaReplace(nmmsCustomTrans.getAwba()); | ||
40 | + map.put("awba", awba); | ||
41 | + | ||
42 | + // 生成报文头部 | ||
43 | + String msgId = makeMsgID("MT3202", orgsn, nmmsCustomTrans.getAwba()); | ||
44 | + String msessageType = "MT3202"; | ||
45 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
46 | + String receiverID = customCode; | ||
47 | + map.put("msgId", msgId); | ||
48 | + map.put("msessageType", msessageType); | ||
49 | + map.put("senderId", senderId); | ||
50 | + map.put("receiverID", receiverID); | ||
51 | + | ||
52 | + Map<String, Object> map3202 = new HashMap<>(); | ||
53 | + | ||
54 | + if (makeXmlToFile("/manifest/MT3202.ftlx", msgId+".xml", map, "./send/add/")>0){ | ||
55 | + map.put("functionCode", "2"); | ||
56 | + map.put("busType","MT3202"); | ||
57 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
58 | + // 航班日期 | ||
59 | + nmmsCustomResponse.setFlightdate(nmmsCustomTrans.getFlightdate()); | ||
60 | + // 航班号 | ||
61 | + nmmsCustomResponse.setFlightno(nmmsCustomTrans.getFlightno()); | ||
62 | + // 航班承运人 | ||
63 | + nmmsCustomResponse.setCarrier(nmmsCustomTrans.getCarrier()); | ||
64 | + // 主单号 | ||
65 | + nmmsCustomResponse.setAwbano(nmmsCustomTrans.getAwba()); | ||
66 | + // 件数 | ||
67 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(nmmsCustomTrans.getTurnpiece().toString())); | ||
68 | + // 重量 | ||
69 | + nmmsCustomResponse.setBusweight(new BigDecimal(nmmsCustomTrans.getTurnweight().toString())); | ||
70 | + // 操作类型 | ||
71 | + nmmsCustomResponse.setOpertype("新增"); | ||
72 | + nmmsCustomResponse.setCusrescode("23"); | ||
73 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
74 | + map3202.put("status", "1"); | ||
75 | + map3202.put("customResponse", nmmsCustomResponse); | ||
76 | + | ||
77 | + return map3202; | ||
78 | + }else { | ||
79 | + map3202.put("status", "0"); | ||
80 | + return map3202; | ||
81 | + } | ||
82 | + } | ||
83 | + | ||
84 | + @Override | ||
85 | + public Map<String, Object> removeMt3202(Map<String, Object> map) throws IOException, ParseException { | ||
86 | + // 关区代码 | ||
87 | + String customCode = map.get("customCode").toString(); | ||
88 | + // 报文头时间 精确到毫秒 | ||
89 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
90 | + // 生成报文头部 | ||
91 | + String msgId = makeMsgID("MT3202", orgsn, map.get("awba").toString()); | ||
92 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
93 | + String receiverID = customCode; | ||
94 | + map.put("msgId", msgId); | ||
95 | + map.put("senderId", senderId); | ||
96 | + map.put("receiverID", receiverID); | ||
97 | + | ||
98 | + // 处理主单号 - | ||
99 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
100 | + map.put("awbas", awba); | ||
101 | + | ||
102 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
103 | + map.put("flightDates",flightDate); | ||
104 | + | ||
105 | + Map<String, Object> map3201 = new HashMap<>(); | ||
106 | + if (makeXmlToFile("/remove/MT3202.ftlx", msgId+".xml", map,"./send/remove/")>0){ | ||
107 | + map.put("functionCode", "3"); | ||
108 | + map.put("busType","MT3202"); | ||
109 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
110 | + // 操作类型 | ||
111 | + nmmsCustomResponse.setOpertype("删除"); | ||
112 | + nmmsCustomResponse.setCusrescode("24"); | ||
113 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
114 | + map3201.put("status", "1"); | ||
115 | + map3201.put("customResponse", nmmsCustomResponse); | ||
116 | + return map3201; | ||
117 | + }else { | ||
118 | + map3201.put("status", "0"); | ||
119 | + return map3201; | ||
120 | + } | ||
121 | + } | ||
122 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT4201; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
6 | +import com.sunyo.wlpt.message.builder.service.MT4201Service; | ||
7 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
8 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
9 | +import com.tianbo.util.Date.DateUtil; | ||
10 | +import org.springframework.beans.factory.annotation.Value; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import javax.xml.crypto.Data; | ||
14 | +import java.io.IOException; | ||
15 | +import java.math.BigDecimal; | ||
16 | +import java.text.ParseException; | ||
17 | +import java.util.HashMap; | ||
18 | +import java.util.Map; | ||
19 | + | ||
20 | +@Service | ||
21 | +public class MT4201ServiceImp extends CustomXmlMaker implements MT4201Service { | ||
22 | + | ||
23 | + | ||
24 | + @Value("${custom.custom-code}") | ||
25 | + private String orgsn; | ||
26 | + | ||
27 | + @Override | ||
28 | + public Map<String, Object> pffmcreate(Map<String, Object> map) throws IOException, ParseException { | ||
29 | + | ||
30 | + | ||
31 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
32 | + | ||
33 | + NMMS_CUSTOM_MT4201 customMt4201 = objectMapper.convertValue(map.get("mt4201"), NMMS_CUSTOM_MT4201.class); | ||
34 | + // 关区代码 | ||
35 | + String customCode = customMt4201.getCustomcode(); | ||
36 | + // 报文头时间 精确到毫秒 | ||
37 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
38 | + // 封装实体 | ||
39 | + map.put("mt", customMt4201); | ||
40 | + // 处理主单号 - | ||
41 | + String awba = ReturnUtil.awbaReplace(customMt4201.getAwba()); | ||
42 | + map.put("awba", awba); | ||
43 | + // 生成报文头部 | ||
44 | + String msgId = makeMsgID("MT4201", orgsn, customMt4201.getAwba()); | ||
45 | + String senderId = makeSenderID(customCode, orgsn); | ||
46 | + String receiverID = customCode; | ||
47 | + map.put("msgId", msgId); | ||
48 | + map.put("senderId", senderId); | ||
49 | + map.put("receiverID", receiverID); | ||
50 | + | ||
51 | + Map<String, Object> map4201 = new HashMap<>(); | ||
52 | + if (makeXmlToFile("/manifest/MT4201.ftlx", msgId+".xml", map, "./send/add/")>0){ | ||
53 | + map.put("functionCode", "2"); | ||
54 | + map.put("busType","MT4201"); | ||
55 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
56 | + System.out.println(); | ||
57 | + // 航班日期 | ||
58 | + nmmsCustomResponse.setFlightdate(customMt4201.getFlightdate()); | ||
59 | + // 航班号 | ||
60 | + nmmsCustomResponse.setFlightno(customMt4201.getFlightno()); | ||
61 | + // 航班承运人 | ||
62 | + nmmsCustomResponse.setCarrier(customMt4201.getCarrier()); | ||
63 | + // 主单号 | ||
64 | + nmmsCustomResponse.setAwbano(customMt4201.getAwba()); | ||
65 | + if (!"".equals(customMt4201.getAwbh())){ | ||
66 | + // 分单号 | ||
67 | + nmmsCustomResponse.setAwbhno(customMt4201.getAwbh()); | ||
68 | + }else { | ||
69 | + // 分单号 | ||
70 | + nmmsCustomResponse.setAwbhno(null); | ||
71 | + } | ||
72 | + // 件数 | ||
73 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt4201.getLodingpiece().toString())); | ||
74 | + // 重量 | ||
75 | + nmmsCustomResponse.setBusweight(new BigDecimal(customMt4201.getLodingweight().toString())); | ||
76 | + // 操作类型 | ||
77 | + nmmsCustomResponse.setOpertype("新增"); | ||
78 | + nmmsCustomResponse.setCusrescode("23"); | ||
79 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
80 | + map4201.put("status", "1"); | ||
81 | + map4201.put("customResponse", nmmsCustomResponse); | ||
82 | + | ||
83 | + return map4201; | ||
84 | + }else { | ||
85 | + map4201.put("status", "0"); | ||
86 | + return map4201; | ||
87 | + } | ||
88 | + } | ||
89 | + | ||
90 | + | ||
91 | + @Override | ||
92 | + public Map<String, Object> remove4201(Map<String, Object> map) throws IOException, ParseException { | ||
93 | + // 关区代码 | ||
94 | + String customCode = map.get("customCode").toString(); | ||
95 | + // 报文头时间 精确到毫秒 | ||
96 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
97 | + // 生成报文头部 | ||
98 | + String msgId = makeMsgID("MT4201", orgsn, map.get("awba").toString()); | ||
99 | + String senderId = makeSenderID(customCode, orgsn); | ||
100 | + String receiverID = customCode; | ||
101 | + map.put("msgId", msgId); | ||
102 | + map.put("senderId", senderId); | ||
103 | + map.put("receiverID", receiverID); | ||
104 | + // 处理主单号 - | ||
105 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
106 | + map.put("awbas", awba); | ||
107 | + | ||
108 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
109 | + map.put("flightDates",flightDate); | ||
110 | + | ||
111 | + Map<String, Object> map4201 = new HashMap<>(); | ||
112 | + if (makeXmlToFile("/remove/MT4201.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
113 | + map.put("functionCode", "3"); | ||
114 | + map.put("busType","MT4201"); | ||
115 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
116 | + // 操作类型 | ||
117 | + nmmsCustomResponse.setOpertype("删除"); | ||
118 | + nmmsCustomResponse.setCusrescode("24"); | ||
119 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
120 | + map4201.put("status", "1"); | ||
121 | + map4201.put("customResponse", nmmsCustomResponse); | ||
122 | + return map4201; | ||
123 | + }else { | ||
124 | + map4201.put("status", "0"); | ||
125 | + return map4201; | ||
126 | + } | ||
127 | + } | ||
128 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT520X; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
6 | +import com.sunyo.wlpt.message.builder.service.MT520XService; | ||
7 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
8 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
9 | +import com.tianbo.util.Date.DateUtil; | ||
10 | +import org.springframework.beans.factory.annotation.Value; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import java.io.IOException; | ||
14 | +import java.math.BigDecimal; | ||
15 | +import java.text.ParseException; | ||
16 | +import java.util.HashMap; | ||
17 | +import java.util.Map; | ||
18 | + | ||
19 | +@Service | ||
20 | +public class MT520XServiceImp extends CustomXmlMaker implements MT520XService{ | ||
21 | + | ||
22 | + @Value("${custom.custom-code}") | ||
23 | + private String orgsn; | ||
24 | + | ||
25 | + @Value("${custom.org-code}") | ||
26 | + private String orgCode; | ||
27 | + | ||
28 | + @Override | ||
29 | + public Map<String, Object> create(Map<String, Object> map) throws IOException, ParseException { | ||
30 | + | ||
31 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
32 | + | ||
33 | + NMMS_CUSTOM_MT520X customMt520X = objectMapper.convertValue(map.get("mt520x"), NMMS_CUSTOM_MT520X.class); | ||
34 | + | ||
35 | + Map<String, Object> hashMap = new HashMap(); | ||
36 | + | ||
37 | + // 处理主单号- | ||
38 | + String awba = ReturnUtil.awbaReplace(customMt520X.getAwba()); | ||
39 | + hashMap.put("awba", awba); | ||
40 | + // 关区代码 | ||
41 | + String customCode = customMt520X.getCustomcode(); | ||
42 | + // 报文头时间 精确到毫秒 | ||
43 | + hashMap.put("sendTime", DateUtil.getCurrentTime17()); | ||
44 | + // 封装实体 | ||
45 | + hashMap.put("mt", customMt520X); | ||
46 | + | ||
47 | + hashMap.put("orgCode", orgCode); | ||
48 | + if ("MT5201".equals(customMt520X.getRcfdep())){ | ||
49 | + // 生成报文头部 | ||
50 | + String msgId = makeMsgID("MT5201", orgsn, customMt520X.getAwba()); | ||
51 | + String msessageType = "MT5201"; | ||
52 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
53 | + String receiverID = customCode; | ||
54 | + hashMap.put("msgId", msgId); | ||
55 | + hashMap.put("msessageType", msessageType); | ||
56 | + hashMap.put("senderId", senderId); | ||
57 | + hashMap.put("receiverID", receiverID); | ||
58 | + | ||
59 | + Map<String, Object> maps = new HashMap<>(); | ||
60 | + if (makeXmlToFile("/manifest/MT5201.ftlx", msgId+".xml", hashMap, "./send/add/")>0){ | ||
61 | + | ||
62 | + hashMap.put("functionCode", "2"); | ||
63 | + hashMap.put("busType","MT5201"); | ||
64 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(hashMap); | ||
65 | + // 航班日期 | ||
66 | + nmmsCustomResponse.setFlightdate(customMt520X.getFlightdate()); | ||
67 | + // 航班号 | ||
68 | + nmmsCustomResponse.setFlightno(customMt520X.getFlightno()); | ||
69 | + // 航班承运人 | ||
70 | + nmmsCustomResponse.setCarrier(customMt520X.getCarrier()); | ||
71 | + // 主单号 | ||
72 | + nmmsCustomResponse.setAwbano(customMt520X.getAwba()); | ||
73 | + if (!"".equals(customMt520X.getAwbh())){ | ||
74 | + // 分单号 | ||
75 | + nmmsCustomResponse.setAwbhno(customMt520X.getAwbh()); | ||
76 | + }else { | ||
77 | + nmmsCustomResponse.setAwbhno(null); | ||
78 | + } | ||
79 | + // 件数 | ||
80 | + nmmsCustomResponse.setBuspiece(customMt520X.getPiece()); | ||
81 | + // 重量 | ||
82 | + nmmsCustomResponse.setBusweight(customMt520X.getWeight()); | ||
83 | + // 操作类型 | ||
84 | + nmmsCustomResponse.setOpertype("新增"); | ||
85 | + nmmsCustomResponse.setCusrescode("23"); | ||
86 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
87 | + maps.put("status", "1"); | ||
88 | + maps.put("customResponse", nmmsCustomResponse); | ||
89 | + return maps; | ||
90 | + }else { | ||
91 | + maps.put("status", "0"); | ||
92 | + return maps; | ||
93 | + } | ||
94 | + }else { | ||
95 | + | ||
96 | + // 生成报文头部 | ||
97 | + String msgId = makeMsgID("MT5202", orgsn, customMt520X.getAwba()); | ||
98 | + String msessageType = "MT5202"; | ||
99 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
100 | + String receiverID = customCode; | ||
101 | + hashMap.put("msgId", msgId); | ||
102 | + hashMap.put("msessageType", msessageType); | ||
103 | + hashMap.put("senderId", senderId); | ||
104 | + hashMap.put("receiverID", receiverID); | ||
105 | + Map<String, Object> maps = new HashMap<>(); | ||
106 | + if (makeXmlToFile("/manifest/MT5202.ftlx", msgId+".xml", hashMap, "./send/add/")>0){ | ||
107 | + | ||
108 | + hashMap.put("functionCode", "2"); | ||
109 | + hashMap.put("busType","MT5202"); | ||
110 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(hashMap); | ||
111 | + // 航班日期 | ||
112 | + nmmsCustomResponse.setFlightdate(customMt520X.getFlightdate()); | ||
113 | + // 航班号 | ||
114 | + nmmsCustomResponse.setFlightno(customMt520X.getFlightno()); | ||
115 | + // 航班承运人 | ||
116 | + nmmsCustomResponse.setCarrier(customMt520X.getCarrier()); | ||
117 | + // 主单号 | ||
118 | + nmmsCustomResponse.setAwbano(customMt520X.getAwba()); | ||
119 | + if (!"".equals(customMt520X.getAwbh())){ | ||
120 | + // 分单号 | ||
121 | + nmmsCustomResponse.setAwbhno(customMt520X.getAwbh()); | ||
122 | + }else { | ||
123 | + nmmsCustomResponse.setAwbhno(null); | ||
124 | + } | ||
125 | + // 件数 | ||
126 | + nmmsCustomResponse.setBuspiece(customMt520X.getPiece()); | ||
127 | + // 重量 | ||
128 | + nmmsCustomResponse.setBusweight(customMt520X.getWeight()); | ||
129 | + // 操作类型 | ||
130 | + nmmsCustomResponse.setOpertype("新增"); | ||
131 | + nmmsCustomResponse.setCusrescode("23"); | ||
132 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
133 | + maps.put("status", "1"); | ||
134 | + maps.put("customResponse", nmmsCustomResponse); | ||
135 | + | ||
136 | + return maps; | ||
137 | + }else { | ||
138 | + maps.put("status", "0"); | ||
139 | + return maps; | ||
140 | + } | ||
141 | + } | ||
142 | + } | ||
143 | + | ||
144 | + @Override | ||
145 | + public Map<String, Object> remove520x(Map<String, Object> map) throws IOException, ParseException { | ||
146 | + | ||
147 | + String customCode = map.get("customCode").toString(); | ||
148 | + map.put("customCode", customCode); | ||
149 | + // 报文头时间 精确到毫秒 | ||
150 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
151 | + | ||
152 | + // 处理主单号- | ||
153 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
154 | + map.put("awbas", awba); | ||
155 | + | ||
156 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
157 | + map.put("flightDates",flightDate); | ||
158 | + | ||
159 | + if ("MT5201".equals(map.get("rcfdep").toString())){ | ||
160 | + // 生成报文头部 | ||
161 | + String msgId = makeMsgID("MT5201", orgsn, map.get("awba").toString()); | ||
162 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
163 | + String receiverID = customCode; | ||
164 | + map.put("msgId", msgId); | ||
165 | + map.put("senderId", senderId); | ||
166 | + map.put("receiverID", receiverID); | ||
167 | + Map<String, Object> maps = new HashMap<>(); | ||
168 | + if (makeXmlToFile("/remove/MT5201.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
169 | + | ||
170 | + map.put("functionCode", "3"); | ||
171 | + map.put("busType","MT5201"); | ||
172 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
173 | + nmmsCustomResponse.setCusrescode("24"); | ||
174 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
175 | + // 操作类型 | ||
176 | + nmmsCustomResponse.setOpertype("删除"); | ||
177 | + maps.put("status", "1"); | ||
178 | + maps.put("customResponse", nmmsCustomResponse); | ||
179 | + return maps; | ||
180 | + }else { | ||
181 | + maps.put("status", "0"); | ||
182 | + return maps; | ||
183 | + } | ||
184 | + }else { | ||
185 | + // 生成报文头部 | ||
186 | + String msgId = makeMsgID("MT5202", orgsn, map.get("awba").toString()); | ||
187 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
188 | + String receiverID = customCode; | ||
189 | + map.put("msgId", msgId); | ||
190 | + map.put("senderId", senderId); | ||
191 | + map.put("receiverID", receiverID); | ||
192 | + Map<String, Object> maps = new HashMap<>(); | ||
193 | + if (makeXmlToFile("/remove/MT5202.ftlx", msgId+".xml", map, "./send/remove/")>0){ | ||
194 | + | ||
195 | + map.put("functionCode", "3"); | ||
196 | + map.put("busType","MT5202"); | ||
197 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
198 | + nmmsCustomResponse.setCusrescode("24"); | ||
199 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
200 | + // 操作类型 | ||
201 | + nmmsCustomResponse.setOpertype("删除"); | ||
202 | + maps.put("status", "1"); | ||
203 | + maps.put("customResponse", nmmsCustomResponse); | ||
204 | + return maps; | ||
205 | + }else { | ||
206 | + maps.put("status", "0"); | ||
207 | + return maps; | ||
208 | + } | ||
209 | + } | ||
210 | + } | ||
211 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_TRANS; | ||
6 | +import com.sunyo.wlpt.message.builder.service.MT6202Service; | ||
7 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
8 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
9 | +import com.tianbo.util.Date.DateUtil; | ||
10 | +import org.springframework.beans.factory.annotation.Value; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import java.io.IOException; | ||
14 | +import java.math.BigDecimal; | ||
15 | +import java.text.ParseException; | ||
16 | +import java.util.HashMap; | ||
17 | +import java.util.Map; | ||
18 | + | ||
19 | +@Service | ||
20 | +public class MT6202ServiceImp extends CustomXmlMaker implements MT6202Service{ | ||
21 | + | ||
22 | + @Value("${custom.custom-code}") | ||
23 | + private String orgsn; | ||
24 | + | ||
25 | + @Override | ||
26 | + public Map<String, Object> creatMt6202(Map<String, Object> map) throws IOException, ParseException { | ||
27 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
28 | + // 转运记录 | ||
29 | + NMMS_CUSTOM_TRANS nmmsCustomTrans = objectMapper.convertValue(map.get("mt6202"), NMMS_CUSTOM_TRANS.class); | ||
30 | + // 关区代码 | ||
31 | + String customCode = nmmsCustomTrans.getCustomcode(); | ||
32 | + // 报文头时间 精确到毫秒 | ||
33 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
34 | + // 封装实体 | ||
35 | + map.put("mt", nmmsCustomTrans); | ||
36 | + | ||
37 | + // 处理主单号 - | ||
38 | + String awba = ReturnUtil.awbaReplace(nmmsCustomTrans.getAwba()); | ||
39 | + map.put("awba", awba); | ||
40 | + | ||
41 | + // 生成报文头部 | ||
42 | + String msgId = makeMsgID("MT6202", orgsn, nmmsCustomTrans.getAwba()); | ||
43 | + String msessageType = "MT6202"; | ||
44 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
45 | + String receiverID = customCode; | ||
46 | + map.put("msgId", msgId); | ||
47 | + map.put("msessageType", msessageType); | ||
48 | + map.put("senderId", senderId); | ||
49 | + map.put("receiverID", receiverID); | ||
50 | + | ||
51 | + Map<String, Object> map6202 = new HashMap<>(); | ||
52 | + | ||
53 | + if (makeXmlToFile("/manifest/MT6202.ftlx", msgId+".xml", map, "./send/add/")>0){ | ||
54 | + map.put("functionCode", "2"); | ||
55 | + map.put("busType","MT6202"); | ||
56 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
57 | + // 航班日期 | ||
58 | + nmmsCustomResponse.setFlightdate(nmmsCustomTrans.getFlightdate()); | ||
59 | + // 航班号 | ||
60 | + nmmsCustomResponse.setFlightno(nmmsCustomTrans.getFlightno()); | ||
61 | + // 航班承运人 | ||
62 | + nmmsCustomResponse.setCarrier(nmmsCustomTrans.getCarrier()); | ||
63 | + // 主单号 | ||
64 | + nmmsCustomResponse.setAwbano(nmmsCustomTrans.getAwba()); | ||
65 | + // 件数 | ||
66 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(nmmsCustomTrans.getTurnpiece().toString())); | ||
67 | + // 重量 | ||
68 | + nmmsCustomResponse.setBusweight(new BigDecimal(nmmsCustomTrans.getTurnweight().toString())); | ||
69 | + // 操作类型 | ||
70 | + nmmsCustomResponse.setOpertype("新增"); | ||
71 | + nmmsCustomResponse.setCusrescode("23"); | ||
72 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
73 | + map6202.put("status", "1"); | ||
74 | + map6202.put("customResponse", nmmsCustomResponse); | ||
75 | + | ||
76 | + return map6202; | ||
77 | + }else { | ||
78 | + map6202.put("status", "0"); | ||
79 | + return map6202; | ||
80 | + } | ||
81 | + } | ||
82 | + | ||
83 | + @Override | ||
84 | + public Map<String, Object> removeMt6202(Map<String, Object> map) throws IOException, ParseException { | ||
85 | + // 关区代码 | ||
86 | + String customCode = map.get("customCode").toString(); | ||
87 | + // 报文头时间 精确到毫秒 | ||
88 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
89 | + // 生成报文头部 | ||
90 | + String msgId = makeMsgID("MT6202", orgsn, map.get("awba").toString()); | ||
91 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
92 | + String receiverID = customCode; | ||
93 | + map.put("msgId", msgId); | ||
94 | + map.put("senderId", senderId); | ||
95 | + map.put("receiverID", receiverID); | ||
96 | + | ||
97 | + // 处理主单号 - | ||
98 | + String awba = ReturnUtil.awbaReplace(map.get("awba").toString()); | ||
99 | + map.put("awbas", awba); | ||
100 | + | ||
101 | + String flightDate = ReturnUtil.awbaReplace(map.get("flightDate").toString()); | ||
102 | + map.put("flightDates",flightDate); | ||
103 | + | ||
104 | + Map<String, Object> map3201 = new HashMap<>(); | ||
105 | + if (makeXmlToFile("/remove/MT6202.ftlx", msgId+".xml", map,"./send/remove/")>0){ | ||
106 | + map.put("functionCode", "3"); | ||
107 | + map.put("busType","MT6202"); | ||
108 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
109 | + // 操作类型 | ||
110 | + nmmsCustomResponse.setOpertype("删除"); | ||
111 | + nmmsCustomResponse.setCusrescode("24"); | ||
112 | + nmmsCustomResponse.setCusrestext("删除报发送成功"); | ||
113 | + map3201.put("status", "1"); | ||
114 | + map3201.put("customResponse", nmmsCustomResponse); | ||
115 | + return map3201; | ||
116 | + }else { | ||
117 | + map3201.put("status", "0"); | ||
118 | + return map3201; | ||
119 | + } | ||
120 | + } | ||
121 | +} |
1 | +package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
4 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201; | ||
5 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT2201; | ||
6 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT8205; | ||
7 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
8 | +import com.sunyo.wlpt.message.builder.service.MT8205Service; | ||
9 | +import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
10 | +import com.sunyo.wlpt.message.builder.util.ReturnUtil; | ||
11 | +import com.tianbo.util.Date.DateUtil; | ||
12 | +import org.springframework.beans.factory.annotation.Autowired; | ||
13 | +import org.springframework.beans.factory.annotation.Value; | ||
14 | +import org.springframework.stereotype.Service; | ||
15 | + | ||
16 | +import java.io.IOException; | ||
17 | +import java.math.BigDecimal; | ||
18 | +import java.text.ParseException; | ||
19 | +import java.util.HashMap; | ||
20 | +import java.util.Map; | ||
21 | + | ||
22 | +@Service | ||
23 | +public class MT8205ServiceImp extends CustomXmlMaker implements MT8205Service { | ||
24 | + | ||
25 | + @Value("${custom.custom-code}") | ||
26 | + private String orgsn; | ||
27 | + | ||
28 | + @Value("${custom.org-code}") | ||
29 | + private String orgCode; | ||
30 | + | ||
31 | + @Override | ||
32 | + public Map<String, Object> create8205(Map<String, Object> map) throws IOException, ParseException { | ||
33 | + ObjectMapper objectMapper = new ObjectMapper(); | ||
34 | + // 转运记录 | ||
35 | + NMMS_CUSTOM_MT8205 customMt8205 = objectMapper.convertValue(map.get("mt8205"), NMMS_CUSTOM_MT8205.class); | ||
36 | + // 进港原始 | ||
37 | + NMMS_CUSTOM_MT1201 customMt1201 = objectMapper.convertValue(map.get("mt1201"), NMMS_CUSTOM_MT1201.class); | ||
38 | + // 出港预配 | ||
39 | + NMMS_CUSTOM_MT2201 customMt2201 = objectMapper.convertValue(map.get("mt2201"), NMMS_CUSTOM_MT2201.class); | ||
40 | + // 关区代码 | ||
41 | + String customCode = customMt8205.getCustomcode(); | ||
42 | + // 报文头时间 精确到毫秒 | ||
43 | + map.put("sendTime", DateUtil.getCurrentTime17()); | ||
44 | + // 封装实体 | ||
45 | + map.put("mt8205", customMt8205); | ||
46 | + map.put("mt1201", customMt1201); | ||
47 | + map.put("mt2201", customMt2201); | ||
48 | + map.put("orgCode", orgCode); | ||
49 | + | ||
50 | + // 处理主单号 - | ||
51 | + String mt1201 = ReturnUtil.awbaReplace(customMt1201.getAwba()); | ||
52 | + map.put("mt1201", mt1201); | ||
53 | + | ||
54 | + // 处理主单号 - | ||
55 | + String mt2201 = ReturnUtil.awbaReplace(customMt2201.getAwba()); | ||
56 | + map.put("mt2201", mt2201); | ||
57 | + | ||
58 | + // 生成报文头部 | ||
59 | + String msgId = makeMsgID("MT8205", orgsn, customMt1201.getAwba()); | ||
60 | + String msessageType = "MT8205"; | ||
61 | + String senderId = makeSenderID(customCode, orgsn, ""); | ||
62 | + String receiverID = customCode; | ||
63 | + map.put("msgId", msgId); | ||
64 | + map.put("msessageType", msessageType); | ||
65 | + map.put("senderId", senderId); | ||
66 | + map.put("receiverID", receiverID); | ||
67 | + | ||
68 | + Map<String, Object> map8205 = new HashMap<>(); | ||
69 | + | ||
70 | + if (makeXmlToFile("/manifest/MT8205.ftlx", msgId+".xml", map, "./send/add/")>0){ | ||
71 | + map.put("functionCode", "2"); | ||
72 | + map.put("busType","MT8205"); | ||
73 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = ReturnUtil.nmmsCustomResponse(map); | ||
74 | + System.out.println(); | ||
75 | + // 航班日期 | ||
76 | + nmmsCustomResponse.setFlightdate(customMt1201.getFlightdate()); | ||
77 | + // 航班号 | ||
78 | + nmmsCustomResponse.setFlightno(customMt1201.getFlightno()); | ||
79 | + // 航班承运人 | ||
80 | + nmmsCustomResponse.setCarrier(customMt1201.getCarrier()); | ||
81 | + // 主单号 | ||
82 | + nmmsCustomResponse.setAwbano(customMt1201.getAwba()); | ||
83 | + // 分单号 | ||
84 | + nmmsCustomResponse.setAwbhno(customMt1201.getAwbh()); | ||
85 | + // 件数 | ||
86 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(customMt1201.getPiece().toString())); | ||
87 | + // 重量 | ||
88 | + nmmsCustomResponse.setBusweight(new BigDecimal(customMt1201.getWeight().toString())); | ||
89 | + // 操作类型 | ||
90 | + nmmsCustomResponse.setOpertype("新增"); | ||
91 | + nmmsCustomResponse.setCusrescode("23"); | ||
92 | + nmmsCustomResponse.setCusrestext("新增报发送成功"); | ||
93 | + map8205.put("status", "1"); | ||
94 | + map8205.put("customResponse", nmmsCustomResponse); | ||
95 | + | ||
96 | + return map8205; | ||
97 | + }else { | ||
98 | + map8205.put("status", "0"); | ||
99 | + return map8205; | ||
100 | + } | ||
101 | + } | ||
102 | +} |
1 | -package com.sunyo.wlpt.message.builder.service.imp; | ||
2 | - | ||
3 | -import com.sunyo.wlpt.base.model.AWB_AWBINFO; | ||
4 | -import com.sunyo.wlpt.base.model.NMMS_CUSTOM_MT1201; | ||
5 | -import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
6 | -import com.sunyo.wlpt.message.builder.model.CUSTOM_RESPONSE; | ||
7 | -import com.sunyo.wlpt.message.builder.service.MakeXml1201Service; | ||
8 | -import com.sunyo.wlpt.message.builder.util.CustomXmlMaker; | ||
9 | -import freemarker.template.Configuration; | ||
10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
11 | -import org.springframework.web.bind.annotation.RequestBody; | ||
12 | - | ||
13 | -import java.util.Date; | ||
14 | -import java.util.HashMap; | ||
15 | -import java.util.Map; | ||
16 | - | ||
17 | -public class MakeXml1201ServiceImp extends CustomXmlMaker implements MakeXml1201Service { | ||
18 | - | ||
19 | - private static String businessType = "MT1201"; | ||
20 | - | ||
21 | - @Autowired | ||
22 | - private Configuration freemakerTemplate; | ||
23 | - | ||
24 | - | ||
25 | - /** | ||
26 | - * MAP包含运单实体与舱单实体 | ||
27 | - * @param awb_manifest {awb:AWB_AWBINFO,man:NMMS_CUSTOM_MT1201} | ||
28 | - * @return | ||
29 | - * @throws Exception | ||
30 | - */ | ||
31 | - @Override | ||
32 | - public boolean makeXml1201_new(@RequestBody Map awb_manifest) throws Exception{ | ||
33 | - try { | ||
34 | - NMMS_CUSTOM_MT1201 mt1201 = new NMMS_CUSTOM_MT1201(); | ||
35 | - AWB_AWBINFO awb = new AWB_AWBINFO(); | ||
36 | - NMMS_CUSTOM_RESPONSE customResponse = new NMMS_CUSTOM_RESPONSE(); | ||
37 | - Map<String,Object> xmlmap = new HashMap<>(); | ||
38 | - xmlmap.put("awb",awb); | ||
39 | - xmlmap.put("man",mt1201); | ||
40 | - xmlmap.put("res",customResponse); | ||
41 | - | ||
42 | - mt1201.setAwba("17212345678"); | ||
43 | - mt1201.setCarrier("CV"); | ||
44 | - mt1201.setCustomcode("4604"); | ||
45 | - mt1201.setFlightno("9733"); | ||
46 | - mt1201.setFlightdate(new Date()); | ||
47 | - mt1201.setDestinationstation("CGO"); | ||
48 | - | ||
49 | - String msgId = makeMsgID(businessType,"460470678920X","17212345678"); | ||
50 | - makeXmlToFile("/manifest/MT2201.ftlx",filename,awb_manifest); | ||
51 | - }catch (Exception e){ | ||
52 | - e.printStackTrace(); | ||
53 | - return false; | ||
54 | - } | ||
55 | - return true; | ||
56 | - } | ||
57 | -} |
@@ -12,7 +12,6 @@ import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; | @@ -12,7 +12,6 @@ import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; | ||
12 | 12 | ||
13 | import java.io.File; | 13 | import java.io.File; |
14 | import java.io.IOException; | 14 | import java.io.IOException; |
15 | -import java.util.Map; | ||
16 | 15 | ||
17 | @Component | 16 | @Component |
18 | public class CustomXmlMaker { | 17 | public class CustomXmlMaker { |
@@ -20,10 +19,22 @@ public class CustomXmlMaker { | @@ -20,10 +19,22 @@ public class CustomXmlMaker { | ||
20 | private Configuration freemakerTemplate; | 19 | private Configuration freemakerTemplate; |
21 | 20 | ||
22 | @Value("${custom.send-path}") | 21 | @Value("${custom.send-path}") |
23 | - private static String sendPath; | 22 | + private String sendPath; |
24 | 23 | ||
25 | @Value("${tcs.mq-number}") | 24 | @Value("${tcs.mq-number}") |
26 | - private static String TCSMQNumber; | 25 | + private String TCSMQNumber; |
26 | + | ||
27 | + @Value("${custom.custom-code}") | ||
28 | + private String customCode; | ||
29 | + | ||
30 | + @Value("${custom.org-code}") | ||
31 | + private String orgCode; | ||
32 | + | ||
33 | + public CustomXmlMaker() { | ||
34 | + if (freemakerTemplate==null){ | ||
35 | + this.freemakerTemplate = new Configuration(); | ||
36 | + } | ||
37 | + } | ||
27 | 38 | ||
28 | /** | 39 | /** |
29 | * 所有填制项中不得出现“<”、“&”符号,如有实际需要,请填写对应的转义符“<”、“&”。 | 40 | * 所有填制项中不得出现“<”、“&”符号,如有实际需要,请填写对应的转义符“<”、“&”。 |
@@ -31,10 +42,11 @@ public class CustomXmlMaker { | @@ -31,10 +42,11 @@ public class CustomXmlMaker { | ||
31 | * @param tplName 模板名称 | 42 | * @param tplName 模板名称 |
32 | * @param fileName 生成的报文名称 | 43 | * @param fileName 生成的报文名称 |
33 | * @param manifestMap 数据实体 | 44 | * @param manifestMap 数据实体 |
45 | + * @param sendPath 生成路径 | ||
34 | * @return 0失败,1成功 | 46 | * @return 0失败,1成功 |
35 | * @throws IOException | 47 | * @throws IOException |
36 | */ | 48 | */ |
37 | - public int makeXmlToFile(String tplName,String fileName,Map manifestMap) throws IOException{ | 49 | + public int makeXmlToFile(String tplName,String fileName,Object manifestMap, String sendPath) throws IOException{ |
38 | try { | 50 | try { |
39 | Template template = freemakerTemplate.getTemplate(tplName); | 51 | Template template = freemakerTemplate.getTemplate(tplName); |
40 | String content = FreeMarkerTemplateUtils.processTemplateIntoString(template,manifestMap); | 52 | String content = FreeMarkerTemplateUtils.processTemplateIntoString(template,manifestMap); |
@@ -91,10 +103,11 @@ public class CustomXmlMaker { | @@ -91,10 +103,11 @@ public class CustomXmlMaker { | ||
91 | sb.append(customCode) | 103 | sb.append(customCode) |
92 | .append(ORGSN) | 104 | .append(ORGSN) |
93 | .append("_") | 105 | .append("_") |
94 | - .append(TCSSN); | 106 | + .append(TCSMQNumber); |
95 | return sb.toString(); | 107 | return sb.toString(); |
96 | } | 108 | } |
97 | public String makeSenderID(String customCode,String ORGSN){ | 109 | public String makeSenderID(String customCode,String ORGSN){ |
98 | return makeSenderID(customCode,ORGSN,TCSMQNumber); | 110 | return makeSenderID(customCode,ORGSN,TCSMQNumber); |
99 | } | 111 | } |
112 | + | ||
100 | } | 113 | } |
1 | +package com.sunyo.wlpt.message.builder.util; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.base.model.NMMS_CUSTOM_RESPONSE; | ||
4 | + | ||
5 | +import java.math.BigDecimal; | ||
6 | +import java.text.ParseException; | ||
7 | +import java.text.SimpleDateFormat; | ||
8 | +import java.util.Date; | ||
9 | +import java.util.Map; | ||
10 | + | ||
11 | +public class ReturnUtil { | ||
12 | + | ||
13 | + /** | ||
14 | + * 报文发送序号 | ||
15 | + * 回执发送者id | ||
16 | + * 回执接送者id | ||
17 | + * 对应海关的functioncode业务代码 | ||
18 | + * 业务件数 | ||
19 | + * 报文发送时间 | ||
20 | + * 业务重量 | ||
21 | + * 业务类型 | ||
22 | + * 主单号 | ||
23 | + * 分单号 | ||
24 | + * 航班号 | ||
25 | + * 航班日期 | ||
26 | + * @param map | ||
27 | + * @return | ||
28 | + * @throws ParseException | ||
29 | + */ | ||
30 | + public static NMMS_CUSTOM_RESPONSE nmmsCustomResponse(Map<String, Object> map) throws ParseException { | ||
31 | + | ||
32 | + NMMS_CUSTOM_RESPONSE nmmsCustomResponse = new NMMS_CUSTOM_RESPONSE(); | ||
33 | + | ||
34 | + if (map.containsKey("msgId")){ | ||
35 | + nmmsCustomResponse.setCusmsgid(map.get("msgId").toString()); | ||
36 | + } | ||
37 | + if (map.containsKey("senderId")){ | ||
38 | + nmmsCustomResponse.setCussenderid(map.get("senderId").toString()); | ||
39 | + } | ||
40 | + if (map.containsKey("receiverID")){ | ||
41 | + nmmsCustomResponse.setCusreciverid(map.get("receiverID").toString()); | ||
42 | + } | ||
43 | + if (map.containsKey("functionCode")){ | ||
44 | + nmmsCustomResponse.setCusfunctioncode(map.get("functionCode").toString()); | ||
45 | + } | ||
46 | + nmmsCustomResponse.setCusversion("1.0"); | ||
47 | + | ||
48 | + nmmsCustomResponse.setBusdate(new Date()); | ||
49 | + if (map.containsKey("piece")){ | ||
50 | + nmmsCustomResponse.setBuspiece(Integer.valueOf(map.get("piece").toString())); | ||
51 | + } | ||
52 | + if (map.containsKey("weight")){ | ||
53 | + nmmsCustomResponse.setBusweight(new BigDecimal(map.get("weight").toString())); | ||
54 | + } | ||
55 | + | ||
56 | + nmmsCustomResponse.setBustype(map.get("busType").toString()); | ||
57 | + if (map.containsKey("awba")){ | ||
58 | + nmmsCustomResponse.setAwbano(map.get("awba").toString()); | ||
59 | + } | ||
60 | + if (map.containsKey("awbh")){ | ||
61 | + if (!"".equals(map.get("awbh").toString())){ | ||
62 | + // 分单号 | ||
63 | + nmmsCustomResponse.setAwbhno(map.get("awbh").toString()); | ||
64 | + }else { | ||
65 | + // 分单号 | ||
66 | + nmmsCustomResponse.setAwbhno(null); | ||
67 | + } | ||
68 | + } | ||
69 | + if (map.containsKey("flightNo")){ | ||
70 | + nmmsCustomResponse.setFlightno(map.get("flightNo").toString()); | ||
71 | + } | ||
72 | + if (map.containsKey("carrier")){ | ||
73 | + nmmsCustomResponse.setCarrier(map.get("carrier").toString()); | ||
74 | + } | ||
75 | + if (map.containsKey("flightDate")){ | ||
76 | + String flightDate = map.get("flightDate").toString(); | ||
77 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | ||
78 | + Date parse = simpleDateFormat.parse(flightDate); | ||
79 | + nmmsCustomResponse.setFlightdate(parse); | ||
80 | + } | ||
81 | + if (map.containsKey("reason")){ | ||
82 | + nmmsCustomResponse.setOperreason(map.get("reason").toString()); | ||
83 | + } | ||
84 | + if (map.containsKey("contactName")){ | ||
85 | + nmmsCustomResponse.setOperperson(map.get("contactName").toString()); | ||
86 | + } | ||
87 | + if (map.containsKey("contactTel")) { | ||
88 | + nmmsCustomResponse.setOpertel(map.get("contactTel").toString()); | ||
89 | + } | ||
90 | + | ||
91 | + return nmmsCustomResponse; | ||
92 | + } | ||
93 | + | ||
94 | + /** | ||
95 | + * 替换主单号带- | ||
96 | + * @param awba | ||
97 | + * @return | ||
98 | + */ | ||
99 | + public static String awbaReplace(String awba){ | ||
100 | + | ||
101 | + return awba.replaceAll("-",""); | ||
102 | + } | ||
103 | + | ||
104 | +} |
1 | +package com.sunyo.wlpt.message.builder.util; | ||
2 | +import org.springframework.beans.BeansException; | ||
3 | +import org.springframework.context.ApplicationContext; | ||
4 | +import org.springframework.context.ApplicationContextAware; | ||
5 | +import org.springframework.stereotype.Component; | ||
6 | + | ||
7 | +/** | ||
8 | + * @ProjectName: | ||
9 | + * @Package: com.backstage.config | ||
10 | + * @ClassName: ApplicationContextProvider | ||
11 | + * @Description: 获取bean对象的工具类 | ||
12 | + * @Author: wangzhilong | ||
13 | + * @CreateDate: 2018/8/31 13:26 | ||
14 | + * @Version: 1.0 | ||
15 | + */ | ||
16 | + | ||
17 | +/** | ||
18 | + * Author:ZhuShangJin | ||
19 | + * Date:2018/7/3 | ||
20 | + */ | ||
21 | +@Component | ||
22 | +public class SpringBeanUtitl implements ApplicationContextAware{ | ||
23 | + | ||
24 | + private static ApplicationContext applicationContext = null; | ||
25 | + @Override | ||
26 | + public void setApplicationContext(ApplicationContext applicationContext) throws | ||
27 | + BeansException { | ||
28 | + // TODO Auto-generated method stub | ||
29 | + SpringBeanUtitl.applicationContext = applicationContext; | ||
30 | + } | ||
31 | + | ||
32 | + /** | ||
33 | + * 从静态变量applicationContext中得到Bean, 自动转型为所赋值对象的类型. | ||
34 | + */ | ||
35 | + @SuppressWarnings("unchecked") | ||
36 | + public static <T> T getBean(String name) { | ||
37 | + if(name == null || applicationContext == null){ | ||
38 | + return null; | ||
39 | + } | ||
40 | + | ||
41 | + return (T) applicationContext.getBean(name); | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * 从静态变量applicationContext中得到Bean, 自动转型为所赋值对象的类型. | ||
46 | + */ | ||
47 | + public static <T> T getBean(Class<T> clazz) { | ||
48 | + return applicationContext.getBean(clazz); | ||
49 | + } | ||
50 | + | ||
51 | +} | ||
52 | + |
src/main/resources/banner.txt
100644 → 100755
src/main/resources/templates/demo.ftlx
0 → 100755
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${t.awba}</MessageID> | ||
4 | + <FunctionCode>${t.customeCode}</FunctionCode> | ||
5 | + <MessageType>MT5202</MessageType> | ||
6 | + <SenderID>460470678920X_DXPENT0000460002</SenderID> | ||
7 | + <ReceiverID>4620</ReceiverID> | ||
8 | + <SendTime>20190523103927763</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <!--<Declaration>--> | ||
12 | + <!--<DeclarationOfficeID>4620</DeclarationOfficeID>--> | ||
13 | + <!--<BorderTransportMeans>--> | ||
14 | + <!--<JourneyID>CX051/20190523</JourneyID>--> | ||
15 | + <!--<TypeCode>4</TypeCode>--> | ||
16 | + <!--<ID>CX051</ID>--> | ||
17 | + <!--<Name>CX051</Name>--> | ||
18 | + <!--<ActualDateTime>201905230820086</ActualDateTime>--> | ||
19 | + <!--<CompletedDateTime>201905230835086</CompletedDateTime>--> | ||
20 | + <!--<LoadingLocation>--> | ||
21 | + <!--<ID>CGO/4620</ID>--> | ||
22 | + <!--</LoadingLocation>--> | ||
23 | + <!--</BorderTransportMeans>--> | ||
24 | + <!--<TallyParty>--> | ||
25 | + <!--<ID>70678920X</ID>--> | ||
26 | + <!--</TallyParty>--> | ||
27 | + <!--<Consignment>--> | ||
28 | + <!--<TransportContractDocument>--> | ||
29 | + <!--<ID>16006939951</ID>--> | ||
30 | + <!--</TransportContractDocument>--> | ||
31 | + <!--<AssociatedTransportDocument>--> | ||
32 | + <!--<ID>16006939951_TYN00072745</ID>--> | ||
33 | + <!--</AssociatedTransportDocument>--> | ||
34 | + <!--<ConsignmentPackaging>--> | ||
35 | + <!--<QuantityQuantity>1</QuantityQuantity>--> | ||
36 | + <!--</ConsignmentPackaging>--> | ||
37 | + <!--<TotalGrossMassMeasure>26</TotalGrossMassMeasure>--> | ||
38 | + <!--</Consignment>--> | ||
39 | + <!--</Declaration>--> | ||
40 | +</Manifest> |
1 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>5</FunctionCode> | ||
5 | + <MessageType>MT1201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <RepresentativePerson> | ||
13 | + <Name>${orgCode}</Name> | ||
14 | + </RepresentativePerson> | ||
15 | + <ExitCustomsOffice> | ||
16 | + <ID>${mt.originstation}</ID> | ||
17 | + </ExitCustomsOffice> | ||
18 | + <Carrier> | ||
19 | + <ID>${mt.carrier}</ID> | ||
20 | + </Carrier> | ||
21 | + <BorderTransportMeans> | ||
22 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
23 | + <TypeCode>4</TypeCode> | ||
24 | + <FirstArrivalLocationID>${mt.destinationstation}</FirstArrivalLocationID> | ||
25 | + <ArrivalDateTime>${arrivalDateTime}</ArrivalDateTime> | ||
26 | + <DepartureDateTime>${departureDateTime}</DepartureDateTime> | ||
27 | + </BorderTransportMeans> | ||
28 | + <Consignment> | ||
29 | + <TransportContractDocument> | ||
30 | + <ID>${awba}</ID> | ||
31 | + <ChangeReasonCode>999</ChangeReasonCode> | ||
32 | + <ConditionCode>10</ConditionCode> | ||
33 | + </TransportContractDocument> | ||
34 | + <#if mt['awbh']??> | ||
35 | + <#if mt.awbh?default("")?length gt 1> | ||
36 | + <AssociatedTransportDocument> | ||
37 | + <ID>${awba}_${mt.awbh}</ID> | ||
38 | + </AssociatedTransportDocument> | ||
39 | + </#if> | ||
40 | + </#if> | ||
41 | + <LoadingLocation> | ||
42 | + <ID>${mt.originstation}</ID> | ||
43 | + </LoadingLocation> | ||
44 | + <UnloadingLocation> | ||
45 | + <ID>${mt.destinationstation}/${mt.customcode}</ID> | ||
46 | + <ArrivalDate>${arrival}</ArrivalDate> | ||
47 | + </UnloadingLocation> | ||
48 | + <GoodsConsignedPlace> | ||
49 | + <ID>${mt.destinationstation}</ID> | ||
50 | + </GoodsConsignedPlace> | ||
51 | + <TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator> | ||
52 | + <FreightPayment> | ||
53 | + <MethodCode>${awbAwbinfo.paymodel}</MethodCode> | ||
54 | + </FreightPayment> | ||
55 | + <ConsignmentPackaging> | ||
56 | + <QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity> | ||
57 | + </ConsignmentPackaging> | ||
58 | + <TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure> | ||
59 | + <Consignee> | ||
60 | + <Name>${awbAwbinfo.cnsnname}</Name> | ||
61 | + <Address> | ||
62 | + <Line>${awbAwbinfo.cnsnaddress}</Line> | ||
63 | + <CountryCode>${awbAwbinfo.cnscountyr}</CountryCode> | ||
64 | + </Address> | ||
65 | + <Communication> | ||
66 | + <ID>${awbAwbinfo.cnsntel}</ID> | ||
67 | + <TypeID>TE</TypeID> | ||
68 | + </Communication> | ||
69 | + </Consignee> | ||
70 | + <Consignor> | ||
71 | + <Name>${awbAwbinfo.shprname}</Name> | ||
72 | + <Address> | ||
73 | + <Line>${awbAwbinfo.shpraddress}</Line> | ||
74 | + <CountryCode>${awbAwbinfo.shprcountyr}</CountryCode> | ||
75 | + </Address> | ||
76 | + <Communication> | ||
77 | + <ID>${awbAwbinfo.shprtel}</ID> | ||
78 | + <TypeID>FX</TypeID> | ||
79 | + </Communication> | ||
80 | + </Consignor> | ||
81 | + <ConsignmentItem> | ||
82 | + <SequenceNumeric>1</SequenceNumeric> | ||
83 | + <ConsignmentItemPackaging> | ||
84 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
85 | + </ConsignmentItemPackaging> | ||
86 | + <Commodity> | ||
87 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
88 | + </Commodity> | ||
89 | + <GoodsMeasure> | ||
90 | + <GrossMassMeasure>${mt.weight?c}</GrossMassMeasure> | ||
91 | + </GoodsMeasure> | ||
92 | + </ConsignmentItem> | ||
93 | + </Consignment> | ||
94 | + <AdditionalInformation> | ||
95 | + <Reason>${reason}</Reason> | ||
96 | + <ContactName>${contactName}</ContactName> | ||
97 | + <ContactTel>${contactTel}</ContactTel> | ||
98 | + </AdditionalInformation> | ||
99 | + </Declaration> | ||
100 | +</Manifest> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
3 | + <Head> | ||
4 | + <MessageID>${msgId}</MessageID> | ||
5 | + <FunctionCode>5</FunctionCode> | ||
6 | + <MessageType>MT2201</MessageType> | ||
7 | + <SenderID>${senderId}</SenderID> | ||
8 | + <ReceiverID>${receiverID}</ReceiverID> | ||
9 | + <SendTime>${sendTime}</SendTime> | ||
10 | + <Version>1.0</Version> | ||
11 | + </Head> | ||
12 | + <Declaration> | ||
13 | + <RepresentativePerson> | ||
14 | + <Name>${orgCode}</Name> | ||
15 | + </RepresentativePerson> | ||
16 | + <ExitCustomsOffice> | ||
17 | + <ID>${mt.originstation}????</ID> | ||
18 | + </ExitCustomsOffice> | ||
19 | + <Carrier> | ||
20 | + <ID>${mt.carrier}</ID> | ||
21 | + </Carrier> | ||
22 | + <BorderTransportMeans> | ||
23 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
24 | + <TypeCode>4</TypeCode> | ||
25 | + </BorderTransportMeans> | ||
26 | + <Consignment> | ||
27 | + <TransportContractDocument> | ||
28 | + <ID>${awba}</ID> | ||
29 | + <ChangeReasonCode>9999</ChangeReasonCode> | ||
30 | + <ConditionCode>10</ConditionCode> | ||
31 | + </TransportContractDocument> | ||
32 | + <#if mt['awbh']??> | ||
33 | + <#if mt.awbh?default("")?length gt 1> | ||
34 | + <AssociatedTransportDocument> | ||
35 | + <ID>${awba}_${mt.awbh}</ID> | ||
36 | + </AssociatedTransportDocument> | ||
37 | + </#if> | ||
38 | + </#if> | ||
39 | + <LoadingLocation> | ||
40 | + <ID>${mt.originstation}/${mt.customcode}</ID> | ||
41 | + <LoadingDate>${loadingDate}</LoadingDate> | ||
42 | + </LoadingLocation> | ||
43 | + <UnloadingLocation> | ||
44 | + <ID>${mt.destinationstation}</ID> | ||
45 | + </UnloadingLocation> | ||
46 | + <TransitDestination> | ||
47 | + <ID>$TransitDestination$</ID> | ||
48 | + </TransitDestination> | ||
49 | + <GoodsConsignedPlace> | ||
50 | + <ID>${mt.originstation}</ID> | ||
51 | + </GoodsConsignedPlace> | ||
52 | + <TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator> | ||
53 | + <FreightPayment> | ||
54 | + <MethodCode>${awbAwbinfo.collected}</MethodCode> | ||
55 | + </FreightPayment> | ||
56 | + <ConsignmentPackaging> | ||
57 | + <QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity> | ||
58 | + </ConsignmentPackaging> | ||
59 | + <TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure> | ||
60 | + <Consignee> | ||
61 | + <Name>${awbAwbinfo.cnsnname}</Name> | ||
62 | + <Address> | ||
63 | + <Line>${awbAwbinfo.cnsnaddress}</Line> | ||
64 | + <CountryCode>${awbAwbinfo.cnscountyr}</CountryCode> | ||
65 | + </Address> | ||
66 | + <Communication> | ||
67 | + <ID>${awbAwbinfo.cnsntel}</ID> | ||
68 | + </Communication> | ||
69 | + </Consignee> | ||
70 | + <Consignor> | ||
71 | + <Name>${awbAwbinfo.shprname}</Name> | ||
72 | + <Address> | ||
73 | + <Line>${awbAwbinfo.shpraddress}</Line> | ||
74 | + <CityName>$ConsignorCityName$</CityName> | ||
75 | + <CountryCode>${awbAwbinfo.shprcountyr}</CountryCode> | ||
76 | + </Address> | ||
77 | + <Communication> | ||
78 | + <ID>${awbAwbinfo.shprtel}</ID> | ||
79 | + </Communication> | ||
80 | + </Consignor> | ||
81 | + <ConsignmentItem> | ||
82 | + <SequenceNumeric>1</SequenceNumeric> | ||
83 | + <ConsignmentItemPackaging> | ||
84 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
85 | + </ConsignmentItemPackaging> | ||
86 | + <Commodity> | ||
87 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
88 | + </Commodity> | ||
89 | + <GoodsMeasure> | ||
90 | + <GrossMassMeasure>${mt.weight?c}</GrossMassMeasure> | ||
91 | + </GoodsMeasure> | ||
92 | + </ConsignmentItem> | ||
93 | + </Consignment> | ||
94 | + <AdditionalInformation> | ||
95 | + <Reason>${reason}</Reason> | ||
96 | + <ContactName>${contactName}</ContactName> | ||
97 | + <ContactTel>${contactTel}</ContactTel> | ||
98 | + </AdditionalInformation> | ||
99 | + </Declaration> | ||
100 | +</Manifest> |
src/main/resources/templates/manifest/MT1201.ftlx
100644 → 100755
1 | <Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1"> | 1 | <Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1"> |
2 | <Head> | 2 | <Head> |
3 | - <MessageID>CN_MT1201_1P0_460470678920X_20190918220458427</MessageID> | 3 | + <MessageID>${msgId}</MessageID> |
4 | <FunctionCode>9</FunctionCode> | 4 | <FunctionCode>9</FunctionCode> |
5 | <MessageType>MT1201</MessageType> | 5 | <MessageType>MT1201</MessageType> |
6 | - <SenderID>460470678920X_DXPENT0000460002</SenderID> | ||
7 | - <ReceiverID>4604</ReceiverID> | ||
8 | - <SendTime>20190918220458427</SendTime> | 6 | + <SenderID>${senderId}</SenderID> |
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | <Version>1.0</Version> | 9 | <Version>1.0</Version> |
10 | </Head> | 10 | </Head> |
11 | <Declaration> | 11 | <Declaration> |
12 | <RepresentativePerson> | 12 | <RepresentativePerson> |
13 | - <Name>9141010070678920XJ</Name> | 13 | + <Name>${orgCode}</Name> |
14 | </RepresentativePerson> | 14 | </RepresentativePerson> |
15 | <ExitCustomsOffice> | 15 | <ExitCustomsOffice> |
16 | - <ID>KUL</ID> | 16 | + <ID>${mt.originstation}</ID> |
17 | </ExitCustomsOffice> | 17 | </ExitCustomsOffice> |
18 | <Carrier> | 18 | <Carrier> |
19 | - <ID>CV</ID> | 19 | + <ID>${mt.carrier}</ID> |
20 | </Carrier> | 20 | </Carrier> |
21 | <BorderTransportMeans> | 21 | <BorderTransportMeans> |
22 | - <JourneyID>CV7303/20190919</JourneyID> | 22 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> |
23 | <TypeCode>4</TypeCode> | 23 | <TypeCode>4</TypeCode> |
24 | - <FirstArrivalLocationID>CGO</FirstArrivalLocationID> | ||
25 | - <ArrivalDateTime>20190919010458086</ArrivalDateTime> | ||
26 | - <DepartureDateTime>20190918230458086</DepartureDateTime> | 24 | + <FirstArrivalLocationID>${mt.destinationstation}</FirstArrivalLocationID> |
25 | + <ArrivalDateTime>${arrivalDateTime}</ArrivalDateTime> | ||
26 | + <DepartureDateTime>${departureDateTime}</DepartureDateTime> | ||
27 | </BorderTransportMeans> | 27 | </BorderTransportMeans> |
28 | <Consignment> | 28 | <Consignment> |
29 | <TransportContractDocument> | 29 | <TransportContractDocument> |
30 | - <ID>17236633273</ID> | 30 | + <ID>${awba}</ID> |
31 | <ConditionCode>10</ConditionCode> | 31 | <ConditionCode>10</ConditionCode> |
32 | </TransportContractDocument> | 32 | </TransportContractDocument> |
33 | + <#if mt['awbh']??> | ||
34 | + <#if mt.awbh?default("")?length gt 1> | ||
35 | + <AssociatedTransportDocument> | ||
36 | + <ID>${awba}_${mt.awbh}</ID> | ||
37 | + </AssociatedTransportDocument> | ||
38 | + </#if> | ||
39 | + </#if> | ||
33 | <LoadingLocation> | 40 | <LoadingLocation> |
34 | - <ID>KUL</ID> | 41 | + <ID>${mt.originstation}</ID> |
35 | </LoadingLocation> | 42 | </LoadingLocation> |
36 | <UnloadingLocation> | 43 | <UnloadingLocation> |
37 | - <ID>CGO/4604</ID> | ||
38 | - <ArrivalDate>20190919</ArrivalDate> | 44 | + <ID>${mt.destinationstation}/${mt.customcode}</ID> |
45 | + <ArrivalDate>${arrival}</ArrivalDate> | ||
39 | </UnloadingLocation> | 46 | </UnloadingLocation> |
40 | - <TransitDestination> | ||
41 | - <ID>CGN</ID> | ||
42 | - </TransitDestination> | ||
43 | - <CustomsStatusCode>002</CustomsStatusCode> | ||
44 | - <TransportSplitIndicator>0</TransportSplitIndicator> | 47 | + <GoodsConsignedPlace> |
48 | + <ID>${mt.destinationstation}</ID> | ||
49 | + </GoodsConsignedPlace> | ||
50 | + <CustomsStatusCode>${awbAwbinfo.awbtype}</CustomsStatusCode> | ||
51 | + <TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator> | ||
45 | <FreightPayment> | 52 | <FreightPayment> |
46 | - <MethodCode>PP</MethodCode> | 53 | + <MethodCode>${awbAwbinfo.paymodel}</MethodCode> |
47 | </FreightPayment> | 54 | </FreightPayment> |
48 | <ConsignmentPackaging> | 55 | <ConsignmentPackaging> |
49 | - <QuantityQuantity>3</QuantityQuantity> | 56 | + <QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity> |
50 | </ConsignmentPackaging> | 57 | </ConsignmentPackaging> |
51 | - <TotalGrossMassMeasure>24.0</TotalGrossMassMeasure> | 58 | + <TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure> |
52 | <Consignee> | 59 | <Consignee> |
53 | - <ID>8888+NONE</ID> | ||
54 | - <Name>SCHENKER DEUTSCHLAND AG</Name> | 60 | + <Name>${awbAwbinfo.cnsnname}</Name> |
55 | <Address> | 61 | <Address> |
56 | - <Line>NEUER WEYERSTRASSERWEG 120 122</Line> | ||
57 | - <CountryCode>CN</CountryCode> | 62 | + <Line>${awbAwbinfo.cnsnaddress}</Line> |
63 | + <CountryCode>${awbAwbinfo.cnscountyr}</CountryCode> | ||
58 | </Address> | 64 | </Address> |
59 | <Communication> | 65 | <Communication> |
60 | - <ID>00000000</ID> | 66 | + <ID>${awbAwbinfo.cnsntel}</ID> |
61 | <TypeID>TE</TypeID> | 67 | <TypeID>TE</TypeID> |
62 | </Communication> | 68 | </Communication> |
63 | - <Contact> | ||
64 | - <Name>NONE</Name> | ||
65 | - <Communication> | ||
66 | - <ID>00000000</ID> | ||
67 | - <TypeID>TE</TypeID> | ||
68 | - </Communication> | ||
69 | - </Contact> | ||
70 | </Consignee> | 69 | </Consignee> |
71 | <Consignor> | 70 | <Consignor> |
72 | - <ID>9999+NONE</ID> | ||
73 | - <Name>SCHENKER LOGISTICS MALAYSIA SDN BHD</Name> | 71 | + <Name>${awbAwbinfo.shprname}</Name> |
74 | <Address> | 72 | <Address> |
75 | - <Line>B 10 MAS FREIGHT FOWARDERS COMPLEX</Line> | ||
76 | - <CountryCode>MY</CountryCode> | 73 | + <Line>${awbAwbinfo.shpraddress}</Line> |
74 | + <CountryCode>${awbAwbinfo.shprcountyr}</CountryCode> | ||
77 | </Address> | 75 | </Address> |
78 | <Communication> | 76 | <Communication> |
79 | - <ID>60387757888</ID> | 77 | + <ID>${awbAwbinfo.shprtel}</ID> |
80 | <TypeID>TE</TypeID> | 78 | <TypeID>TE</TypeID> |
81 | </Communication> | 79 | </Communication> |
82 | </Consignor> | 80 | </Consignor> |
83 | <ConsignmentItem> | 81 | <ConsignmentItem> |
84 | <SequenceNumeric>1</SequenceNumeric> | 82 | <SequenceNumeric>1</SequenceNumeric> |
85 | <ConsignmentItemPackaging> | 83 | <ConsignmentItemPackaging> |
86 | - <QuantityQuantity>3</QuantityQuantity> | 84 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> |
87 | </ConsignmentItemPackaging> | 85 | </ConsignmentItemPackaging> |
88 | <Commodity> | 86 | <Commodity> |
89 | - <CargoDescription>CONSOL</CargoDescription> | 87 | + <CargoDescription>${mt.goodsname}</CargoDescription> |
90 | </Commodity> | 88 | </Commodity> |
91 | <GoodsMeasure> | 89 | <GoodsMeasure> |
92 | - <GrossMassMeasure>24</GrossMassMeasure> | 90 | + <GrossMassMeasure>${mt.weight?c}</GrossMassMeasure> |
93 | </GoodsMeasure> | 91 | </GoodsMeasure> |
94 | </ConsignmentItem> | 92 | </ConsignmentItem> |
95 | </Consignment> | 93 | </Consignment> |
src/main/resources/templates/manifest/MT2201.ftlx
100644 → 100755
1 | -<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1"> | 1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
2 | <Head> | 2 | <Head> |
3 | - <MessageID>${cusmsgid}</MessageID> | ||
4 | - <FunctionCode>${cusfunctioncode}</FunctionCode> | ||
5 | - <MessageType>${bustype}</MessageType> | ||
6 | - <SenderID>${cussenderid}</SenderID> | ||
7 | - <ReceiverID>${cusreciverid}</ReceiverID> | ||
8 | - <SendTime>${busdate?string('ddMMyyyyHHmmssSSS')}</SendTime> | ||
9 | - <Version>${cusversion}</Version> | 3 | + <MessageID>${msgId}</MessageID> |
4 | + <FunctionCode>9</FunctionCode> | ||
5 | + <MessageType>MT2201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | </Head> | 10 | </Head> |
11 | + <Declaration> | ||
12 | + <RepresentativePerson> | ||
13 | + <Name>${orgCode}</Name> | ||
14 | + </RepresentativePerson> | ||
15 | + <ExitCustomsOffice> | ||
16 | + <ID>${mt.originstation}</ID> | ||
17 | + </ExitCustomsOffice> | ||
18 | + <Carrier> | ||
19 | + <ID>${mt.carrier}</ID> | ||
20 | + </Carrier> | ||
21 | + <BorderTransportMeans> | ||
22 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
23 | + <TypeCode>4</TypeCode> | ||
24 | + </BorderTransportMeans> | ||
25 | + <Consignment> | ||
26 | + <TransportContractDocument> | ||
27 | + <ID>${awba}</ID> | ||
28 | + <ConditionCode>10</ConditionCode> | ||
29 | + </TransportContractDocument> | ||
30 | + <#if mt['awbh']??> | ||
31 | + <#if mt.awbh?default("")?length gt 1> | ||
32 | + <AssociatedTransportDocument> | ||
33 | + <ID>${awba}_${mt.awbh}</ID> | ||
34 | + </AssociatedTransportDocument> | ||
35 | + </#if> | ||
36 | + </#if> | ||
37 | + <LoadingLocation> | ||
38 | + <ID>${mt.originstation}/${mt.customcode}</ID> | ||
39 | + <LoadingDate>${loadingDate}</LoadingDate> | ||
40 | + </LoadingLocation> | ||
41 | + <UnloadingLocation> | ||
42 | + <ID>${mt.destinationstation}</ID> | ||
43 | + </UnloadingLocation> | ||
44 | + <GoodsConsignedPlace> | ||
45 | + <ID>${mt.originstation}</ID> | ||
46 | + </GoodsConsignedPlace> | ||
47 | + <CustomsStatusCode>${awbAwbinfo.awbtype}</CustomsStatusCode> | ||
48 | + <TransportSplitIndicator>${mt.splitcode}</TransportSplitIndicator> | ||
49 | + <FreightPayment> | ||
50 | + <MethodCode>${awbAwbinfo.collected}</MethodCode> | ||
51 | + </FreightPayment> | ||
52 | + <ConsignmentPackaging> | ||
53 | + <QuantityQuantity>${awbAwbinfo.pcs}</QuantityQuantity> | ||
54 | + </ConsignmentPackaging> | ||
55 | + <TotalGrossMassMeasure>${awbAwbinfo.weight?c}</TotalGrossMassMeasure> | ||
56 | + <Consignee> | ||
57 | + <Name>${awbAwbinfo.cnsnname}</Name> | ||
58 | + <Address> | ||
59 | + <Line>${awbAwbinfo.cnsnaddress}</Line> | ||
60 | + <CountryCode>${awbAwbinfo.cnscountyr}</CountryCode> | ||
61 | + </Address> | ||
62 | + <Communication> | ||
63 | + <ID>${awbAwbinfo.cnsntel}</ID> | ||
64 | + </Communication> | ||
65 | + </Consignee> | ||
66 | + <Consignor> | ||
67 | + <Name>${awbAwbinfo.shprname}</Name> | ||
68 | + <Address> | ||
69 | + <Line>${awbAwbinfo.shpraddress}</Line> | ||
70 | + <CountryCode>${awbAwbinfo.shprcountyr}</CountryCode> | ||
71 | + </Address> | ||
72 | + <Communication> | ||
73 | + <ID>${awbAwbinfo.shprtel}</ID> | ||
74 | + </Communication> | ||
75 | + </Consignor> | ||
76 | + <ConsignmentItem> | ||
77 | + <SequenceNumeric>1</SequenceNumeric> | ||
78 | + <ConsignmentItemPackaging> | ||
79 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
80 | + </ConsignmentItemPackaging> | ||
81 | + <Commodity> | ||
82 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
83 | + </Commodity> | ||
84 | + <GoodsMeasure> | ||
85 | + <GrossMassMeasure>${mt.weight?c}</GrossMassMeasure> | ||
86 | + </GoodsMeasure> | ||
87 | + </ConsignmentItem> | ||
88 | + </Consignment> | ||
89 | + </Declaration> | ||
11 | </Manifest> | 90 | </Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>2</FunctionCode> | ||
5 | + <MessageType>MT3201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
15 | + <TypeCode>4</TypeCode> | ||
16 | + <ID>${mt.carrier}${mt.flightno}</ID> | ||
17 | + <Name>${mt.carrier}${mt.flightno}</Name> | ||
18 | + </BorderTransportMeans> | ||
19 | + <UnloadingLocation> | ||
20 | + <ID>${mt.destinationstation}/${mt.customcode}</ID> | ||
21 | + <ArrivalDate>${mt.arrivetime?string("yyyyMMdd")}</ArrivalDate> | ||
22 | + </UnloadingLocation> | ||
23 | + <Consignment> | ||
24 | + <TransportContractDocument> | ||
25 | + <ID>${awba}</ID> | ||
26 | + </TransportContractDocument> | ||
27 | + <#if mt['awbh']??> | ||
28 | + <#if mt.awbh?default("")?length gt 1> | ||
29 | + <AssociatedTransportDocument> | ||
30 | + <ID>${awba}_${mt.awbh}</ID> | ||
31 | + </AssociatedTransportDocument> | ||
32 | + </#if> | ||
33 | + </#if> | ||
34 | + <ConsignmentPackaging> | ||
35 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
36 | + </ConsignmentPackaging> | ||
37 | + <TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure> | ||
38 | + <ConsignmentItem> | ||
39 | + <SequenceNumeric>1</SequenceNumeric> | ||
40 | + <Commodity> | ||
41 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
42 | + </Commodity> | ||
43 | + </ConsignmentItem> | ||
44 | + </Consignment> | ||
45 | + </Declaration> | ||
46 | +</Manifest> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3202:1"> | ||
3 | + <Head> | ||
4 | + <MessageID>${msgId}</MessageID> | ||
5 | + <FunctionCode>2</FunctionCode> | ||
6 | + <MessageType>MT3202</MessageType> | ||
7 | + <SenderID>${senderId}</SenderID> | ||
8 | + <ReceiverID>${receiverID}</ReceiverID> | ||
9 | + <SendTime>${sendTime}</SendTime> | ||
10 | + <Version>1.0</Version> | ||
11 | + </Head> | ||
12 | + <Declaration> | ||
13 | + <DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID> | ||
14 | + <BorderTransportMeans> | ||
15 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
16 | + <TypeCode>4</TypeCode> | ||
17 | + </BorderTransportMeans> | ||
18 | + <UnloadingLocation> | ||
19 | + <ID>${mt.turnunloading}</ID> | ||
20 | + <ArrivalDate>${mt.flightno}</ArrivalDate> | ||
21 | + </UnloadingLocation> | ||
22 | + <Consignment> | ||
23 | + <TransportContractDocument> | ||
24 | + <ID>${awba}</ID> | ||
25 | + </TransportContractDocument> | ||
26 | + <ConsignmentPackaging> | ||
27 | + <QuantityQuantity>${mt.turnpiece}</QuantityQuantity> | ||
28 | + </ConsignmentPackaging> | ||
29 | + <TotalGrossMassMeasure>${mt.turnweight?c}</TotalGrossMassMeasure> | ||
30 | + <ConsignmentItem> | ||
31 | + <SequenceNumeric>1</SequenceNumeric> | ||
32 | + <Commodity> | ||
33 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
34 | + </Commodity> | ||
35 | + </ConsignmentItem> | ||
36 | + </Consignment> | ||
37 | + </Declaration> | ||
38 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT4201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>2</FunctionCode> | ||
5 | + <MessageType>MT4201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <Carrier> | ||
13 | + <ID>${mt.carrier}</ID> | ||
14 | + </Carrier> | ||
15 | + <BorderTransportMeans> | ||
16 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
17 | + <TypeCode>4</TypeCode> | ||
18 | + <ID>${mt.carrier}${mt.flightno}</ID> | ||
19 | + <Name>${mt.carrier}${mt.flightno}</Name> | ||
20 | + </BorderTransportMeans> | ||
21 | + <Consignment> | ||
22 | + <TransportContractDocument> | ||
23 | + <ID>${awba}</ID> | ||
24 | + </TransportContractDocument> | ||
25 | + <#if mt['awbh']??> | ||
26 | + <#if mt.awbh?default("")?length gt 1> | ||
27 | + <AssociatedTransportDocument> | ||
28 | + <ID>${awba}_${mt.awbh}</ID> | ||
29 | + </AssociatedTransportDocument> | ||
30 | + </#if> | ||
31 | + </#if> | ||
32 | + <LoadingLocation> | ||
33 | + <ID>${mt.originstation}/${mt.customcode}</ID> | ||
34 | + <LoadingDate>${mt.loadingtime?string('yyyyMMddHHmmss')}</LoadingDate> | ||
35 | + </LoadingLocation> | ||
36 | + <ConsignmentPackaging> | ||
37 | + <QuantityQuantity>${mt.lodingpiece}</QuantityQuantity> | ||
38 | + </ConsignmentPackaging> | ||
39 | + <TotalGrossMassMeasure>${mt.lodingweight?c}</TotalGrossMassMeasure> | ||
40 | + <TransportSplitIndicator>0</TransportSplitIndicator> | ||
41 | + <ConsignmentItem> | ||
42 | + <Commodity> | ||
43 | + <CargoDescription>${mt.goodsname}</CargoDescription> | ||
44 | + </Commodity> | ||
45 | + </ConsignmentItem> | ||
46 | + </Consignment> | ||
47 | + </Declaration> | ||
48 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>2</FunctionCode> | ||
5 | + <MessageType>MT5201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
15 | + <TypeCode>4</TypeCode> | ||
16 | + <ID>${mt.carrier}${mt.flightno}</ID> | ||
17 | + <Name>${mt.carrier}${mt.flightno}</Name> | ||
18 | + <ActualDateTime>${mt.starttime?string('yyyyMMddHHmmss')}</ActualDateTime> | ||
19 | + <CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmss')}</CompletedDateTime> | ||
20 | + <UnloadingLocation> | ||
21 | + <ID>${mt.destinationstation}/${mt.customcode}</ID> | ||
22 | + </UnloadingLocation> | ||
23 | + </BorderTransportMeans> | ||
24 | + <TallyParty> | ||
25 | + <ID>${orgCode}</ID> | ||
26 | + </TallyParty> | ||
27 | + <Consignment> | ||
28 | + <TransportContractDocument> | ||
29 | + <ID>${awba}</ID> | ||
30 | + </TransportContractDocument> | ||
31 | + <#if mt['awbh']??> | ||
32 | + <#if mt.awbh?default("")?length gt 1> | ||
33 | + <AssociatedTransportDocument> | ||
34 | + <ID>${awba}_${mt.awbh}</ID> | ||
35 | + </AssociatedTransportDocument> | ||
36 | + </#if> | ||
37 | + </#if> | ||
38 | + <ConsignmentPackaging> | ||
39 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
40 | + </ConsignmentPackaging> | ||
41 | + <TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure> | ||
42 | + </Consignment> | ||
43 | + </Declaration> | ||
44 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>2</FunctionCode> | ||
5 | + <MessageType>MT5202</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${mt.customcode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
15 | + <TypeCode>4</TypeCode> | ||
16 | + <ID>${mt.carrier}${mt.flightno}</ID> | ||
17 | + <Name>${mt.carrier}${mt.flightno}</Name> | ||
18 | + <ActualDateTime>${mt.starttime?string('yyyyMMddHHmmss')}</ActualDateTime> | ||
19 | + <CompletedDateTime>${mt.endtime?string('yyyyMMddHHmmss')}</CompletedDateTime> | ||
20 | + <LoadingLocation> | ||
21 | + <ID>${mt.originstation}/${mt.customcode}</ID> | ||
22 | + </LoadingLocation> | ||
23 | + </BorderTransportMeans> | ||
24 | + <TallyParty> | ||
25 | + <ID>${orgCode}</ID> | ||
26 | + </TallyParty> | ||
27 | + <Consignment> | ||
28 | + <TransportContractDocument> | ||
29 | + <ID>${awba}</ID> | ||
30 | + </TransportContractDocument> | ||
31 | + <#if mt['awbh']??> | ||
32 | + <#if mt.awbh?default("")?length gt 1> | ||
33 | + <AssociatedTransportDocument> | ||
34 | + <ID>${awba}_${mt.awbh}</ID> | ||
35 | + </AssociatedTransportDocument> | ||
36 | + </#if> | ||
37 | + </#if> | ||
38 | + <ConsignmentPackaging> | ||
39 | + <QuantityQuantity>${mt.piece}</QuantityQuantity> | ||
40 | + </ConsignmentPackaging> | ||
41 | + <TotalGrossMassMeasure>${mt.weight?c}</TotalGrossMassMeasure> | ||
42 | + </Consignment> | ||
43 | + </Declaration> | ||
44 | +</Manifest> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT6202:1"> | ||
3 | + <Head> | ||
4 | + <MessageID>${msgId}</MessageID> | ||
5 | + <FunctionCode>2</FunctionCode> | ||
6 | + <MessageType>MT8205</MessageType> | ||
7 | + <SenderID>${senderId}</SenderID> | ||
8 | + <ReceiverID>${receiverID}</ReceiverID> | ||
9 | + <SendTime>${sendTime}</SendTime> | ||
10 | + <Version>1.0</Version> | ||
11 | + </Head> | ||
12 | + <Declaration> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${mt.carrier}${mt.flightno}/${mt.flightdate?string('yyyyMMdd')}</JourneyID> | ||
15 | + <TypeCode>4</TypeCode> | ||
16 | + <CargoFacilityLocation>${mt.turnunloading}</CargoFacilityLocation> | ||
17 | + <UnloadingLocation> | ||
18 | + <ID>${mt.ext2}</ID> | ||
19 | + </UnloadingLocation> | ||
20 | + </BorderTransportMeans> | ||
21 | + <Consignment> | ||
22 | + <TransportContractDocument> | ||
23 | + <ID>${awba}</ID> | ||
24 | + </TransportContractDocument> | ||
25 | + <ConsignmentPackaging> | ||
26 | + <QuantityQuantity>${mt.turnpiece}</QuantityQuantity> | ||
27 | + </ConsignmentPackaging> | ||
28 | + <TotalGrossMassMeasure>${mt.turnweight?c}</TotalGrossMassMeasure> | ||
29 | + <BorderTransportMeans> | ||
30 | + <JourneyID>${mt.pno}</JourneyID> | ||
31 | + <TypeCode>3</TypeCode> | ||
32 | + <Carrier> | ||
33 | + <Name>${mt.ext1}</Name> | ||
34 | + </Carrier> | ||
35 | + </BorderTransportMeans> | ||
36 | + </Consignment> | ||
37 | + </Declaration> | ||
38 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT8205:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>2</FunctionCode> | ||
5 | + <MessageType>MT8205</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${mt8205.customcode}</DeclarationOfficeID> | ||
13 | + <Relation> | ||
14 | + <ImportInformation> | ||
15 | + <RepresentativePerson> | ||
16 | + <Name>${orgCode}</Name> | ||
17 | + </RepresentativePerson> | ||
18 | + <BorderTransportMeans> | ||
19 | + <JourneyID>${mt1201.carrier}${mt1201.flightno}/${mt1201.flightdate?string('yyyyMMdd')}</JourneyID> | ||
20 | + </BorderTransportMeans> | ||
21 | + <Consignment> | ||
22 | + <TransportContractDocument> | ||
23 | + <ID>${mt1201awba}</ID> | ||
24 | + </TransportContractDocument> | ||
25 | + <LoadingLocation> | ||
26 | + <ID>${mt8205.awboriginstation}</ID> | ||
27 | + </LoadingLocation> | ||
28 | + <ConsignmentPackaging> | ||
29 | + <QuantityQuantity>${mt1201.piece}</QuantityQuantity> | ||
30 | + <TypeCode>PK</TypeCode> | ||
31 | + </ConsignmentPackaging> | ||
32 | + <TotalGrossMassMeasure>${mt1201.weight?c}</TotalGrossMassMeasure> | ||
33 | + <ConsignmentItem> | ||
34 | + <Commodity> | ||
35 | + <CargoDescription>${mt1201.goodsname}</CargoDescription> | ||
36 | + </Commodity> | ||
37 | + </ConsignmentItem> | ||
38 | + </Consignment> | ||
39 | + </ImportInformation> | ||
40 | + <ExportInformation> | ||
41 | + <RepresentativePerson> | ||
42 | + <Name>${orgCode}</Name> | ||
43 | + </RepresentativePerson> | ||
44 | + <BorderTransportMeans> | ||
45 | + <JourneyID>${mt2201.carrier}${mt2201.flightno}/${mt2201.flightdate?string('yyyyMMdd')}</JourneyID> | ||
46 | + </BorderTransportMeans> | ||
47 | + <Consignment> | ||
48 | + <TransportContractDocument> | ||
49 | + <ID>${mt2201awba}</ID> | ||
50 | + </TransportContractDocument> | ||
51 | + <UnloadingLocation> | ||
52 | + <ID>${mt8205.awbdesstation}</ID> | ||
53 | + </UnloadingLocation> | ||
54 | + <ConsignmentPackaging> | ||
55 | + <QuantityQuantity>${mt2201.piece}</QuantityQuantity> | ||
56 | + <TypeCode>PK</TypeCode> | ||
57 | + </ConsignmentPackaging> | ||
58 | + <TotalGrossMassMeasure>${mt2201.weight?c}</TotalGrossMassMeasure> | ||
59 | + </Consignment> | ||
60 | + </ExportInformation> | ||
61 | + </Relation> | ||
62 | + </Declaration> | ||
63 | +</Manifest> |
1 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT1201:1"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT1201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <RepresentativePerson> | ||
13 | + <Name>${orgCode}</Name> | ||
14 | + </RepresentativePerson> | ||
15 | + <BorderTransportMeans> | ||
16 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
17 | + </BorderTransportMeans> | ||
18 | + <Consignment> | ||
19 | + <TransportContractDocument> | ||
20 | + <ID>${awbas}</ID> | ||
21 | + <ChangeReasonCode>999</ChangeReasonCode> | ||
22 | + </TransportContractDocument> | ||
23 | + <#if awbh?default("")?length gt 1> | ||
24 | + <AssociatedTransportDocument> | ||
25 | + <ID>${awbas}_${awbh}</ID> | ||
26 | + </AssociatedTransportDocument> | ||
27 | + </#if> | ||
28 | + </Consignment> | ||
29 | + <AdditionalInformation> | ||
30 | + <Reason>${reason}</Reason> | ||
31 | + <ContactName>${contactName}</ContactName> | ||
32 | + <ContactTel>${contactTel}</ContactTel> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2201:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
3 | + <Head> | ||
4 | + <MessageID>${msgId}</MessageID> | ||
5 | + <FunctionCode>3</FunctionCode> | ||
6 | + <MessageType>MT2201</MessageType> | ||
7 | + <SenderID>${senderId}</SenderID> | ||
8 | + <ReceiverID>${receiverID}</ReceiverID> | ||
9 | + <SendTime>${sendTime}</SendTime> | ||
10 | + <Version>1.0</Version> | ||
11 | + </Head> | ||
12 | + <Declaration> | ||
13 | + <RepresentativePerson> | ||
14 | + <Name>${orgCode}</Name> | ||
15 | + </RepresentativePerson> | ||
16 | + <BorderTransportMeans> | ||
17 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
18 | + </BorderTransportMeans> | ||
19 | + <Consignment> | ||
20 | + <TransportContractDocument> | ||
21 | + <ID>${awbas}</ID> | ||
22 | + <ChangeReasonCode>9999</ChangeReasonCode> | ||
23 | + </TransportContractDocument> | ||
24 | + <#if awbh?default("")?length gt 1> | ||
25 | + <AssociatedTransportDocument> | ||
26 | + <ID>${awbas}_${awbh}</ID> | ||
27 | + </AssociatedTransportDocument> | ||
28 | + </#if> | ||
29 | + </Consignment> | ||
30 | + <AdditionalInformation> | ||
31 | + <Reason>${reason}</Reason> | ||
32 | + <ContactName>${contactName}</ContactName> | ||
33 | + <ContactTel>${contactTel}</ContactTel> | ||
34 | + <#if content?length gt 1> | ||
35 | + <Content>${content}</Content> | ||
36 | + </#if> | ||
37 | + </AdditionalInformation> | ||
38 | + </Declaration> | ||
39 | +</Manifest> |
1 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT3201:1"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT3201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awbas}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?default("")?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awbas}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT3202</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <BorderTransportMeans> | ||
13 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
14 | + </BorderTransportMeans> | ||
15 | + <Consignment> | ||
16 | + <TransportContractDocument> | ||
17 | + <ID>${awbas}</ID> | ||
18 | + </TransportContractDocument> | ||
19 | + </Consignment> | ||
20 | + <AdditionalInformation> | ||
21 | + <Reason>${reason}</Reason> | ||
22 | + <ContactName>${contactName}</ContactName> | ||
23 | + <ContactTel>${contactTel}</ContactTel> | ||
24 | + </AdditionalInformation> | ||
25 | + </Declaration> | ||
26 | +</Manifest> |
1 | +<Manifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Declaration:datamodel:standard:CN:MT4201:1"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT4201</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <BorderTransportMeans> | ||
13 | + <JourneyID>${flightNo}/${flightDates}</JourneyID> | ||
14 | + </BorderTransportMeans> | ||
15 | + <Consignment> | ||
16 | + <TransportContractDocument> | ||
17 | + <ID>${awbas}</ID> | ||
18 | + </TransportContractDocument> | ||
19 | + <#if awbh?default("")?length gt 1> | ||
20 | + <AssociatedTransportDocument> | ||
21 | + <ID>${awbas}_${awbh}</ID> | ||
22 | + </AssociatedTransportDocument> | ||
23 | + </#if> | ||
24 | + </Consignment> | ||
25 | + <AdditionalInformation> | ||
26 | + <Reason>${reason}</Reason> | ||
27 | + <ContactName>${contactName}</ContactName> | ||
28 | + <ContactTel>${contactTel}</ContactTel> | ||
29 | + <#if content?length gt 1> | ||
30 | + <Content>${content}</Content> | ||
31 | + </#if> | ||
32 | + </AdditionalInformation> | ||
33 | + </Declaration> | ||
34 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT5021</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awbas}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?default("")?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awbas}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT5202</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <DeclarationOfficeID>${customCode}</DeclarationOfficeID> | ||
13 | + <BorderTransportMeans> | ||
14 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
15 | + </BorderTransportMeans> | ||
16 | + <Consignment> | ||
17 | + <TransportContractDocument> | ||
18 | + <ID>${awbas}</ID> | ||
19 | + </TransportContractDocument> | ||
20 | + <#if awbh?default("")?length gt 1> | ||
21 | + <AssociatedTransportDocument> | ||
22 | + <ID>${awbas}_${awbh}</ID> | ||
23 | + </AssociatedTransportDocument> | ||
24 | + </#if> | ||
25 | + </Consignment> | ||
26 | + <AdditionalInformation> | ||
27 | + <Reason>${reason}</Reason> | ||
28 | + <ContactName>${contactName}</ContactName> | ||
29 | + <ContactTel>${contactTel}</ContactTel> | ||
30 | + <#if content?length gt 1> | ||
31 | + <Content>${content}</Content> | ||
32 | + </#if> | ||
33 | + </AdditionalInformation> | ||
34 | + </Declaration> | ||
35 | +</Manifest> |
1 | +<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT5202:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
2 | + <Head> | ||
3 | + <MessageID>${msgId}</MessageID> | ||
4 | + <FunctionCode>3</FunctionCode> | ||
5 | + <MessageType>MT6202</MessageType> | ||
6 | + <SenderID>${senderId}</SenderID> | ||
7 | + <ReceiverID>${receiverID}</ReceiverID> | ||
8 | + <SendTime>${sendTime}</SendTime> | ||
9 | + <Version>1.0</Version> | ||
10 | + </Head> | ||
11 | + <Declaration> | ||
12 | + <BorderTransportMeans> | ||
13 | + <JourneyID>${carrier}${flightNo}/${flightDates}</JourneyID> | ||
14 | + </BorderTransportMeans> | ||
15 | + <Consignment> | ||
16 | + <TransportContractDocument> | ||
17 | + <ID>${awbas}</ID> | ||
18 | + </TransportContractDocument> | ||
19 | + </Consignment> | ||
20 | + <AdditionalInformation> | ||
21 | + <Reason>${reason}</Reason> | ||
22 | + <ContactName>${contactName}</ContactName> | ||
23 | + <ContactTel>${contactTel}</ContactTel> | ||
24 | + </AdditionalInformation> | ||
25 | + </Declaration> | ||
26 | +</Manifest> |
-
请 注册 或 登录 后发表评论