作者 朱兆平

舱单收发MQ节点,外网获取回执报文

正在显示 38 个修改的文件 包含 32 行增加4371 行删除

要显示太多修改。

为保证性能只显示 38 of 38+ 个文件。

@@ -22,7 +22,7 @@ spring: @@ -22,7 +22,7 @@ spring:
22 static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,classpath:/public/,file:${web.upload-path} 22 static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,classpath:/public/,file:${web.upload-path}
23 23
24 application: 24 application:
25 - name: WLTP-NMMS-CUSTOM-RECIPTION-RESOLVER 25 + name: WLTP-NMMS-CUSTOMMESSAGEPROCESS
26 26
27 jackson: 27 jackson:
28 serialization: 28 serialization:
@@ -44,44 +44,6 @@ spring: @@ -44,44 +44,6 @@ spring:
44 auto-registration: 44 auto-registration:
45 enabled: false 45 enabled: false
46 46
47 - datasource:  
48 - type: com.alibaba.druid.pool.DruidDataSource  
49 - #oracle  
50 - driver-class-name: oracle.jdbc.OracleDriver  
51 - url: jdbc:oracle:thin:@10.50.3.69:1521:CGODB  
52 -# url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL  
53 - username: CGONMS  
54 - password: 1q2w3e4r  
55 - #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码  
56 -# url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8  
57 -# username: root  
58 -# password:  
59 -# driver-class-name: com.mysql.jdbc.Driver  
60 - max-idle: 20  
61 - max-wait: 10000  
62 - min-idle: 5  
63 - initial-size: 5  
64 - #配置初始化大小/最小/最大  
65 - druid:  
66 - initial-size: 1  
67 - min-idle: 1  
68 - #最大并发连接数  
69 - max-active: 40  
70 - #获取连接等待超时时间  
71 - max-wait: 60000  
72 - #一个连接在池中最小生存的时间  
73 - min-evictable-idle-time-millis: 300000  
74 - #间隔多久进行一次检测,检测需要关闭的空闲连接  
75 - time-between-eviction-runs-millis: 60000  
76 - #mysql  
77 -# validation-query: SELECT 1 FROM DUAL  
78 - #oracle  
79 - validation-query: SELECT 'x' FROM DUAL  
80 - test-while-idle: true  
81 - test-on-borrow: false  
82 - test-on-return: false  
83 - default-auto-commit: true  
84 -  
85 eureka: 47 eureka:
86 instance: 48 instance:
87 #eureka服务器页面中status的请求路径 49 #eureka服务器页面中status的请求路径
@@ -100,20 +62,6 @@ eureka: @@ -100,20 +62,6 @@ eureka:
100 defaultZone: http://10.50.3.82:19527/eureka/ 62 defaultZone: http://10.50.3.82:19527/eureka/
101 registry-fetch-interval-seconds: 30 63 registry-fetch-interval-seconds: 30
102 64
103 -  
104 -  
105 -  
106 -mybatis:  
107 - mapper-locations: classpath:mapping/*.xml  
108 - type-aliases-package: com.tianbo.warehouse.model  
109 -pagehelper:  
110 - #auto-dialect: true  
111 - #auto-runtime-dialect: true  
112 - helper-dialect: oracle  
113 - reasonable: true  
114 - support-methods-arguments: true  
115 - params: count=countSql  
116 -  
117 #debug配置,debug或者为true的时候,logback才会记录和写入日志文件 65 #debug配置,debug或者为true的时候,logback才会记录和写入日志文件
118 trace: false 66 trace: false
119 debug: false 67 debug: false
@@ -169,7 +117,7 @@ mq: @@ -169,7 +117,7 @@ mq:
169 #新舱单业务报文mq队列名称 117 #新舱单业务报文mq队列名称
170 nmms-mq: send 118 nmms-mq: send
171 #读取回执报文mq队列名称 119 #读取回执报文mq队列名称
172 - tcs-mq: responsebak 120 + tcs-mq: response.agent
173 exchange: 121 exchange:
174 #TCS回执发送到此交换,交换再把回执消息同步到其他配置的回执订阅队列 122 #TCS回执发送到此交换,交换再把回执消息同步到其他配置的回执订阅队列
175 tcs-ex: 123 tcs-ex:
@@ -181,8 +129,8 @@ mq: @@ -181,8 +129,8 @@ mq:
181 routing-key: 129 routing-key:
182 130
183 connection: 131 connection:
184 - ip: 10.50.7.90  
185 - port: 5672 132 + ip: 218.28.199.134
  133 + port: 8004
186 vHost: NMMS 134 vHost: NMMS
187 username: tianbo 135 username: tianbo
188 password: vmvnv1v2VV 136 password: vmvnv1v2VV
@@ -22,10 +22,10 @@ @@ -22,10 +22,10 @@
22 </properties> 22 </properties>
23 <dependencies> 23 <dependencies>
24 <!--spring boot--> 24 <!--spring boot-->
25 - <dependency>  
26 - <groupId>org.springframework.boot</groupId>  
27 - <artifactId>spring-boot-starter-jdbc</artifactId>  
28 - </dependency> 25 +<!-- <dependency>-->
  26 +<!-- <groupId>org.springframework.boot</groupId>-->
  27 +<!-- <artifactId>spring-boot-starter-jdbc</artifactId>-->
  28 +<!-- </dependency>-->
29 <dependency> 29 <dependency>
30 <groupId>org.mybatis.spring.boot</groupId> 30 <groupId>org.mybatis.spring.boot</groupId>
31 <artifactId>mybatis-spring-boot-starter</artifactId> 31 <artifactId>mybatis-spring-boot-starter</artifactId>
@@ -68,17 +68,17 @@ @@ -68,17 +68,17 @@
68 <version>${lombok_sersion}</version> 68 <version>${lombok_sersion}</version>
69 <scope>provided</scope> 69 <scope>provided</scope>
70 </dependency> 70 </dependency>
71 - <!--数据库-->  
72 - <dependency>  
73 - <groupId>com.alibaba</groupId>  
74 - <artifactId>druid</artifactId>  
75 - <version>${druid.version}</version>  
76 - </dependency>  
77 - <dependency>  
78 - <groupId>org.mybatis</groupId>  
79 - <artifactId>mybatis</artifactId>  
80 - <version>3.4.6</version>  
81 - </dependency> 71 +<!-- &lt;!&ndash;数据库&ndash;&gt;-->
  72 +<!-- <dependency>-->
  73 +<!-- <groupId>com.alibaba</groupId>-->
  74 +<!-- <artifactId>druid</artifactId>-->
  75 +<!-- <version>${druid.version}</version>-->
  76 +<!-- </dependency>-->
  77 +<!-- <dependency>-->
  78 +<!-- <groupId>org.mybatis</groupId>-->
  79 +<!-- <artifactId>mybatis</artifactId>-->
  80 +<!-- <version>3.4.6</version>-->
  81 +<!-- </dependency>-->
82 <!--&lt;!&ndash; mysql&ndash;&gt;--> 82 <!--&lt;!&ndash; mysql&ndash;&gt;-->
83 <!--<dependency>--> 83 <!--<dependency>-->
84 <!--<groupId>mysql</groupId>--> 84 <!--<groupId>mysql</groupId>-->
@@ -86,11 +86,11 @@ @@ -86,11 +86,11 @@
86 <!--<version>8.0.15</version>--> 86 <!--<version>8.0.15</version>-->
87 <!--</dependency>--> 87 <!--</dependency>-->
88 <!-- oracle--> 88 <!-- oracle-->
89 - <dependency>  
90 - <groupId>com.oracle</groupId>  
91 - <artifactId>ojdbc6</artifactId>  
92 - <version>11.2.0.4.0-atlassian-hosted</version>  
93 - </dependency> 89 +<!-- <dependency>-->
  90 +<!-- <groupId>com.oracle</groupId>-->
  91 +<!-- <artifactId>ojdbc6</artifactId>-->
  92 +<!-- <version>11.2.0.4.0-atlassian-hosted</version>-->
  93 +<!-- </dependency>-->
94 <!--util依赖--> 94 <!--util依赖-->
95 <dependency> 95 <dependency>
96 <groupId>com.tianbo</groupId> 96 <groupId>com.tianbo</groupId>
1 -Manifest-Version: 1.0  
2 -Main-Class: com.tianbo.analysis.BootApplication  
3 -Class-Path: spring-boot-starter-thymeleaf-2.2.0.BUILD-20191016.163455-71  
4 - 2.jar commons-jxpath-1.3.jar netflix-commons-util-0.3.0.jar spring-jdbc  
5 - -5.2.0.RELEASE.jar woodstox-core-5.2.1.jar amqp-client-5.7.3.jar jersey  
6 - -core-1.19.1.jar thymeleaf-3.0.11.RELEASE.jar spring-boot-starter-loggi  
7 - ng-2.2.0.BUILD-20191016.163447-713.jar rxnetty-0.4.9.jar spring-cloud-n  
8 - etflix-hystrix-2.1.5.BUILD-20200131.212025-597.jar guice-4.1.0.jar myba  
9 - tis-spring-1.3.2.jar joda-time-2.10.4.jar logback-core-1.2.3.jar bcpkix  
10 - -jdk15on-1.64.jar snakeyaml-1.25.jar spring-cloud-netflix-archaius-2.1.  
11 - 5.BUILD-20200131.211909-597.jar spring-tx-5.2.0.RELEASE.jar spring-webm  
12 - vc-5.2.0.RELEASE.jar hibernate-validator-6.0.17.Final.jar eureka-client  
13 - -1.9.13.jar javax.inject-1.jar unbescape-1.1.6.RELEASE.jar attoparser-2  
14 - .0.5.RELEASE.jar spring-boot-2.2.0.BUILD-20191016.163506-711.jar dom4j-  
15 - 2.1.0.jar spring-messaging-5.2.0.RELEASE.jar mybatis-3.4.6.jar jackson-  
16 - annotations-2.10.0.jar tomcat-embed-core-9.0.27.jar spring-cloud-netfli  
17 - x-eureka-client-2.1.5.BUILD-20200131.212304-596.jar stax2-api-4.2.jar s  
18 - pring-core-5.2.0.RELEASE.jar mybatis-spring-boot-starter-1.3.2.jar spri  
19 - ng-cloud-starter-netflix-archaius-2.1.5.BUILD-20200131.212322-596.jar r  
20 - ibbon-2.3.0.jar netflix-eventbus-0.3.0.jar spring-boot-starter-web-2.2.  
21 - 0.BUILD-20191016.163459-711.jar spring-web-5.2.0.RELEASE.jar spring-con  
22 - text-5.2.0.RELEASE.jar xstream-1.4.11.1.jar ojdbc6-11.2.0.4.0-atlassian  
23 - -hosted.jar spring-security-rsa-1.0.9.RELEASE.jar spring-boot-starter-w  
24 - ebsocket-2.2.0.BUILD-20191016.163500-711.jar commons-configuration-1.8.  
25 - jar slf4j-api-1.7.28.jar xercesImpl-2.11.0.jar ribbon-eureka-2.3.0.jar  
26 - ribbon-loadbalancer-2.3.0.jar spring-cloud-netflix-ribbon-2.1.5.BUILD-2  
27 - 0200131.211941-597.jar spring-boot-starter-jdbc-2.2.0.BUILD-20191016.16  
28 - 3441-713.jar spring-boot-starter-json-2.2.0.BUILD-20191016.163444-713.j  
29 - ar spring-cloud-commons-2.1.5.BUILD-20200131.003036-348.jar mybatis-spr  
30 - ing-boot-autoconfigure-1.3.2.jar spring-boot-autoconfigure-2.2.0.BUILD-  
31 - 20191016.163400-713.jar jsr311-api-1.1.1.jar commons-lang-2.6.jar antlr  
32 - -runtime-3.4.jar rxnetty-contexts-0.4.9.jar spring-boot-starter-tomcat-  
33 - 2.2.0.BUILD-20191016.163456-712.jar spring-boot-starter-validation-2.2.  
34 - 0.BUILD-20191016.163457-711.jar spring-boot-starter-aop-2.2.0.BUILD-201  
35 - 91016.163422-713.jar spring-cloud-starter-netflix-eureka-client-2.1.5.B  
36 - UILD-20200131.212334-596.jar thymeleaf-extras-java8time-3.0.4.RELEASE.j  
37 - ar jackson-module-parameter-names-2.10.0.jar aspectjweaver-1.9.4.jar je  
38 - rsey-client-1.19.1.jar stax-api-1.0.1.jar ribbon-httpclient-2.3.0.jar j  
39 - ettison-1.3.7.jar spring-aop-5.2.0.RELEASE.jar spring-cloud-context-2.1  
40 - .5.BUILD-20200131.002935-351.jar guava-16.0.jar commons-io-2.6.jar ribb  
41 - on-transport-2.3.0.jar annotations-19.0.0.jar httpcore-4.4.12.jar logba  
42 - ck-classic-1.2.3.jar log4j-to-slf4j-2.12.1.jar ribbon-core-2.3.0.jar co  
43 - mmons-math-2.2.jar HdrHistogram-2.1.9.jar xmlpull-1.1.3.1.jar jakarta.a  
44 - nnotation-api-1.3.5.jar httpclient-4.5.10.jar spring-websocket-5.2.0.RE  
45 - LEASE.jar HikariCP-3.4.1.jar spring-cloud-starter-2.1.5.BUILD-20200131.  
46 - 003057-348.jar archaius-core-0.7.6.jar spring-expression-5.2.0.RELEASE.  
47 - jar xpp3_min-1.1.4c.jar jackson-datatype-jdk8-2.10.0.jar antlr-2.7.7.ja  
48 - r servo-core-0.12.21.jar hystrix-core-1.5.18.jar gson-2.8.6.jar rxnetty  
49 - -servo-0.4.9.jar jersey-apache-client4-1.19.1.jar eureka-core-1.9.13.ja  
50 - r bcprov-jdk15on-1.64.jar druid-1.1.9.jar jackson-core-2.10.0.jar jakar  
51 - ta.validation-api-2.0.1.jar netflix-infix-0.3.0.jar nekohtml-1.9.22.jar  
52 - tomcat-embed-el-9.0.27.jar jboss-logging-3.4.1.Final.jar jul-to-slf4j-  
53 - 1.7.28.jar thymeleaf-spring5-3.0.11.RELEASE.jar netflix-statistics-0.1.  
54 - 1.jar spring-beans-5.2.0.RELEASE.jar aopalliance-1.0.jar tomcat-embed-w  
55 - ebsocket-9.0.27.jar classmate-1.5.0.jar spring-jcl-5.2.0.RELEASE.jar st  
56 - ringtemplate-3.2.1.jar spring-security-crypto-5.2.0.RELEASE.jar rxjava-  
57 - 1.3.8.jar xml-apis-1.4.01.jar spring-boot-starter-2.2.0.BUILD-20191016.  
58 - 163501-711.jar log4j-api-2.12.1.jar commons-collections-3.2.2.jar jacks  
59 - on-datatype-jsr310-2.10.0.jar spring-cloud-starter-netflix-ribbon-2.1.5  
60 - .BUILD-20200131.212329-596.jar jackson-databind-2.10.0.jar commons-code  
61 - c-1.13.jar jaxen-1.2.0.jar  
62 -  
@@ -7,6 +7,9 @@ package com.tianbo.analysis; @@ -7,6 +7,9 @@ package com.tianbo.analysis;
7 import org.mybatis.spring.annotation.MapperScan; 7 import org.mybatis.spring.annotation.MapperScan;
8 import org.springframework.boot.SpringApplication; 8 import org.springframework.boot.SpringApplication;
9 import org.springframework.boot.autoconfigure.SpringBootApplication; 9 import org.springframework.boot.autoconfigure.SpringBootApplication;
  10 +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  11 +import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
  12 +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
10 import org.springframework.boot.web.client.RestTemplateBuilder; 13 import org.springframework.boot.web.client.RestTemplateBuilder;
11 import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 14 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
12 import org.springframework.cloud.client.loadbalancer.LoadBalanced; 15 import org.springframework.cloud.client.loadbalancer.LoadBalanced;
@@ -18,11 +21,14 @@ import org.springframework.web.client.RestTemplate; @@ -18,11 +21,14 @@ import org.springframework.web.client.RestTemplate;
18 21
19 import java.time.Duration; 22 import java.time.Duration;
20 23
21 -@SpringBootApplication 24 +@SpringBootApplication(exclude = {
  25 + DataSourceAutoConfiguration.class,
  26 + DataSourceTransactionManagerAutoConfiguration.class,
  27 + HibernateJpaAutoConfiguration.class})
22 @EnableScheduling 28 @EnableScheduling
23 @EnableDiscoveryClient 29 @EnableDiscoveryClient
24 @EnableTransactionManagement 30 @EnableTransactionManagement
25 -@MapperScan("com.tianbo.analysis.dao") 31 +//@MapperScan("com.tianbo.analysis.dao")
26 public class BootApplication { 32 public class BootApplication {
27 33
28 public static void main(String[] args) { 34 public static void main(String[] args) {
1 -package com.tianbo.analysis.bean;  
2 -  
3 -import com.netflix.discovery.converters.Auto;  
4 -import com.tianbo.analysis.dao.*;  
5 -import com.tianbo.analysis.service.CustomMessageService;  
6 -import com.tianbo.analysis.service.SendLogService;  
7 -import org.springframework.beans.factory.annotation.Autowired;  
8 -import org.springframework.stereotype.Component;  
9 -  
10 -@Component  
11 -public class WlptBaseModel {  
12 -  
13 -  
14 - @Autowired  
15 - public ALLOCATEARRIVALMapper allocatearrivalMapper;  
16 -  
17 - @Autowired  
18 - public SendLogService sendLogService;  
19 -  
20 - @Autowired  
21 - public ARRIVEDMASTERMapper arrivedmasterMapper;  
22 -  
23 - @Autowired  
24 - public ARRIVEDSECONDARYMapper arrivedsecondaryMapper;  
25 -  
26 - @Autowired  
27 - public DEPARTURESLOADINGMapper departuresloadingMapper;  
28 -  
29 - @Autowired  
30 - public INPORTALLOCATEMapper inportallocateMapper;  
31 -  
32 - @Autowired  
33 - public INTERNATIONALTRANSITMapper internationaltransitMapper;  
34 -  
35 - @Autowired  
36 - public ORIGINMANIFESTMASTERMapper originmanifestmasterMapper;  
37 -  
38 - @Autowired  
39 - public OriginmanifestsecondaryMapper originmanifestsecondaryMapper;  
40 -  
41 - @Autowired  
42 - public PREPAREMASTERMapper preparemasterMapper;  
43 -  
44 - @Autowired  
45 - public PREPARESECONDARYMapper preparesecondaryMapper;  
46 -  
47 - @Autowired  
48 - public TALLYMASTERMapper tallymasterMapper;  
49 -  
50 - @Autowired  
51 - public TALLYSECONDARYMapper tallysecondaryMapper;  
52 -  
53 - @Autowired  
54 - public CUSTOMSMESSAGEMapper customsmessageMapper;  
55 -  
56 - @Autowired  
57 - public CustomMessageService customMessageService;  
58 -  
59 - @Autowired  
60 - public MANIFESTLOADMapper manifestloadMapper;  
61 -  
62 - @Autowired  
63 - public MANIFESTLOSTCHANGEMapper manifestlostchangeMapper;  
64 -  
65 -  
66 - public WlptBaseModel() {  
67 - //处理多线程时 springboot 无法注入bean的问题  
68 - if (allocatearrivalMapper==null){  
69 - allocatearrivalMapper = SpringBeanUtitl.getBean(ALLOCATEARRIVALMapper.class);  
70 - }  
71 - if (sendLogService==null){  
72 - sendLogService = SpringBeanUtitl.getBean(SendLogService.class);  
73 - }  
74 - if (arrivedmasterMapper==null){  
75 - arrivedmasterMapper = SpringBeanUtitl.getBean(ARRIVEDMASTERMapper.class);  
76 - }  
77 - if (arrivedsecondaryMapper==null){  
78 - arrivedsecondaryMapper= SpringBeanUtitl.getBean(ARRIVEDSECONDARYMapper.class);  
79 - }  
80 - if(departuresloadingMapper==null){  
81 - departuresloadingMapper = SpringBeanUtitl.getBean(DEPARTURESLOADINGMapper.class);  
82 - }  
83 - if(inportallocateMapper==null){  
84 - inportallocateMapper = SpringBeanUtitl.getBean(INPORTALLOCATEMapper.class);  
85 - }  
86 - if(internationaltransitMapper==null){  
87 - internationaltransitMapper = SpringBeanUtitl.getBean(INTERNATIONALTRANSITMapper.class);  
88 - }  
89 - if(originmanifestmasterMapper==null){  
90 - originmanifestmasterMapper = SpringBeanUtitl.getBean(ORIGINMANIFESTMASTERMapper.class);  
91 - }  
92 - if(originmanifestsecondaryMapper==null){  
93 - originmanifestsecondaryMapper = SpringBeanUtitl.getBean(OriginmanifestsecondaryMapper.class);  
94 - }  
95 - if(preparemasterMapper==null){  
96 - preparemasterMapper = SpringBeanUtitl.getBean(PREPAREMASTERMapper.class);  
97 - }  
98 - if(preparesecondaryMapper==null){  
99 - preparesecondaryMapper = SpringBeanUtitl.getBean(PREPARESECONDARYMapper.class);  
100 - }  
101 - if(tallymasterMapper==null){  
102 - tallymasterMapper = SpringBeanUtitl.getBean(TALLYMASTERMapper.class);  
103 - }  
104 - if(tallysecondaryMapper==null){  
105 - tallysecondaryMapper = SpringBeanUtitl.getBean(TALLYSECONDARYMapper.class);  
106 - }  
107 - if(customsmessageMapper==null){  
108 - customsmessageMapper = SpringBeanUtitl.getBean(CUSTOMSMESSAGEMapper.class);  
109 - }  
110 - if(customMessageService==null){  
111 - customMessageService = SpringBeanUtitl.getBean(CustomMessageService.class);  
112 - }  
113 - if(manifestloadMapper==null){  
114 - manifestloadMapper = SpringBeanUtitl.getBean(MANIFESTLOADMapper.class);  
115 - }  
116 - if(manifestlostchangeMapper==null){  
117 - manifestlostchangeMapper = SpringBeanUtitl.getBean(MANIFESTLOSTCHANGEMapper.class);  
118 - }  
119 -  
120 - }  
121 -  
122 - public static void init(){  
123 -  
124 - }  
125 -  
126 - public int masterAnalysisReception(){  
127 - return 0;  
128 - }  
129 -  
130 - public int secondAnalysisReception(){  
131 - return 0;  
132 - }  
133 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ALLOCATEARRIVAL;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface ALLOCATEARRIVALMapper {  
8 - int insert(ALLOCATEARRIVAL record);  
9 -  
10 - int insertSelective(ALLOCATEARRIVAL record);  
11 -  
12 - int updateRECEIPTION(ALLOCATEARRIVAL record);  
13 -  
14 - List<ALLOCATEARRIVAL> selectAutoIdByAwb(ALLOCATEARRIVAL record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ARRIVEDMASTER;  
4 -import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;  
5 -  
6 -import java.util.List;  
7 -  
8 -public interface ARRIVEDMASTERMapper {  
9 - int deleteByPrimaryKey(String autoid);  
10 -  
11 - int insert(ARRIVEDMASTER record);  
12 -  
13 - int insertSelective(ARRIVEDMASTER record);  
14 -  
15 - ARRIVEDMASTER selectByPrimaryKey(String autoid);  
16 -  
17 - int updateByPrimaryKeySelective(ARRIVEDMASTER record);  
18 -  
19 - int updateByPrimaryKey(ARRIVEDMASTER record);  
20 -  
21 - int insertRecept(ARRIVEDMASTER arrivedmaster);  
22 -  
23 - int updateRECEIPTION(ARRIVEDMASTER record);  
24 -  
25 - List<ARRIVEDMASTER> selectAutoIdByAwb(ARRIVEDMASTER record);  
26 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ARRIVEDSECONDARY;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface ARRIVEDSECONDARYMapper {  
8 - int insert(ARRIVEDSECONDARY record);  
9 -  
10 - int insertSelective(ARRIVEDSECONDARY record);  
11 -  
12 - int updateRECEIPTION(ARRIVEDSECONDARY record);  
13 -  
14 - List<ARRIVEDSECONDARY> selectAutoIdByawbAawbH(ARRIVEDSECONDARY record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.CUSTOMSMESSAGE;  
4 -import com.tianbo.analysis.model.CUSTOMSMESSAGEWithBLOBs;  
5 -  
6 -import java.util.List;  
7 -  
8 -public interface CUSTOMSMESSAGEMapper {  
9 - int insert(CUSTOMSMESSAGEWithBLOBs record);  
10 -  
11 - int insertSelective(CUSTOMSMESSAGEWithBLOBs record);  
12 -  
13 - List<CUSTOMSMESSAGEWithBLOBs> selectMessage(String messageId);  
14 -  
15 - int updateMessageByMessageid(CUSTOMSMESSAGE record);  
16 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.DEPARTURESLOADING;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface DEPARTURESLOADINGMapper {  
8 - int insert(DEPARTURESLOADING record);  
9 -  
10 - int insertSelective(DEPARTURESLOADING record);  
11 -  
12 - int updateRECEIPTION(DEPARTURESLOADING record);  
13 -  
14 - List<DEPARTURESLOADING> selectAutoIdByAwb(DEPARTURESLOADING record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.INPORTALLOCATE;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface INPORTALLOCATEMapper {  
8 - int insert(INPORTALLOCATE record);  
9 -  
10 - int insertSelective(INPORTALLOCATE record);  
11 -  
12 - int updateRECEIPTION(INPORTALLOCATE record);  
13 -  
14 - List<INPORTALLOCATE> selectAutoIdByAwb(INPORTALLOCATE record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.INTERNATIONALTRANSIT;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface INTERNATIONALTRANSITMapper {  
8 - int insert(INTERNATIONALTRANSIT record);  
9 -  
10 - int insertSelective(INTERNATIONALTRANSIT record);  
11 -  
12 - int updateRECEIPTION(INTERNATIONALTRANSIT record);  
13 -  
14 - List<INTERNATIONALTRANSIT> selectAutoIdByAwb(INTERNATIONALTRANSIT record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.MANIFESTLOAD;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface MANIFESTLOADMapper {  
8 - int insert(MANIFESTLOAD record);  
9 -  
10 - int insertSelective(MANIFESTLOAD record);  
11 -  
12 - int updateRECEIPTION(MANIFESTLOAD record);  
13 -  
14 - List<MANIFESTLOAD> selectAutoIdByawbAawbH(MANIFESTLOAD record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.MANIFESTLOSTCHANGE;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface MANIFESTLOSTCHANGEMapper {  
8 -  
9 - int insert(MANIFESTLOSTCHANGE record);  
10 -  
11 - int insertSelective(MANIFESTLOSTCHANGE record);  
12 -  
13 - int updateRECEIPTION(MANIFESTLOSTCHANGE record);  
14 -  
15 - List<MANIFESTLOSTCHANGE> selectAutoIdByawbAawbH(MANIFESTLOSTCHANGE record);  
16 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface ORIGINMANIFESTMASTERMapper {  
8 - int insert(ORIGINMANIFESTMASTER record);  
9 -  
10 - int insertSelective(ORIGINMANIFESTMASTER record);  
11 -  
12 - int updateRECEIPTION(ORIGINMANIFESTMASTER record);  
13 -  
14 - List<ORIGINMANIFESTMASTER> selectAutoIdByAwb(ORIGINMANIFESTMASTER record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.Originmanifestsecondary;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface OriginmanifestsecondaryMapper {  
8 - int insert(Originmanifestsecondary record);  
9 -  
10 - int insertSelective(Originmanifestsecondary record);  
11 -  
12 - int updateRECEIPTION(Originmanifestsecondary record);  
13 -  
14 - List<Originmanifestsecondary> selectAutoIdByawbAawbH(Originmanifestsecondary record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ARRIVEDMASTER;  
4 -import com.tianbo.analysis.model.PREPAREMASTER;  
5 -  
6 -import java.util.List;  
7 -  
8 -public interface PREPAREMASTERMapper {  
9 - int insert(PREPAREMASTER record);  
10 -  
11 - int insertSelective(PREPAREMASTER record);  
12 -  
13 - int updateRECEIPTION(PREPAREMASTER record);  
14 -  
15 - List<PREPAREMASTER> selectAutoIdByAwb(PREPAREMASTER record);  
16 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.ARRIVEDSECONDARY;  
4 -import com.tianbo.analysis.model.PREPARESECONDARY;  
5 -  
6 -import java.util.List;  
7 -  
8 -public interface PREPARESECONDARYMapper {  
9 - int deleteByPrimaryKey(Short id);  
10 -  
11 - int insert(PREPARESECONDARY record);  
12 -  
13 - int insertSelective(PREPARESECONDARY record);  
14 -  
15 - PREPARESECONDARY selectByPrimaryKey(Short id);  
16 -  
17 - int updateByPrimaryKeySelective(PREPARESECONDARY record);  
18 -  
19 - int updateByPrimaryKey(PREPARESECONDARY record);  
20 -  
21 - int updateRECEIPTION(PREPARESECONDARY record);  
22 -  
23 - List<PREPARESECONDARY> selectAutoIdByawbAawbH(PREPARESECONDARY record);  
24 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.SENDLOG;  
4 -  
5 -public interface SENDLOGMapper {  
6 - int insert(SENDLOG record);  
7 -  
8 - int insertSelective(SENDLOG record);  
9 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.TALLYMASTER;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface TALLYMASTERMapper {  
8 - int insert(TALLYMASTER record);  
9 -  
10 - int insertSelective(TALLYMASTER record);  
11 -  
12 - int updateRECEIPTION(TALLYMASTER record);  
13 -  
14 - List<TALLYMASTER> selectAutoIdByAwb(TALLYMASTER record);  
15 -}  
1 -package com.tianbo.analysis.dao;  
2 -  
3 -import com.tianbo.analysis.model.TALLYSECONDARY;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface TALLYSECONDARYMapper {  
8 - int insert(TALLYSECONDARY record);  
9 -  
10 - int insertSelective(TALLYSECONDARY record);  
11 -  
12 - int updateRECEIPTION(TALLYSECONDARY record);  
13 -  
14 - List<TALLYSECONDARY> selectAutoIdByawbAawbH(TALLYSECONDARY record);  
15 -}  
1 -package com.tianbo.analysis.handle;  
2 -  
3 -  
4 -import com.tianbo.analysis.model.Agent_Notice;  
5 -import com.tianbo.analysis.model.CustomReception;  
6 -import com.tianbo.analysis.tools.AWBTools;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -  
9 -import org.springframework.beans.factory.annotation.Autowired;  
10 -import org.springframework.http.client.SimpleClientHttpRequestFactory;  
11 -import org.springframework.stereotype.Component;  
12 -import org.springframework.web.client.RestTemplate;  
13 -  
14 -import javax.annotation.PostConstruct;  
15 -  
16 -  
17 -@Slf4j  
18 -@Component  
19 -public class AgentXmlHandle {  
20 -  
21 - private static AgentXmlHandle agentXmlHandle;  
22 -  
23 -  
24 - public void Http_resolver(CustomReception customReception){  
25 - try{  
26 - SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();  
27 - requestFactory.setConnectTimeout(5000);  
28 - requestFactory.setReadTimeout(5000);  
29 - RestTemplate restTemplate = new RestTemplate(requestFactory);  
30 -  
31 - String secondSplit = "_";  
32 - String waybillnosecondary="";  
33 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
34 - //取分单号  
35 - String[] awbhArr = customReception.getWayBillSecond().split("_");  
36 - waybillnosecondary = awbhArr[1];  
37 - }  
38 -  
39 - Agent_Notice notice = restTemplate.getForObject("http://10.50.3.73:1983/agent/receipt/a0608c4054662dd902e1314f7e450e3eaa81c114?message_type={1}&waybillNo={2}&waybillNoSub={3}&response_code={4}&response_text={5}"  
40 - , Agent_Notice.class,"MT2201", AWBTools.awbFormat(customReception.getWayBillMaster()),waybillnosecondary,customReception.getResponseCode(),customReception.getResponseText());  
41 - log.info(notice.toString());  
42 - }catch (Exception e){  
43 - log.error("链接代理人服务器超时或者接口异常,{}",e);  
44 - }  
45 -  
46 -  
47 - }  
48 -  
49 -}  
1 -package com.tianbo.analysis.handle;  
2 -  
3 -import com.tianbo.analysis.model.*;  
4 -import com.tianbo.analysis.service.CustomMessageService;  
5 -import com.tianbo.analysis.tools.AWBTools;  
6 -import com.tianbo.util.Date.DateUtil;  
7 -import com.tianbo.util.XML.XMLXPath;  
8 -import lombok.Data;  
9 -import lombok.extern.slf4j.Slf4j;  
10 -import org.apache.commons.io.FileExistsException;  
11 -import org.apache.commons.io.FileUtils;  
12 -import org.apache.commons.lang.StringUtils;  
13 -import org.dom4j.Document;  
14 -import org.dom4j.DocumentException;  
15 -import org.dom4j.Element;  
16 -import org.dom4j.io.SAXReader;  
17 -import org.springframework.beans.factory.annotation.Value;  
18 -import org.springframework.stereotype.Component;  
19 -import org.xml.sax.SAXParseException;  
20 -  
21 -import javax.annotation.PostConstruct;  
22 -import java.io.File;  
23 -import java.io.FileNotFoundException;  
24 -import java.io.IOException;  
25 -import java.io.UnsupportedEncodingException;  
26 -import java.util.concurrent.CountDownLatch;  
27 -  
28 -/**  
29 - * @author mrz  
30 - * @e  
31 - * 海关新舱单回执解析xml文件  
32 - */  
33 -@Data  
34 -@Component  
35 -@Slf4j  
36 -public class CustomXmlHandleThread implements Runnable{  
37 -  
38 - private CountDownLatch latch;  
39 - //备份目录  
40 - @Value("${custom.receptBakDir}")  
41 - private String bakupDir;  
42 -  
43 - //解析出错转移目录  
44 - @Value("${custom.errBakDir}")  
45 - private String errBakDir;  
46 -  
47 - //回执转发目录  
48 - @Value("${custom.transmitDir}")  
49 - private String transmitDir;  
50 -  
51 - //匹配技术回执正则  
52 - @Value("${custom.delTechnologyReceptMatch}")  
53 - private String delTechnologyReceptMatch;  
54 -  
55 - private File xmlfile;  
56 -  
57 - private static CustomXmlHandleThread customXmlHandle;  
58 - //海关新舱单回执报头  
59 - public final static String MessageID = "//Manifest/Head/MessageID";  
60 - public final static String FunctionCode = "//Manifest/Head/FunctionCode";  
61 - public final static String MessageType = "//Manifest/Head/MessageType";  
62 - public final static String SenderID = "//Manifest/Head/SenderID";  
63 - public final static String ReceiverID = "//Manifest/Head/ReceiverID";  
64 - public final static String SendTime = "//Manifest/Head/SendTime";  
65 - public final static String Version = "//Manifest/Head/Version";  
66 -  
67 -  
68 - /**  
69 - * 海关普通业务新舱单回执报体  
70 - */  
71 - public final static String JourneyID = "//Manifest/Response/BorderTransportMeans/JourneyID";  
72 - public final static String WaybillMaster = "//Manifest/Response/Consignment/TransportContractDocument/ID";  
73 - public final static String WaybillSecond = "//Manifest/Response/Consignment/AssociatedTransportDocument/ID";  
74 - public final static String ResponseCode = "//ResponseType/Code";  
75 - public final static String ResponseText = "//ResponseType/Text";  
76 -  
77 - /**  
78 - * 海关国际转运业务回执报体  
79 - */  
80 - public final static String ImportJourneyID = "//Manifest/Response/ImportInformation/BorderTransportMeans/JourneyID";  
81 - public final static String ImportWaybillMaster = "//Manifest/Response/ImportInformation/Consignment/TransportContractDocument/ID";  
82 - public final static String ExportJourneyID = "//Manifest/Response/ExportInformation/BorderTransportMeans/JourneyID";  
83 - public final static String ExportWaybillMaster = "//Manifest/Response/ExportInformation/Consignment/TransportContractDocument/ID";  
84 -// public final static String TransResponseCode = "//Manifest/Response/ResponseType/Code";  
85 -// public final static String TransResponseText = "//Manifest/Response/ResponseType/Text";  
86 - public final static String TransResponseCode = "//ResponseType/Code";  
87 - public final static String TransResponseText = "//ResponseType/Text";  
88 -  
89 -  
90 - //通过@PostConstruct实现初始化bean之前进行的操作,解决service调用空指针问题  
91 - @PostConstruct  
92 - public void init() {  
93 - customXmlHandle = this;  
94 -  
95 - customXmlHandle.bakupDir = this.bakupDir;  
96 -  
97 - customXmlHandle.errBakDir = this.errBakDir;  
98 -  
99 - customXmlHandle.delTechnologyReceptMatch = this.delTechnologyReceptMatch;  
100 -  
101 - customXmlHandle.transmitDir = this.transmitDir;  
102 -  
103 - // 初使化时将已静态化的testService实例化  
104 - }  
105 -  
106 - @Override  
107 - public void run() {  
108 - String filename = xmlfile.getName();  
109 - log.info("线程:{}开始",filename);  
110 - if(filename.matches(customXmlHandle.delTechnologyReceptMatch)){  
111 - log.warn("{}报文为技术回执,剪切到错误备份目录,不解析",filename);  
112 - errBak(xmlfile);  
113 - log.info("{}报文为技术回执,剪切备份成功..开始解析下一文件,当前线程即将结束",filename);  
114 - }  
115 - else  
116 - {  
117 - try{  
118 - //解析前先转发  
119 - FileUtils.copyFileToDirectory(xmlfile, new File(customXmlHandle.transmitDir));  
120 - int i =handelXmlDocument();  
121 - String today = DateUtil.getTodayBy_yyyyMMdd();  
122 - String backdireByDay = customXmlHandle.bakupDir + "/" + today;  
123 - //操作成功,则转移剪切解析文件到备份目录,否则转移到error目录备份  
124 - if(i>0){  
125 - File bakupDirectory = new File(backdireByDay);  
126 - //解析成功备份一份到备份目录  
127 - FileUtils.moveFileToDirectory(xmlfile,bakupDirectory,true);  
128 - }else {  
129 - errBak(xmlfile);  
130 - }  
131 - }catch (FileExistsException e){  
132 - log.error("错误的解析文件剪切失败,目标目录已存在同名文件");  
133 - }catch (Exception e){  
134 - log.error("错误的解析文件剪切失败,目标目录已存在同名文件",e);  
135 - errBak(xmlfile);  
136 - e.printStackTrace();  
137 - }  
138 -  
139 - }  
140 -  
141 - log.info("线程:{}结束",xmlfile.getName());  
142 - latch.countDown();  
143 - log.info("剩余线程数量{}",latch.getCount());  
144 - }  
145 - /**  
146 - *  
147 - *  
148 - * @return  
149 - * @throws DocumentException  
150 - * @throws UnsupportedEncodingException  
151 - * @throws SAXParseException  
152 - * @throws FileNotFoundException  
153 - */  
154 - private int handelXmlDocument() throws DocumentException,UnsupportedEncodingException,SAXParseException,FileNotFoundException {  
155 -  
156 - int i = 0;  
157 - String secondSplit = "_";  
158 - SAXReader saxReader = new SAXReader();  
159 - Document document = saxReader.read(xmlfile);  
160 - Element contentRoot = document.getRootElement();  
161 -  
162 - String flightNo = "UNKONW";  
163 - String flightDate = "20101010";  
164 -  
165 - //开始解析  
166 - String msgType = XMLXPath.getSingleValueByPath(document,MessageType);  
167 - String journeyid = XMLXPath.getSingleValueByPath(document,JourneyID);  
168 -// XMLXPath.getSingleValueByPath(document, )  
169 -  
170 -  
171 - String awbA = XMLXPath.getSingleValueByPath(document,WaybillMaster);  
172 - //全格式的分单 如 17212345678_ADBD  
173 - String awbH = XMLXPath.getSingleValueByPath(document,WaybillSecond);  
174 - String resCode = XMLXPath.getSingleValueByPath(document,ResponseCode);  
175 - String resText = XMLXPath.getSingleValueByPath(document,ResponseText);  
176 - String messageId = XMLXPath.getSingleValueByPath(document, MessageID);  
177 - String sendTime = XMLXPath.getSingleValueByPath(document,SendTime);  
178 - String sendId = XMLXPath.getSingleValueByPath(document,SenderID);  
179 - String reciveId = XMLXPath.getSingleValueByPath(document,ReceiverID);  
180 - String version = XMLXPath.getSingleValueByPath(document,Version);  
181 - String functionCode = XMLXPath.getSingleValueByPath(document,FunctionCode);  
182 -  
183 -  
184 -  
185 - CustomReception customReception = new CustomReception( msgType,  
186 - flightNo,  
187 - flightDate,  
188 - awbA,  
189 - awbH,  
190 - resCode,  
191 - resText,  
192 - messageId,  
193 - sendTime,  
194 - sendId,  
195 - reciveId,  
196 - version,  
197 - functionCode);  
198 -  
199 - /**  
200 - * 如果回执中没有携带航班信息节点,说明是出错报文  
201 - * 到发送日志表根据messageid 找到相应的发送日志报文的航班及运单信息,再进行解析  
202 - */  
203 - if(!StringUtils.isEmpty(journeyid)){  
204 -  
205 - String[] flightList = journeyid.split("/");  
206 - if(flightList.length > 0){  
207 - flightNo = flightList[0];  
208 - flightDate = flightList[1];  
209 - customReception.setFlightNo(flightNo);  
210 - customReception.setFlightDate(flightDate);  
211 - }  
212 - }else {  
213 - CUSTOMSMESSAGE customsmessage = new CUSTOMSMESSAGE();  
214 - customReception = customsmessage.getWaybillInfoByCutomResponse(customReception);  
215 - }  
216 -  
217 - switch (msgType){  
218 - case "MT9999":  
219 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
220 - PREPARESECONDARY preparesecondary = new PREPARESECONDARY(customReception);  
221 - int pre_i = preparesecondary.secondAnalysisReception();  
222 -  
223 - if (pre_i>0){  
224 - i=1;  
225 - }else {  
226 - ARRIVEDSECONDARY arrivedsecondary = new ARRIVEDSECONDARY(customReception);  
227 - int arr_i=arrivedsecondary.secondAnalysisReception();  
228 -  
229 - if (arr_i>0){  
230 - i= 1;  
231 - }else {  
232 - Originmanifestsecondary originmanifestsecondary = new Originmanifestsecondary(customReception);  
233 - int org_i=originmanifestsecondary.secondAnalysisReception();  
234 - if (org_i>0){  
235 - i=1;  
236 - }  
237 - }  
238 - }  
239 - }else{  
240 - ORIGINMANIFESTMASTER originmanifestmaster = new ORIGINMANIFESTMASTER(customReception);  
241 - PREPAREMASTER preparemaster= new PREPAREMASTER(customReception);  
242 - ARRIVEDMASTER arrivedmaster9999 = new ARRIVEDMASTER(customReception);  
243 - if(originmanifestmaster.masterAnalysisReception()>0){  
244 - i=1;  
245 - }else if(preparemaster.masterAnalysisReception()>0){  
246 - i=1;  
247 - }else {  
248 - i=arrivedmaster9999.masterAnalysisReception();  
249 - }  
250 - }  
251 - AgentXmlHandle agentXmlHandle=new AgentXmlHandle();  
252 - agentXmlHandle.Http_resolver(customReception);  
253 - break;  
254 - case "MT3201":  
255 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
256 - ARRIVEDSECONDARY arrivedsecondary = new ARRIVEDSECONDARY(customReception);  
257 - i=arrivedsecondary.secondAnalysisReception();  
258 - }else {  
259 - ARRIVEDMASTER arrivedmaster = new ARRIVEDMASTER(customReception);  
260 - i=arrivedmaster.masterAnalysisReception();  
261 - }  
262 - break;  
263 - case "MT5202":  
264 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
265 - TALLYSECONDARY tallysecondary = new TALLYSECONDARY(customReception);  
266 - i=tallysecondary.secondAnalysisReception();  
267 - }else {  
268 - TALLYMASTER tallymaster= new TALLYMASTER(customReception);  
269 - i = tallymaster.masterAnalysisReception();  
270 - }  
271 - break;  
272 - case "MT5201":  
273 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
274 - TALLYSECONDARY tallysecondary = new TALLYSECONDARY(customReception);  
275 - i=tallysecondary.secondAnalysisReception();  
276 - }else {  
277 - TALLYMASTER tallymaster= new TALLYMASTER(customReception);  
278 - i = tallymaster.masterAnalysisReception();  
279 - }  
280 - break;  
281 - case "MT4201":  
282 - DEPARTURESLOADING departuresloading = new DEPARTURESLOADING(customReception);  
283 - i=departuresloading.masterAnalysisReception();  
284 - break;  
285 - case "MT1201":  
286 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
287 - Originmanifestsecondary originmanifestsecondary = new Originmanifestsecondary(customReception);  
288 - i=originmanifestsecondary.secondAnalysisReception();  
289 - }else {  
290 - ORIGINMANIFESTMASTER originmanifestmaster1201 = new ORIGINMANIFESTMASTER(customReception);  
291 - i = originmanifestmaster1201.masterAnalysisReception();  
292 - }  
293 - break;  
294 - case "MT2201":  
295 - if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){  
296 - PREPARESECONDARY preparesecondary = new PREPARESECONDARY(customReception);  
297 - i = preparesecondary.secondAnalysisReception();  
298 - }else {  
299 - PREPAREMASTER preparemaster1201= new PREPAREMASTER(customReception);  
300 - i = preparemaster1201.masterAnalysisReception();  
301 - }  
302 - break;  
303 - case "MT6202":  
304 - INPORTALLOCATE inportallocate = new INPORTALLOCATE(customReception);  
305 - i = inportallocate.masterAnalysisReception();  
306 - break;  
307 - case "MT3202":  
308 - ALLOCATEARRIVAL allocatearrival = new ALLOCATEARRIVAL(customReception);  
309 - i= allocatearrival.masterAnalysisReception();  
310 - break;  
311 - case "MT8205":  
312 - i = transXmlHandel(document,customReception);  
313 - break;  
314 - case "MT8202":  
315 - MANIFESTLOAD manifestload = new MANIFESTLOAD(customReception);  
316 - i= manifestload.secondAnalysisReception();  
317 - break;  
318 - case "MT8203":  
319 - MANIFESTLOSTCHANGE manifestlostchange = new MANIFESTLOSTCHANGE(customReception);  
320 - i= manifestlostchange.secondAnalysisReception();  
321 - break;  
322 - default:  
323 - break;  
324 -  
325 - }  
326 -  
327 - updateCustomMessage(customReception);  
328 - return i;  
329 -  
330 - }  
331 -  
332 - /**  
333 - * 国际转运回执处理,特殊业务  
334 - * @param document  
335 - * @param customReception  
336 - * @return  
337 - */  
338 - private int transXmlHandel(Document document,CustomReception customReception){  
339 -  
340 - String importJourneyID = XMLXPath.getSingleValueByPath(document,ImportJourneyID);  
341 - String importFlightNo = "UNKONW";  
342 - String importFlightDate = "20101010";  
343 - if(!StringUtils.isEmpty(importJourneyID)){  
344 - importFlightNo = AWBTools.splitFlightAndDate(importJourneyID)[0];  
345 - importFlightDate = AWBTools.splitFlightAndDate(importJourneyID)[1];  
346 - }  
347 -  
348 -  
349 - String importWaybillMaster= XMLXPath.getSingleValueByPath(document,ImportWaybillMaster);  
350 - String transResponseCode=XMLXPath.getSingleValueByPath(document,TransResponseCode);  
351 - String transResponseText=XMLXPath.getSingleValueByPath(document,TransResponseText);  
352 - CustomReception transCustomReception = new CustomReception( customReception.getMessageType(),  
353 - importFlightNo,  
354 - importFlightDate,  
355 - importWaybillMaster,  
356 - transResponseCode,  
357 - transResponseText,  
358 - customReception.getMessageID(),  
359 - customReception.getSendTime(),  
360 - customReception.getSenderID(),  
361 - customReception.getReceiverID(),  
362 - customReception.getVersion(),  
363 - customReception.getFunctionCode());  
364 - INTERNATIONALTRANSIT internationaltransit = new INTERNATIONALTRANSIT(transCustomReception);  
365 -  
366 - int i=internationaltransit.masterAnalysisReception();  
367 -  
368 - return i;  
369 -  
370 - }  
371 -  
372 - private int updateCustomMessage(CustomReception customReception){  
373 - CUSTOMSMESSAGE customsmessage = new CUSTOMSMESSAGE(customReception);  
374 - return customsmessage.updateMessageByMessageid();  
375 - }  
376 -  
377 - private void errBak(File file){  
378 - try {  
379 - String today = DateUtil.getTodayBy_yyyyMMdd();  
380 - String errDirByDay = customXmlHandle.errBakDir + "/" + today;  
381 - File berrDirectory = new File(errDirByDay);  
382 - FileUtils.moveFileToDirectory(file,berrDirectory,true);  
383 - log.info("数据库未找到与回执适配的信息备份文件:{}:",file.getName());  
384 - }catch (FileExistsException e){  
385 - log.error("备份解析错误文件失败,目标文件夹存在同名文件{}",file.getName());  
386 - }catch (Exception e){  
387 - e.printStackTrace();  
388 - }  
389 - }  
390 -  
391 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class ALLOCATEARRIVAL extends WlptBaseModel{  
16 -  
17 - private String id;  
18 -  
19 - private Date createdate;  
20 -  
21 - private String waybillno;  
22 -  
23 - private String carrier;  
24 -  
25 - private String flightno;  
26 -  
27 - private Date flightdate;  
28 -  
29 - private String customos;  
30 -  
31 - private String arrivalpieces;  
32 -  
33 - private String arrivalweight;  
34 -  
35 - private String unloadingland;  
36 -  
37 - private String productcode;  
38 -  
39 - private String status;  
40 -  
41 - private String receiptinformation;  
42 -  
43 -  
44 -  
45 - public ALLOCATEARRIVAL(){  
46 -  
47 - }  
48 -  
49 - public ALLOCATEARRIVAL(CustomReception customReception){  
50 - this.waybillno = customReception.getWayBillMaster();  
51 - this.receiptinformation = customReception.getResponseText();  
52 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
53 - String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());  
54 - this.setFlightno(flightInfo[1]);  
55 - this.setCarrier(flightInfo[0]);  
56 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
57 - this.setFlightdate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));  
58 - }  
59 -  
60 - }  
61 -  
62 - public String getId() {  
63 - return id;  
64 - }  
65 -  
66 - public void setId(String id) {  
67 - this.id = id == null ? null : id.trim();  
68 - }  
69 -  
70 - public Date getCreatedate() {  
71 - return createdate;  
72 - }  
73 -  
74 - public void setCreatedate(Date createdate) {  
75 - this.createdate = createdate;  
76 - }  
77 -  
78 - public String getWaybillno() {  
79 - return waybillno;  
80 - }  
81 -  
82 - public void setWaybillno(String waybillno) {  
83 - this.waybillno = waybillno == null ? null : waybillno.trim();  
84 - }  
85 -  
86 - public String getCarrier() {  
87 - return carrier;  
88 - }  
89 -  
90 - public void setCarrier(String carrier) {  
91 - this.carrier = carrier == null ? null : carrier.trim();  
92 - }  
93 -  
94 - public String getFlightno() {  
95 - return flightno;  
96 - }  
97 -  
98 - public void setFlightno(String flightno) {  
99 - this.flightno = flightno == null ? null : flightno.trim();  
100 - }  
101 -  
102 - public Date getFlightdate() {  
103 - return flightdate;  
104 - }  
105 -  
106 - public void setFlightdate(Date flightdate) {  
107 - this.flightdate = flightdate;  
108 - }  
109 -  
110 - public String getCustomos() {  
111 - return customos;  
112 - }  
113 -  
114 - public void setCustomos(String customos) {  
115 - this.customos = customos == null ? null : customos.trim();  
116 - }  
117 -  
118 - public String getArrivalpieces() {  
119 - return arrivalpieces;  
120 - }  
121 -  
122 - public void setArrivalpieces(String arrivalpieces) {  
123 - this.arrivalpieces = arrivalpieces == null ? null : arrivalpieces.trim();  
124 - }  
125 -  
126 - public String getArrivalweight() {  
127 - return arrivalweight;  
128 - }  
129 -  
130 - public void setArrivalweight(String arrivalweight) {  
131 - this.arrivalweight = arrivalweight == null ? null : arrivalweight.trim();  
132 - }  
133 -  
134 - public String getUnloadingland() {  
135 - return unloadingland;  
136 - }  
137 -  
138 - public void setUnloadingland(String unloadingland) {  
139 - this.unloadingland = unloadingland == null ? null : unloadingland.trim();  
140 - }  
141 -  
142 - public String getProductcode() {  
143 - return productcode;  
144 - }  
145 -  
146 - public void setProductcode(String productcode) {  
147 - this.productcode = productcode == null ? null : productcode.trim();  
148 - }  
149 -  
150 - public String getStatus() {  
151 - return status;  
152 - }  
153 -  
154 - public void setStatus(String status) {  
155 - this.status = status == null ? null : status.trim();  
156 - }  
157 -  
158 - public String getReceiptinformation() {  
159 - return receiptinformation;  
160 - }  
161 -  
162 - public void setReceiptinformation(String receiptinformation) {  
163 - this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();  
164 - }  
165 -  
166 - @Override  
167 - public int masterAnalysisReception(){  
168 -  
169 - int i= allocatearrivalMapper.updateRECEIPTION(this);  
170 - //获取主单autoid  
171 - List<ALLOCATEARRIVAL> arrivedmasterList = allocatearrivalMapper.selectAutoIdByAwb(this);  
172 - if(!arrivedmasterList.isEmpty()){  
173 - ALLOCATEARRIVAL departuresloading1 = arrivedmasterList.get(0);  
174 - String autoId = departuresloading1.getId();  
175 -  
176 - //插入sendlog记录表  
177 - log.info("即将插入回执日志运单号为:"+waybillno+"->id="+autoId);  
178 - int ii =sendLogService.insertSendlog("MT3202",receiptinformation,autoId);  
179 -  
180 - if (i>0 && ii>0){  
181 - log.info("运单号 {} 分拨运抵回执更新成功",waybillno);  
182 - return 1;  
183 - }  
184 - }  
185 - return 0;  
186 - }  
187 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class ARRIVEDMASTER extends WlptBaseModel {  
16 -  
17 - private String autoid;  
18 -  
19 - private String waybillnomaster;  
20 -  
21 - private String tcdName;  
22 -  
23 - private String tcdTypecode;  
24 -  
25 - private String flightno;  
26 -  
27 - private Date flightDate;  
28 -  
29 - private String carrier;  
30 -  
31 - private String originatingstation;  
32 -  
33 - private String oName;  
34 -  
35 - private String destinationstation;  
36 -  
37 - private String fdName;  
38 -  
39 - private String arrivedtotalpiece;  
40 -  
41 - private String totalpiecequantity;  
42 -  
43 - private String arrivedtotalweight;  
44 -  
45 - private String grossweightmeasureuc;  
46 -  
47 - private String totalgrossweightmeasure;  
48 -  
49 - private String totalgrossweightmeasureuc;  
50 -  
51 - private String chargeableweightmeasure;  
52 -  
53 - private String chargeableweightmeasureuc;  
54 -  
55 - private Date arriveddate;  
56 -  
57 - private String transportsplitdescription;  
58 -  
59 - private String customscode;  
60 -  
61 - private String productname;  
62 -  
63 - private String status;  
64 -  
65 - private String receiptinformation;  
66 -  
67 - private Date createdate;  
68 -  
69 - public ARRIVEDMASTER() {  
70 -  
71 - }  
72 -  
73 - public ARRIVEDMASTER(CustomReception customReception) {  
74 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
75 -  
76 - String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());  
77 - this.setFlightno(flightInfo[1]);  
78 - this.setCarrier(flightInfo[0]);  
79 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
80 - this.setFlightDate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));  
81 - }  
82 -  
83 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
84 - this.receiptinformation = customReception.getResponseText();  
85 - }  
86 -  
87 - @Override  
88 - public int masterAnalysisReception() {  
89 - //更新主单回执  
90 - int i = arrivedmasterMapper.updateRECEIPTION(this);  
91 - //获取分单autoid  
92 - List<ARRIVEDMASTER> arrivedmasterList = arrivedmasterMapper.selectAutoIdByAwb(this);  
93 - if(!arrivedmasterList.isEmpty()){  
94 - ARRIVEDMASTER originMaster = arrivedmasterList.get(0);  
95 - String autoId = originMaster.getAutoid();  
96 -  
97 - //插入sendlog记录表  
98 - log.info("即将插入回执日志运单号为:"+waybillnomaster+"->autoid="+autoId);  
99 - int ii =sendLogService.insertSendlog("MT3201",receiptinformation,autoId);  
100 -  
101 -  
102 - if (i>0 && ii>0){  
103 - log.info("运单号 {} 运抵回执更新成功",waybillnomaster);  
104 - return 1;  
105 - }  
106 - }  
107 - return 0;  
108 - }  
109 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class ARRIVEDSECONDARY extends WlptBaseModel {  
16 - private String autoid;  
17 -  
18 - private String waybillnomaster;  
19 -  
20 - private String tcdName;  
21 -  
22 - private String tcdTypecode;  
23 -  
24 - private String waybillnosecondary;  
25 -  
26 - private String carrier;  
27 -  
28 - private String oId;  
29 -  
30 - private String oName;  
31 -  
32 - private String fdId;  
33 -  
34 - private String fdName;  
35 -  
36 - private String flightno;  
37 -  
38 - private Date flightdate;  
39 -  
40 - private String arrivedtotalpiece;  
41 -  
42 - private String totalpiecequantity;  
43 -  
44 - private String arrivedtotalweight;  
45 -  
46 - private String grossweightmeasureuc;  
47 -  
48 - private String totalgrossweightmeasure;  
49 -  
50 - private String totalgrossweightmeasureuc;  
51 -  
52 - private String chargeableweightmeasure;  
53 -  
54 - private String chargeableweightmeasureuc;  
55 -  
56 - private Date arriveddate;  
57 -  
58 - private String customscode;  
59 -  
60 - private String productname;  
61 -  
62 - private Date createdate;  
63 -  
64 - private String arrivedmasterid;  
65 -  
66 - private String transportsplitdescription;  
67 -  
68 - private String receiption;  
69 -  
70 - private String status;  
71 -  
72 - public String getAutoid() {  
73 - return autoid;  
74 - }  
75 -  
76 - public void setAutoid(String autoid) {  
77 - this.autoid = autoid == null ? null : autoid.trim();  
78 - }  
79 -  
80 - public String getWaybillnomaster() {  
81 - return waybillnomaster;  
82 - }  
83 -  
84 - public void setWaybillnomaster(String waybillnomaster) {  
85 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
86 - }  
87 -  
88 - public String getTcdName() {  
89 - return tcdName;  
90 - }  
91 -  
92 - public void setTcdName(String tcdName) {  
93 - this.tcdName = tcdName == null ? null : tcdName.trim();  
94 - }  
95 -  
96 - public String getTcdTypecode() {  
97 - return tcdTypecode;  
98 - }  
99 -  
100 - public void setTcdTypecode(String tcdTypecode) {  
101 - this.tcdTypecode = tcdTypecode == null ? null : tcdTypecode.trim();  
102 - }  
103 -  
104 - public String getWaybillnosecondary() {  
105 - return waybillnosecondary;  
106 - }  
107 -  
108 - public void setWaybillnosecondary(String waybillnosecondary) {  
109 - this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();  
110 - }  
111 -  
112 - public String getCarrier() {  
113 - return carrier;  
114 - }  
115 -  
116 - public void setCarrier(String carrier) {  
117 - this.carrier = carrier == null ? null : carrier.trim();  
118 - }  
119 -  
120 - public String getoId() {  
121 - return oId;  
122 - }  
123 -  
124 - public void setoId(String oId) {  
125 - this.oId = oId == null ? null : oId.trim();  
126 - }  
127 -  
128 - public String getoName() {  
129 - return oName;  
130 - }  
131 -  
132 - public void setoName(String oName) {  
133 - this.oName = oName == null ? null : oName.trim();  
134 - }  
135 -  
136 - public String getFdId() {  
137 - return fdId;  
138 - }  
139 -  
140 - public void setFdId(String fdId) {  
141 - this.fdId = fdId == null ? null : fdId.trim();  
142 - }  
143 -  
144 - public String getFdName() {  
145 - return fdName;  
146 - }  
147 -  
148 - public void setFdName(String fdName) {  
149 - this.fdName = fdName == null ? null : fdName.trim();  
150 - }  
151 -  
152 - public String getFlightno() {  
153 - return flightno;  
154 - }  
155 -  
156 - public void setFlightno(String flightno) {  
157 - this.flightno = flightno == null ? null : flightno.trim();  
158 - }  
159 -  
160 - public Date getFlightdate() {  
161 - return flightdate;  
162 - }  
163 -  
164 - public void setFlightdate(Date flightdate) {  
165 - this.flightdate = flightdate;  
166 - }  
167 -  
168 - public String getArrivedtotalpiece() {  
169 - return arrivedtotalpiece;  
170 - }  
171 -  
172 - public void setArrivedtotalpiece(String arrivedtotalpiece) {  
173 - this.arrivedtotalpiece = arrivedtotalpiece == null ? null : arrivedtotalpiece.trim();  
174 - }  
175 -  
176 - public String getTotalpiecequantity() {  
177 - return totalpiecequantity;  
178 - }  
179 -  
180 - public void setTotalpiecequantity(String totalpiecequantity) {  
181 - this.totalpiecequantity = totalpiecequantity == null ? null : totalpiecequantity.trim();  
182 - }  
183 -  
184 - public String getArrivedtotalweight() {  
185 - return arrivedtotalweight;  
186 - }  
187 -  
188 - public void setArrivedtotalweight(String arrivedtotalweight) {  
189 - this.arrivedtotalweight = arrivedtotalweight == null ? null : arrivedtotalweight.trim();  
190 - }  
191 -  
192 - public String getGrossweightmeasureuc() {  
193 - return grossweightmeasureuc;  
194 - }  
195 -  
196 - public void setGrossweightmeasureuc(String grossweightmeasureuc) {  
197 - this.grossweightmeasureuc = grossweightmeasureuc == null ? null : grossweightmeasureuc.trim();  
198 - }  
199 -  
200 - public String getTotalgrossweightmeasure() {  
201 - return totalgrossweightmeasure;  
202 - }  
203 -  
204 - public void setTotalgrossweightmeasure(String totalgrossweightmeasure) {  
205 - this.totalgrossweightmeasure = totalgrossweightmeasure == null ? null : totalgrossweightmeasure.trim();  
206 - }  
207 -  
208 - public String getTotalgrossweightmeasureuc() {  
209 - return totalgrossweightmeasureuc;  
210 - }  
211 -  
212 - public void setTotalgrossweightmeasureuc(String totalgrossweightmeasureuc) {  
213 - this.totalgrossweightmeasureuc = totalgrossweightmeasureuc == null ? null : totalgrossweightmeasureuc.trim();  
214 - }  
215 -  
216 - public String getChargeableweightmeasure() {  
217 - return chargeableweightmeasure;  
218 - }  
219 -  
220 - public void setChargeableweightmeasure(String chargeableweightmeasure) {  
221 - this.chargeableweightmeasure = chargeableweightmeasure == null ? null : chargeableweightmeasure.trim();  
222 - }  
223 -  
224 - public String getChargeableweightmeasureuc() {  
225 - return chargeableweightmeasureuc;  
226 - }  
227 -  
228 - public void setChargeableweightmeasureuc(String chargeableweightmeasureuc) {  
229 - this.chargeableweightmeasureuc = chargeableweightmeasureuc == null ? null : chargeableweightmeasureuc.trim();  
230 - }  
231 -  
232 - public Date getArriveddate() {  
233 - return arriveddate;  
234 - }  
235 -  
236 - public void setArriveddate(Date arriveddate) {  
237 - this.arriveddate = arriveddate;  
238 - }  
239 -  
240 - public String getCustomscode() {  
241 - return customscode;  
242 - }  
243 -  
244 - public void setCustomscode(String customscode) {  
245 - this.customscode = customscode == null ? null : customscode.trim();  
246 - }  
247 -  
248 - public String getProductname() {  
249 - return productname;  
250 - }  
251 -  
252 - public void setProductname(String productname) {  
253 - this.productname = productname == null ? null : productname.trim();  
254 - }  
255 -  
256 - public Date getCreatedate() {  
257 - return createdate;  
258 - }  
259 -  
260 - public void setCreatedate(Date createdate) {  
261 - this.createdate = createdate;  
262 - }  
263 -  
264 - public String getArrivedmasterid() {  
265 - return arrivedmasterid;  
266 - }  
267 -  
268 - public void setArrivedmasterid(String arrivedmasterid) {  
269 - this.arrivedmasterid = arrivedmasterid == null ? null : arrivedmasterid.trim();  
270 - }  
271 -  
272 - public String getTransportsplitdescription() {  
273 - return transportsplitdescription;  
274 - }  
275 -  
276 - public void setTransportsplitdescription(String transportsplitdescription) {  
277 - this.transportsplitdescription = transportsplitdescription == null ? null : transportsplitdescription.trim();  
278 - }  
279 -  
280 - public String getReceiption() {  
281 - return receiption;  
282 - }  
283 -  
284 - public void setReceiption(String receiption) {  
285 - this.receiption = receiption == null ? null : receiption.trim();  
286 - }  
287 -  
288 - public String getStatus() {  
289 - return status;  
290 - }  
291 -  
292 - public void setStatus(String status) {  
293 - this.status = status == null ? null : status.trim();  
294 - }  
295 -  
296 - public ARRIVEDSECONDARY() {  
297 - }  
298 -  
299 - public ARRIVEDSECONDARY(CustomReception customReception) {  
300 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
301 - //取分单号  
302 - String[] awbhArr = customReception.getWayBillSecond().split("_");  
303 - this.waybillnosecondary = awbhArr[1];  
304 - String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());  
305 - this.setFlightno(flightInfo[1]);  
306 - this.setCarrier(flightInfo[0]);  
307 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
308 - this.setFlightdate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));  
309 - }  
310 - this.receiption = customReception.getResponseText();  
311 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
312 - }  
313 -  
314 - @Override  
315 - public int secondAnalysisReception() {  
316 - //更新分单回执  
317 - int i = arrivedsecondaryMapper.updateRECEIPTION(this);  
318 - //获取分单autoid  
319 - List<ARRIVEDSECONDARY> arrivedsecondaryList = arrivedsecondaryMapper.selectAutoIdByawbAawbH(this);  
320 - if(!arrivedsecondaryList.isEmpty()){  
321 - ARRIVEDSECONDARY arrivedSecond = arrivedsecondaryList.get(0);  
322 - String autoId = arrivedSecond.getAutoid();  
323 - //插入sendlog记录表  
324 - log.info("即将插入回执日志运单号为:{}{},->autoid={}",waybillnomaster,waybillnosecondary,autoId);  
325 - int ii = sendLogService.insertSendlog("MT3201",receiption,autoId);  
326 -  
327 - //todo:同时更新发送日志表的回执信息  
328 -  
329 -  
330 - if (i>0 && ii>0 ){  
331 - log.info("运单号 {} 运抵分单回执更新成功",waybillnosecondary);  
332 - return 1;  
333 - }  
334 - }else {  
335 - //todo:如果都没适配到的话,要从发送日志表里面通过回执中的messageid 找到发送信息,适配回执  
336 - }  
337 - return 0;  
338 -  
339 -  
340 - }  
341 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import lombok.Data;  
4 -  
5 -@Data  
6 -public class Agent_Notice {  
7 - private int status;  
8 - private int code;  
9 - private String msg;  
10 - private Object data;  
11 - private int page;  
12 - private int count;  
13 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.util.Date.DateUtil;  
5 -import lombok.Data;  
6 -import lombok.extern.slf4j.Slf4j;  
7 -  
8 -import java.math.BigDecimal;  
9 -import java.util.Date;  
10 -  
11 -@Data  
12 -@Slf4j  
13 -public class CUSTOMSMESSAGE extends WlptBaseModel {  
14 - private String autoid;  
15 -  
16 - private String messageid;  
17 -  
18 - private String messagetype;  
19 -  
20 - private String messagestatus;  
21 -  
22 - private Date sendtime;  
23 -  
24 - private Date receivetime;  
25 -  
26 - private String objectid;  
27 -  
28 - private String flightno;  
29 -  
30 - private Date flightdate;  
31 -  
32 - private String masterautoid;  
33 -  
34 - private String waybillnomaster;  
35 -  
36 - private String secondaryautoid;  
37 -  
38 - private String waybillnosecondary;  
39 -  
40 - private BigDecimal pcs;  
41 -  
42 - private BigDecimal wt;  
43 -  
44 - private String responsecode;  
45 -  
46 - private String responsetext;  
47 -  
48 - private Date createtime;  
49 -  
50 - public String getAutoid() {  
51 - return autoid;  
52 - }  
53 -  
54 - public void setAutoid(String autoid) {  
55 - this.autoid = autoid == null ? null : autoid.trim();  
56 - }  
57 -  
58 - public String getMessageid() {  
59 - return messageid;  
60 - }  
61 -  
62 - public void setMessageid(String messageid) {  
63 - this.messageid = messageid == null ? null : messageid.trim();  
64 - }  
65 -  
66 - public String getMessagetype() {  
67 - return messagetype;  
68 - }  
69 -  
70 - public void setMessagetype(String messagetype) {  
71 - this.messagetype = messagetype == null ? null : messagetype.trim();  
72 - }  
73 -  
74 - public String getMessagestatus() {  
75 - return messagestatus;  
76 - }  
77 -  
78 - public void setMessagestatus(String messagestatus) {  
79 - this.messagestatus = messagestatus == null ? null : messagestatus.trim();  
80 - }  
81 -  
82 - public Date getSendtime() {  
83 - return sendtime;  
84 - }  
85 -  
86 - public void setSendtime(Date sendtime) {  
87 - this.sendtime = sendtime;  
88 - }  
89 -  
90 - public Date getReceivetime() {  
91 - return receivetime;  
92 - }  
93 -  
94 - public void setReceivetime(Date receivetime) {  
95 - this.receivetime = receivetime;  
96 - }  
97 -  
98 - public String getObjectid() {  
99 - return objectid;  
100 - }  
101 -  
102 - public void setObjectid(String objectid) {  
103 - this.objectid = objectid == null ? null : objectid.trim();  
104 - }  
105 -  
106 - public String getFlightno() {  
107 - return flightno;  
108 - }  
109 -  
110 - public void setFlightno(String flightno) {  
111 - this.flightno = flightno == null ? null : flightno.trim();  
112 - }  
113 -  
114 - public Date getFlightdate() {  
115 - return flightdate;  
116 - }  
117 -  
118 - public void setFlightdate(Date flightdate) {  
119 - this.flightdate = flightdate;  
120 - }  
121 -  
122 - public String getMasterautoid() {  
123 - return masterautoid;  
124 - }  
125 -  
126 - public void setMasterautoid(String masterautoid) {  
127 - this.masterautoid = masterautoid == null ? null : masterautoid.trim();  
128 - }  
129 -  
130 - public String getWaybillnomaster() {  
131 - return waybillnomaster;  
132 - }  
133 -  
134 - public void setWaybillnomaster(String waybillnomaster) {  
135 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
136 - }  
137 -  
138 - public String getSecondaryautoid() {  
139 - return secondaryautoid;  
140 - }  
141 -  
142 - public void setSecondaryautoid(String secondaryautoid) {  
143 - this.secondaryautoid = secondaryautoid == null ? null : secondaryautoid.trim();  
144 - }  
145 -  
146 - public String getWaybillnosecondary() {  
147 - return waybillnosecondary;  
148 - }  
149 -  
150 - public void setWaybillnosecondary(String waybillnosecondary) {  
151 - this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();  
152 - }  
153 -  
154 - public BigDecimal getPcs() {  
155 - return pcs;  
156 - }  
157 -  
158 - public void setPcs(BigDecimal pcs) {  
159 - this.pcs = pcs;  
160 - }  
161 -  
162 - public BigDecimal getWt() {  
163 - return wt;  
164 - }  
165 -  
166 - public void setWt(BigDecimal wt) {  
167 - this.wt = wt;  
168 - }  
169 -  
170 - public String getResponsecode() {  
171 - return responsecode;  
172 - }  
173 -  
174 - public void setResponsecode(String responsecode) {  
175 - this.responsecode = responsecode == null ? null : responsecode.trim();  
176 - }  
177 -  
178 - public String getResponsetext() {  
179 - return responsetext;  
180 - }  
181 -  
182 - public void setResponsetext(String responsetext) {  
183 - this.responsetext = responsetext == null ? null : responsetext.trim();  
184 - }  
185 -  
186 - public Date getCreatetime() {  
187 - return createtime;  
188 - }  
189 -  
190 - public void setCreatetime(Date createtime) {  
191 - this.createtime = createtime;  
192 - }  
193 -  
194 - public CUSTOMSMESSAGE(){  
195 -  
196 - }  
197 - public CUSTOMSMESSAGE(CustomReception customReception) {  
198 - this.messageid = customReception.getMessageID();  
199 - this.messagetype = customReception.getMessageType();  
200 - this.receivetime = new Date();  
201 - this.flightno = customReception.getFlightNo();  
202 - this.flightdate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());  
203 - this.waybillnomaster = customReception.getWayBillMaster();  
204 - this.waybillnosecondary = customReception.getWayBillSecond();  
205 - this.responsecode = customReception.getResponseCode();  
206 - this.responsetext = customReception.getResponseText();  
207 - this.messagestatus = "3";  
208 - }  
209 -  
210 - public CustomReception getWaybillInfoByCutomResponse(CustomReception customReception){  
211 - return customMessageService.getWaybillInfoByCutomResponse(customReception);  
212 - }  
213 -  
214 - public int updateMessageByMessageid(){  
215 - return customsmessageMapper.updateMessageByMessageid(this);  
216 - }  
217 -  
218 -  
219 -  
220 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.util.Date.DateUtil;  
4 -  
5 -import java.util.Date;  
6 -  
7 -public class CUSTOMSMESSAGEWithBLOBs extends CUSTOMSMESSAGE {  
8 - private String messagecontent;  
9 -  
10 - private String receivecontent;  
11 -  
12 - public String getMessagecontent() {  
13 - return messagecontent;  
14 - }  
15 -  
16 - public void setMessagecontent(String messagecontent) {  
17 - this.messagecontent = messagecontent == null ? null : messagecontent.trim();  
18 - }  
19 -  
20 - public String getReceivecontent() {  
21 - return receivecontent;  
22 - }  
23 -  
24 - public void setReceivecontent(String receivecontent) {  
25 - this.receivecontent = receivecontent == null ? null : receivecontent.trim();  
26 - }  
27 -  
28 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -@Data  
13 -@Slf4j  
14 -public class DEPARTURESLOADING extends WlptBaseModel {  
15 - private String id;  
16 -  
17 - private Date createdate;  
18 -  
19 - private String waybillno;  
20 -  
21 - private String flightno;  
22 -  
23 - private Date flightdate;  
24 -  
25 - private String originatingstation;  
26 -  
27 - private String destinationstation;  
28 -  
29 - private String stowagepieces;  
30 -  
31 - private String stowageweight;  
32 -  
33 - private String waybillpieces;  
34 -  
35 - private String waybillweight;  
36 -  
37 - private Date stowagedate;  
38 -  
39 - private String productname;  
40 -  
41 - private String specialcode;  
42 -  
43 - private String customs;  
44 -  
45 - private String receiption;  
46 -  
47 - private String status;  
48 -  
49 - public String getId() {  
50 - return id;  
51 - }  
52 -  
53 - public void setId(String id) {  
54 - this.id = id == null ? null : id.trim();  
55 - }  
56 -  
57 - public Date getCreatedate() {  
58 - return createdate;  
59 - }  
60 -  
61 - public void setCreatedate(Date createdate) {  
62 - this.createdate = createdate;  
63 - }  
64 -  
65 - public String getWaybillno() {  
66 - return waybillno;  
67 - }  
68 -  
69 - public void setWaybillno(String waybillno) {  
70 - this.waybillno = waybillno == null ? null : waybillno.trim();  
71 - }  
72 -  
73 - public String getFlightno() {  
74 - return flightno;  
75 - }  
76 -  
77 - public void setFlightno(String flightno) {  
78 - this.flightno = flightno == null ? null : flightno.trim();  
79 - }  
80 -  
81 - public Date getFlightdate() {  
82 - return flightdate;  
83 - }  
84 -  
85 - public void setFlightdate(Date flightdate) {  
86 - this.flightdate = flightdate;  
87 - }  
88 -  
89 - public String getOriginatingstation() {  
90 - return originatingstation;  
91 - }  
92 -  
93 - public void setOriginatingstation(String originatingstation) {  
94 - this.originatingstation = originatingstation == null ? null : originatingstation.trim();  
95 - }  
96 -  
97 - public String getDestinationstation() {  
98 - return destinationstation;  
99 - }  
100 -  
101 - public void setDestinationstation(String destinationstation) {  
102 - this.destinationstation = destinationstation == null ? null : destinationstation.trim();  
103 - }  
104 -  
105 - public String getStowagepieces() {  
106 - return stowagepieces;  
107 - }  
108 -  
109 - public void setStowagepieces(String stowagepieces) {  
110 - this.stowagepieces = stowagepieces == null ? null : stowagepieces.trim();  
111 - }  
112 -  
113 - public String getStowageweight() {  
114 - return stowageweight;  
115 - }  
116 -  
117 - public void setStowageweight(String stowageweight) {  
118 - this.stowageweight = stowageweight == null ? null : stowageweight.trim();  
119 - }  
120 -  
121 - public String getWaybillpieces() {  
122 - return waybillpieces;  
123 - }  
124 -  
125 - public void setWaybillpieces(String waybillpieces) {  
126 - this.waybillpieces = waybillpieces == null ? null : waybillpieces.trim();  
127 - }  
128 -  
129 - public String getWaybillweight() {  
130 - return waybillweight;  
131 - }  
132 -  
133 - public void setWaybillweight(String waybillweight) {  
134 - this.waybillweight = waybillweight == null ? null : waybillweight.trim();  
135 - }  
136 -  
137 - public Date getStowagedate() {  
138 - return stowagedate;  
139 - }  
140 -  
141 - public void setStowagedate(Date stowagedate) {  
142 - this.stowagedate = stowagedate;  
143 - }  
144 -  
145 - public String getProductname() {  
146 - return productname;  
147 - }  
148 -  
149 - public void setProductname(String productname) {  
150 - this.productname = productname == null ? null : productname.trim();  
151 - }  
152 -  
153 - public String getSpecialcode() {  
154 - return specialcode;  
155 - }  
156 -  
157 - public void setSpecialcode(String specialcode) {  
158 - this.specialcode = specialcode == null ? null : specialcode.trim();  
159 - }  
160 -  
161 - public String getCustoms() {  
162 - return customs;  
163 - }  
164 -  
165 - public void setCustoms(String customs) {  
166 - this.customs = customs == null ? null : customs.trim();  
167 - }  
168 -  
169 - public String getReceiption() {  
170 - return receiption;  
171 - }  
172 -  
173 - public void setReceiption(String receiption) {  
174 - this.receiption = receiption == null ? null : receiption.trim();  
175 - }  
176 -  
177 - public String getStatus() {  
178 - return status;  
179 - }  
180 -  
181 - public void setStatus(String status) {  
182 - this.status = status == null ? null : status.trim();  
183 - }  
184 -  
185 - public DEPARTURESLOADING() {  
186 -  
187 - }  
188 - public DEPARTURESLOADING(CustomReception customReception) {  
189 - init();  
190 - this.waybillno = AWBTools.awbFormat(customReception.getWayBillMaster());  
191 - this.flightno = customReception.getFlightNo();  
192 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
193 - this.setFlightdate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));  
194 - }  
195 - this.receiption = customReception.getResponseText();  
196 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
197 - }  
198 -  
199 - @Override  
200 - public int masterAnalysisReception() {  
201 - int i = departuresloadingMapper.updateRECEIPTION(this);  
202 - List<DEPARTURESLOADING> list = departuresloadingMapper.selectAutoIdByAwb(this);  
203 - if(!list.isEmpty()){  
204 - DEPARTURESLOADING departuresloading1 = list.get(0);  
205 - String autoId = departuresloading1.getId();  
206 - //插入sendlog记录表  
207 - log.info("即将插入回执日志运单号为:"+waybillno+"->autoid="+autoId);  
208 - int ii =sendLogService.insertSendlog("MT4201",receiption,autoId);  
209 -  
210 - if (i>0 && ii>0){  
211 - log.info("运单号 {} 装载回执更新成功",waybillno);  
212 - return 1;  
213 - }  
214 - }  
215 - return 0;  
216 - }  
217 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class INPORTALLOCATE extends WlptBaseModel {  
16 - private String id;  
17 -  
18 - private Date createdate;  
19 -  
20 - private String waybillno;  
21 -  
22 - private String carrier;  
23 -  
24 - private String flightno;  
25 -  
26 - private Date flightdate;  
27 -  
28 - private String customos;  
29 -  
30 - private String tallypieces;  
31 -  
32 - private String tallyweight;  
33 -  
34 - private String allocatepieces;  
35 -  
36 - private String allocateweight;  
37 -  
38 - private String allocatedestination;  
39 -  
40 - private String trailernumber;  
41 -  
42 - private String status;  
43 -  
44 - private String receiptinformation;  
45 -  
46 - public String getId() {  
47 - return id;  
48 - }  
49 -  
50 - public void setId(String id) {  
51 - this.id = id == null ? null : id.trim();  
52 - }  
53 -  
54 - public Date getCreatedate() {  
55 - return createdate;  
56 - }  
57 -  
58 - public void setCreatedate(Date createdate) {  
59 - this.createdate = createdate;  
60 - }  
61 -  
62 - public String getWaybillno() {  
63 - return waybillno;  
64 - }  
65 -  
66 - public void setWaybillno(String waybillno) {  
67 - this.waybillno = waybillno == null ? null : waybillno.trim();  
68 - }  
69 -  
70 - public String getCarrier() {  
71 - return carrier;  
72 - }  
73 -  
74 - public void setCarrier(String carrier) {  
75 - this.carrier = carrier == null ? null : carrier.trim();  
76 - }  
77 -  
78 - public String getFlightno() {  
79 - return flightno;  
80 - }  
81 -  
82 - public void setFlightno(String flightno) {  
83 - this.flightno = flightno == null ? null : flightno.trim();  
84 - }  
85 -  
86 - public Date getFlightdate() {  
87 - return flightdate;  
88 - }  
89 -  
90 - public void setFlightdate(Date flightdate) {  
91 - this.flightdate = flightdate;  
92 - }  
93 -  
94 - public String getCustomos() {  
95 - return customos;  
96 - }  
97 -  
98 - public void setCustomos(String customos) {  
99 - this.customos = customos == null ? null : customos.trim();  
100 - }  
101 -  
102 - public String getTallypieces() {  
103 - return tallypieces;  
104 - }  
105 -  
106 - public void setTallypieces(String tallypieces) {  
107 - this.tallypieces = tallypieces == null ? null : tallypieces.trim();  
108 - }  
109 -  
110 - public String getTallyweight() {  
111 - return tallyweight;  
112 - }  
113 -  
114 - public void setTallyweight(String tallyweight) {  
115 - this.tallyweight = tallyweight == null ? null : tallyweight.trim();  
116 - }  
117 -  
118 - public String getAllocatepieces() {  
119 - return allocatepieces;  
120 - }  
121 -  
122 - public void setAllocatepieces(String allocatepieces) {  
123 - this.allocatepieces = allocatepieces == null ? null : allocatepieces.trim();  
124 - }  
125 -  
126 - public String getAllocateweight() {  
127 - return allocateweight;  
128 - }  
129 -  
130 - public void setAllocateweight(String allocateweight) {  
131 - this.allocateweight = allocateweight == null ? null : allocateweight.trim();  
132 - }  
133 -  
134 - public String getAllocatedestination() {  
135 - return allocatedestination;  
136 - }  
137 -  
138 - public void setAllocatedestination(String allocatedestination) {  
139 - this.allocatedestination = allocatedestination == null ? null : allocatedestination.trim();  
140 - }  
141 -  
142 - public String getTrailernumber() {  
143 - return trailernumber;  
144 - }  
145 -  
146 - public void setTrailernumber(String trailernumber) {  
147 - this.trailernumber = trailernumber == null ? null : trailernumber.trim();  
148 - }  
149 -  
150 - public String getStatus() {  
151 - return status;  
152 - }  
153 -  
154 - public void setStatus(String status) {  
155 - this.status = status == null ? null : status.trim();  
156 - }  
157 -  
158 - public String getReceiptinformation() {  
159 - return receiptinformation;  
160 - }  
161 -  
162 - public void setReceiptinformation(String receiptinformation) {  
163 - this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();  
164 - }  
165 -  
166 - public INPORTALLOCATE() {  
167 - }  
168 - public INPORTALLOCATE(CustomReception customReception) {  
169 - this.waybillno = customReception.getWayBillMaster();  
170 - String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());  
171 - this.setFlightno(flightInfo[1]);  
172 - this.setCarrier(flightInfo[0]);  
173 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
174 - this.setFlightdate(DateUtil.formatByyyyyMMdd(customReception.getFlightDate()));  
175 - }  
176 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
177 - this.receiptinformation = customReception.getResponseText();  
178 - }  
179 -  
180 - @Override  
181 - public int masterAnalysisReception() {  
182 - int i = inportallocateMapper.updateRECEIPTION(this);  
183 -  
184 - List<INPORTALLOCATE> arrivedmasterList = inportallocateMapper.selectAutoIdByAwb(this);  
185 - if(!arrivedmasterList.isEmpty()){  
186 - INPORTALLOCATE departuresloading1 = arrivedmasterList.get(0);  
187 - String autoId = departuresloading1.getId();  
188 -  
189 - //插入sendlog记录表  
190 - log.info("即将插入回执日志运单号为:"+waybillno+"->autoid="+autoId);  
191 - int ii =sendLogService.insertSendlog("MT6202",receiptinformation,autoId);  
192 -  
193 - if (i>0 && ii>0 ){  
194 - log.info("运单号 {} 分拨申请回执更新成功",waybillno);  
195 - return 1;  
196 - }  
197 - }  
198 - return 0;  
199 - }  
200 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -  
9 -import java.util.Date;  
10 -import java.util.List;  
11 -  
12 -@Data  
13 -@Slf4j  
14 -public class INTERNATIONALTRANSIT extends WlptBaseModel {  
15 - private String autoid;  
16 -  
17 - private Date createdate;  
18 -  
19 - private String originalCarrier;  
20 -  
21 - private String originalFlightno;  
22 -  
23 - private Date originalFlightdate;  
24 -  
25 - private String originalBillno;  
26 -  
27 - private String originalSubNumber;  
28 -  
29 - private String preCarrier;  
30 -  
31 - private String preFlightno;  
32 -  
33 - private Date preFlightdate;  
34 -  
35 - private String preBillno;  
36 -  
37 - private String preSubNumber;  
38 -  
39 - private String billpiece;  
40 -  
41 - private String billweight;  
42 -  
43 - private String product;  
44 -  
45 - private String originatingstation;  
46 -  
47 - private String packagingtype;  
48 -  
49 - private String status;  
50 -  
51 - private String receiption;  
52 -  
53 - private String destinationstationBill;  
54 -  
55 - public String getAutoid() {  
56 - return autoid;  
57 - }  
58 -  
59 - public void setAutoid(String autoid) {  
60 - this.autoid = autoid == null ? null : autoid.trim();  
61 - }  
62 -  
63 - public Date getCreatedate() {  
64 - return createdate;  
65 - }  
66 -  
67 - public void setCreatedate(Date createdate) {  
68 - this.createdate = createdate;  
69 - }  
70 -  
71 - public String getOriginalCarrier() {  
72 - return originalCarrier;  
73 - }  
74 -  
75 - public void setOriginalCarrier(String originalCarrier) {  
76 - this.originalCarrier = originalCarrier == null ? null : originalCarrier.trim();  
77 - }  
78 -  
79 - public String getOriginalFlightno() {  
80 - return originalFlightno;  
81 - }  
82 -  
83 - public void setOriginalFlightno(String originalFlightno) {  
84 - this.originalFlightno = originalFlightno == null ? null : originalFlightno.trim();  
85 - }  
86 -  
87 - public Date getOriginalFlightdate() {  
88 - return originalFlightdate;  
89 - }  
90 -  
91 - public void setOriginalFlightdate(Date originalFlightdate) {  
92 - this.originalFlightdate = originalFlightdate;  
93 - }  
94 -  
95 - public String getOriginalBillno() {  
96 - return originalBillno;  
97 - }  
98 -  
99 - public void setOriginalBillno(String originalBillno) {  
100 - this.originalBillno = originalBillno == null ? null : originalBillno.trim();  
101 - }  
102 -  
103 - public String getOriginalSubNumber() {  
104 - return originalSubNumber;  
105 - }  
106 -  
107 - public void setOriginalSubNumber(String originalSubNumber) {  
108 - this.originalSubNumber = originalSubNumber == null ? null : originalSubNumber.trim();  
109 - }  
110 -  
111 - public String getPreCarrier() {  
112 - return preCarrier;  
113 - }  
114 -  
115 - public void setPreCarrier(String preCarrier) {  
116 - this.preCarrier = preCarrier == null ? null : preCarrier.trim();  
117 - }  
118 -  
119 - public String getPreFlightno() {  
120 - return preFlightno;  
121 - }  
122 -  
123 - public void setPreFlightno(String preFlightno) {  
124 - this.preFlightno = preFlightno == null ? null : preFlightno.trim();  
125 - }  
126 -  
127 - public Date getPreFlightdate() {  
128 - return preFlightdate;  
129 - }  
130 -  
131 - public void setPreFlightdate(Date preFlightdate) {  
132 - this.preFlightdate = preFlightdate;  
133 - }  
134 -  
135 - public String getPreBillno() {  
136 - return preBillno;  
137 - }  
138 -  
139 - public void setPreBillno(String preBillno) {  
140 - this.preBillno = preBillno == null ? null : preBillno.trim();  
141 - }  
142 -  
143 - public String getPreSubNumber() {  
144 - return preSubNumber;  
145 - }  
146 -  
147 - public void setPreSubNumber(String preSubNumber) {  
148 - this.preSubNumber = preSubNumber == null ? null : preSubNumber.trim();  
149 - }  
150 -  
151 - public String getBillpiece() {  
152 - return billpiece;  
153 - }  
154 -  
155 - public void setBillpiece(String billpiece) {  
156 - this.billpiece = billpiece == null ? null : billpiece.trim();  
157 - }  
158 -  
159 - public String getBillweight() {  
160 - return billweight;  
161 - }  
162 -  
163 - public void setBillweight(String billweight) {  
164 - this.billweight = billweight == null ? null : billweight.trim();  
165 - }  
166 -  
167 - public String getProduct() {  
168 - return product;  
169 - }  
170 -  
171 - public void setProduct(String product) {  
172 - this.product = product == null ? null : product.trim();  
173 - }  
174 -  
175 - public String getOriginatingstation() {  
176 - return originatingstation;  
177 - }  
178 -  
179 - public void setOriginatingstation(String originatingstation) {  
180 - this.originatingstation = originatingstation == null ? null : originatingstation.trim();  
181 - }  
182 -  
183 - public String getPackagingtype() {  
184 - return packagingtype;  
185 - }  
186 -  
187 - public void setPackagingtype(String packagingtype) {  
188 - this.packagingtype = packagingtype == null ? null : packagingtype.trim();  
189 - }  
190 -  
191 - public String getStatus() {  
192 - return status;  
193 - }  
194 -  
195 - public void setStatus(String status) {  
196 - this.status = status == null ? null : status.trim();  
197 - }  
198 -  
199 - public String getReceiption() {  
200 - return receiption;  
201 - }  
202 -  
203 - public void setReceiption(String receiption) {  
204 - this.receiption = receiption == null ? null : receiption.trim();  
205 - }  
206 -  
207 - public String getDestinationstationBill() {  
208 - return destinationstationBill;  
209 - }  
210 -  
211 - public void setDestinationstationBill(String destinationstationBill) {  
212 - this.destinationstationBill = destinationstationBill == null ? null : destinationstationBill.trim();  
213 - }  
214 -  
215 - public INTERNATIONALTRANSIT(){  
216 -  
217 - }  
218 - public INTERNATIONALTRANSIT(CustomReception customReception) {  
219 - String[] flightInfo = AWBTools.splitFlight(customReception.getImportFlightNo());  
220 - this.originalCarrier = flightInfo[0];  
221 - this.originalFlightno = flightInfo[1];  
222 - this.originalFlightdate = DateUtil.formatByyyyyMMdd(customReception.getImportFlightDate());  
223 - this.originalBillno = AWBTools.awbFormat(customReception.getImportWaybillMaster());  
224 - //TODO:碰见分单回执再解析  
225 - this.originalSubNumber = customReception.getWayBillSecond();  
226 -  
227 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
228 - this.receiption = customReception.getResponseText();  
229 - }  
230 -  
231 - @Override  
232 - public int masterAnalysisReception() {  
233 - int i = internationaltransitMapper.updateRECEIPTION(this);  
234 - List<INTERNATIONALTRANSIT> internationaltransits = internationaltransitMapper.selectAutoIdByAwb(this);  
235 - if(!internationaltransits.isEmpty()){  
236 - INTERNATIONALTRANSIT internationaltransit = internationaltransits.get(0);  
237 - String autoId = internationaltransit.getAutoid();  
238 -  
239 - //插入sendlog记录表  
240 - log.info("即将插入国际转运日志运单号为:"+originalBillno+"->autoid="+autoId);  
241 - int ii =sendLogService.insertSendlog("MT8205",receiption,autoId);  
242 - if (i>0 && ii>0){  
243 - log.info("运单号 {} 国际转运回执更新成功",originalBillno);  
244 - return 1;  
245 - }  
246 - }  
247 - return 0;  
248 - }  
249 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.extern.slf4j.Slf4j;  
7 -  
8 -import java.util.Date;  
9 -import java.util.List;  
10 -  
11 -@Slf4j  
12 -public class MANIFESTLOAD extends WlptBaseModel {  
13 - private String id;  
14 -  
15 - private Date createdate;  
16 -  
17 - private String flightno;  
18 -  
19 - private String waybillnomaster;  
20 -  
21 - private Date flightdate;  
22 -  
23 - private String waybillnosecondary;  
24 -  
25 - private String remark;  
26 -  
27 - private String status;  
28 -  
29 - private String receiption;  
30 -  
31 - private String customcode;  
32 -  
33 - private String reason;  
34 -  
35 - private String contactname;  
36 -  
37 - private String contacttel;  
38 -  
39 - public String getId() {  
40 - return id;  
41 - }  
42 -  
43 - public void setId(String id) {  
44 - this.id = id == null ? null : id.trim();  
45 - }  
46 -  
47 - public Date getCreatedate() {  
48 - return createdate;  
49 - }  
50 -  
51 - public void setCreatedate(Date createdate) {  
52 - this.createdate = createdate;  
53 - }  
54 -  
55 - public String getFlightno() {  
56 - return flightno;  
57 - }  
58 -  
59 - public void setFlightno(String flightno) {  
60 - this.flightno = flightno == null ? null : flightno.trim();  
61 - }  
62 -  
63 - public String getWaybillnomaster() {  
64 - return waybillnomaster;  
65 - }  
66 -  
67 - public void setWaybillnomaster(String waybillnomaster) {  
68 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
69 - }  
70 -  
71 - public Date getFlightdate() {  
72 - return flightdate;  
73 - }  
74 -  
75 - public void setFlightdate(Date flightdate) {  
76 - this.flightdate = flightdate;  
77 - }  
78 -  
79 - public String getWaybillnosecondary() {  
80 - return waybillnosecondary;  
81 - }  
82 -  
83 - public void setWaybillnosecondary(String waybillnosecondary) {  
84 - this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();  
85 - }  
86 -  
87 - public String getRemark() {  
88 - return remark;  
89 - }  
90 -  
91 - public void setRemark(String remark) {  
92 - this.remark = remark == null ? null : remark.trim();  
93 - }  
94 -  
95 - public String getStatus() {  
96 - return status;  
97 - }  
98 -  
99 - public void setStatus(String status) {  
100 - this.status = status == null ? null : status.trim();  
101 - }  
102 -  
103 - public String getReceiption() {  
104 - return receiption;  
105 - }  
106 -  
107 - public void setReceiption(String receiption) {  
108 - this.receiption = receiption == null ? null : receiption.trim();  
109 - }  
110 -  
111 - public String getCustomcode() {  
112 - return customcode;  
113 - }  
114 -  
115 - public void setCustomcode(String customcode) {  
116 - this.customcode = customcode == null ? null : customcode.trim();  
117 - }  
118 -  
119 - public String getReason() {  
120 - return reason;  
121 - }  
122 -  
123 - public void setReason(String reason) {  
124 - this.reason = reason == null ? null : reason.trim();  
125 - }  
126 -  
127 - public String getContactname() {  
128 - return contactname;  
129 - }  
130 -  
131 - public void setContactname(String contactname) {  
132 - this.contactname = contactname == null ? null : contactname.trim();  
133 - }  
134 -  
135 - public String getContacttel() {  
136 - return contacttel;  
137 - }  
138 -  
139 - public void setContacttel(String contacttel) {  
140 - this.contacttel = contacttel == null ? null : contacttel.trim();  
141 - }  
142 -  
143 - public MANIFESTLOAD() {  
144 -  
145 - }  
146 -  
147 - public MANIFESTLOAD(CustomReception customReception) {  
148 -  
149 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
150 -  
151 -  
152 - //取分单号  
153 - if(!customReception.getWayBillSecond().isEmpty()){  
154 - String[] awbhArr = customReception.getWayBillSecond().split("_");  
155 - this.waybillnosecondary = awbhArr[1];  
156 - }  
157 -  
158 - this.flightno = customReception.getFlightNo();  
159 - this.flightdate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());  
160 -  
161 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
162 - this.receiption = customReception.getResponseText();  
163 - }  
164 -  
165 - @Override  
166 - public int secondAnalysisReception(){  
167 -  
168 - //更新分单回执  
169 - int i = manifestloadMapper.updateRECEIPTION(this);  
170 - //获取分单autoid  
171 - List<MANIFESTLOAD> secondaryList = manifestloadMapper.selectAutoIdByawbAawbH(this);  
172 - if(!secondaryList.isEmpty()){  
173 - MANIFESTLOAD arrivedSecond = secondaryList.get(0);  
174 - String autoId = arrivedSecond.getId();  
175 - //插入sendlog记录表  
176 - log.info("即将插入回执日志运单号为:{}{},->autoid={}",waybillnomaster,waybillnosecondary,autoId);  
177 - int ii = sendLogService.insertSendlog("MT8202",receiption,autoId);  
178 -  
179 - //todo:同时更新发送日志表的回执信息  
180 -  
181 -  
182 - if (i>0 && ii>0 ){  
183 - log.info("运单号 {} 落装分单回执更新成功",waybillnosecondary);  
184 - return 1;  
185 - }  
186 - }else {  
187 - //todo:如果都没适配到的话,要从发送日志表里面通过回执中的messageid 找到发送信息,适配回执  
188 - }  
189 - return 0;  
190 - }  
191 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.extern.slf4j.Slf4j;  
7 -  
8 -import java.util.Date;  
9 -import java.util.List;  
10 -  
11 -@Slf4j  
12 -public class MANIFESTLOSTCHANGE extends WlptBaseModel{  
13 - private String id;  
14 -  
15 - private String flightno;  
16 -  
17 - private Date flightdate;  
18 -  
19 - private String waybillnomaster;  
20 -  
21 - private String waybillnosecondary;  
22 -  
23 - private String cwaybillnomaster;  
24 -  
25 - private String cwaybillnosecondary;  
26 -  
27 - private Date createdate;  
28 -  
29 - private String status;  
30 -  
31 - private String receiption;  
32 -  
33 - private String cflightno;  
34 -  
35 - private Date cflightdate;  
36 -  
37 - private String sequencenumeric;  
38 -  
39 - private String quantity;  
40 -  
41 - private String cargodescription;  
42 -  
43 - private String goodsmeasure;  
44 -  
45 - private String customcode;  
46 -  
47 - private String reason;  
48 -  
49 - private String contactname;  
50 -  
51 - private String contacttel;  
52 -  
53 - public String getId() {  
54 - return id;  
55 - }  
56 -  
57 - public void setId(String id) {  
58 - this.id = id == null ? null : id.trim();  
59 - }  
60 -  
61 - public String getFlightno() {  
62 - return flightno;  
63 - }  
64 -  
65 - public void setFlightno(String flightno) {  
66 - this.flightno = flightno == null ? null : flightno.trim();  
67 - }  
68 -  
69 - public Date getFlightdate() {  
70 - return flightdate;  
71 - }  
72 -  
73 - public void setFlightdate(Date flightdate) {  
74 - this.flightdate = flightdate;  
75 - }  
76 -  
77 - public String getWaybillnomaster() {  
78 - return waybillnomaster;  
79 - }  
80 -  
81 - public void setWaybillnomaster(String waybillnomaster) {  
82 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
83 - }  
84 -  
85 - public String getWaybillnosecondary() {  
86 - return waybillnosecondary;  
87 - }  
88 -  
89 - public void setWaybillnosecondary(String waybillnosecondary) {  
90 - this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();  
91 - }  
92 -  
93 - public String getCwaybillnomaster() {  
94 - return cwaybillnomaster;  
95 - }  
96 -  
97 - public void setCwaybillnomaster(String cwaybillnomaster) {  
98 - this.cwaybillnomaster = cwaybillnomaster == null ? null : cwaybillnomaster.trim();  
99 - }  
100 -  
101 - public String getCwaybillnosecondary() {  
102 - return cwaybillnosecondary;  
103 - }  
104 -  
105 - public void setCwaybillnosecondary(String cwaybillnosecondary) {  
106 - this.cwaybillnosecondary = cwaybillnosecondary == null ? null : cwaybillnosecondary.trim();  
107 - }  
108 -  
109 - public Date getCreatedate() {  
110 - return createdate;  
111 - }  
112 -  
113 - public void setCreatedate(Date createdate) {  
114 - this.createdate = createdate;  
115 - }  
116 -  
117 - public String getStatus() {  
118 - return status;  
119 - }  
120 -  
121 - public void setStatus(String status) {  
122 - this.status = status == null ? null : status.trim();  
123 - }  
124 -  
125 - public String getReceiption() {  
126 - return receiption;  
127 - }  
128 -  
129 - public void setReceiption(String receiption) {  
130 - this.receiption = receiption == null ? null : receiption.trim();  
131 - }  
132 -  
133 - public String getCflightno() {  
134 - return cflightno;  
135 - }  
136 -  
137 - public void setCflightno(String cflightno) {  
138 - this.cflightno = cflightno == null ? null : cflightno.trim();  
139 - }  
140 -  
141 - public Date getCflightdate() {  
142 - return cflightdate;  
143 - }  
144 -  
145 - public void setCflightdate(Date cflightdate) {  
146 - this.cflightdate = cflightdate;  
147 - }  
148 -  
149 - public String getSequencenumeric() {  
150 - return sequencenumeric;  
151 - }  
152 -  
153 - public void setSequencenumeric(String sequencenumeric) {  
154 - this.sequencenumeric = sequencenumeric == null ? null : sequencenumeric.trim();  
155 - }  
156 -  
157 - public String getQuantity() {  
158 - return quantity;  
159 - }  
160 -  
161 - public void setQuantity(String quantity) {  
162 - this.quantity = quantity == null ? null : quantity.trim();  
163 - }  
164 -  
165 - public String getCargodescription() {  
166 - return cargodescription;  
167 - }  
168 -  
169 - public void setCargodescription(String cargodescription) {  
170 - this.cargodescription = cargodescription == null ? null : cargodescription.trim();  
171 - }  
172 -  
173 - public String getGoodsmeasure() {  
174 - return goodsmeasure;  
175 - }  
176 -  
177 - public void setGoodsmeasure(String goodsmeasure) {  
178 - this.goodsmeasure = goodsmeasure == null ? null : goodsmeasure.trim();  
179 - }  
180 -  
181 - public String getCustomcode() {  
182 - return customcode;  
183 - }  
184 -  
185 - public void setCustomcode(String customcode) {  
186 - this.customcode = customcode == null ? null : customcode.trim();  
187 - }  
188 -  
189 - public String getReason() {  
190 - return reason;  
191 - }  
192 -  
193 - public void setReason(String reason) {  
194 - this.reason = reason == null ? null : reason.trim();  
195 - }  
196 -  
197 - public String getContactname() {  
198 - return contactname;  
199 - }  
200 -  
201 - public void setContactname(String contactname) {  
202 - this.contactname = contactname == null ? null : contactname.trim();  
203 - }  
204 -  
205 - public String getContacttel() {  
206 - return contacttel;  
207 - }  
208 -  
209 - public void setContacttel(String contacttel) {  
210 - this.contacttel = contacttel == null ? null : contacttel.trim();  
211 - }  
212 -  
213 -  
214 - public MANIFESTLOSTCHANGE() {  
215 -  
216 - }  
217 -  
218 - public MANIFESTLOSTCHANGE(CustomReception customReception) {  
219 -  
220 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
221 -  
222 -  
223 - //取分单号  
224 - if(!customReception.getWayBillSecond().isEmpty()){  
225 - String[] awbhArr = customReception.getWayBillSecond().split("_");  
226 - this.waybillnosecondary = awbhArr[1];  
227 - }  
228 -  
229 - this.flightno = customReception.getFlightNo();  
230 - this.flightdate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());  
231 -  
232 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
233 - this.receiption = customReception.getResponseText();  
234 - }  
235 -  
236 - @Override  
237 - public int secondAnalysisReception(){  
238 -  
239 - //更新分单回执  
240 - int i = manifestlostchangeMapper.updateRECEIPTION(this);  
241 - //获取分单autoid  
242 - List<MANIFESTLOSTCHANGE> secondaryList = manifestlostchangeMapper.selectAutoIdByawbAawbH(this);  
243 - if(!secondaryList.isEmpty()){  
244 - MANIFESTLOSTCHANGE arrivedSecond = secondaryList.get(0);  
245 - String autoId = arrivedSecond.getId();  
246 - //插入sendlog记录表  
247 - log.info("即将插入回执日志运单号为:{}{},->autoid={}",waybillnomaster,waybillnosecondary,autoId);  
248 - int ii = sendLogService.insertSendlog("MT8203",receiption,autoId);  
249 -  
250 - //todo:同时更新发送日志表的回执信息  
251 -  
252 -  
253 - if (i>0 && ii>0 ){  
254 - log.info("运单号 {} 落装改配分单回执更新成功",waybillnosecondary);  
255 - return 1;  
256 - }  
257 - }else {  
258 - //todo:如果都没适配到的话,要从发送日志表里面通过回执中的messageid 找到发送信息,适配回执  
259 - }  
260 - return 0;  
261 - }  
262 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.model.CustomReception;  
4 -import com.tianbo.analysis.service.imp.CoustomAnalysisServiceImp;  
5 -import com.tianbo.analysis.service.imp.ShareServiceImp;  
6 -import com.tianbo.analysis.tools.AWBTools;  
7 -import com.tianbo.util.Date.DateUtil;  
8 -import lombok.extern.slf4j.Slf4j;  
9 -import org.apache.commons.lang.StringUtils;  
10 -import org.springframework.scheduling.annotation.Async;  
11 -  
12 -import java.util.Date;  
13 -  
14 -@Slf4j  
15 -@Async  
16 -public class NmmsBase {  
17 -  
18 - public ShareServiceImp shareServiceImp;  
19 - public CoustomAnalysisServiceImp coustomAnalysisServiceImp;  
20 - public String awbA ;  
21 - public String awbH ;  
22 - public String rspCode;  
23 - public String nmsStatusCode;  
24 - public String reception;  
25 - public String flightDateStr;  
26 - public CustomReception customReception;  
27 - public Date flightDate;  
28 -  
29 - public int insertRecept(CustomReception customReception){  
30 - log.warn("公共对象监控打印{}",this);  
31 - this.shareServiceImp = new ShareServiceImp();  
32 - // 发送日志 插入  
33 - this.coustomAnalysisServiceImp = new CoustomAnalysisServiceImp();  
34 - this.customReception = customReception;  
35 -  
36 - // 主单号;处理主单格式,将海关回执的主单号58019316861,变为580-19316861  
37 - this.awbA = AWBTools.awbFormat(customReception.getWayBillMaster());  
38 - this.awbH = customReception.getWayBillSecond();  
39 - this.rspCode = customReception.getResponseCode();  
40 - this.nmsStatusCode = AWBTools.transCusRspCode(rspCode);  
41 -  
42 - this.reception = customReception.getResponseText();  
43 - this.flightDateStr = customReception.getFlightDate();  
44 - log.info("开始解析:运单号 {} 回执类型:{} ",awbA,customReception.getMessageType());  
45 - if (!StringUtils.isEmpty(flightDateStr)) {  
46 - this.flightDate = DateUtil.formatByyyyyMMdd(flightDateStr);  
47 -  
48 - // 判断航班号 航班日期 是否为空  
49 - if (flightDate != null && customReception.getFlightNo() != null){  
50 - //有分单号 更新分单回执  
51 - if(!StringUtils.isEmpty(awbH)){  
52 - return second();  
53 - }  
54 -  
55 - if (!StringUtils.isEmpty(awbA)){  
56 - return master();  
57 - }  
58 - }else {  
59 - //从发送日志表查找发送MESSAGEID进行二次入库  
60 - return shareServiceImp.share(customReception.getMessageType(), customReception);  
61 - }  
62 - }  
63 -  
64 - return 0;  
65 -  
66 - }  
67 -  
68 - /**  
69 - * 入库分单回执信息  
70 - * @return 成功返回1,失败返回0。  
71 - */  
72 - public int second() {  
73 - return 0;  
74 - }  
75 -  
76 - /**  
77 - * 入库分单回执信息  
78 - * @return 成功返回1,失败返回0。  
79 - */  
80 - public int master() {  
81 - return 0;  
82 - }  
83 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class ORIGINMANIFESTMASTER extends WlptBaseModel {  
16 - private String autoid;  
17 -  
18 - private String waybillnomaster;  
19 -  
20 - private String segment;  
21 -  
22 - private String originatingstation;  
23 -  
24 - private String destinationstation;  
25 -  
26 - private String totalweight;  
27 -  
28 - private String totalpiece;  
29 -  
30 - private String manifesttotalpiece;  
31 -  
32 - private String manifesttotalweight;  
33 -  
34 - private String flightno;  
35 -  
36 - private String productname;  
37 -  
38 - private String customsstatus;  
39 -  
40 - private String carrier1;  
41 -  
42 - private String arrivalstation1;  
43 -  
44 - private String carrier2;  
45 -  
46 - private String arrivalstation2;  
47 -  
48 - private String carrier3;  
49 -  
50 - private String arrivalstation3;  
51 -  
52 - private String paymode;  
53 -  
54 - private String specialgoodscode;  
55 -  
56 - private String customscode;  
57 -  
58 - private String shippername;  
59 -  
60 - private String shipperaddress;  
61 -  
62 - private String consigneename;  
63 -  
64 - private String consigneeaddress;  
65 -  
66 - private String receiptinformation;  
67 -  
68 - private Date createdate;  
69 -  
70 - private Date flightDate;  
71 -  
72 - private String status;  
73 -  
74 - private String isbatch;  
75 -  
76 - private String originatingstationBill;  
77 -  
78 - private String destinationstationBill;  
79 -  
80 - private String reportorder;  
81 -  
82 - private String islast;  
83 -  
84 - private String shipperCode;  
85 -  
86 - private String shipperCountrycode;  
87 -  
88 - private String shipperPhone;  
89 -  
90 - private String shipperFax;  
91 -  
92 - private String consigneeCode;  
93 -  
94 - private String consigneeCountrycode;  
95 -  
96 - private String consigneeFax;  
97 -  
98 - private String specificConsigneename;  
99 -  
100 - private String specificConsigneePhone;  
101 -  
102 - private String consigneePhone;  
103 -  
104 - public String getAutoid() {  
105 - return autoid;  
106 - }  
107 -  
108 - public void setAutoid(String autoid) {  
109 - this.autoid = autoid == null ? null : autoid.trim();  
110 - }  
111 -  
112 - public String getWaybillnomaster() {  
113 - return waybillnomaster;  
114 - }  
115 -  
116 - public void setWaybillnomaster(String waybillnomaster) {  
117 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
118 - }  
119 -  
120 - public String getSegment() {  
121 - return segment;  
122 - }  
123 -  
124 - public void setSegment(String segment) {  
125 - this.segment = segment == null ? null : segment.trim();  
126 - }  
127 -  
128 - public String getOriginatingstation() {  
129 - return originatingstation;  
130 - }  
131 -  
132 - public void setOriginatingstation(String originatingstation) {  
133 - this.originatingstation = originatingstation == null ? null : originatingstation.trim();  
134 - }  
135 -  
136 - public String getDestinationstation() {  
137 - return destinationstation;  
138 - }  
139 -  
140 - public void setDestinationstation(String destinationstation) {  
141 - this.destinationstation = destinationstation == null ? null : destinationstation.trim();  
142 - }  
143 -  
144 - public String getTotalweight() {  
145 - return totalweight;  
146 - }  
147 -  
148 - public void setTotalweight(String totalweight) {  
149 - this.totalweight = totalweight == null ? null : totalweight.trim();  
150 - }  
151 -  
152 - public String getTotalpiece() {  
153 - return totalpiece;  
154 - }  
155 -  
156 - public void setTotalpiece(String totalpiece) {  
157 - this.totalpiece = totalpiece == null ? null : totalpiece.trim();  
158 - }  
159 -  
160 - public String getManifesttotalpiece() {  
161 - return manifesttotalpiece;  
162 - }  
163 -  
164 - public void setManifesttotalpiece(String manifesttotalpiece) {  
165 - this.manifesttotalpiece = manifesttotalpiece == null ? null : manifesttotalpiece.trim();  
166 - }  
167 -  
168 - public String getManifesttotalweight() {  
169 - return manifesttotalweight;  
170 - }  
171 -  
172 - public void setManifesttotalweight(String manifesttotalweight) {  
173 - this.manifesttotalweight = manifesttotalweight == null ? null : manifesttotalweight.trim();  
174 - }  
175 -  
176 - public String getFlightno() {  
177 - return flightno;  
178 - }  
179 -  
180 - public void setFlightno(String flightno) {  
181 - this.flightno = flightno == null ? null : flightno.trim();  
182 - }  
183 -  
184 - public String getProductname() {  
185 - return productname;  
186 - }  
187 -  
188 - public void setProductname(String productname) {  
189 - this.productname = productname == null ? null : productname.trim();  
190 - }  
191 -  
192 - public String getCustomsstatus() {  
193 - return customsstatus;  
194 - }  
195 -  
196 - public void setCustomsstatus(String customsstatus) {  
197 - this.customsstatus = customsstatus == null ? null : customsstatus.trim();  
198 - }  
199 -  
200 - public String getCarrier1() {  
201 - return carrier1;  
202 - }  
203 -  
204 - public void setCarrier1(String carrier1) {  
205 - this.carrier1 = carrier1 == null ? null : carrier1.trim();  
206 - }  
207 -  
208 - public String getArrivalstation1() {  
209 - return arrivalstation1;  
210 - }  
211 -  
212 - public void setArrivalstation1(String arrivalstation1) {  
213 - this.arrivalstation1 = arrivalstation1 == null ? null : arrivalstation1.trim();  
214 - }  
215 -  
216 - public String getCarrier2() {  
217 - return carrier2;  
218 - }  
219 -  
220 - public void setCarrier2(String carrier2) {  
221 - this.carrier2 = carrier2 == null ? null : carrier2.trim();  
222 - }  
223 -  
224 - public String getArrivalstation2() {  
225 - return arrivalstation2;  
226 - }  
227 -  
228 - public void setArrivalstation2(String arrivalstation2) {  
229 - this.arrivalstation2 = arrivalstation2 == null ? null : arrivalstation2.trim();  
230 - }  
231 -  
232 - public String getCarrier3() {  
233 - return carrier3;  
234 - }  
235 -  
236 - public void setCarrier3(String carrier3) {  
237 - this.carrier3 = carrier3 == null ? null : carrier3.trim();  
238 - }  
239 -  
240 - public String getArrivalstation3() {  
241 - return arrivalstation3;  
242 - }  
243 -  
244 - public void setArrivalstation3(String arrivalstation3) {  
245 - this.arrivalstation3 = arrivalstation3 == null ? null : arrivalstation3.trim();  
246 - }  
247 -  
248 - public String getPaymode() {  
249 - return paymode;  
250 - }  
251 -  
252 - public void setPaymode(String paymode) {  
253 - this.paymode = paymode == null ? null : paymode.trim();  
254 - }  
255 -  
256 - public String getSpecialgoodscode() {  
257 - return specialgoodscode;  
258 - }  
259 -  
260 - public void setSpecialgoodscode(String specialgoodscode) {  
261 - this.specialgoodscode = specialgoodscode == null ? null : specialgoodscode.trim();  
262 - }  
263 -  
264 - public String getCustomscode() {  
265 - return customscode;  
266 - }  
267 -  
268 - public void setCustomscode(String customscode) {  
269 - this.customscode = customscode == null ? null : customscode.trim();  
270 - }  
271 -  
272 - public String getShippername() {  
273 - return shippername;  
274 - }  
275 -  
276 - public void setShippername(String shippername) {  
277 - this.shippername = shippername == null ? null : shippername.trim();  
278 - }  
279 -  
280 - public String getShipperaddress() {  
281 - return shipperaddress;  
282 - }  
283 -  
284 - public void setShipperaddress(String shipperaddress) {  
285 - this.shipperaddress = shipperaddress == null ? null : shipperaddress.trim();  
286 - }  
287 -  
288 - public String getConsigneename() {  
289 - return consigneename;  
290 - }  
291 -  
292 - public void setConsigneename(String consigneename) {  
293 - this.consigneename = consigneename == null ? null : consigneename.trim();  
294 - }  
295 -  
296 - public String getConsigneeaddress() {  
297 - return consigneeaddress;  
298 - }  
299 -  
300 - public void setConsigneeaddress(String consigneeaddress) {  
301 - this.consigneeaddress = consigneeaddress == null ? null : consigneeaddress.trim();  
302 - }  
303 -  
304 - public String getReceiptinformation() {  
305 - return receiptinformation;  
306 - }  
307 -  
308 - public void setReceiptinformation(String receiptinformation) {  
309 - this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();  
310 - }  
311 -  
312 - public Date getCreatedate() {  
313 - return createdate;  
314 - }  
315 -  
316 - public void setCreatedate(Date createdate) {  
317 - this.createdate = createdate;  
318 - }  
319 -  
320 - public Date getFlightDate() {  
321 - return flightDate;  
322 - }  
323 -  
324 - public void setFlightDate(Date flightDate) {  
325 - this.flightDate = flightDate;  
326 - }  
327 -  
328 - public String getStatus() {  
329 - return status;  
330 - }  
331 -  
332 - public void setStatus(String status) {  
333 - this.status = status == null ? null : status.trim();  
334 - }  
335 -  
336 - public String getIsbatch() {  
337 - return isbatch;  
338 - }  
339 -  
340 - public void setIsbatch(String isbatch) {  
341 - this.isbatch = isbatch == null ? null : isbatch.trim();  
342 - }  
343 -  
344 - public String getOriginatingstationBill() {  
345 - return originatingstationBill;  
346 - }  
347 -  
348 - public void setOriginatingstationBill(String originatingstationBill) {  
349 - this.originatingstationBill = originatingstationBill == null ? null : originatingstationBill.trim();  
350 - }  
351 -  
352 - public String getDestinationstationBill() {  
353 - return destinationstationBill;  
354 - }  
355 -  
356 - public void setDestinationstationBill(String destinationstationBill) {  
357 - this.destinationstationBill = destinationstationBill == null ? null : destinationstationBill.trim();  
358 - }  
359 -  
360 - public String getReportorder() {  
361 - return reportorder;  
362 - }  
363 -  
364 - public void setReportorder(String reportorder) {  
365 - this.reportorder = reportorder == null ? null : reportorder.trim();  
366 - }  
367 -  
368 - public String getIslast() {  
369 - return islast;  
370 - }  
371 -  
372 - public void setIslast(String islast) {  
373 - this.islast = islast == null ? null : islast.trim();  
374 - }  
375 -  
376 - public String getShipperCode() {  
377 - return shipperCode;  
378 - }  
379 -  
380 - public void setShipperCode(String shipperCode) {  
381 - this.shipperCode = shipperCode == null ? null : shipperCode.trim();  
382 - }  
383 -  
384 - public String getShipperCountrycode() {  
385 - return shipperCountrycode;  
386 - }  
387 -  
388 - public void setShipperCountrycode(String shipperCountrycode) {  
389 - this.shipperCountrycode = shipperCountrycode == null ? null : shipperCountrycode.trim();  
390 - }  
391 -  
392 - public String getShipperPhone() {  
393 - return shipperPhone;  
394 - }  
395 -  
396 - public void setShipperPhone(String shipperPhone) {  
397 - this.shipperPhone = shipperPhone == null ? null : shipperPhone.trim();  
398 - }  
399 -  
400 - public String getShipperFax() {  
401 - return shipperFax;  
402 - }  
403 -  
404 - public void setShipperFax(String shipperFax) {  
405 - this.shipperFax = shipperFax == null ? null : shipperFax.trim();  
406 - }  
407 -  
408 - public String getConsigneeCode() {  
409 - return consigneeCode;  
410 - }  
411 -  
412 - public void setConsigneeCode(String consigneeCode) {  
413 - this.consigneeCode = consigneeCode == null ? null : consigneeCode.trim();  
414 - }  
415 -  
416 - public String getConsigneeCountrycode() {  
417 - return consigneeCountrycode;  
418 - }  
419 -  
420 - public void setConsigneeCountrycode(String consigneeCountrycode) {  
421 - this.consigneeCountrycode = consigneeCountrycode == null ? null : consigneeCountrycode.trim();  
422 - }  
423 -  
424 - public String getConsigneeFax() {  
425 - return consigneeFax;  
426 - }  
427 -  
428 - public void setConsigneeFax(String consigneeFax) {  
429 - this.consigneeFax = consigneeFax == null ? null : consigneeFax.trim();  
430 - }  
431 -  
432 - public String getSpecificConsigneename() {  
433 - return specificConsigneename;  
434 - }  
435 -  
436 - public void setSpecificConsigneename(String specificConsigneename) {  
437 - this.specificConsigneename = specificConsigneename == null ? null : specificConsigneename.trim();  
438 - }  
439 -  
440 - public String getSpecificConsigneePhone() {  
441 - return specificConsigneePhone;  
442 - }  
443 -  
444 - public void setSpecificConsigneePhone(String specificConsigneePhone) {  
445 - this.specificConsigneePhone = specificConsigneePhone == null ? null : specificConsigneePhone.trim();  
446 - }  
447 -  
448 - public String getConsigneePhone() {  
449 - return consigneePhone;  
450 - }  
451 -  
452 - public void setConsigneePhone(String consigneePhone) {  
453 - this.consigneePhone = consigneePhone == null ? null : consigneePhone.trim();  
454 - }  
455 -  
456 - public ORIGINMANIFESTMASTER() {  
457 -  
458 - }  
459 - public ORIGINMANIFESTMASTER(CustomReception customReception) {  
460 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
461 - this.flightno = customReception.getFlightNo();  
462 - this.receiptinformation = customReception.getResponseText();  
463 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
464 - this.flightDate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());  
465 - }  
466 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
467 - }  
468 -  
469 - @Override  
470 - public int masterAnalysisReception() {  
471 - //更新主单回执  
472 - int i = originmanifestmasterMapper.updateRECEIPTION(this);  
473 - //获取分单autoid  
474 - List<ORIGINMANIFESTMASTER> originmanifestmasterList = originmanifestmasterMapper.selectAutoIdByAwb(this);  
475 - if(!originmanifestmasterList.isEmpty()){  
476 - ORIGINMANIFESTMASTER originMaster = originmanifestmasterList.get(0);  
477 - String autoId = originMaster.getAutoid();  
478 -  
479 - //插入sendlog记录表  
480 - log.info("即将插入日志运单号为:"+waybillnomaster+"->autoid="+autoId);  
481 - int ii =sendLogService.insertSendlog("MT1201",receiptinformation,autoId);;  
482 -  
483 - if (i>0 && ii>0){  
484 - log.info("运单号 {} 原始回执更新成功",waybillnomaster);  
485 - return 1;  
486 - }  
487 - }  
488 - return 0;  
489 - }  
490 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class Originmanifestsecondary extends WlptBaseModel {  
16 - private String autoid;  
17 -  
18 - private String waybillnomaster;  
19 -  
20 - private String waybillnosecondary;  
21 -  
22 - private String weight;  
23 -  
24 - private String piece;  
25 -  
26 - private String manifestpiece;  
27 -  
28 - private String manifestweight;  
29 -  
30 - private String productname;  
31 -  
32 - private String paymode;  
33 -  
34 - private String specialgoodscode;  
35 -  
36 - private String customscode;  
37 -  
38 - private String shippername;  
39 -  
40 - private String shipperaddress;  
41 -  
42 - private String consigneename;  
43 -  
44 - private String consigneeaddress;  
45 -  
46 - private Date createdate;  
47 -  
48 - private String originmanifestmasterautoid;  
49 -  
50 - private String customsstatus;  
51 -  
52 - private String status;  
53 -  
54 - private String receiption;  
55 -  
56 - private String originatingstationBill;  
57 -  
58 - private String destinationstationBill;  
59 -  
60 - private String shipperCode;  
61 -  
62 - private String shipperCountrycode;  
63 -  
64 - private String shipperPhone;  
65 -  
66 - private String shipperFax;  
67 -  
68 - private String consigneeCode;  
69 -  
70 - private String consigneeCountrycode;  
71 -  
72 - private String consigneeFax;  
73 -  
74 - private String specificConsigneename;  
75 -  
76 - private String specificConsigneePhone;  
77 -  
78 - private String consigneePhone;  
79 -  
80 - private ORIGINMANIFESTMASTER master;  
81 -  
82 - public String getAutoid() {  
83 - return autoid;  
84 - }  
85 -  
86 - public void setAutoid(String autoid) {  
87 - this.autoid = autoid == null ? null : autoid.trim();  
88 - }  
89 -  
90 - public String getWaybillnomaster() {  
91 - return waybillnomaster;  
92 - }  
93 -  
94 - public void setWaybillnomaster(String waybillnomaster) {  
95 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
96 - }  
97 -  
98 - public String getWaybillnosecondary() {  
99 - return waybillnosecondary;  
100 - }  
101 -  
102 - public void setWaybillnosecondary(String waybillnosecondary) {  
103 - this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();  
104 - }  
105 -  
106 - public String getWeight() {  
107 - return weight;  
108 - }  
109 -  
110 - public void setWeight(String weight) {  
111 - this.weight = weight == null ? null : weight.trim();  
112 - }  
113 -  
114 - public String getPiece() {  
115 - return piece;  
116 - }  
117 -  
118 - public void setPiece(String piece) {  
119 - this.piece = piece == null ? null : piece.trim();  
120 - }  
121 -  
122 - public String getManifestpiece() {  
123 - return manifestpiece;  
124 - }  
125 -  
126 - public void setManifestpiece(String manifestpiece) {  
127 - this.manifestpiece = manifestpiece == null ? null : manifestpiece.trim();  
128 - }  
129 -  
130 - public String getManifestweight() {  
131 - return manifestweight;  
132 - }  
133 -  
134 - public void setManifestweight(String manifestweight) {  
135 - this.manifestweight = manifestweight == null ? null : manifestweight.trim();  
136 - }  
137 -  
138 - public String getProductname() {  
139 - return productname;  
140 - }  
141 -  
142 - public void setProductname(String productname) {  
143 - this.productname = productname == null ? null : productname.trim();  
144 - }  
145 -  
146 - public String getPaymode() {  
147 - return paymode;  
148 - }  
149 -  
150 - public void setPaymode(String paymode) {  
151 - this.paymode = paymode == null ? null : paymode.trim();  
152 - }  
153 -  
154 - public String getSpecialgoodscode() {  
155 - return specialgoodscode;  
156 - }  
157 -  
158 - public void setSpecialgoodscode(String specialgoodscode) {  
159 - this.specialgoodscode = specialgoodscode == null ? null : specialgoodscode.trim();  
160 - }  
161 -  
162 - public String getCustomscode() {  
163 - return customscode;  
164 - }  
165 -  
166 - public void setCustomscode(String customscode) {  
167 - this.customscode = customscode == null ? null : customscode.trim();  
168 - }  
169 -  
170 - public String getShippername() {  
171 - return shippername;  
172 - }  
173 -  
174 - public void setShippername(String shippername) {  
175 - this.shippername = shippername == null ? null : shippername.trim();  
176 - }  
177 -  
178 - public String getShipperaddress() {  
179 - return shipperaddress;  
180 - }  
181 -  
182 - public void setShipperaddress(String shipperaddress) {  
183 - this.shipperaddress = shipperaddress == null ? null : shipperaddress.trim();  
184 - }  
185 -  
186 - public String getConsigneename() {  
187 - return consigneename;  
188 - }  
189 -  
190 - public void setConsigneename(String consigneename) {  
191 - this.consigneename = consigneename == null ? null : consigneename.trim();  
192 - }  
193 -  
194 - public String getConsigneeaddress() {  
195 - return consigneeaddress;  
196 - }  
197 -  
198 - public void setConsigneeaddress(String consigneeaddress) {  
199 - this.consigneeaddress = consigneeaddress == null ? null : consigneeaddress.trim();  
200 - }  
201 -  
202 - public Date getCreatedate() {  
203 - return createdate;  
204 - }  
205 -  
206 - public void setCreatedate(Date createdate) {  
207 - this.createdate = createdate;  
208 - }  
209 -  
210 - public String getOriginmanifestmasterautoid() {  
211 - return originmanifestmasterautoid;  
212 - }  
213 -  
214 - public void setOriginmanifestmasterautoid(String originmanifestmasterautoid) {  
215 - this.originmanifestmasterautoid = originmanifestmasterautoid == null ? null : originmanifestmasterautoid.trim();  
216 - }  
217 -  
218 - public String getCustomsstatus() {  
219 - return customsstatus;  
220 - }  
221 -  
222 - public void setCustomsstatus(String customsstatus) {  
223 - this.customsstatus = customsstatus == null ? null : customsstatus.trim();  
224 - }  
225 -  
226 - public String getStatus() {  
227 - return status;  
228 - }  
229 -  
230 - public void setStatus(String status) {  
231 - this.status = status == null ? null : status.trim();  
232 - }  
233 -  
234 - public String getReceiption() {  
235 - return receiption;  
236 - }  
237 -  
238 - public void setReceiption(String receiption) {  
239 - this.receiption = receiption == null ? null : receiption.trim();  
240 - }  
241 -  
242 - public String getOriginatingstationBill() {  
243 - return originatingstationBill;  
244 - }  
245 -  
246 - public void setOriginatingstationBill(String originatingstationBill) {  
247 - this.originatingstationBill = originatingstationBill == null ? null : originatingstationBill.trim();  
248 - }  
249 -  
250 - public String getDestinationstationBill() {  
251 - return destinationstationBill;  
252 - }  
253 -  
254 - public void setDestinationstationBill(String destinationstationBill) {  
255 - this.destinationstationBill = destinationstationBill == null ? null : destinationstationBill.trim();  
256 - }  
257 -  
258 - public String getShipperCode() {  
259 - return shipperCode;  
260 - }  
261 -  
262 - public void setShipperCode(String shipperCode) {  
263 - this.shipperCode = shipperCode == null ? null : shipperCode.trim();  
264 - }  
265 -  
266 - public String getShipperCountrycode() {  
267 - return shipperCountrycode;  
268 - }  
269 -  
270 - public void setShipperCountrycode(String shipperCountrycode) {  
271 - this.shipperCountrycode = shipperCountrycode == null ? null : shipperCountrycode.trim();  
272 - }  
273 -  
274 - public String getShipperPhone() {  
275 - return shipperPhone;  
276 - }  
277 -  
278 - public void setShipperPhone(String shipperPhone) {  
279 - this.shipperPhone = shipperPhone == null ? null : shipperPhone.trim();  
280 - }  
281 -  
282 - public String getShipperFax() {  
283 - return shipperFax;  
284 - }  
285 -  
286 - public void setShipperFax(String shipperFax) {  
287 - this.shipperFax = shipperFax == null ? null : shipperFax.trim();  
288 - }  
289 -  
290 - public String getConsigneeCode() {  
291 - return consigneeCode;  
292 - }  
293 -  
294 - public void setConsigneeCode(String consigneeCode) {  
295 - this.consigneeCode = consigneeCode == null ? null : consigneeCode.trim();  
296 - }  
297 -  
298 - public String getConsigneeCountrycode() {  
299 - return consigneeCountrycode;  
300 - }  
301 -  
302 - public void setConsigneeCountrycode(String consigneeCountrycode) {  
303 - this.consigneeCountrycode = consigneeCountrycode == null ? null : consigneeCountrycode.trim();  
304 - }  
305 -  
306 - public String getConsigneeFax() {  
307 - return consigneeFax;  
308 - }  
309 -  
310 - public void setConsigneeFax(String consigneeFax) {  
311 - this.consigneeFax = consigneeFax == null ? null : consigneeFax.trim();  
312 - }  
313 -  
314 - public String getSpecificConsigneename() {  
315 - return specificConsigneename;  
316 - }  
317 -  
318 - public void setSpecificConsigneename(String specificConsigneename) {  
319 - this.specificConsigneename = specificConsigneename == null ? null : specificConsigneename.trim();  
320 - }  
321 -  
322 - public String getSpecificConsigneePhone() {  
323 - return specificConsigneePhone;  
324 - }  
325 -  
326 - public void setSpecificConsigneePhone(String specificConsigneePhone) {  
327 - this.specificConsigneePhone = specificConsigneePhone == null ? null : specificConsigneePhone.trim();  
328 - }  
329 -  
330 - public String getConsigneePhone() {  
331 - return consigneePhone;  
332 - }  
333 -  
334 - public void setConsigneePhone(String consigneePhone) {  
335 - this.consigneePhone = consigneePhone == null ? null : consigneePhone.trim();  
336 - }  
337 -  
338 - public Originmanifestsecondary(){  
339 -  
340 - }  
341 - public Originmanifestsecondary(CustomReception customReception) {  
342 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
343 - this.waybillnosecondary = customReception.getWayBillSecond().split("_")[1];  
344 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
345 - this.receiption = customReception.getResponseText();  
346 -  
347 - this.master = new ORIGINMANIFESTMASTER(customReception);  
348 - }  
349 -  
350 - @Override  
351 - public int secondAnalysisReception() {  
352 - //更新分单回执  
353 -  
354 - //todo:这里根据航班号航班日期还要反查下分单的主单id  
355 -  
356 - List<ORIGINMANIFESTMASTER> masterlist = originmanifestmasterMapper.selectAutoIdByAwb(this.master);  
357 - if(!masterlist.isEmpty()){  
358 - ORIGINMANIFESTMASTER masterResult = masterlist.get(0);  
359 - this.originmanifestmasterautoid = masterResult.getAutoid();  
360 -  
361 - }  
362 - int i = originmanifestsecondaryMapper.updateRECEIPTION(this);  
363 - //获取分单autoid  
364 - List<Originmanifestsecondary> originmanifestsecondaryList = originmanifestsecondaryMapper.selectAutoIdByawbAawbH(this);  
365 - if(!originmanifestsecondaryList.isEmpty()){  
366 - Originmanifestsecondary originSecond = originmanifestsecondaryList.get(0);  
367 - String autoId = originSecond.getAutoid();  
368 - //插入sendlog记录表  
369 - log.info("即将插入日志运单号为:"+waybillnosecondary+"->autoid="+autoId);  
370 - int ii = sendLogService.insertSendlog("MT1201",receiption,autoId);  
371 -  
372 - if (i>0 && ii>0){  
373 - log.info("运单号 {}_{} 原始回执更新成功",waybillnomaster,waybillnosecondary);  
374 - return 1;  
375 - }  
376 - }  
377 - return 0;  
378 - }  
379 -}  
1 -package com.tianbo.analysis.model;  
2 -  
3 -import com.tianbo.analysis.bean.WlptBaseModel;  
4 -import com.tianbo.analysis.tools.AWBTools;  
5 -import com.tianbo.util.Date.DateUtil;  
6 -import lombok.Data;  
7 -import lombok.extern.slf4j.Slf4j;  
8 -import org.apache.commons.lang.StringUtils;  
9 -  
10 -import java.util.Date;  
11 -import java.util.List;  
12 -  
13 -@Data  
14 -@Slf4j  
15 -public class PREPAREMASTER extends WlptBaseModel {  
16 - private String autoid;  
17 -  
18 - private String flightno;  
19 -  
20 - private Date flightdate;  
21 -  
22 - private String originatingstation;  
23 -  
24 - private String destinationstation;  
25 -  
26 - private String waybillnomaster;  
27 -  
28 - private String totalweight;  
29 -  
30 - private String totalpiece;  
31 -  
32 - private String preparetotalpiece;  
33 -  
34 - private String preparetotalweight;  
35 -  
36 - private Date stowagedate;  
37 -  
38 - private String status;  
39 -  
40 - private String carrier;  
41 -  
42 - private String customsstatus;  
43 -  
44 - private String paymode;  
45 -  
46 - private String customscode;  
47 -  
48 - private String agentcode;  
49 -  
50 - private String agentname;  
51 -  
52 - private String shippername;  
53 -  
54 - private String shippercity;  
55 -  
56 - private String shipperaddress;  
57 -  
58 - private String consigneename;  
59 -  
60 - private String consigneecity;  
61 -  
62 - private String consigneeaddress;  
63 -  
64 - private String receiptinformation;  
65 -  
66 - private Date createdate;  
67 -  
68 - private String productname;  
69 -  
70 - private String shipperCode;  
71 -  
72 - private String shipperCountrycode;  
73 -  
74 - private String shipperPhone;  
75 -  
76 - private String shipperFax;  
77 -  
78 - private String consigneeCode;  
79 -  
80 - private String consigneeCountrycode;  
81 -  
82 - private String consigneeFax;  
83 -  
84 - private String consigneePhone;  
85 -  
86 - private String shipperAeo;  
87 -  
88 - private String consigneeAeo;  
89 -  
90 - private String unloadingstation;  
91 -  
92 - public String getAutoid() {  
93 - return autoid;  
94 - }  
95 -  
96 - public void setAutoid(String autoid) {  
97 - this.autoid = autoid == null ? null : autoid.trim();  
98 - }  
99 -  
100 - public String getFlightno() {  
101 - return flightno;  
102 - }  
103 -  
104 - public void setFlightno(String flightno) {  
105 - this.flightno = flightno == null ? null : flightno.trim();  
106 - }  
107 -  
108 - public Date getFlightdate() {  
109 - return flightdate;  
110 - }  
111 -  
112 - public void setFlightdate(Date flightdate) {  
113 - this.flightdate = flightdate;  
114 - }  
115 -  
116 - public String getOriginatingstation() {  
117 - return originatingstation;  
118 - }  
119 -  
120 - public void setOriginatingstation(String originatingstation) {  
121 - this.originatingstation = originatingstation == null ? null : originatingstation.trim();  
122 - }  
123 -  
124 - public String getDestinationstation() {  
125 - return destinationstation;  
126 - }  
127 -  
128 - public void setDestinationstation(String destinationstation) {  
129 - this.destinationstation = destinationstation == null ? null : destinationstation.trim();  
130 - }  
131 -  
132 - public String getWaybillnomaster() {  
133 - return waybillnomaster;  
134 - }  
135 -  
136 - public void setWaybillnomaster(String waybillnomaster) {  
137 - this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();  
138 - }  
139 -  
140 - public String getTotalweight() {  
141 - return totalweight;  
142 - }  
143 -  
144 - public void setTotalweight(String totalweight) {  
145 - this.totalweight = totalweight == null ? null : totalweight.trim();  
146 - }  
147 -  
148 - public String getTotalpiece() {  
149 - return totalpiece;  
150 - }  
151 -  
152 - public void setTotalpiece(String totalpiece) {  
153 - this.totalpiece = totalpiece == null ? null : totalpiece.trim();  
154 - }  
155 -  
156 - public String getPreparetotalpiece() {  
157 - return preparetotalpiece;  
158 - }  
159 -  
160 - public void setPreparetotalpiece(String preparetotalpiece) {  
161 - this.preparetotalpiece = preparetotalpiece == null ? null : preparetotalpiece.trim();  
162 - }  
163 -  
164 - public String getPreparetotalweight() {  
165 - return preparetotalweight;  
166 - }  
167 -  
168 - public void setPreparetotalweight(String preparetotalweight) {  
169 - this.preparetotalweight = preparetotalweight == null ? null : preparetotalweight.trim();  
170 - }  
171 -  
172 - public Date getStowagedate() {  
173 - return stowagedate;  
174 - }  
175 -  
176 - public void setStowagedate(Date stowagedate) {  
177 - this.stowagedate = stowagedate;  
178 - }  
179 -  
180 - public String getStatus() {  
181 - return status;  
182 - }  
183 -  
184 - public void setStatus(String status) {  
185 - this.status = status == null ? null : status.trim();  
186 - }  
187 -  
188 - public String getCarrier() {  
189 - return carrier;  
190 - }  
191 -  
192 - public void setCarrier(String carrier) {  
193 - this.carrier = carrier == null ? null : carrier.trim();  
194 - }  
195 -  
196 - public String getCustomsstatus() {  
197 - return customsstatus;  
198 - }  
199 -  
200 - public void setCustomsstatus(String customsstatus) {  
201 - this.customsstatus = customsstatus == null ? null : customsstatus.trim();  
202 - }  
203 -  
204 - public String getPaymode() {  
205 - return paymode;  
206 - }  
207 -  
208 - public void setPaymode(String paymode) {  
209 - this.paymode = paymode == null ? null : paymode.trim();  
210 - }  
211 -  
212 - public String getCustomscode() {  
213 - return customscode;  
214 - }  
215 -  
216 - public void setCustomscode(String customscode) {  
217 - this.customscode = customscode == null ? null : customscode.trim();  
218 - }  
219 -  
220 - public String getAgentcode() {  
221 - return agentcode;  
222 - }  
223 -  
224 - public void setAgentcode(String agentcode) {  
225 - this.agentcode = agentcode == null ? null : agentcode.trim();  
226 - }  
227 -  
228 - public String getAgentname() {  
229 - return agentname;  
230 - }  
231 -  
232 - public void setAgentname(String agentname) {  
233 - this.agentname = agentname == null ? null : agentname.trim();  
234 - }  
235 -  
236 - public String getShippername() {  
237 - return shippername;  
238 - }  
239 -  
240 - public void setShippername(String shippername) {  
241 - this.shippername = shippername == null ? null : shippername.trim();  
242 - }  
243 -  
244 - public String getShippercity() {  
245 - return shippercity;  
246 - }  
247 -  
248 - public void setShippercity(String shippercity) {  
249 - this.shippercity = shippercity == null ? null : shippercity.trim();  
250 - }  
251 -  
252 - public String getShipperaddress() {  
253 - return shipperaddress;  
254 - }  
255 -  
256 - public void setShipperaddress(String shipperaddress) {  
257 - this.shipperaddress = shipperaddress == null ? null : shipperaddress.trim();  
258 - }  
259 -  
260 - public String getConsigneename() {  
261 - return consigneename;  
262 - }  
263 -  
264 - public void setConsigneename(String consigneename) {  
265 - this.consigneename = consigneename == null ? null : consigneename.trim();  
266 - }  
267 -  
268 - public String getConsigneecity() {  
269 - return consigneecity;  
270 - }  
271 -  
272 - public void setConsigneecity(String consigneecity) {  
273 - this.consigneecity = consigneecity == null ? null : consigneecity.trim();  
274 - }  
275 -  
276 - public String getConsigneeaddress() {  
277 - return consigneeaddress;  
278 - }  
279 -  
280 - public void setConsigneeaddress(String consigneeaddress) {  
281 - this.consigneeaddress = consigneeaddress == null ? null : consigneeaddress.trim();  
282 - }  
283 -  
284 - public String getReceiptinformation() {  
285 - return receiptinformation;  
286 - }  
287 -  
288 - public void setReceiptinformation(String receiptinformation) {  
289 - this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();  
290 - }  
291 -  
292 - public Date getCreatedate() {  
293 - return createdate;  
294 - }  
295 -  
296 - public void setCreatedate(Date createdate) {  
297 - this.createdate = createdate;  
298 - }  
299 -  
300 - public String getProductname() {  
301 - return productname;  
302 - }  
303 -  
304 - public void setProductname(String productname) {  
305 - this.productname = productname == null ? null : productname.trim();  
306 - }  
307 -  
308 - public String getShipperCode() {  
309 - return shipperCode;  
310 - }  
311 -  
312 - public void setShipperCode(String shipperCode) {  
313 - this.shipperCode = shipperCode == null ? null : shipperCode.trim();  
314 - }  
315 -  
316 - public String getShipperCountrycode() {  
317 - return shipperCountrycode;  
318 - }  
319 -  
320 - public void setShipperCountrycode(String shipperCountrycode) {  
321 - this.shipperCountrycode = shipperCountrycode == null ? null : shipperCountrycode.trim();  
322 - }  
323 -  
324 - public String getShipperPhone() {  
325 - return shipperPhone;  
326 - }  
327 -  
328 - public void setShipperPhone(String shipperPhone) {  
329 - this.shipperPhone = shipperPhone == null ? null : shipperPhone.trim();  
330 - }  
331 -  
332 - public String getShipperFax() {  
333 - return shipperFax;  
334 - }  
335 -  
336 - public void setShipperFax(String shipperFax) {  
337 - this.shipperFax = shipperFax == null ? null : shipperFax.trim();  
338 - }  
339 -  
340 - public String getConsigneeCode() {  
341 - return consigneeCode;  
342 - }  
343 -  
344 - public void setConsigneeCode(String consigneeCode) {  
345 - this.consigneeCode = consigneeCode == null ? null : consigneeCode.trim();  
346 - }  
347 -  
348 - public String getConsigneeCountrycode() {  
349 - return consigneeCountrycode;  
350 - }  
351 -  
352 - public void setConsigneeCountrycode(String consigneeCountrycode) {  
353 - this.consigneeCountrycode = consigneeCountrycode == null ? null : consigneeCountrycode.trim();  
354 - }  
355 -  
356 - public String getConsigneeFax() {  
357 - return consigneeFax;  
358 - }  
359 -  
360 - public void setConsigneeFax(String consigneeFax) {  
361 - this.consigneeFax = consigneeFax == null ? null : consigneeFax.trim();  
362 - }  
363 -  
364 - public String getConsigneePhone() {  
365 - return consigneePhone;  
366 - }  
367 -  
368 - public void setConsigneePhone(String consigneePhone) {  
369 - this.consigneePhone = consigneePhone == null ? null : consigneePhone.trim();  
370 - }  
371 -  
372 - public String getShipperAeo() {  
373 - return shipperAeo;  
374 - }  
375 -  
376 - public void setShipperAeo(String shipperAeo) {  
377 - this.shipperAeo = shipperAeo == null ? null : shipperAeo.trim();  
378 - }  
379 -  
380 - public String getConsigneeAeo() {  
381 - return consigneeAeo;  
382 - }  
383 -  
384 - public void setConsigneeAeo(String consigneeAeo) {  
385 - this.consigneeAeo = consigneeAeo == null ? null : consigneeAeo.trim();  
386 - }  
387 -  
388 - public String getUnloadingstation() {  
389 - return unloadingstation;  
390 - }  
391 -  
392 - public void setUnloadingstation(String unloadingstation) {  
393 - this.unloadingstation = unloadingstation == null ? null : unloadingstation.trim();  
394 - }  
395 -  
396 - public PREPAREMASTER() {  
397 -  
398 - }  
399 - public PREPAREMASTER(CustomReception customReception) {  
400 - String[] flightInfo = AWBTools.splitFlight(customReception.getFlightNo());  
401 - this.setFlightno(flightInfo[1]);  
402 - this.setCarrier(flightInfo[0]);  
403 - if (!StringUtils.isEmpty(customReception.getFlightDate())) {  
404 - this.flightdate=DateUtil.formatByyyyyMMdd(customReception.getFlightDate());  
405 - }  
406 - this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());  
407 - this.status = AWBTools.transCusRspCode(customReception.getResponseCode());  
408 - this.receiptinformation = customReception.getResponseText();  
409 - }  
410 -  
411 - @Override  
412 - public int masterAnalysisReception() {  
413 -//更新主单回执  
414 - int i = preparemasterMapper.updateRECEIPTION(this);  
415 - //获取分单autoid  
416 - List<PREPAREMASTER> preparemasterList = preparemasterMapper.selectAutoIdByAwb(this);  
417 - if(!preparemasterList.isEmpty()){  
418 - PREPAREMASTER originMaster = preparemasterList.get(0);  
419 - String autoId = originMaster.getAutoid();  
420 -  
421 - //插入sendlog记录表  
422 - log.info("即将插入日志运单号为:"+waybillnomaster+"->autoid="+autoId);  
423 - int ii =sendLogService.insertSendlog("MT2201",receiptinformation,autoId);  
424 -  
425 - if (i>0 && ii>0){  
426 - log.info("运单号 {} 预配回执更新成功",waybillnomaster);  
427 - return 1;  
428 - }  
429 - }  
430 - return 0;  
431 - }  
432 -}