正在显示
136 个修改的文件
包含
3742 行增加
和
0 行删除
.DS_Store
0 → 100644
不能预览此文件类型
.classpath
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<classpath> | ||
3 | + <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
4 | + <attributes> | ||
5 | + <attribute name="optional" value="true"/> | ||
6 | + <attribute name="maven.pomderived" value="true"/> | ||
7 | + </attributes> | ||
8 | + </classpathentry> | ||
9 | + <classpathentry kind="src" path="src/resources"/> | ||
10 | + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
11 | + <attributes> | ||
12 | + <attribute name="maven.pomderived" value="true"/> | ||
13 | + </attributes> | ||
14 | + </classpathentry> | ||
15 | + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
16 | + <attributes> | ||
17 | + <attribute name="maven.pomderived" value="true"/> | ||
18 | + </attributes> | ||
19 | + </classpathentry> | ||
20 | + <classpathentry kind="lib" path="lib/antlr-2.7.7.jar"/> | ||
21 | + <classpathentry kind="lib" path="lib/antlr-3.2.jar"/> | ||
22 | + <classpathentry kind="lib" path="lib/antlr-runtime-3.2.jar"/> | ||
23 | + <classpathentry kind="lib" path="lib/aopalliance-1.0.jar"/> | ||
24 | + <classpathentry kind="lib" path="lib/apiConfig.jar"/> | ||
25 | + <classpathentry kind="lib" path="lib/asm-3.3.jar"/> | ||
26 | + <classpathentry kind="lib" path="lib/bcprov-jdk15-1.45.jar"/> | ||
27 | + <classpathentry kind="lib" path="lib/c3p0-0.9.5.2.jar"/> | ||
28 | + <classpathentry kind="lib" path="lib/CL3Export.jar"/> | ||
29 | + <classpathentry kind="lib" path="lib/CL3Nonexport.jar"/> | ||
30 | + <classpathentry kind="lib" path="lib/com.ibm.mq.axis2.jar"/> | ||
31 | + <classpathentry kind="lib" path="lib/com.ibm.mq.commonservices.jar"/> | ||
32 | + <classpathentry kind="lib" path="lib/com.ibm.mq.defaultconfig.jar"/> | ||
33 | + <classpathentry kind="lib" path="lib/com.ibm.mq.fta.jar"/> | ||
34 | + <classpathentry kind="lib" path="lib/com.ibm.mq.headers.jar"/> | ||
35 | + <classpathentry kind="lib" path="lib/com.ibm.mq.jar"/> | ||
36 | + <classpathentry kind="lib" path="lib/com.ibm.mq.jmqi.jar"/> | ||
37 | + <classpathentry kind="lib" path="lib/com.ibm.mq.jms.Nojndi.jar"/> | ||
38 | + <classpathentry kind="lib" path="lib/com.ibm.mq.pcf.jar"/> | ||
39 | + <classpathentry kind="lib" path="lib/com.ibm.mq.postcard.jar"/> | ||
40 | + <classpathentry kind="lib" path="lib/com.ibm.mq.soap.jar"/> | ||
41 | + <classpathentry kind="lib" path="lib/com.ibm.mq.tools.ras.jar"/> | ||
42 | + <classpathentry kind="lib" path="lib/com.ibm.mqetclient.jar"/> | ||
43 | + <classpathentry kind="lib" path="lib/com.ibm.mqjms.jar"/> | ||
44 | + <classpathentry kind="lib" path="lib/commons-collections-3.2.1.jar"/> | ||
45 | + <classpathentry kind="lib" path="lib/commons-lang-2.5.jar"/> | ||
46 | + <classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/> | ||
47 | + <classpathentry kind="lib" path="lib/commons-pool-1.5.5.jar"/> | ||
48 | + <classpathentry kind="lib" path="lib/connector.jar"/> | ||
49 | + <classpathentry kind="lib" path="lib/cxf-2.3.2.jar"/> | ||
50 | + <classpathentry kind="lib" path="lib/cxf-xjc-boolean-2.3.2.jar"/> | ||
51 | + <classpathentry kind="lib" path="lib/cxf-xjc-bug671-2.3.2.jar"/> | ||
52 | + <classpathentry kind="lib" path="lib/cxf-xjc-dv-2.3.2.jar"/> | ||
53 | + <classpathentry kind="lib" path="lib/cxf-xjc-ts-2.3.2.jar"/> | ||
54 | + <classpathentry kind="lib" path="lib/dhbcore.jar"/> | ||
55 | + <classpathentry kind="lib" path="lib/FastInfoset-1.2.8.jar"/> | ||
56 | + <classpathentry kind="lib" path="lib/fscontext.jar"/> | ||
57 | + <classpathentry kind="lib" path="lib/geronimo-activation_1.1_spec-1.1.jar"/> | ||
58 | + <classpathentry kind="lib" path="lib/geronimo-annotation_1.0_spec-1.1.1.jar"/> | ||
59 | + <classpathentry kind="lib" path="lib/geronimo-javamail_1.4_spec-1.7.1.jar"/> | ||
60 | + <classpathentry kind="lib" path="lib/geronimo-jaxws_2.2_spec-1.0.jar"/> | ||
61 | + <classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.1.1.jar"/> | ||
62 | + <classpathentry kind="lib" path="lib/geronimo-servlet_3.0_spec-1.0.jar"/> | ||
63 | + <classpathentry kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/> | ||
64 | + <classpathentry kind="lib" path="lib/geronimo-ws-metadata_2.0_spec-1.1.3.jar"/> | ||
65 | + <classpathentry kind="lib" path="lib/HeartbeatService.jar"/> | ||
66 | + <classpathentry kind="lib" path="lib/IMFClient.1.0.0.jar"/> | ||
67 | + <classpathentry kind="lib" path="lib/imfmsg.jar"/> | ||
68 | + <classpathentry kind="lib" path="lib/jaxb-api-2.2.1.jar"/> | ||
69 | + <classpathentry kind="lib" path="lib/jaxb-impl-2.2.1.1.jar"/> | ||
70 | + <classpathentry kind="lib" path="lib/jaxb-xjc-2.2.1.1.jar"/> | ||
71 | + <classpathentry kind="lib" path="lib/jdom-1.1.3.jar"/> | ||
72 | + <classpathentry kind="lib" path="lib/jettison-1.2.jar"/> | ||
73 | + <classpathentry kind="lib" path="lib/jetty-continuation-7.2.2.v20101205.jar"/> | ||
74 | + <classpathentry kind="lib" path="lib/jetty-http-7.2.2.v20101205.jar"/> | ||
75 | + <classpathentry kind="lib" path="lib/jetty-io-7.2.2.v20101205.jar"/> | ||
76 | + <classpathentry kind="lib" path="lib/jetty-server-7.2.2.v20101205.jar"/> | ||
77 | + <classpathentry kind="lib" path="lib/jetty-util-7.2.2.v20101205.jar"/> | ||
78 | + <classpathentry kind="lib" path="lib/jms.jar"/> | ||
79 | + <classpathentry kind="lib" path="lib/jndi.jar"/> | ||
80 | + <classpathentry kind="lib" path="lib/jra-1.0-alpha-4.jar"/> | ||
81 | + <classpathentry kind="lib" path="lib/js-1.7R2.jar"/> | ||
82 | + <classpathentry kind="lib" path="lib/jsr173_1.0_api.jar"/> | ||
83 | + <classpathentry kind="lib" path="lib/jsr311-api-1.1.1.jar"/> | ||
84 | + <classpathentry kind="lib" path="lib/jta.jar"/> | ||
85 | + <classpathentry kind="lib" path="lib/ldap.jar"/> | ||
86 | + <classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/> | ||
87 | + <classpathentry kind="lib" path="lib/mchange-commons-java-0.2.11.jar"/> | ||
88 | + <classpathentry kind="lib" path="lib/neethi-2.0.4.jar"/> | ||
89 | + <classpathentry kind="lib" path="lib/ojdbc6.jar"/> | ||
90 | + <classpathentry kind="lib" path="lib/org.springframework.jdbc-3.0.0.CI-331.jar"/> | ||
91 | + <classpathentry kind="lib" path="lib/oro-2.0.8.jar"/> | ||
92 | + <classpathentry kind="lib" path="lib/ProcessService.jar"/> | ||
93 | + <classpathentry kind="lib" path="lib/providerutil.jar"/> | ||
94 | + <classpathentry kind="lib" path="lib/resolver.jar"/> | ||
95 | + <classpathentry kind="lib" path="lib/returnXml.jar"/> | ||
96 | + <classpathentry kind="lib" path="lib/rmm.jar"/> | ||
97 | + <classpathentry kind="lib" path="lib/saaj-api-1.3.jar"/> | ||
98 | + <classpathentry kind="lib" path="lib/saaj-impl-1.3.2.jar"/> | ||
99 | + <classpathentry kind="lib" path="lib/serializer-2.7.1.jar"/> | ||
100 | + <classpathentry kind="lib" path="lib/sigar.jar"/> | ||
101 | + <classpathentry kind="lib" path="lib/slf4j-api-1.6.1.jar"/> | ||
102 | + <classpathentry kind="lib" path="lib/slf4j-jdk14-1.6.1.jar"/> | ||
103 | + <classpathentry kind="lib" path="lib/spring-aop-3.0.5.RELEASE.jar"/> | ||
104 | + <classpathentry kind="lib" path="lib/spring-asm-3.0.5.RELEASE.jar"/> | ||
105 | + <classpathentry kind="lib" path="lib/spring-beans-3.0.5.RELEASE.jar"/> | ||
106 | + <classpathentry kind="lib" path="lib/spring-context-3.0.5.RELEASE.jar"/> | ||
107 | + <classpathentry kind="lib" path="lib/spring-core-3.0.5.RELEASE.jar"/> | ||
108 | + <classpathentry kind="lib" path="lib/spring-expression-3.0.5.RELEASE.jar"/> | ||
109 | + <classpathentry kind="lib" path="lib/spring-jms-3.0.5.RELEASE.jar"/> | ||
110 | + <classpathentry kind="lib" path="lib/spring-tx-3.0.5.RELEASE.jar"/> | ||
111 | + <classpathentry kind="lib" path="lib/spring-web-3.0.5.RELEASE.jar"/> | ||
112 | + <classpathentry kind="lib" path="lib/stax2-api-3.0.2.jar"/> | ||
113 | + <classpathentry kind="lib" path="lib/stringtemplate-3.2.jar"/> | ||
114 | + <classpathentry kind="lib" path="lib/UploadService.jar"/> | ||
115 | + <classpathentry kind="lib" path="lib/velocity-1.6.4.jar"/> | ||
116 | + <classpathentry kind="lib" path="lib/woodstox-core-asl-4.0.8.jar"/> | ||
117 | + <classpathentry kind="lib" path="lib/wsdl4j-1.6.2.jar"/> | ||
118 | + <classpathentry kind="lib" path="lib/wss4j-1.5.11.jar"/> | ||
119 | + <classpathentry kind="lib" path="lib/xalan-2.7.1.jar"/> | ||
120 | + <classpathentry kind="lib" path="lib/xbean_xpath.jar"/> | ||
121 | + <classpathentry kind="lib" path="lib/xbean.jar"/> | ||
122 | + <classpathentry kind="lib" path="lib/xml-resolver-1.2.jar"/> | ||
123 | + <classpathentry kind="lib" path="lib/xmlbeans-2.4.0.jar"/> | ||
124 | + <classpathentry kind="lib" path="lib/xmlbeans-qname.jar"/> | ||
125 | + <classpathentry kind="lib" path="lib/xmlpublic.jar"/> | ||
126 | + <classpathentry kind="lib" path="lib/XmlSchema-1.4.7.jar"/> | ||
127 | + <classpathentry kind="lib" path="lib/xmlsec-1.4.4.jar"/> | ||
128 | + <classpathentry kind="lib" path="lib/FSU.jar"/> | ||
129 | + <classpathentry kind="output" path="target/classes"/> | ||
130 | +</classpath> |
.project
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<projectDescription> | ||
3 | + <name>agent-imf-zwy</name> | ||
4 | + <comment></comment> | ||
5 | + <projects> | ||
6 | + </projects> | ||
7 | + <buildSpec> | ||
8 | + <buildCommand> | ||
9 | + <name>org.eclipse.jdt.core.javabuilder</name> | ||
10 | + <arguments> | ||
11 | + </arguments> | ||
12 | + </buildCommand> | ||
13 | + <buildCommand> | ||
14 | + <name>org.eclipse.m2e.core.maven2Builder</name> | ||
15 | + <arguments> | ||
16 | + </arguments> | ||
17 | + </buildCommand> | ||
18 | + </buildSpec> | ||
19 | + <natures> | ||
20 | + <nature>org.eclipse.jdt.core.javanature</nature> | ||
21 | + <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
22 | + </natures> | ||
23 | +</projectDescription> |
.settings/org.eclipse.core.resources.prefs
0 → 100644
.settings/org.eclipse.jdt.core.prefs
0 → 100644
1 | +eclipse.preferences.version=1 | ||
2 | +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | +org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
8 | +org.eclipse.jdt.core.compiler.source=1.8 |
.settings/org.eclipse.m2e.core.prefs
0 → 100644
init.log
0 → 100644
1 | +2018-06-10 17:19:45:error is file not found,没有发现本地配置文件 | ||
2 | +2018-06-11 16:30:12:error is file not found,没有发现本地配置文件 | ||
3 | +2018-06-29 05:14:59:error is file not found,没有发现本地配置文件 | ||
4 | +2018-06-29 05:16:25:error is file not found,没有发现本地配置文件 | ||
5 | +2018-07-02 19:05:29:error is file not found,没有发现本地配置文件 | ||
6 | +2018-10-10 19:01:43:error is file not found,没有发现本地配置文件 | ||
7 | +2018-10-11 15:14:01:error is file not found,没有发现本地配置文件 | ||
8 | +2018-10-11 15:14:45:error is file not found,没有发现本地配置文件 |
lib/CL3Export.jar
0 → 100755
不能预览此文件类型
lib/CL3Nonexport.jar
0 → 100755
不能预览此文件类型
lib/FSU.jar
0 → 100644
不能预览此文件类型
lib/FastInfoset-1.2.8.jar
0 → 100755
不能预览此文件类型
lib/HeartbeatService.jar
0 → 100755
不能预览此文件类型
lib/IMFClient.1.0.0.jar
0 → 100755
不能预览此文件类型
lib/ProcessService.jar
0 → 100755
不能预览此文件类型
lib/UploadService.jar
0 → 100755
不能预览此文件类型
lib/XmlSchema-1.4.7.jar
0 → 100755
不能预览此文件类型
lib/antlr-2.7.7.jar
0 → 100755
不能预览此文件类型
lib/antlr-3.2.jar
0 → 100755
不能预览此文件类型
lib/antlr-runtime-3.2.jar
0 → 100755
不能预览此文件类型
lib/aopalliance-1.0.jar
0 → 100755
不能预览此文件类型
lib/apiConfig.jar
0 → 100755
不能预览此文件类型
lib/asm-3.3.jar
0 → 100755
不能预览此文件类型
lib/bcprov-jdk15-1.45.jar
0 → 100755
不能预览此文件类型
lib/c3p0-0.9.5.2.jar
0 → 100644
不能预览此文件类型
lib/com.ibm.mq.axis2.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.commonservices.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.defaultconfig.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.fta.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.headers.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.jmqi.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.jms.Nojndi.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.pcf.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.postcard.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.soap.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mq.tools.ras.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mqetclient.jar
0 → 100755
不能预览此文件类型
lib/com.ibm.mqjms.jar
0 → 100755
不能预览此文件类型
lib/commons-collections-3.2.1.jar
0 → 100755
不能预览此文件类型
lib/commons-lang-2.5.jar
0 → 100755
不能预览此文件类型
lib/commons-logging-1.1.1.jar
0 → 100755
不能预览此文件类型
lib/commons-pool-1.5.5.jar
0 → 100755
不能预览此文件类型
lib/connector.jar
0 → 100755
不能预览此文件类型
lib/cxf-2.3.2.jar
0 → 100755
不能预览此文件类型
lib/cxf-xjc-boolean-2.3.2.jar
0 → 100755
不能预览此文件类型
lib/cxf-xjc-bug671-2.3.2.jar
0 → 100755
不能预览此文件类型
lib/cxf-xjc-dv-2.3.2.jar
0 → 100755
不能预览此文件类型
lib/cxf-xjc-ts-2.3.2.jar
0 → 100755
不能预览此文件类型
lib/dhbcore.jar
0 → 100755
不能预览此文件类型
lib/fscontext.jar
0 → 100755
不能预览此文件类型
lib/geronimo-activation_1.1_spec-1.1.jar
0 → 100755
不能预览此文件类型
lib/geronimo-annotation_1.0_spec-1.1.1.jar
0 → 100755
不能预览此文件类型
lib/geronimo-javamail_1.4_spec-1.7.1.jar
0 → 100755
不能预览此文件类型
lib/geronimo-jaxws_2.2_spec-1.0.jar
0 → 100755
不能预览此文件类型
lib/geronimo-jms_1.1_spec-1.1.1.jar
0 → 100755
不能预览此文件类型
lib/geronimo-servlet_3.0_spec-1.0.jar
0 → 100755
不能预览此文件类型
lib/geronimo-stax-api_1.0_spec-1.0.1.jar
0 → 100755
不能预览此文件类型
lib/geronimo-ws-metadata_2.0_spec-1.1.3.jar
0 → 100755
不能预览此文件类型
lib/imfmsg.jar
0 → 100755
不能预览此文件类型
lib/jaxb-api-2.2.1.jar
0 → 100755
不能预览此文件类型
lib/jaxb-impl-2.2.1.1.jar
0 → 100755
不能预览此文件类型
lib/jaxb-xjc-2.2.1.1.jar
0 → 100755
不能预览此文件类型
lib/jdom-1.1.3.jar
0 → 100644
不能预览此文件类型
lib/jettison-1.2.jar
0 → 100755
不能预览此文件类型
lib/jetty-continuation-7.2.2.v20101205.jar
0 → 100755
不能预览此文件类型
lib/jetty-http-7.2.2.v20101205.jar
0 → 100755
不能预览此文件类型
lib/jetty-io-7.2.2.v20101205.jar
0 → 100755
不能预览此文件类型
lib/jetty-server-7.2.2.v20101205.jar
0 → 100755
不能预览此文件类型
lib/jetty-util-7.2.2.v20101205.jar
0 → 100755
不能预览此文件类型
lib/jms.jar
0 → 100755
不能预览此文件类型
lib/jndi.jar
0 → 100755
不能预览此文件类型
lib/jra-1.0-alpha-4.jar
0 → 100755
不能预览此文件类型
lib/js-1.7R2.jar
0 → 100755
不能预览此文件类型
lib/jsr173_1.0_api.jar
0 → 100755
不能预览此文件类型
lib/jsr311-api-1.1.1.jar
0 → 100755
不能预览此文件类型
lib/jta.jar
0 → 100755
不能预览此文件类型
lib/ldap.jar
0 → 100755
不能预览此文件类型
lib/log4j-1.2.16.jar
0 → 100755
不能预览此文件类型
lib/mchange-commons-java-0.2.11.jar
0 → 100644
不能预览此文件类型
lib/neethi-2.0.4.jar
0 → 100755
不能预览此文件类型
lib/ojdbc6.jar
0 → 100644
不能预览此文件类型
不能预览此文件类型
lib/oro-2.0.8.jar
0 → 100755
不能预览此文件类型
lib/providerutil.jar
0 → 100755
不能预览此文件类型
lib/resolver.jar
0 → 100755
不能预览此文件类型
lib/returnXml.jar
0 → 100755
不能预览此文件类型
lib/rmm.jar
0 → 100755
不能预览此文件类型
lib/saaj-api-1.3.jar
0 → 100755
不能预览此文件类型
lib/saaj-impl-1.3.2.jar
0 → 100755
不能预览此文件类型
lib/serializer-2.7.1.jar
0 → 100755
不能预览此文件类型
lib/sigar.jar
0 → 100755
不能预览此文件类型
lib/slf4j-api-1.6.1.jar
0 → 100755
不能预览此文件类型
lib/slf4j-jdk14-1.6.1.jar
0 → 100755
不能预览此文件类型
lib/spring-aop-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-asm-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-beans-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-context-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-core-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-expression-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-jms-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-tx-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/spring-web-3.0.5.RELEASE.jar
0 → 100755
不能预览此文件类型
lib/stax2-api-3.0.2.jar
0 → 100755
不能预览此文件类型
lib/stringtemplate-3.2.jar
0 → 100755
不能预览此文件类型
lib/velocity-1.6.4.jar
0 → 100755
不能预览此文件类型
lib/woodstox-core-asl-4.0.8.jar
0 → 100755
不能预览此文件类型
lib/wsdl4j-1.6.2.jar
0 → 100755
不能预览此文件类型
lib/wss4j-1.5.11.jar
0 → 100755
不能预览此文件类型
lib/xalan-2.7.1.jar
0 → 100755
不能预览此文件类型
lib/xbean.jar
0 → 100755
不能预览此文件类型
lib/xbean_xpath.jar
0 → 100755
不能预览此文件类型
lib/xml-resolver-1.2.jar
0 → 100755
不能预览此文件类型
lib/xmlbeans-2.4.0.jar
0 → 100755
不能预览此文件类型
lib/xmlbeans-qname.jar
0 → 100755
不能预览此文件类型
lib/xmlpublic.jar
0 → 100755
不能预览此文件类型
lib/xmlsec-1.4.4.jar
0 → 100755
不能预览此文件类型
logs/zhongwaiyun_imf.log
0 → 100644
1 | +10-11 15:14:00,0852[INFO] 准备登录IMF...... | ||
2 | +10-11 15:14:00,0870[INFO] Initialization ApplicationContext | ||
3 | +10-11 15:14:00,0977[INFO] Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@2ac1fdc4: startup date [Thu Oct 11 15:14:00 CST 2018]; root of context hierarchy | ||
4 | +10-11 15:14:01,0070[INFO] Loading XML bean definitions from file [/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/ApplicationContext.xml] | ||
5 | +10-11 15:14:01,0073[INFO] SystemBean.createInstance()-->com.airport.util.LteException: Initialization ApplicationContext error:org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/ApplicationContext.xml]; nested exception is java.io.FileNotFoundException: ApplicationContext.xml (No such file or directory) | ||
6 | + at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) | ||
7 | + at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) | ||
8 | + at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) | ||
9 | + at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) | ||
10 | + at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) | ||
11 | + at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212) | ||
12 | + at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126) | ||
13 | + at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92) | ||
14 | + at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) | ||
15 | + at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) | ||
16 | + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) | ||
17 | + at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140) | ||
18 | + at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84) | ||
19 | + at com.airport.util.SystemBean.createInstance(SystemBean.java:31) | ||
20 | + at com.air.agent.imf.App.main(App.java:31) | ||
21 | +Caused by: java.io.FileNotFoundException: ApplicationContext.xml (No such file or directory) | ||
22 | + at java.io.FileInputStream.open0(Native Method) | ||
23 | + at java.io.FileInputStream.open(FileInputStream.java:195) | ||
24 | + at java.io.FileInputStream.<init>(FileInputStream.java:138) | ||
25 | + at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:110) | ||
26 | + at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) | ||
27 | + ... 14 more | ||
28 | + | ||
29 | +10-11 15:14:01,0094[INFO] 初始化img配置文件 | ||
30 | +10-11 15:14:01,0094[INFO] img配置文件路径:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/target/imf_config.properties | ||
31 | +10-11 15:14:01,0102[INFO] img配置文件初始化失败 | ||
32 | +10-11 15:14:01,0103[INFO] 登录失败,退出服务...... | ||
33 | +10-11 15:14:44,0385[INFO] 准备登录IMF...... | ||
34 | +10-11 15:14:44,0399[INFO] Initialization ApplicationContext | ||
35 | +10-11 15:14:44,0493[INFO] Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@71e7a66b: startup date [Thu Oct 11 15:14:44 CST 2018]; root of context hierarchy | ||
36 | +10-11 15:14:44,0566[INFO] Loading XML bean definitions from file [/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/target/classes/ApplicationContext.xml] | ||
37 | +10-11 15:14:44,0840[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14acaea5: defining beans [dataSource,configurationBean,jdbcTemplate,dao]; root of factory hierarchy | ||
38 | +10-11 15:14:45,0473[INFO] 初始化img配置文件 | ||
39 | +10-11 15:14:45,0473[INFO] img配置文件路径:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/target/imf_config.properties | ||
40 | +10-11 15:14:45,0476[INFO] img配置文件初始化失败 | ||
41 | +10-11 15:14:45,0476[INFO] 登录失败,退出服务...... | ||
42 | +10-11 15:14:45,0478[INFO] Closing org.springframework.context.support.FileSystemXmlApplicationContext@71e7a66b: startup date [Thu Oct 11 15:14:44 CST 2018]; root of context hierarchy | ||
43 | +10-11 15:14:45,0479[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14acaea5: defining beans [dataSource,configurationBean,jdbcTemplate,dao]; root of factory hierarchy | ||
44 | +10-11 15:15:27,0171[INFO] 准备登录IMF...... | ||
45 | +10-11 15:15:27,0185[INFO] Initialization ApplicationContext | ||
46 | +10-11 15:15:27,0274[INFO] Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@71e7a66b: startup date [Thu Oct 11 15:15:27 CST 2018]; root of context hierarchy | ||
47 | +10-11 15:15:27,0347[INFO] Loading XML bean definitions from file [/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/target/classes/ApplicationContext.xml] | ||
48 | +10-11 15:15:27,0608[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14acaea5: defining beans [dataSource,configurationBean,jdbcTemplate,dao]; root of factory hierarchy | ||
49 | +10-11 15:15:27,0961[INFO] 初始化img配置文件 | ||
50 | +10-11 15:15:27,0961[INFO] img配置文件路径:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/target/classes/imf_config.properties | ||
51 | +10-11 15:15:27,0964[INFO] 初始化成功 | ||
52 | +10-11 15:15:27,0964[INFO] 当前API版本号为:1.0.2.2 | ||
53 | +10-11 15:15:27,0965[INFO] user:AGTZ is logining | ||
54 | +10-11 15:15:27,0965[INFO] ------------->IMF Service initialization start | ||
55 | +10-11 15:15:27,0967[INFO] ps addr is:http://10.50.3.74:7484/ProcessServer/services/ProcessService?wsdl | ||
56 | +10-11 15:15:28,0382[INFO] ps ws addr is:http://10.50.3.74:7484/ProcessServer/services/ProcessService?wsdl | ||
57 | +10-11 15:15:28,0422[INFO] Refreshing org.apache.cxf.bus.spring.BusApplicationContext@7fa98a66: startup date [Thu Oct 11 15:15:28 CST 2018]; root of context hierarchy | ||
58 | +10-11 15:15:28,0554[INFO] Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] | ||
59 | +10-11 15:15:28,0555[INFO] Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] | ||
60 | +10-11 15:15:28,0557[INFO] Overriding bean definition for bean 'org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider': replacing [Generic bean: class [org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] | ||
61 | +10-11 15:15:28,0559[INFO] Overriding bean definition for bean 'org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory': replacing [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] with [Generic bean: class [org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory]; scope=; abstract=false; lazyInit=true; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/Users/Kevin/Documents/workspace/javaweb/agent-imf-zwy/lib/cxf-2.3.2.jar!/META-INF/cxf/cxf-extension-http.fixml]] | ||
62 | +10-11 15:15:28,0662[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@dd05255: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.service.factory.FactoryBeanListenerManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandler,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.management.InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.wstx_msv_validation.WoodstoxValidationImpl,org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.policy.RMAssertionBuilder]; root of factory hierarchy | ||
63 | +10-11 15:15:28,0775[INFO] Creating Service {http://webservice.process.imf.caac.com/}ProcessServiceService from class com.caac.imf.process.webservice.ProcessService | ||
64 | +10-11 15:15:29,0718[INFO] ------------->IMF Service initialization success | ||
65 | +10-11 15:15:29,0876[INFO] Inbound Message | ||
66 | +---------------------------- | ||
67 | +ID: 1 | ||
68 | +Response-Code: 200 | ||
69 | +Encoding: UTF-8 | ||
70 | +Content-Type: text/xml;charset=UTF-8 | ||
71 | +Headers: {Server=[Apache-Coyote/1.1], content-type=[text/xml;charset=UTF-8], Content-Length=[2419], Date=[Thu, 11 Oct 2018 07:15:29 GMT]} | ||
72 | +Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:loginResponse xmlns:ns2="http://webservice.process.imf.caac.com/"><return><INFO><CONFIG><ENDPOINTCONFIG><ENDPOINTID>AGTZ</ENDPOINTID><ENDPOINT>AGTZ</ENDPOINT><CHECKTYPE>N</CHECKTYPE><AUTHMSGRS>A</AUTHMSGRS><CONNMODEL>A</CONNMODEL><HOST>10.50.3.74</HOST><PORT>2414</PORT><CCSID>1208</CCSID><QUEUEMANAGER>QM_IMF</QUEUEMANAGER><GETQUEUENAME>AGTZ_R</GETQUEUENAME><PUTQUEUENAME>AGTZ_S</PUTQUEUENAME><QUEUECHANNEL>SVRCONN_AGTZ</QUEUECHANNEL><INACTIVETIMEOUT>5000</INACTIVETIMEOUT><GETMSGTYPE>G</GETMSGTYPE><MSGRECEIVEINTERVAL>5000</MSGRECEIVEINTERVAL><AGENTKEEPALIVEINTERVAL>5000</AGENTKEEPALIVEINTERVAL><SYSQUEUENAME>AGTZ_L</SYSQUEUENAME><JOINUPMODEL>A</JOINUPMODEL><MSGGROUP>7</MSGGROUP><REQUESTCONTROL>5000</REQUESTCONTROL><ISAPPKEEPALIVE>Y</ISAPPKEEPALIVE><ISLOG>Y</ISLOG><VERSION>1.0.2.2</VERSION><ISSHUTDOWN>Y</ISSHUTDOWN><RELOADINTERVAL>5000</RELOADINTERVAL><ISCLEAR>N</ISCLEAR><MSGLENGTH>5</MSGLENGTH><ISENCODING>Y</ISENCODING><ENCODING>UTF-8</ENCODING><CLFG>N</CLFG></ENDPOINTCONFIG><SRVRS><SRVR><SERVICENAME>UPLOAD</SERVICENAME><SERVICEHOST>10.50.3.74</SERVICEHOST><SERVICEPORT>7484</SERVICEPORT><SERVICEURL>http://10.50.3.74:7484/UploadService/services/UploadService?wsdl</SERVICEURL><SERVICETYPE>UPLOAD</SERVICETYPE><SERVICEINTERVAL>5000</SERVICEINTERVAL></SRVR><SRVR><SERVICENAME>KEEPALIVE</SERVICENAME><SERVICEHOST>10.50.3.74</SERVICEHOST><SERVICEPORT>7484</SERVICEPORT><SERVICEURL>http://10.50.3.74:7484/HeartbeatService/services/HeartbeatService?wsdl</SERVICEURL><SERVICETYPE>KEEPALIVE</SERVICETYPE><SERVICEINTERVAL>5000</SERVICEINTERVAL></SRVR></SRVRS><RQMS><RQMN>REQE</RQMN></RQMS></CONFIG><RESULT><RETURNCODE>1</RETURNCODE></RESULT></INFO></return></ns2:loginResponse></soap:Body></soap:Envelope> | ||
73 | +-------------------------------------- | ||
74 | +10-11 15:15:30,0009[INFO] 登陆请求消息反馈内容是:<INFO><CONFIG><ENDPOINTCONFIG><ENDPOINTID>AGTZ</ENDPOINTID><ENDPOINT>AGTZ</ENDPOINT><CHECKTYPE>N</CHECKTYPE><AUTHMSGRS>A</AUTHMSGRS><CONNMODEL>A</CONNMODEL><HOST>10.50.3.74</HOST><PORT>2414</PORT><CCSID>1208</CCSID><QUEUEMANAGER>QM_IMF</QUEUEMANAGER><GETQUEUENAME>AGTZ_R</GETQUEUENAME><PUTQUEUENAME>AGTZ_S</PUTQUEUENAME><QUEUECHANNEL>SVRCONN_AGTZ</QUEUECHANNEL><INACTIVETIMEOUT>5000</INACTIVETIMEOUT><GETMSGTYPE>G</GETMSGTYPE><MSGRECEIVEINTERVAL>5000</MSGRECEIVEINTERVAL><AGENTKEEPALIVEINTERVAL>5000</AGENTKEEPALIVEINTERVAL><SYSQUEUENAME>AGTZ_L</SYSQUEUENAME><JOINUPMODEL>A</JOINUPMODEL><MSGGROUP>7</MSGGROUP><REQUESTCONTROL>5000</REQUESTCONTROL><ISAPPKEEPALIVE>Y</ISAPPKEEPALIVE><ISLOG>Y</ISLOG><VERSION>1.0.2.2</VERSION><ISSHUTDOWN>Y</ISSHUTDOWN><RELOADINTERVAL>5000</RELOADINTERVAL><ISCLEAR>N</ISCLEAR><MSGLENGTH>5</MSGLENGTH><ISENCODING>Y</ISENCODING><ENCODING>UTF-8</ENCODING><CLFG>N</CLFG></ENDPOINTCONFIG><SRVRS><SRVR><SERVICENAME>UPLOAD</SERVICENAME><SERVICEHOST>10.50.3.74</SERVICEHOST><SERVICEPORT>7484</SERVICEPORT><SERVICEURL>http://10.50.3.74:7484/UploadService/services/UploadService?wsdl</SERVICEURL><SERVICETYPE>UPLOAD</SERVICETYPE><SERVICEINTERVAL>5000</SERVICEINTERVAL></SRVR><SRVR><SERVICENAME>KEEPALIVE</SERVICENAME><SERVICEHOST>10.50.3.74</SERVICEHOST><SERVICEPORT>7484</SERVICEPORT><SERVICEURL>http://10.50.3.74:7484/HeartbeatService/services/HeartbeatService?wsdl</SERVICEURL><SERVICETYPE>KEEPALIVE</SERVICETYPE><SERVICEINTERVAL>5000</SERVICEINTERVAL></SRVR></SRVRS><RQMS><RQMN>REQE</RQMN></RQMS></CONFIG><RESULT><RETURNCODE>1</RETURNCODE></RESULT></INFO> | ||
75 | +10-11 15:15:30,0319[INFO] user:AGTZlogin successfull! | ||
76 | +10-11 15:15:30,0341[INFO] ------------->IMF Application initialization start | ||
77 | +10-11 15:15:30,0344[INFO] Creating Service {http://webservice.upload.process.imf.caac.com/}UploadServiceService from class com.caac.imf.process.upload.webservice.UploadService | ||
78 | +10-11 15:15:30,0410[INFO] ------------->IMF Application initialization success | ||
79 | +10-11 15:15:30,0410[INFO] ------------->IMF Communication initialization start | ||
80 | +10-11 15:15:30,0846[INFO] ------------->IMF Communication initialization sucess | ||
81 | +10-11 15:15:30,0887[INFO] message=<MSG><META><SNDR>SYSTEM</SNDR><TYPE>SYS</TYPE><STYP/><DDTM>2018-10-11 15:15:30</DDTM><SEQN/></META><CONTENT><CODE>1</CODE><DESC>login successful</DESC></CONTENT></MSG> | ||
82 | +10-11 15:15:30,0887[INFO] login success | ||
83 | +10-11 15:15:30,0887[INFO] 登录成功..... | ||
84 | +10-11 15:15:30,0888[INFO] 开启中外运报文接收服务...... | ||
85 | +10-11 15:15:34,0913[INFO] Closing org.springframework.context.support.FileSystemXmlApplicationContext@71e7a66b: startup date [Thu Oct 11 15:15:27 CST 2018]; root of context hierarchy | ||
86 | +10-11 15:15:34,0913[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14acaea5: defining beans [dataSource,configurationBean,jdbcTemplate,dao]; root of factory hierarchy |
pom.xml
0 → 100644
1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
2 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
4 | + <modelVersion>4.0.0</modelVersion> | ||
5 | + | ||
6 | + <groupId>com.air</groupId> | ||
7 | + <artifactId>agent-imf</artifactId> | ||
8 | + <version>0.0.1-SNAPSHOT</version> | ||
9 | + <packaging>jar</packaging> | ||
10 | + | ||
11 | + <name>agent-imf</name> | ||
12 | + <url>http://maven.apache.org</url> | ||
13 | + | ||
14 | + <properties> | ||
15 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
16 | + <jackson.version>2.6.4</jackson.version> | ||
17 | + <hibernate.version>5.0.6.Final</hibernate.version> | ||
18 | + </properties> | ||
19 | + | ||
20 | + <dependencies> | ||
21 | + <dependency> | ||
22 | + <groupId>junit</groupId> | ||
23 | + <artifactId>junit</artifactId> | ||
24 | + <version>3.8.1</version> | ||
25 | + <scope>test</scope> | ||
26 | + </dependency> | ||
27 | + <dependency> | ||
28 | + <groupId>com.jfinal</groupId> | ||
29 | + <artifactId>jfinal</artifactId> | ||
30 | + <version>3.4</version> | ||
31 | + </dependency> | ||
32 | + <dependency> | ||
33 | + <groupId>com.google.code.gson</groupId> | ||
34 | + <artifactId>gson</artifactId> | ||
35 | + <version>2.8.1</version> | ||
36 | + </dependency> | ||
37 | + <!-- jackson --> | ||
38 | + <dependency> | ||
39 | + <groupId>com.fasterxml.jackson.core</groupId> | ||
40 | + <artifactId>jackson-databind</artifactId> | ||
41 | + <version>${jackson.version}</version> | ||
42 | + </dependency> | ||
43 | + <dependency> | ||
44 | + <groupId>com.fasterxml.jackson.module</groupId> | ||
45 | + <artifactId>jackson-module-jaxb-annotations</artifactId> | ||
46 | + <version>${jackson.version}</version> | ||
47 | + </dependency> | ||
48 | + <dependency> | ||
49 | + <groupId>com.fasterxml.jackson.datatype</groupId> | ||
50 | + <artifactId>jackson-datatype-joda</artifactId> | ||
51 | + <version>${jackson.version}</version> | ||
52 | + </dependency> | ||
53 | + <dependency> | ||
54 | + <groupId>org.codehaus.jackson</groupId> | ||
55 | + <artifactId>jackson-mapper-asl</artifactId> | ||
56 | + <version>1.9.13</version> | ||
57 | + </dependency> | ||
58 | + <dependency> | ||
59 | + <groupId>javax.annotation</groupId> | ||
60 | + <artifactId>jsr250-api</artifactId> | ||
61 | + <version>1.0</version> | ||
62 | + </dependency> | ||
63 | + <!-- jpa implements hibernate --> | ||
64 | + <dependency> | ||
65 | + <groupId>org.hibernate</groupId> | ||
66 | + <artifactId>hibernate-core</artifactId> | ||
67 | + <version>${hibernate.version}</version> | ||
68 | + </dependency> | ||
69 | + | ||
70 | + <dependency> | ||
71 | + <groupId>org.hibernate</groupId> | ||
72 | + <artifactId>hibernate-entitymanager</artifactId> | ||
73 | + <version>${hibernate.version}</version> | ||
74 | + </dependency> | ||
75 | + | ||
76 | + <dependency> | ||
77 | + <groupId>org.hibernate</groupId> | ||
78 | + <artifactId>hibernate-ehcache</artifactId> | ||
79 | + <version>${hibernate.version}</version> | ||
80 | + </dependency> | ||
81 | + </dependencies> | ||
82 | +</project> |
src/.DS_Store
0 → 100644
不能预览此文件类型
src/main/java/com/air/agent/imf/App.java
0 → 100644
1 | +package com.air.agent.imf; | ||
2 | + | ||
3 | +import java.io.File; | ||
4 | + | ||
5 | +import org.apache.log4j.Logger; | ||
6 | +import org.apache.log4j.PropertyConfigurator; | ||
7 | +import org.springframework.context.support.GenericXmlApplicationContext; | ||
8 | + | ||
9 | +import com.airport.util.LteException; | ||
10 | +import com.airport.util.SystemBean; | ||
11 | +import com.caac.imf.api.IMFClient; | ||
12 | +import com.caac.imf.api.IMFClientFactory; | ||
13 | +import com.jfinal.kit.PathKit; | ||
14 | +import com.jfinal.kit.PropKit; | ||
15 | + | ||
16 | +public class App { | ||
17 | + private static final Logger logger = Logger.getLogger(App.class); | ||
18 | + private static IMFClient client = null; | ||
19 | + public static boolean isLoginOk; | ||
20 | + | ||
21 | + public static void main(String[] args) { | ||
22 | + logger.info("准备登录IMF......"); | ||
23 | + PropKit.use("config.properties"); | ||
24 | + PropertyConfigurator.configure("target/classes/log4j.properties"); | ||
25 | + | ||
26 | + String rootDir = new File(PathKit.getRootClassPath()).getParent(); | ||
27 | + try { | ||
28 | + GenericXmlApplicationContext context = new GenericXmlApplicationContext(); | ||
29 | + context.setValidating(false); | ||
30 | + | ||
31 | + String applicationContextFile = "/" + rootDir + "/ApplicationContext.xml"; | ||
32 | + SystemBean.createInstance(applicationContextFile); | ||
33 | + | ||
34 | +// SystemBean.createInstance("config/ApplicationContext.xml"); | ||
35 | + } catch (LteException e) { | ||
36 | + logger.info("SystemBean.createInstance()-->" + e.toString()); | ||
37 | + } | ||
38 | + | ||
39 | + client = IMFClientFactory.createInstance(); | ||
40 | + String imf_username = PropKit.get("imf_username"); | ||
41 | + String imf_password = PropKit.get("imf_password"); | ||
42 | + // debug运行 | ||
43 | +// String confFileName = PathKit.getRootClassPath() + "/imf_config.properties"; | ||
44 | + // 正式环境jar包方式运行,imf_config.properties要和jar包同目录 | ||
45 | + String confFileName = rootDir + "/imf_config.properties"; | ||
46 | + isLoginOk = IMFLogin.login(client, imf_username, imf_password, confFileName); | ||
47 | + | ||
48 | + if (isLoginOk) { | ||
49 | + logger.info("登录成功....."); | ||
50 | + logger.info("开启中外运报文接收服务......"); | ||
51 | + new IMFReaderTask(client).start(); | ||
52 | + | ||
53 | + } else { | ||
54 | + logger.info("登录失败,退出服务......"); | ||
55 | + System.exit(-1); | ||
56 | + } | ||
57 | + } | ||
58 | +} |
1 | +package com.air.agent.imf; | ||
2 | + | ||
3 | +import org.apache.log4j.Logger; | ||
4 | + | ||
5 | +import com.caac.imf.api.IMFClient; | ||
6 | +import com.jfinal.kit.PropKit; | ||
7 | + | ||
8 | +/** | ||
9 | + * Depiction: | ||
10 | + * <p> | ||
11 | + * Modify: | ||
12 | + * <p> | ||
13 | + * Author: William Lynn | ||
14 | + * <p> | ||
15 | + * Create Date:2018年6月10日 下午5:35:52 | ||
16 | + * | ||
17 | + */ | ||
18 | +public class IMFLogin { | ||
19 | + private static final Logger logger = Logger.getLogger(IMFLogin.class); | ||
20 | + private static boolean isLoginOk; | ||
21 | + | ||
22 | + public IMFLogin() { | ||
23 | + } | ||
24 | + | ||
25 | + public static boolean login(IMFClient client, String userName, String password, String confFileName) { | ||
26 | + logger.info("初始化img配置文件"); | ||
27 | + logger.info("img配置文件路径:"+confFileName); | ||
28 | + if (client.initial(confFileName)) { | ||
29 | + String message = client.login(userName, password); | ||
30 | + logger.info("message=" + message); | ||
31 | + if (message.indexOf("<CODE>1</CODE>") > 0) { | ||
32 | + logger.info("login success"); | ||
33 | + isLoginOk = true; | ||
34 | + return true; | ||
35 | + } else { | ||
36 | + int times = 0; | ||
37 | + | ||
38 | + while (times < PropKit.getInt("retry_times")) { | ||
39 | + logger.info("try connection..."); | ||
40 | + ++times; | ||
41 | + logger.info("message.=" + message); | ||
42 | + if (message.indexOf("<CODE>1</CODE>") > 0) { | ||
43 | + logger.info("login success"); | ||
44 | + isLoginOk = true; | ||
45 | + return true; | ||
46 | + } | ||
47 | + | ||
48 | + logger.info("login failure"); | ||
49 | + message = client.login(userName, password); | ||
50 | + | ||
51 | + try { | ||
52 | + Thread.sleep(4000L); | ||
53 | + } catch (InterruptedException var7) { | ||
54 | + var7.printStackTrace(); | ||
55 | + } | ||
56 | + } | ||
57 | + | ||
58 | + if (!isLoginOk) { | ||
59 | + logger.info("login fail too many times,will exit."); | ||
60 | + client.disconnect(); | ||
61 | + // System.exit(-1); | ||
62 | + } | ||
63 | + } | ||
64 | + }else { | ||
65 | + logger.info("img配置文件初始化失败"); | ||
66 | + } | ||
67 | + | ||
68 | + return false; | ||
69 | + | ||
70 | + } | ||
71 | + | ||
72 | +} |
1 | +package com.air.agent.imf; | ||
2 | + | ||
3 | +import org.apache.log4j.Logger; | ||
4 | + | ||
5 | +import com.air.agent.imf.bean.MainKit; | ||
6 | +import com.air.agent.imf.bean.ManifestEntity; | ||
7 | +import com.air.agent.imf.bean.PreparesecondaryEntity; | ||
8 | +import com.air.agent.imf.bean.SubKit; | ||
9 | +import com.air.agent.imf.dao.impl.DaoImpl; | ||
10 | +import com.airport.util.SystemBean; | ||
11 | +import com.airport.util.parse.XMPParse; | ||
12 | +import com.caac.imf.api.IMFClient; | ||
13 | + | ||
14 | +/** | ||
15 | + * Depiction: | ||
16 | + * <p> | ||
17 | + * Modify: | ||
18 | + * <p> | ||
19 | + * Author: William Lynn | ||
20 | + * <p> | ||
21 | + * Create Date:2018年6月10日 下午5:09:04 | ||
22 | + * | ||
23 | + */ | ||
24 | +public class IMFReaderTask extends Thread { | ||
25 | + private static final Logger logger = Logger.getLogger(IMFReaderTask.class); | ||
26 | + private static final String MESSAGE_TYPE_TAG = "/MSG/DECLAREPREPAREMASTERXMLBODY/Head/MessageType"; | ||
27 | + private IMFClient client; | ||
28 | + | ||
29 | + public IMFReaderTask(IMFClient client) { | ||
30 | + this.client = client; | ||
31 | + } | ||
32 | + | ||
33 | + @Override | ||
34 | + public void run() { | ||
35 | + while (true) { | ||
36 | + if (App.isLoginOk) { | ||
37 | + synchronized (this) { | ||
38 | + String message = this.client.getMSG(); | ||
39 | + if (message != null) { | ||
40 | + logger.info("===================================="); | ||
41 | + logger.info(message); | ||
42 | + logger.info("===================================="); | ||
43 | + message = message.replaceAll("\n", ""); | ||
44 | + handleMessage(message); | ||
45 | + } | ||
46 | + } | ||
47 | + } else { | ||
48 | + logger.info("***"); | ||
49 | + } | ||
50 | + | ||
51 | + try { | ||
52 | + Thread.sleep(100L); | ||
53 | + } catch (InterruptedException var3) { | ||
54 | + logger.info("InterruptedException: " + var3.toString()); | ||
55 | + } | ||
56 | + } | ||
57 | + } | ||
58 | + | ||
59 | + /** | ||
60 | + * 是否为主单 | ||
61 | + * | ||
62 | + * @param message | ||
63 | + * | ||
64 | + * @return | ||
65 | + */ | ||
66 | + private boolean isMaster(String message) { | ||
67 | + String messageType; | ||
68 | + try { | ||
69 | + messageType = XMPParse.getNodeValueFromXmlString(message, MESSAGE_TYPE_TAG); | ||
70 | + logger.info("isMaster(): messageType-->"+messageType); | ||
71 | + return messageType.equalsIgnoreCase("MT2201MASTER"); | ||
72 | + } catch (Exception e) { | ||
73 | + logger.info("isMaster(): error info-->"+e.toString()); | ||
74 | + } | ||
75 | + | ||
76 | + return false; | ||
77 | + } | ||
78 | + | ||
79 | + private void handleMessage(String message) { | ||
80 | + DaoImpl dao = (DaoImpl) SystemBean.getBean("dao"); | ||
81 | + if (isMaster(message)) { | ||
82 | + logger.info("解析主单"); | ||
83 | + ManifestEntity bean = MainKit.parseXml(message); | ||
84 | + bean.setId(dao.getMaxMasterId()+1); | ||
85 | + long ret = dao.saveMain(bean); | ||
86 | + logger.info("保存主单:" + ret); | ||
87 | + } else { | ||
88 | + logger.info("解析分单"); | ||
89 | + PreparesecondaryEntity bean = SubKit.parseXml(message); | ||
90 | + long masterId = dao.getMasterId(bean.getWaybillnomaster()); | ||
91 | + if (masterId > 0) { | ||
92 | + logger.info("主单ID:" + masterId); | ||
93 | + bean.setPreparemasterid(masterId); | ||
94 | + bean.setId(dao.getMaxSubId()+1); | ||
95 | + long ret = dao.saveSub(bean); | ||
96 | + logger.info("保存分单:" + ret); | ||
97 | + } else { | ||
98 | + logger.info("主单不存在"); | ||
99 | + } | ||
100 | + } | ||
101 | + } | ||
102 | + | ||
103 | +} |
src/main/java/com/air/agent/imf/IO.java
0 → 100644
1 | +package com.air.agent.imf; | ||
2 | + | ||
3 | +import java.io.BufferedInputStream; | ||
4 | +import java.io.BufferedOutputStream; | ||
5 | +import java.io.BufferedReader; | ||
6 | +import java.io.BufferedWriter; | ||
7 | +import java.io.ByteArrayOutputStream; | ||
8 | +import java.io.File; | ||
9 | +import java.io.FileInputStream; | ||
10 | +import java.io.FileNotFoundException; | ||
11 | +import java.io.FileOutputStream; | ||
12 | +import java.io.FileReader; | ||
13 | +import java.io.FileWriter; | ||
14 | +import java.io.IOException; | ||
15 | +import java.io.InputStream; | ||
16 | +import java.io.OutputStream; | ||
17 | +import java.io.Reader; | ||
18 | +import java.io.UnsupportedEncodingException; | ||
19 | +import java.io.Writer; | ||
20 | + | ||
21 | + | ||
22 | +public final class IO { | ||
23 | + | ||
24 | + public static final int BUFFER = 4 * 1024; | ||
25 | + | ||
26 | + public static void copy(File in, OutputStream out) throws FileNotFoundException, IOException { | ||
27 | + copy(IO.createInputStream(in), out); | ||
28 | + } | ||
29 | + | ||
30 | + public static void copy(File in, File out) throws FileNotFoundException, IOException { | ||
31 | + IO.copy(IO.createInputStream(in), out); | ||
32 | + } | ||
33 | + | ||
34 | + public static void copy(InputStream in, File out) throws FileNotFoundException, IOException { | ||
35 | + copy(in, new BufferedOutputStream(new FileOutputStream(out))); | ||
36 | + } | ||
37 | + | ||
38 | + public static void copy(InputStream in, OutputStream out) throws IOException { | ||
39 | + byte[] bytes = new byte[BUFFER]; | ||
40 | + for (int length = in.read(bytes); length > 0; length = in.read(bytes)) { | ||
41 | + out.write(bytes, 0, length); | ||
42 | + } | ||
43 | + in.close(); | ||
44 | + out.close(); | ||
45 | + } | ||
46 | + | ||
47 | + public static InputStream createInputStream(File file) throws FileNotFoundException { | ||
48 | + return new BufferedInputStream(new FileInputStream(file)); | ||
49 | + } | ||
50 | + | ||
51 | + public static Reader createReader(File file) throws FileNotFoundException { | ||
52 | + return new BufferedReader(new FileReader(file)); | ||
53 | + } | ||
54 | + | ||
55 | + public static Writer createWriter(File file) throws IOException { | ||
56 | + return new BufferedWriter(new FileWriter(file)); | ||
57 | + } | ||
58 | + | ||
59 | + public static byte[] readAsBytes(File in) throws FileNotFoundException, IOException { | ||
60 | + ByteArrayOutputStream out = new ByteArrayOutputStream(); | ||
61 | + copy(IO.createInputStream(in), out); | ||
62 | + return out.toByteArray(); | ||
63 | + } | ||
64 | + | ||
65 | + public static byte[] readAsBytes(InputStream in) throws FileNotFoundException, IOException { | ||
66 | + ByteArrayOutputStream out = new ByteArrayOutputStream(); | ||
67 | + copy(in, out); | ||
68 | + return out.toByteArray(); | ||
69 | + } | ||
70 | + | ||
71 | + public static String readAsString(File in) throws UnsupportedEncodingException, FileNotFoundException, IOException { | ||
72 | + return new String(IO.readAsBytes(in), "UTF8"); | ||
73 | + } | ||
74 | + | ||
75 | + public static String readAsString(InputStream in) throws UnsupportedEncodingException, FileNotFoundException, IOException { | ||
76 | + return new String(IO.readAsBytes(in), "UTF8"); | ||
77 | + } | ||
78 | + | ||
79 | + public static void write(String content, File file) throws IOException { | ||
80 | + Writer writer = IO.createWriter(file); | ||
81 | + writer.write(content); | ||
82 | + writer.close(); | ||
83 | + } | ||
84 | + | ||
85 | +} |
src/main/java/com/air/agent/imf/XmlKit.java
0 → 100644
1 | +package com.air.agent.imf; | ||
2 | + | ||
3 | +import java.io.ByteArrayOutputStream; | ||
4 | +import java.io.File; | ||
5 | +import java.io.FileNotFoundException; | ||
6 | +import java.io.FileOutputStream; | ||
7 | +import java.io.FileWriter; | ||
8 | +import java.io.IOException; | ||
9 | +import java.io.StringReader; | ||
10 | +import java.io.StringWriter; | ||
11 | +import java.io.UnsupportedEncodingException; | ||
12 | + | ||
13 | +import javax.xml.bind.JAXBContext; | ||
14 | +import javax.xml.bind.Marshaller; | ||
15 | +import javax.xml.bind.Unmarshaller; | ||
16 | +import javax.xml.bind.annotation.XmlRootElement; | ||
17 | +import javax.xml.stream.XMLOutputFactory; | ||
18 | +import javax.xml.stream.XMLStreamWriter; | ||
19 | + | ||
20 | +import org.dom4j.Document; | ||
21 | +import org.dom4j.DocumentHelper; | ||
22 | +import org.dom4j.io.OutputFormat; | ||
23 | +import org.dom4j.io.XMLWriter; | ||
24 | +import org.slf4j.Logger; | ||
25 | +import org.slf4j.LoggerFactory; | ||
26 | + | ||
27 | +import com.air.agent.imf.bean.ManifestEntity; | ||
28 | + | ||
29 | +/** | ||
30 | + * Created by cohesion on 2017/4/24. | ||
31 | + */ | ||
32 | +@XmlRootElement | ||
33 | +public class XmlKit { | ||
34 | + public static final Logger logger = LoggerFactory.getLogger(XmlKit.class); | ||
35 | + | ||
36 | + public static void main(String[] args) { | ||
37 | + String path = "/Users/Kevin/Downloads/zhu.xml"; | ||
38 | + try { | ||
39 | + String xml = IO.readAsString(new File(path)); | ||
40 | + System.out.println("==========================xml=========================="); | ||
41 | + System.out.println(xml); | ||
42 | + | ||
43 | + System.out.println(); | ||
44 | + System.out.println(); | ||
45 | + | ||
46 | + ManifestEntity mani = converyToJavaBean(xml, ManifestEntity.class); | ||
47 | + System.out.println("==========================bean=========================="); | ||
48 | + System.out.println(mani.toString()); | ||
49 | + } catch (UnsupportedEncodingException e) { | ||
50 | + e.printStackTrace(); | ||
51 | + } catch (FileNotFoundException e) { | ||
52 | + e.printStackTrace(); | ||
53 | + } catch (IOException e) { | ||
54 | + e.printStackTrace(); | ||
55 | + } | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * JavaBean转换成xml | ||
60 | + * | ||
61 | + * @param obj | ||
62 | + * @return | ||
63 | + */ | ||
64 | + public static String convertToXml(Object obj) { | ||
65 | + | ||
66 | + try { | ||
67 | + JAXBContext context = JAXBContext.newInstance(obj.getClass()); | ||
68 | + Marshaller marshaller = context.createMarshaller(); | ||
69 | + | ||
70 | + marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); | ||
71 | + marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); | ||
72 | + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); | ||
73 | + | ||
74 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
75 | + // 注意jdk版本 | ||
76 | + XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); | ||
77 | + XMLStreamWriter xmlStreamWriter = xmlOutputFactory.createXMLStreamWriter(baos, | ||
78 | + (String) marshaller.getProperty(Marshaller.JAXB_ENCODING)); | ||
79 | + xmlStreamWriter.writeStartDocument((String) marshaller.getProperty(Marshaller.JAXB_ENCODING), "1.0"); | ||
80 | + marshaller.marshal(obj, xmlStreamWriter); | ||
81 | + xmlStreamWriter.writeEndDocument(); | ||
82 | + xmlStreamWriter.close(); | ||
83 | + return new String(baos.toString("UTF-8")); | ||
84 | + | ||
85 | + } catch (Exception e) { | ||
86 | + e.printStackTrace(); | ||
87 | + } | ||
88 | + return null; | ||
89 | + | ||
90 | + } | ||
91 | + | ||
92 | + public static String convertToXml2(Object obj, String path) { | ||
93 | + String result = null; | ||
94 | + try { | ||
95 | + JAXBContext context = JAXBContext.newInstance(obj.getClass()); | ||
96 | + Marshaller marshaller = context.createMarshaller(); | ||
97 | + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); | ||
98 | + marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); | ||
99 | + StringWriter writer = new StringWriter(); | ||
100 | + marshaller.marshal(obj, writer); | ||
101 | + result = writer.toString(); | ||
102 | + | ||
103 | + File file = new File(path); | ||
104 | + if (file.exists()) { | ||
105 | + file.delete(); | ||
106 | + } | ||
107 | + file.getParentFile().mkdirs(); | ||
108 | + file.createNewFile(); | ||
109 | + byte bt[] = new byte[1024]; | ||
110 | + bt = writer.toString().getBytes(); | ||
111 | + try { | ||
112 | + FileOutputStream in = new FileOutputStream(file); | ||
113 | + try { | ||
114 | + in.write(bt, 0, bt.length); | ||
115 | + in.close(); | ||
116 | + } catch (IOException e) { | ||
117 | + e.printStackTrace(); | ||
118 | + } | ||
119 | + } catch (FileNotFoundException e) { | ||
120 | + e.printStackTrace(); | ||
121 | + } | ||
122 | + | ||
123 | + } catch (Exception e) { | ||
124 | + e.printStackTrace(); | ||
125 | + } | ||
126 | + return result; | ||
127 | + } | ||
128 | + | ||
129 | + /** | ||
130 | + * xml转换成JavaBean | ||
131 | + * | ||
132 | + * @param xml | ||
133 | + * @param c | ||
134 | + * @return | ||
135 | + */ | ||
136 | + @SuppressWarnings("unchecked") | ||
137 | + public static <T> T converyToJavaBean(String xml, Class<T> c) { | ||
138 | + T t = null; | ||
139 | + try { | ||
140 | + JAXBContext context = JAXBContext.newInstance(c); | ||
141 | + Unmarshaller unmarshaller = context.createUnmarshaller(); | ||
142 | + t = (T) unmarshaller.unmarshal(new StringReader(xml)); | ||
143 | + } catch (Exception e) { | ||
144 | + e.printStackTrace(); | ||
145 | + } | ||
146 | + | ||
147 | + return t; | ||
148 | + } | ||
149 | + | ||
150 | + public static void writeXmlDocument(String content, String Encode, String XMLPathAndName) { | ||
151 | + long lasting = System.currentTimeMillis();// 效率检测 | ||
152 | + | ||
153 | + try { | ||
154 | + XMLWriter writer = null;// 声明写XML的对象 | ||
155 | + OutputFormat format = OutputFormat.createPrettyPrint(); | ||
156 | + format.setEncoding(Encode);// 设置XML文件的编码格式 | ||
157 | + | ||
158 | + String filePath = XMLPathAndName;// 获得文件地址 | ||
159 | + File file = new File(filePath);// 获得文件 | ||
160 | + | ||
161 | + if (file.exists()) { | ||
162 | + file.delete(); | ||
163 | + | ||
164 | + } | ||
165 | + // 新建xml文件并新增内容 | ||
166 | + Document document = DocumentHelper.createDocument(); | ||
167 | + document.addElement(content);// 添加根节点 | ||
168 | + // 生成XML文件 | ||
169 | + writer = new XMLWriter(new FileWriter(file), format); | ||
170 | + writer.write(document); | ||
171 | + writer.close(); | ||
172 | + long lasting2 = System.currentTimeMillis(); | ||
173 | + System.out.println("写入XML文件结束,用时" + (lasting2 - lasting) + "ms"); | ||
174 | + } catch (Exception e) { | ||
175 | + System.out.println("XML文件写入失败"); | ||
176 | + } | ||
177 | + | ||
178 | + } | ||
179 | +} |
1 | +package com.air.agent.imf.bean; | ||
2 | + | ||
3 | +import java.util.Calendar; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +import org.apache.commons.lang.StringUtils; | ||
7 | + | ||
8 | +/** | ||
9 | + * Depiction: | ||
10 | + * <p> | ||
11 | + * Modify: | ||
12 | + * <p> | ||
13 | + * Author: William Lynn | ||
14 | + * <p> | ||
15 | + * Create Date:2018年10月10日 下午5:12:17 | ||
16 | + * | ||
17 | + */ | ||
18 | +public class DateKit { | ||
19 | + | ||
20 | + public static Date getDate(String datestr) { | ||
21 | + if (datestr == null) | ||
22 | + return null; | ||
23 | + | ||
24 | + Calendar calendar = Calendar.getInstance(); | ||
25 | + String year = null; | ||
26 | + String time = null; | ||
27 | + if (datestr.indexOf(":") < 0) { | ||
28 | + // 只有日期,没有时分秒等时间 | ||
29 | + year = datestr.split(" ")[0]; | ||
30 | + | ||
31 | + } else { | ||
32 | + year = datestr.split(" ")[0]; | ||
33 | + time = datestr.split(" ")[1]; | ||
34 | + } | ||
35 | + | ||
36 | + String[] years = year.split("-"); | ||
37 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2])); | ||
38 | + if (StringUtils.isNotBlank(time)) { | ||
39 | + String[] times = time.split(":"); | ||
40 | + int hour = Integer.parseInt(times[0]); | ||
41 | + int min = Integer.parseInt(times[1]); | ||
42 | + int sec = 0; | ||
43 | + if (times.length == 3) { | ||
44 | + sec = Integer.parseInt(times[2]); | ||
45 | + } | ||
46 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2]), hour, | ||
47 | + min, sec); | ||
48 | + } | ||
49 | + return calendar.getTime(); | ||
50 | + } | ||
51 | + | ||
52 | +} |
1 | +package com.air.agent.imf.bean; | ||
2 | + | ||
3 | +import java.util.Date; | ||
4 | + | ||
5 | +import com.airport.util.parse.XMPParse; | ||
6 | + | ||
7 | +public class MainKit { | ||
8 | + | ||
9 | + private static final String TAG_HEADER = "/MSG/DECLAREPREPAREMASTERXMLBODY/Declaration"; | ||
10 | + | ||
11 | + public static ManifestEntity parseXml(String message) { | ||
12 | + ManifestEntity bean = new ManifestEntity(); | ||
13 | + try { | ||
14 | + String Carrier = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Carrier/ID"); | ||
15 | + String ORG = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/ORG/ID"); | ||
16 | + String DES = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/DES/ID"); | ||
17 | + String BorderTransportMeans = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/BorderTransportMeans/JourneyID"); | ||
18 | + String TransportContractDocument = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TransportContractDocument/ID"); | ||
19 | +// String LoadingLocation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/LoadingLocation/ID"); | ||
20 | + String LoadingDate = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/LoadingLocation/LoadingDate"); | ||
21 | +// String UnloadingLocation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/UnloadingLocation/ID"); | ||
22 | +// String TransportSplitIndicator = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TransportSplitIndicator"); | ||
23 | + String QuantityQuantity = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/ConsignmentPackaging/QuantityQuantity"); | ||
24 | + String TotalGrossMassMeasure = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TotalGrossMassMeasure"); | ||
25 | + String PreQuantityQuantity = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PreQuantityQuantity"); | ||
26 | + String PreTotalGrossMassMeasure = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PreTotalGrossMassMeasure"); | ||
27 | + String CustomsStatus = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/CustomsStatus"); | ||
28 | + String MethodCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/FreightPayment/MethodCode"); | ||
29 | + String ProductName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/ProductName"); | ||
30 | +// String PrepareTime = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PrepareTime"); | ||
31 | + String CustomsCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/CustomsCode"); | ||
32 | + String AgentName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/AgentName"); | ||
33 | + String AgentCompany = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/AgentCompany"); | ||
34 | + String NameOfgoods = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/NameOfgoods"); | ||
35 | + String DeliveryStation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/DeliveryStation"); | ||
36 | + String UNnumber = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/UNnumber"); | ||
37 | + String Category = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Category"); | ||
38 | + | ||
39 | + bean.setAgentcompany(AgentCompany); | ||
40 | + bean.setAgentcompanycode("WK"); | ||
41 | + bean.setAgentman(AgentName); | ||
42 | + bean.setCreator(1583l); | ||
43 | + | ||
44 | + bean.setCarrier(Carrier); | ||
45 | + bean.setCategory(Category); | ||
46 | + | ||
47 | + bean.setCreatedate(new Date()); | ||
48 | + bean.setCustomscode(CustomsCode); | ||
49 | + bean.setCustomsstatus(CustomsStatus); | ||
50 | + bean.setDe_chweight(TotalGrossMassMeasure); | ||
51 | +// bean.setDe_ids(de_ids); | ||
52 | + bean.setDe_number(QuantityQuantity); | ||
53 | +// bean.setDe_packing(de_packing); | ||
54 | +// bean.setDe_remarks(de_remarks); | ||
55 | +// bean.setDe_size(de_size); | ||
56 | +// bean.setDe_trstation(de_trstation); | ||
57 | +// bean.setDe_type(de_type); | ||
58 | +// bean.setDe_volume(de_volume); | ||
59 | + bean.setDe_weight(TotalGrossMassMeasure); | ||
60 | + bean.setDelivery_station(DeliveryStation); | ||
61 | + bean.setDestinationstation(DES); | ||
62 | + String fdate = BorderTransportMeans.split("/")[1]; | ||
63 | + bean.setFlightdate(DateKit.getDate(fdate)); | ||
64 | + bean.setFlightno(BorderTransportMeans.split("/")[0]); | ||
65 | + bean.setName_ofgoods(NameOfgoods); | ||
66 | + bean.setOriginatingstation(ORG); | ||
67 | + bean.setPaymode(MethodCode); | ||
68 | + bean.setPreparetotalpiece(PreQuantityQuantity); | ||
69 | + bean.setPreparetotalweight(PreTotalGrossMassMeasure); | ||
70 | + bean.setProductname(ProductName); | ||
71 | + bean.setReach_station(DES); | ||
72 | + | ||
73 | +// bean.setSpecialgoodscode(specialgoodscode); | ||
74 | +// bean.setStatus(status); | ||
75 | + bean.setStowagedate(DateKit.getDate(LoadingDate)); | ||
76 | + bean.setTotalpiece(QuantityQuantity); | ||
77 | + bean.setTotalweight(TotalGrossMassMeasure); | ||
78 | + bean.setUnnumber(UNnumber); | ||
79 | +// bean.setUSER_ID(uSER_ID); | ||
80 | + bean.setWaybillnomaster(TransportContractDocument); | ||
81 | + | ||
82 | + | ||
83 | + String Consignee_Name = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Name"); | ||
84 | + String Consignee_Address_Line = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Line"); | ||
85 | + String Consignee_Address_CityName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CityName"); | ||
86 | + String Consignee_Address_CountryCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CountryCode"); | ||
87 | + String Consignee_Address_ZipCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/ZipCode"); | ||
88 | + String Consignee_Address_PROVINCECODE = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/PROVINCECODE"); | ||
89 | + String Consignee_Address_PROVINCENAME = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/PROVINCENAME"); | ||
90 | + String Consignee_Address_Deltaname = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Deltaname"); | ||
91 | + String Consignee_Address_TelePhone = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/TelePhone"); | ||
92 | + String Consignee_Address_Fax = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Fax"); | ||
93 | + String Consignee_Address_CNECUSID = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CNECUSID"); | ||
94 | + String Consignee_Address_CNEAEO = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CNEAEO"); | ||
95 | + String Consignee_Address_Unlodingcode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Unlodingcode"); | ||
96 | + bean.setSh_address(Consignee_Address_Line); | ||
97 | + bean.setSh_city(Consignee_Address_CityName); | ||
98 | + bean.setSh_company(Consignee_Name); | ||
99 | + bean.setSh_country(Consignee_Address_CountryCode); | ||
100 | + bean.setSh_deltaname(Consignee_Address_Deltaname); | ||
101 | + bean.setSh_fax(Consignee_Address_Fax); | ||
102 | + bean.setSh_name(Consignee_Name); | ||
103 | + bean.setSh_provincecode(Consignee_Address_PROVINCECODE); | ||
104 | + bean.setSh_provincename(Consignee_Address_PROVINCENAME); | ||
105 | + bean.setSh_telephone(Consignee_Address_TelePhone); | ||
106 | + bean.setSh_zipcode(Consignee_Address_ZipCode); | ||
107 | + bean.setCneaeo(Consignee_Address_CNEAEO); | ||
108 | + bean.setCnecusid(Consignee_Address_CNECUSID); | ||
109 | + bean.setUnlodingcode(Consignee_Address_Unlodingcode); | ||
110 | + | ||
111 | + String Consignor_name = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/name"); | ||
112 | + String Consignor_Address_Line = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Line"); | ||
113 | + String Consignor_Address_CityName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/CityName"); | ||
114 | + String Consignor_Address_CountryCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/CountryCode"); | ||
115 | + String Consignor_Address_ZipCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/ZipCode"); | ||
116 | +// String Consignor_Address_PROVINCECODE = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/PROVINCECODE"); | ||
117 | +// String Consignor_Address_PROVINCENAME = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/PROVINCENAME"); | ||
118 | + String Consignor_Address_Deltaname = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Deltaname"); | ||
119 | + String Consignor_Address_TelePhone = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/TelePhone"); | ||
120 | + String Consignor_Address_Fax = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Fax"); | ||
121 | + String Consignor_Address_SHPCUSID = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/SHPCUSID"); | ||
122 | + String Consignor_Address_SHPAEO = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/SHPAEO"); | ||
123 | + bean.setCo_address(Consignor_Address_Line); | ||
124 | + bean.setCo_city(Consignor_Address_CityName); | ||
125 | + bean.setCo_company(Consignor_name); | ||
126 | + bean.setCo_country(Consignor_Address_CountryCode); | ||
127 | + bean.setCo_deltaname(Consignor_Address_Deltaname); | ||
128 | + bean.setCo_fax(Consignor_Address_Fax); | ||
129 | + bean.setCo_name(Consignor_name); | ||
130 | + bean.setCo_telephone(Consignor_Address_TelePhone); | ||
131 | + bean.setCo_zipcode(Consignor_Address_ZipCode); | ||
132 | + bean.setShpaeo(Consignor_Address_SHPAEO); | ||
133 | + bean.setShpcusid(Consignor_Address_SHPCUSID); | ||
134 | + | ||
135 | + } catch (Exception e) { | ||
136 | + e.printStackTrace(); | ||
137 | + } | ||
138 | + return bean; | ||
139 | + } | ||
140 | + | ||
141 | +} |
1 | +package com.air.agent.imf.bean; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Calendar; | ||
5 | +import java.util.Date; | ||
6 | + | ||
7 | +import javax.persistence.Column; | ||
8 | +import javax.persistence.Entity; | ||
9 | +import javax.persistence.GeneratedValue; | ||
10 | +import javax.persistence.GenerationType; | ||
11 | +import javax.persistence.Id; | ||
12 | +import javax.persistence.Table; | ||
13 | + | ||
14 | +import org.apache.commons.lang.StringUtils; | ||
15 | + | ||
16 | +/** | ||
17 | + * Created by cohesion on 2017/8/9. | ||
18 | + * <p/> | ||
19 | + * 预配舱单主单表 | ||
20 | + */ | ||
21 | +@Entity | ||
22 | +@Table(name = "MANIFEST") | ||
23 | +public class ManifestEntity implements Serializable { | ||
24 | + private static final long serialVersionUID = 1L; | ||
25 | + | ||
26 | + private String unlodingcode;// 卸货地代码 | ||
27 | + private String cnecusid;// 收货人代码 | ||
28 | + private String shpcusid;// 发货人代码 | ||
29 | + /** | ||
30 | + * 发货人aeo | ||
31 | + */ | ||
32 | + private String shpaeo; | ||
33 | + /** | ||
34 | + * 收货人aeo | ||
35 | + */ | ||
36 | + private String cneaeo; | ||
37 | + /** | ||
38 | + * 航班号 | ||
39 | + */ | ||
40 | + private String flightno; | ||
41 | + /** | ||
42 | + * 航班日期 | ||
43 | + */ | ||
44 | + private Date flightdate; | ||
45 | + /** | ||
46 | + * 起始地 | ||
47 | + */ | ||
48 | + private String originatingstation; | ||
49 | + /** | ||
50 | + * 目的地 | ||
51 | + */ | ||
52 | + private String destinationstation; | ||
53 | + /** | ||
54 | + * 主单号 | ||
55 | + */ | ||
56 | + private String waybillnomaster; | ||
57 | + /** | ||
58 | + * 总重量 | ||
59 | + */ | ||
60 | + private String totalweight; | ||
61 | + /** | ||
62 | + * 总件数 | ||
63 | + */ | ||
64 | + private String totalpiece; | ||
65 | + /** | ||
66 | + * 舱单件数 | ||
67 | + */ | ||
68 | + private String preparetotalpiece; | ||
69 | + /** | ||
70 | + * 舱单重量 | ||
71 | + */ | ||
72 | + private String preparetotalweight; | ||
73 | + /** | ||
74 | + * 代理人代码 | ||
75 | + */ | ||
76 | + private String agentcompanycode; | ||
77 | + /** | ||
78 | + * 装载日期 | ||
79 | + */ | ||
80 | + private Date stowagedate; | ||
81 | + /** | ||
82 | + * 状态 | ||
83 | + */ | ||
84 | + private Integer status; | ||
85 | + /** | ||
86 | + * 承运人 | ||
87 | + */ | ||
88 | + private String carrier; | ||
89 | + /** | ||
90 | + * 海关状态 | ||
91 | + */ | ||
92 | + private String customsstatus; | ||
93 | + /** | ||
94 | + * 付费方式 | ||
95 | + */ | ||
96 | + private String paymode; | ||
97 | + /** | ||
98 | + * 特货代码 | ||
99 | + */ | ||
100 | + private String specialgoodscode; | ||
101 | + /** | ||
102 | + * 海关关区 | ||
103 | + */ | ||
104 | + private String customscode; | ||
105 | + /** | ||
106 | + * 代理人 | ||
107 | + */ | ||
108 | + private String agentman; | ||
109 | + /** | ||
110 | + * 代理人公司 | ||
111 | + */ | ||
112 | + private String agentcompany; | ||
113 | + /** | ||
114 | + * 回执信息 | ||
115 | + */ | ||
116 | + private String receiptinformation; | ||
117 | + /** | ||
118 | + * 创建日期 | ||
119 | + */ | ||
120 | + private Date createdate; | ||
121 | + /** | ||
122 | + * 货物描述 | ||
123 | + */ | ||
124 | + private String productname; | ||
125 | + /** | ||
126 | + * UN编号 | ||
127 | + */ | ||
128 | + private String unnumber; | ||
129 | + /** | ||
130 | + * 危险品类别 | ||
131 | + */ | ||
132 | + private String category; | ||
133 | + /** | ||
134 | + * 收货人公司 | ||
135 | + */ | ||
136 | + private String sh_company; | ||
137 | + /** | ||
138 | + * 收货人地址 | ||
139 | + */ | ||
140 | + private String sh_address; | ||
141 | + /** | ||
142 | + * 收货人邮编 | ||
143 | + */ | ||
144 | + private String sh_zipcode; | ||
145 | + /** | ||
146 | + * 收货人城市 | ||
147 | + */ | ||
148 | + private String sh_city; | ||
149 | + /** | ||
150 | + * 收货人洲名 | ||
151 | + */ | ||
152 | + private String sh_deltaname; | ||
153 | + /** | ||
154 | + * 收货人国家名字 | ||
155 | + */ | ||
156 | + private String sh_country; | ||
157 | + /** | ||
158 | + * 收货人电话 | ||
159 | + */ | ||
160 | + private String sh_telephone; | ||
161 | + /** | ||
162 | + * 收货人传真 | ||
163 | + */ | ||
164 | + private String sh_fax; | ||
165 | + /** | ||
166 | + * 收货人名字 | ||
167 | + */ | ||
168 | + private String sh_name; | ||
169 | + /** | ||
170 | + * 发货人公司 | ||
171 | + */ | ||
172 | + private String co_company; | ||
173 | + /** | ||
174 | + * 发货人地址 | ||
175 | + */ | ||
176 | + private String co_address; | ||
177 | + /** | ||
178 | + * 发货人邮编 | ||
179 | + */ | ||
180 | + private String co_zipcode; | ||
181 | + /** | ||
182 | + * 发货人城市 | ||
183 | + */ | ||
184 | + private String co_city; | ||
185 | + /** | ||
186 | + * 发货人洲名 | ||
187 | + */ | ||
188 | + private String co_deltaname; | ||
189 | + /** | ||
190 | + * 发货人国家名字 | ||
191 | + */ | ||
192 | + private String co_country; | ||
193 | + /** | ||
194 | + * 发货人电话 | ||
195 | + */ | ||
196 | + private String co_telephone; | ||
197 | + /** | ||
198 | + * 发货人传真 | ||
199 | + */ | ||
200 | + private String co_fax; | ||
201 | + /** | ||
202 | + * 发货人名字 | ||
203 | + */ | ||
204 | + private String co_name; | ||
205 | + /** | ||
206 | + * 到达站 | ||
207 | + */ | ||
208 | + private String reach_station; | ||
209 | + /** | ||
210 | + * 承运人 | ||
211 | + */ | ||
212 | + private String carrier1; | ||
213 | + /** | ||
214 | + * 到达站 | ||
215 | + */ | ||
216 | + private String reach_station1; | ||
217 | + /** | ||
218 | + * 承运人 | ||
219 | + */ | ||
220 | + private String carrier2; | ||
221 | + /** | ||
222 | + * 到达站 | ||
223 | + */ | ||
224 | + private String reach_station2; | ||
225 | + /** | ||
226 | + * 货物品名 | ||
227 | + */ | ||
228 | + private String name_ofgoods; | ||
229 | + /** | ||
230 | + * 交运货站 | ||
231 | + */ | ||
232 | + private String delivery_station; | ||
233 | + /** | ||
234 | + * 收货人省份代码 | ||
235 | + */ | ||
236 | + private String sh_provincecode; | ||
237 | + /** | ||
238 | + * 收货人省份 | ||
239 | + */ | ||
240 | + private String sh_provincename; | ||
241 | + /** | ||
242 | + * 交运件数 | ||
243 | + */ | ||
244 | + private String de_number; | ||
245 | + /** | ||
246 | + * 交运重量 | ||
247 | + */ | ||
248 | + private String de_weight; | ||
249 | + /** | ||
250 | + * 交运计费重量 | ||
251 | + */ | ||
252 | + private String de_chweight; | ||
253 | + /** | ||
254 | + * 交运体尺寸 | ||
255 | + */ | ||
256 | + private String de_size; | ||
257 | + /** | ||
258 | + * 交运体积 | ||
259 | + */ | ||
260 | + private String de_volume; | ||
261 | + /** | ||
262 | + * 交运类型 | ||
263 | + */ | ||
264 | + private String de_type; | ||
265 | + /** | ||
266 | + * 交运中转站 | ||
267 | + */ | ||
268 | + private String de_trstation; | ||
269 | + /** | ||
270 | + * 交运包装信息 | ||
271 | + */ | ||
272 | + private String de_packing; | ||
273 | + /** | ||
274 | + * 交运备注 | ||
275 | + */ | ||
276 | + private String de_remarks; | ||
277 | + /** | ||
278 | + * 交运发送状态 1发送 | ||
279 | + */ | ||
280 | + private Integer de_ids; | ||
281 | + /* | ||
282 | + * 回执代码 | ||
283 | + */ | ||
284 | + private String response_code; | ||
285 | + /* | ||
286 | + * 回执状态文本 | ||
287 | + */ | ||
288 | + private String response_text; | ||
289 | + private Long save_time; | ||
290 | + private Long USER_ID; // 报文所属的用户id | ||
291 | + | ||
292 | + private Date createDate; | ||
293 | + private Date modifyDate; | ||
294 | + private Long creator; | ||
295 | + private Long modifier; | ||
296 | + | ||
297 | + /** | ||
298 | + * 是否删除 1删除 在里不让在修改主单号 | ||
299 | + */ | ||
300 | + private Integer isdelete = 0; | ||
301 | + | ||
302 | + protected Long id; | ||
303 | + | ||
304 | + @Id | ||
305 | + @GeneratedValue(strategy = GenerationType.SEQUENCE) | ||
306 | + @Column(name = "ID") | ||
307 | + public Long getId() { | ||
308 | + return id; | ||
309 | + } | ||
310 | + | ||
311 | + public void setId(Long id) { | ||
312 | + this.id = id; | ||
313 | + } | ||
314 | + | ||
315 | + @Column(name = "MODIFY_DATE") | ||
316 | + public Date getModifyDate() { | ||
317 | + return modifyDate; | ||
318 | + } | ||
319 | + | ||
320 | + public void setModifyDate(Date modifyDate) { | ||
321 | + this.modifyDate = modifyDate; | ||
322 | + } | ||
323 | + | ||
324 | + public Long getCreator() { | ||
325 | + return creator; | ||
326 | + } | ||
327 | + | ||
328 | + public void setCreator(Long creator) { | ||
329 | + this.creator = creator; | ||
330 | + } | ||
331 | + | ||
332 | + public Long getModifier() { | ||
333 | + return modifier; | ||
334 | + } | ||
335 | + | ||
336 | + public void setModifier(Long modifier) { | ||
337 | + this.modifier = modifier; | ||
338 | + } | ||
339 | + | ||
340 | + @Column(name = "IS_DELETE") | ||
341 | + public Integer getIsdelete() { | ||
342 | + return isdelete; | ||
343 | + } | ||
344 | + | ||
345 | + public void setIsdelete(Integer isdelete) { | ||
346 | + this.isdelete = isdelete; | ||
347 | + } | ||
348 | + | ||
349 | + public String getUnlodingcode() { | ||
350 | + return StringUtils.isBlank(unlodingcode) ? getDestinationstation() : unlodingcode; | ||
351 | + } | ||
352 | + | ||
353 | + public void setUnlodingcode(String unlodingcode) { | ||
354 | + this.unlodingcode = unlodingcode; | ||
355 | + } | ||
356 | + | ||
357 | + public String getCnecusid() { | ||
358 | + return cnecusid; | ||
359 | + } | ||
360 | + | ||
361 | + public void setCnecusid(String cnecusid) { | ||
362 | + this.cnecusid = cnecusid; | ||
363 | + } | ||
364 | + | ||
365 | + public String getShpcusid() { | ||
366 | + return shpcusid; | ||
367 | + } | ||
368 | + | ||
369 | + public void setShpcusid(String shpcusid) { | ||
370 | + this.shpcusid = shpcusid; | ||
371 | + } | ||
372 | + | ||
373 | + public String getShpaeo() { | ||
374 | + return shpaeo; | ||
375 | + } | ||
376 | + | ||
377 | + public void setShpaeo(String shpaeo) { | ||
378 | + this.shpaeo = shpaeo; | ||
379 | + } | ||
380 | + | ||
381 | + public String getCneaeo() { | ||
382 | + return cneaeo; | ||
383 | + } | ||
384 | + | ||
385 | + public void setCneaeo(String cneaeo) { | ||
386 | + this.cneaeo = cneaeo; | ||
387 | + } | ||
388 | + | ||
389 | + public Long getUSER_ID() { | ||
390 | + return USER_ID; | ||
391 | + } | ||
392 | + | ||
393 | + public void setUSER_ID(Long uSER_ID) { | ||
394 | + USER_ID = uSER_ID; | ||
395 | + } | ||
396 | + | ||
397 | + @Column(name = "SAVE_TIME") | ||
398 | + public Long getSave_time() { | ||
399 | + return save_time; | ||
400 | + } | ||
401 | + | ||
402 | + public void setSave_time(Long save_time) { | ||
403 | + this.save_time = save_time; | ||
404 | + } | ||
405 | + | ||
406 | + @Column(name = "RESPONSE_CODE") | ||
407 | + public String getResponse_code() { | ||
408 | + return response_code; | ||
409 | + } | ||
410 | + | ||
411 | + public void setResponse_code(String response_code) { | ||
412 | + this.response_code = response_code; | ||
413 | + } | ||
414 | + | ||
415 | + @Column(name = "RESPONSE_TEXT") | ||
416 | + public String getResponse_text() { | ||
417 | + return response_text; | ||
418 | + } | ||
419 | + | ||
420 | + public void setResponse_text(String response_text) { | ||
421 | + this.response_text = response_text; | ||
422 | + } | ||
423 | + | ||
424 | + @Column(name = "DE_IDS") | ||
425 | + public Integer getDe_ids() { | ||
426 | + return de_ids; | ||
427 | + } | ||
428 | + | ||
429 | + public void setDe_ids(Integer de_ids) { | ||
430 | + this.de_ids = de_ids; | ||
431 | + } | ||
432 | + | ||
433 | + @Column(name = "DE_NUMBER") | ||
434 | + public String getDe_number() { | ||
435 | + return getTotalpiece(); | ||
436 | + } | ||
437 | + | ||
438 | + public void setDe_number(String de_number) { | ||
439 | + this.de_number = de_number; | ||
440 | + } | ||
441 | + | ||
442 | + @Column(name = "DE_WEIGHT") | ||
443 | + public String getDe_weight() { | ||
444 | + return getTotalweight(); | ||
445 | + } | ||
446 | + | ||
447 | + public void setDe_weight(String de_weight) { | ||
448 | + this.de_weight = de_weight; | ||
449 | + } | ||
450 | + | ||
451 | + @Column(name = "DE_CHWEIGHT") | ||
452 | + public String getDe_chweight() { | ||
453 | + return getTotalweight(); | ||
454 | + } | ||
455 | + | ||
456 | + public void setDe_chweight(String de_chweight) { | ||
457 | + this.de_chweight = de_chweight; | ||
458 | + } | ||
459 | + | ||
460 | + @Column(name = "DE_SIZE") | ||
461 | + public String getDe_size() { | ||
462 | + return de_size; | ||
463 | + } | ||
464 | + | ||
465 | + public void setDe_size(String de_size) { | ||
466 | + this.de_size = de_size; | ||
467 | + } | ||
468 | + | ||
469 | + @Column(name = "DE_VOLUME") | ||
470 | + public String getDe_volume() { | ||
471 | + return de_volume; | ||
472 | + } | ||
473 | + | ||
474 | + public void setDe_volume(String de_volume) { | ||
475 | + this.de_volume = de_volume; | ||
476 | + } | ||
477 | + | ||
478 | + @Column(name = "DE_TYPE") | ||
479 | + public String getDe_type() { | ||
480 | + return de_type; | ||
481 | + } | ||
482 | + | ||
483 | + public void setDe_type(String de_type) { | ||
484 | + this.de_type = de_type; | ||
485 | + } | ||
486 | + | ||
487 | + @Column(name = "DE_TRSTATION") | ||
488 | + public String getDe_trstation() { | ||
489 | + return de_trstation; | ||
490 | + } | ||
491 | + | ||
492 | + public void setDe_trstation(String de_trstation) { | ||
493 | + this.de_trstation = de_trstation; | ||
494 | + } | ||
495 | + | ||
496 | + @Column(name = "DE_PACKING") | ||
497 | + public String getDe_packing() { | ||
498 | + return de_packing; | ||
499 | + } | ||
500 | + | ||
501 | + public void setDe_packing(String de_packing) { | ||
502 | + this.de_packing = de_packing; | ||
503 | + } | ||
504 | + | ||
505 | + @Column(name = "DE_REMARKS") | ||
506 | + public String getDe_remarks() { | ||
507 | + return de_remarks; | ||
508 | + } | ||
509 | + | ||
510 | + public void setDe_remarks(String de_remarks) { | ||
511 | + this.de_remarks = de_remarks; | ||
512 | + } | ||
513 | + | ||
514 | + @Column(name = "SH_PROVINCECODE") | ||
515 | + public String getSh_provincecode() { | ||
516 | + return sh_provincecode; | ||
517 | + } | ||
518 | + | ||
519 | + public void setSh_provincecode(String sh_provincecode) { | ||
520 | + this.sh_provincecode = sh_provincecode; | ||
521 | + } | ||
522 | + | ||
523 | + @Column(name = "SH_PROVINCENAME") | ||
524 | + public String getSh_provincename() { | ||
525 | + return sh_provincename; | ||
526 | + } | ||
527 | + | ||
528 | + public void setSh_provincename(String sh_provincename) { | ||
529 | + this.sh_provincename = sh_provincename; | ||
530 | + } | ||
531 | + | ||
532 | + @Column(name = "FLIGHTNO") | ||
533 | + public String getFlightno() { | ||
534 | + return flightno; | ||
535 | + } | ||
536 | + | ||
537 | + public void setFlightno(String flightno) { | ||
538 | + this.flightno = flightno; | ||
539 | + } | ||
540 | + | ||
541 | + @Column(name = "FLIGHTDATE") | ||
542 | + public Date getFlightdate() { | ||
543 | + return flightdate; | ||
544 | + } | ||
545 | + | ||
546 | + public void setFlightdate(Date flightdate) { | ||
547 | + this.flightdate = flightdate; | ||
548 | + } | ||
549 | + | ||
550 | + @Column(name = "ORIGINATINGSTATION") | ||
551 | + public String getOriginatingstation() { | ||
552 | + return originatingstation; | ||
553 | + } | ||
554 | + | ||
555 | + public void setOriginatingstation(String originatingstation) { | ||
556 | + this.originatingstation = originatingstation; | ||
557 | + } | ||
558 | + | ||
559 | + @Column(name = "DESTINATIONSTATION") | ||
560 | + public String getDestinationstation() { | ||
561 | + return destinationstation; | ||
562 | + } | ||
563 | + | ||
564 | + public void setDestinationstation(String destinationstation) { | ||
565 | + this.destinationstation = destinationstation; | ||
566 | + } | ||
567 | + | ||
568 | + @Column(name = "WAYBILLNOMASTER") | ||
569 | + public String getWaybillnomaster() { | ||
570 | + return waybillnomaster; | ||
571 | + } | ||
572 | + | ||
573 | + public void setWaybillnomaster(String waybillnomaster) { | ||
574 | + this.waybillnomaster = waybillnomaster; | ||
575 | + } | ||
576 | + | ||
577 | + @Column(name = "TOTALWEIGHT") | ||
578 | + public String getTotalweight() { | ||
579 | + return totalweight; | ||
580 | + } | ||
581 | + | ||
582 | + public void setTotalweight(String totalweight) { | ||
583 | + this.totalweight = totalweight; | ||
584 | + } | ||
585 | + | ||
586 | + @Column(name = "TOTALPIECE") | ||
587 | + public String getTotalpiece() { | ||
588 | + return totalpiece; | ||
589 | + } | ||
590 | + | ||
591 | + public void setTotalpiece(String totalpiece) { | ||
592 | + this.totalpiece = totalpiece; | ||
593 | + } | ||
594 | + | ||
595 | + @Column(name = "PREPARETOTALPIECE") | ||
596 | + public String getPreparetotalpiece() { | ||
597 | + return getTotalpiece(); | ||
598 | + } | ||
599 | + | ||
600 | + public void setPreparetotalpiece(String preparetotalpiece) { | ||
601 | + this.preparetotalpiece = preparetotalpiece; | ||
602 | + } | ||
603 | + | ||
604 | + @Column(name = "PREPARETOTALWEIGHT") | ||
605 | + public String getPreparetotalweight() { | ||
606 | + return getTotalweight(); | ||
607 | + } | ||
608 | + | ||
609 | + public void setPreparetotalweight(String preparetotalweight) { | ||
610 | + this.preparetotalweight = preparetotalweight; | ||
611 | + } | ||
612 | + | ||
613 | + @Column(name = "AGENTCOMPANYCODE") | ||
614 | + public String getAgentcompanycode() { | ||
615 | + return agentcompanycode; | ||
616 | + } | ||
617 | + | ||
618 | + public void setAgentcompanycode(String agentcompanycode) { | ||
619 | + this.agentcompanycode = agentcompanycode; | ||
620 | + } | ||
621 | + | ||
622 | + @Column(name = "STOWAGEDATE") | ||
623 | + public Date getStowagedate() { | ||
624 | +// return stowagedate; | ||
625 | + return new Date(System.currentTimeMillis() + 6 * 3600); | ||
626 | + } | ||
627 | + | ||
628 | + public void setStowagedate(Date stowagedate) { | ||
629 | + this.stowagedate = stowagedate; | ||
630 | + } | ||
631 | + | ||
632 | + public static Date getStowagedate(String datestr) { | ||
633 | + if (datestr == null) | ||
634 | + return null; | ||
635 | + | ||
636 | + Calendar calendar = Calendar.getInstance(); | ||
637 | + String year = null; | ||
638 | + String time = null; | ||
639 | + if (datestr.indexOf(":") < 0) { | ||
640 | + // 只有日期,没有时分秒等时间 | ||
641 | + year = datestr.split(" ")[0]; | ||
642 | + | ||
643 | + } else { | ||
644 | + year = datestr.split(" ")[0]; | ||
645 | + time = datestr.split(" ")[1]; | ||
646 | + } | ||
647 | + | ||
648 | + String[] years = year.split("-"); | ||
649 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2])); | ||
650 | + if (StringUtils.isNotBlank(time)) { | ||
651 | + String[] times = time.split(":"); | ||
652 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2]), | ||
653 | + Integer.parseInt(times[0]), Integer.parseInt(times[1]), Integer.parseInt(times[2])); | ||
654 | + } | ||
655 | + return calendar.getTime(); | ||
656 | + } | ||
657 | + | ||
658 | + @Column(name = "STATUS") | ||
659 | + public Integer getStatus() { | ||
660 | + return status; | ||
661 | + } | ||
662 | + | ||
663 | + public void setStatus(Integer status) { | ||
664 | + this.status = status; | ||
665 | + } | ||
666 | + | ||
667 | + @Column(name = "CARRIER") | ||
668 | + public String getCarrier() { | ||
669 | + return carrier; | ||
670 | + } | ||
671 | + | ||
672 | + public void setCarrier(String carrier) { | ||
673 | + this.carrier = carrier; | ||
674 | + } | ||
675 | + | ||
676 | + @Column(name = "CUSTOMSSTATUS") | ||
677 | + public String getCustomsstatus() { | ||
678 | + return customsstatus; | ||
679 | + } | ||
680 | + | ||
681 | + public void setCustomsstatus(String customsstatus) { | ||
682 | + this.customsstatus = customsstatus; | ||
683 | + } | ||
684 | + | ||
685 | + @Column(name = "PAYMODE") | ||
686 | + public String getPaymode() { | ||
687 | + return paymode; | ||
688 | + } | ||
689 | + | ||
690 | + public void setPaymode(String paymode) { | ||
691 | + this.paymode = paymode; | ||
692 | + } | ||
693 | + | ||
694 | + @Column(name = "SPECIALGOODSCODE") | ||
695 | + public String getSpecialgoodscode() { | ||
696 | + return specialgoodscode; | ||
697 | + } | ||
698 | + | ||
699 | + public void setSpecialgoodscode(String specialgoodscode) { | ||
700 | + this.specialgoodscode = specialgoodscode; | ||
701 | + } | ||
702 | + | ||
703 | + @Column(name = "CUSTOMSCODE") | ||
704 | + public String getCustomscode() { | ||
705 | + return customscode; | ||
706 | + } | ||
707 | + | ||
708 | + public void setCustomscode(String customscode) { | ||
709 | + this.customscode = customscode; | ||
710 | + } | ||
711 | + | ||
712 | + @Column(name = "AGENTMAN") | ||
713 | + public String getAgentman() { | ||
714 | + return agentman; | ||
715 | + } | ||
716 | + | ||
717 | + public void setAgentman(String agentman) { | ||
718 | + this.agentman = agentman; | ||
719 | + } | ||
720 | + | ||
721 | + @Column(name = "AGENTCOMPANY") | ||
722 | + public String getAgentcompany() { | ||
723 | + return agentcompany; | ||
724 | + } | ||
725 | + | ||
726 | + public void setAgentcompany(String agentcompany) { | ||
727 | + this.agentcompany = agentcompany; | ||
728 | + } | ||
729 | + | ||
730 | + @Column(name = "RECEIPTINFORMATION") | ||
731 | + public String getReceiptinformation() { | ||
732 | + return receiptinformation; | ||
733 | + } | ||
734 | + | ||
735 | + public void setReceiptinformation(String receiptinformation) { | ||
736 | + this.receiptinformation = receiptinformation; | ||
737 | + } | ||
738 | + | ||
739 | + @Column(name = "CREATEDATE") | ||
740 | + public Date getCreatedate() { | ||
741 | + return createdate; | ||
742 | + } | ||
743 | + | ||
744 | + public void setCreatedate(Date createdate) { | ||
745 | + this.createdate = createdate; | ||
746 | + } | ||
747 | + | ||
748 | + @Column(name = "PRODUCTNAME") | ||
749 | + public String getProductname() { | ||
750 | + return productname; | ||
751 | + } | ||
752 | + | ||
753 | + public void setProductname(String productname) { | ||
754 | + this.productname = productname; | ||
755 | + } | ||
756 | + | ||
757 | + @Column(name = "UNNUMBER") | ||
758 | + public String getUnnumber() { | ||
759 | + return unnumber; | ||
760 | + } | ||
761 | + | ||
762 | + public void setUnnumber(String unnumber) { | ||
763 | + this.unnumber = unnumber; | ||
764 | + } | ||
765 | + | ||
766 | + @Column(name = "CATEGORY") | ||
767 | + public String getCategory() { | ||
768 | + return category; | ||
769 | + } | ||
770 | + | ||
771 | + public void setCategory(String category) { | ||
772 | + this.category = category; | ||
773 | + } | ||
774 | + | ||
775 | + @Column(name = "SH_COMPANY") | ||
776 | + public String getSh_company() { | ||
777 | + return sh_company; | ||
778 | + } | ||
779 | + | ||
780 | + public void setSh_company(String sh_company) { | ||
781 | + this.sh_company = sh_company; | ||
782 | + } | ||
783 | + | ||
784 | + @Column(name = "SH_ADDRESS") | ||
785 | + public String getSh_address() { | ||
786 | + return sh_address; | ||
787 | + } | ||
788 | + | ||
789 | + public void setSh_address(String sh_address) { | ||
790 | + this.sh_address = sh_address; | ||
791 | + } | ||
792 | + | ||
793 | + @Column(name = "SH_ZIPCODE") | ||
794 | + public String getSh_zipcode() { | ||
795 | + return sh_zipcode; | ||
796 | + } | ||
797 | + | ||
798 | + public void setSh_zipcode(String sh_zipcode) { | ||
799 | + this.sh_zipcode = sh_zipcode; | ||
800 | + } | ||
801 | + | ||
802 | + @Column(name = "SH_CITY") | ||
803 | + public String getSh_city() { | ||
804 | + return sh_city; | ||
805 | + } | ||
806 | + | ||
807 | + public void setSh_city(String sh_city) { | ||
808 | + this.sh_city = sh_city; | ||
809 | + } | ||
810 | + | ||
811 | + @Column(name = "SH_DELTANAME") | ||
812 | + public String getSh_deltaname() { | ||
813 | + return sh_deltaname; | ||
814 | + } | ||
815 | + | ||
816 | + public void setSh_deltaname(String sh_deltaname) { | ||
817 | + this.sh_deltaname = sh_deltaname; | ||
818 | + } | ||
819 | + | ||
820 | + @Column(name = "SH_COUNTRY") | ||
821 | + public String getSh_country() { | ||
822 | + return sh_country; | ||
823 | + } | ||
824 | + | ||
825 | + public void setSh_country(String sh_country) { | ||
826 | + this.sh_country = sh_country; | ||
827 | + } | ||
828 | + | ||
829 | + @Column(name = "SH_TELEPHONE") | ||
830 | + public String getSh_telephone() { | ||
831 | + return sh_telephone; | ||
832 | + } | ||
833 | + | ||
834 | + public void setSh_telephone(String sh_telephone) { | ||
835 | + this.sh_telephone = sh_telephone; | ||
836 | + } | ||
837 | + | ||
838 | + @Column(name = "SH_FAX") | ||
839 | + public String getSh_fax() { | ||
840 | + return sh_fax; | ||
841 | + } | ||
842 | + | ||
843 | + public void setSh_fax(String sh_fax) { | ||
844 | + this.sh_fax = sh_fax; | ||
845 | + } | ||
846 | + | ||
847 | + @Column(name = "SH_NAME") | ||
848 | + public String getSh_name() { | ||
849 | + return sh_name; | ||
850 | + } | ||
851 | + | ||
852 | + public void setSh_name(String sh_name) { | ||
853 | + this.sh_name = sh_name; | ||
854 | + } | ||
855 | + | ||
856 | + @Column(name = "CO_COMPANY") | ||
857 | + public String getCo_company() { | ||
858 | + return co_company; | ||
859 | + } | ||
860 | + | ||
861 | + public void setCo_company(String co_company) { | ||
862 | + this.co_company = co_company; | ||
863 | + } | ||
864 | + | ||
865 | + @Column(name = "CO_ADDRESS") | ||
866 | + public String getCo_address() { | ||
867 | + return co_address; | ||
868 | + } | ||
869 | + | ||
870 | + public void setCo_address(String co_address) { | ||
871 | + this.co_address = co_address; | ||
872 | + } | ||
873 | + | ||
874 | + @Column(name = "CO_ZIPCODE") | ||
875 | + public String getCo_zipcode() { | ||
876 | + return co_zipcode; | ||
877 | + } | ||
878 | + | ||
879 | + public void setCo_zipcode(String co_zipcode) { | ||
880 | + this.co_zipcode = co_zipcode; | ||
881 | + } | ||
882 | + | ||
883 | + @Column(name = "CO_CITY") | ||
884 | + public String getCo_city() { | ||
885 | + return co_city; | ||
886 | + } | ||
887 | + | ||
888 | + public void setCo_city(String co_city) { | ||
889 | + this.co_city = co_city; | ||
890 | + } | ||
891 | + | ||
892 | + @Column(name = "CO_DELTANAME") | ||
893 | + public String getCo_deltaname() { | ||
894 | + return co_deltaname; | ||
895 | + } | ||
896 | + | ||
897 | + public void setCo_deltaname(String co_deltaname) { | ||
898 | + this.co_deltaname = co_deltaname; | ||
899 | + } | ||
900 | + | ||
901 | + @Column(name = "CO_COUNTRY") | ||
902 | + public String getCo_country() { | ||
903 | + return co_country != null ? co_country.toUpperCase() : ""; | ||
904 | + } | ||
905 | + | ||
906 | + public void setCo_country(String co_country) { | ||
907 | + this.co_country = co_country; | ||
908 | + } | ||
909 | + | ||
910 | + @Column(name = "CO_TELEPHONE") | ||
911 | + public String getCo_telephone() { | ||
912 | + return co_telephone; | ||
913 | + } | ||
914 | + | ||
915 | + public void setCo_telephone(String co_telephone) { | ||
916 | + this.co_telephone = co_telephone; | ||
917 | + } | ||
918 | + | ||
919 | + @Column(name = "CO_FAX") | ||
920 | + public String getCo_fax() { | ||
921 | + return co_fax; | ||
922 | + } | ||
923 | + | ||
924 | + public void setCo_fax(String co_fax) { | ||
925 | + this.co_fax = co_fax; | ||
926 | + } | ||
927 | + | ||
928 | + @Column(name = "CO_NAME") | ||
929 | + public String getCo_name() { | ||
930 | + return co_name; | ||
931 | + } | ||
932 | + | ||
933 | + public void setCo_name(String co_name) { | ||
934 | + this.co_name = co_name; | ||
935 | + } | ||
936 | + | ||
937 | + @Column(name = "REACH_STATION") | ||
938 | + public String getReach_station() { | ||
939 | + return StringUtils.isBlank(reach_station) ? getDestinationstation() : reach_station; | ||
940 | + } | ||
941 | + | ||
942 | + public void setReach_station(String reach_station) { | ||
943 | + this.reach_station = reach_station; | ||
944 | + } | ||
945 | + | ||
946 | + @Column(name = "CARRIER1") | ||
947 | + public String getCarrier1() { | ||
948 | + return carrier1; | ||
949 | + } | ||
950 | + | ||
951 | + public void setCarrier1(String carrier1) { | ||
952 | + this.carrier1 = carrier1; | ||
953 | + } | ||
954 | + | ||
955 | + @Column(name = "REACH_STATION1") | ||
956 | + public String getReach_station1() { | ||
957 | + return reach_station1; | ||
958 | + } | ||
959 | + | ||
960 | + public void setReach_station1(String reach_station1) { | ||
961 | + this.reach_station1 = reach_station1; | ||
962 | + } | ||
963 | + | ||
964 | + @Column(name = "CARRIER2") | ||
965 | + public String getCarrier2() { | ||
966 | + return carrier2; | ||
967 | + } | ||
968 | + | ||
969 | + public void setCarrier2(String carrier2) { | ||
970 | + this.carrier2 = carrier2; | ||
971 | + } | ||
972 | + | ||
973 | + @Column(name = "REACH_STATION2") | ||
974 | + public String getReach_station2() { | ||
975 | + return reach_station2; | ||
976 | + } | ||
977 | + | ||
978 | + public void setReach_station2(String reach_station2) { | ||
979 | + this.reach_station2 = reach_station2; | ||
980 | + } | ||
981 | + | ||
982 | + @Column(name = "NAME_OFGOODS") | ||
983 | + public String getName_ofgoods() { | ||
984 | + return name_ofgoods; | ||
985 | + } | ||
986 | + | ||
987 | + public void setName_ofgoods(String name_ofgoods) { | ||
988 | + this.name_ofgoods = name_ofgoods; | ||
989 | + } | ||
990 | + | ||
991 | + @Column(name = "DELIVERY_STATION") | ||
992 | + public String getDelivery_station() { | ||
993 | + return delivery_station; | ||
994 | + } | ||
995 | + | ||
996 | + public void setDelivery_station(String delivery_station) { | ||
997 | + this.delivery_station = delivery_station; | ||
998 | + } | ||
999 | + | ||
1000 | + // 该函数主要用于List的contains | ||
1001 | + public boolean equals(Object mme) { | ||
1002 | + if (mme == null) | ||
1003 | + return false; | ||
1004 | + ManifestEntity me = (ManifestEntity) mme; | ||
1005 | + if (me.getCo_company() == null && this.getCo_company() == null) | ||
1006 | + return true; | ||
1007 | + else if (this.getCo_company() != null) { | ||
1008 | + // 在值相等的情况下,判断时间的大小 | ||
1009 | + if (this.getCo_company().equals(me.getCo_company())) { | ||
1010 | + // 当前时间为null,直接返回true | ||
1011 | + if (this.getSave_time() == null) | ||
1012 | + return true; | ||
1013 | + // 要比较的那个对象为null,直接返回false | ||
1014 | + else if (me.getSave_time() == null) | ||
1015 | + return false; | ||
1016 | + else | ||
1017 | + return this.getSave_time() > me.getSave_time(); | ||
1018 | + } | ||
1019 | + } | ||
1020 | + return false; | ||
1021 | + } | ||
1022 | + | ||
1023 | + @Override | ||
1024 | + public String toString() { | ||
1025 | + return "ManifestEntity [unlodingcode=" + unlodingcode + ", cnecusid=" + cnecusid + ", shpcusid=" + shpcusid | ||
1026 | + + ", shpaeo=" + shpaeo + ", cneaeo=" + cneaeo + ", flightno=" + flightno + ", flightdate=" + flightdate | ||
1027 | + + ", originatingstation=" + originatingstation + ", destinationstation=" + destinationstation | ||
1028 | + + ", waybillnomaster=" + waybillnomaster + ", totalweight=" + totalweight + ", totalpiece=" + totalpiece | ||
1029 | + + ", preparetotalpiece=" + preparetotalpiece + ", preparetotalweight=" + preparetotalweight | ||
1030 | + + ", agentcompanycode=" + agentcompanycode + ", stowagedate=" + stowagedate + ", status=" + status | ||
1031 | + + ", carrier=" + carrier + ", customsstatus=" + customsstatus + ", paymode=" + paymode | ||
1032 | + + ", specialgoodscode=" + specialgoodscode + ", customscode=" + customscode + ", agentman=" + agentman | ||
1033 | + + ", agentcompany=" + agentcompany + ", receiptinformation=" + receiptinformation + ", createdate=" | ||
1034 | + + createdate + ", productname=" + productname + ", unnumber=" + unnumber + ", category=" + category | ||
1035 | + + ", sh_company=" + sh_company + ", sh_address=" + sh_address + ", sh_zipcode=" + sh_zipcode | ||
1036 | + + ", sh_city=" + sh_city + ", sh_deltaname=" + sh_deltaname + ", sh_country=" + sh_country | ||
1037 | + + ", sh_telephone=" + sh_telephone + ", sh_fax=" + sh_fax + ", sh_name=" + sh_name + ", co_company=" | ||
1038 | + + co_company + ", co_address=" + co_address + ", co_zipcode=" + co_zipcode + ", co_city=" + co_city | ||
1039 | + + ", co_deltaname=" + co_deltaname + ", co_country=" + co_country + ", co_telephone=" + co_telephone | ||
1040 | + + ", co_fax=" + co_fax + ", co_name=" + co_name + ", reach_station=" + reach_station + ", carrier1=" | ||
1041 | + + carrier1 + ", reach_station1=" + reach_station1 + ", carrier2=" + carrier2 + ", reach_station2=" | ||
1042 | + + reach_station2 + ", name_ofgoods=" + name_ofgoods + ", delivery_station=" + delivery_station | ||
1043 | + + ", sh_provincecode=" + sh_provincecode + ", sh_provincename=" + sh_provincename + ", de_number=" | ||
1044 | + + de_number + ", de_weight=" + de_weight + ", de_chweight=" + de_chweight + ", de_size=" + de_size | ||
1045 | + + ", de_volume=" + de_volume + ", de_type=" + de_type + ", de_trstation=" + de_trstation | ||
1046 | + + ", de_packing=" + de_packing + ", de_remarks=" + de_remarks + ", de_ids=" + de_ids | ||
1047 | + + ", response_code=" + response_code + ", response_text=" + response_text + ", save_time=" + save_time | ||
1048 | + + ", USER_ID=" + USER_ID + ", createDate=" + createDate + ", modifyDate=" + modifyDate + ", creator=" | ||
1049 | + + creator + ", modifier=" + modifier + ", isdelete=" + isdelete + ", id=" + id + "]"; | ||
1050 | + } | ||
1051 | + | ||
1052 | +} |
1 | +package com.air.agent.imf.bean; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Calendar; | ||
5 | +import java.util.Date; | ||
6 | + | ||
7 | +import javax.persistence.Column; | ||
8 | +import javax.persistence.Entity; | ||
9 | +import javax.persistence.GeneratedValue; | ||
10 | +import javax.persistence.GenerationType; | ||
11 | +import javax.persistence.Id; | ||
12 | +import javax.persistence.Table; | ||
13 | + | ||
14 | +import org.apache.commons.lang.StringUtils; | ||
15 | + | ||
16 | +/** | ||
17 | + * Created by cohesion on 2017/8/9. | ||
18 | + * <p/> | ||
19 | + * 预配舱单分单表 | ||
20 | + */ | ||
21 | +@Entity | ||
22 | +@Table(name = "preparesecondary") | ||
23 | +public class PreparesecondaryEntity implements Serializable { | ||
24 | + private static final long serialVersionUID = 1L; | ||
25 | + | ||
26 | + private String unlodingcode;// 卸货地代码 | ||
27 | + private String cnecusid;// 收货人代码 | ||
28 | + private String shpcusid;// 发货人代码 | ||
29 | + /** | ||
30 | + * 发货人aeo | ||
31 | + */ | ||
32 | + private String shpaeo; | ||
33 | + /** | ||
34 | + * 收货人aeo | ||
35 | + */ | ||
36 | + private String cneaeo; | ||
37 | + private String autoid; | ||
38 | + /** | ||
39 | + * 主单号 | ||
40 | + */ | ||
41 | + private String waybillnomaster; | ||
42 | + /** | ||
43 | + * 分单号 | ||
44 | + */ | ||
45 | + private String waybillnosecondary; | ||
46 | + /** | ||
47 | + * 总重量 | ||
48 | + */ | ||
49 | + private String totalweight; | ||
50 | + /** | ||
51 | + * 总件数 | ||
52 | + */ | ||
53 | + private String totalpiece; | ||
54 | + /** | ||
55 | + * 舱单件数 | ||
56 | + */ | ||
57 | + private String preparepiece; | ||
58 | + /** | ||
59 | + * 舱单重量 | ||
60 | + */ | ||
61 | + private String prepareweight; | ||
62 | + /** | ||
63 | + * 货物描述 | ||
64 | + */ | ||
65 | + private String productname; | ||
66 | + /** | ||
67 | + * 装载日期 | ||
68 | + */ | ||
69 | + private Date stowagedate; | ||
70 | + /** | ||
71 | + * 创建日期 | ||
72 | + */ | ||
73 | + private Date createdate; | ||
74 | + /** | ||
75 | + * 预配主单表主键 | ||
76 | + */ | ||
77 | + private Long preparemasterid; | ||
78 | + /** | ||
79 | + * 航班日期 | ||
80 | + */ | ||
81 | + private Date flightdate; | ||
82 | + /** | ||
83 | + * 起始地 | ||
84 | + */ | ||
85 | + private String originatingstation; | ||
86 | + /** | ||
87 | + * 目的地 | ||
88 | + */ | ||
89 | + private String destinationstation; | ||
90 | + /** | ||
91 | + * 代理人代码 | ||
92 | + */ | ||
93 | + private String agentcompanycode; | ||
94 | + /** | ||
95 | + * 状态 | ||
96 | + */ | ||
97 | + private String status; | ||
98 | + /** | ||
99 | + * 承运人 | ||
100 | + */ | ||
101 | + private String carrier; | ||
102 | + /** | ||
103 | + * 海关状态 | ||
104 | + */ | ||
105 | + private String customsstatus; | ||
106 | + /** | ||
107 | + * 付费方式 | ||
108 | + */ | ||
109 | + private String paymode; | ||
110 | + /** | ||
111 | + * 特货代码 | ||
112 | + */ | ||
113 | + private String specialgoodscode; | ||
114 | + /** | ||
115 | + * 海关关区 | ||
116 | + */ | ||
117 | + private String customscode; | ||
118 | + /** | ||
119 | + * 代理人 | ||
120 | + */ | ||
121 | + private String agentman; | ||
122 | + /** | ||
123 | + * 代理人公司 | ||
124 | + */ | ||
125 | + private String agentcompany; | ||
126 | + /** | ||
127 | + * 回执信息 | ||
128 | + */ | ||
129 | + private String receiptinformation; | ||
130 | + /** | ||
131 | + * UN编号 | ||
132 | + */ | ||
133 | + private String unnumber; | ||
134 | + /** | ||
135 | + * 危险品类别 | ||
136 | + */ | ||
137 | + private String category; | ||
138 | + /** | ||
139 | + * 航班号 | ||
140 | + */ | ||
141 | + private String flightno; | ||
142 | + /** | ||
143 | + * 收货人公司 | ||
144 | + */ | ||
145 | + private String sh_company; | ||
146 | + /** | ||
147 | + * 收货人地址 | ||
148 | + */ | ||
149 | + private String sh_address; | ||
150 | + /** | ||
151 | + * 收货人邮编 | ||
152 | + */ | ||
153 | + private String sh_zipcode; | ||
154 | + /** | ||
155 | + * 收货人城市 | ||
156 | + */ | ||
157 | + private String sh_city; | ||
158 | + /** | ||
159 | + * 收货人洲名 | ||
160 | + */ | ||
161 | + private String sh_deltaname; | ||
162 | + /** | ||
163 | + * 收货人国家名字 | ||
164 | + */ | ||
165 | + private String sh_country; | ||
166 | + /** | ||
167 | + * 收货人电话 | ||
168 | + */ | ||
169 | + private String sh_telephone; | ||
170 | + /** | ||
171 | + * 收货人传真 | ||
172 | + */ | ||
173 | + private String sh_fax; | ||
174 | + /** | ||
175 | + * 收货人名字 | ||
176 | + */ | ||
177 | + private String sh_name; | ||
178 | + /** | ||
179 | + * 发货人公司 | ||
180 | + */ | ||
181 | + private String co_company; | ||
182 | + /** | ||
183 | + * 发货人地址 | ||
184 | + */ | ||
185 | + private String co_address; | ||
186 | + /** | ||
187 | + * 发货人邮编 | ||
188 | + */ | ||
189 | + private String co_zipcode; | ||
190 | + /** | ||
191 | + * 发货人城市 | ||
192 | + */ | ||
193 | + private String co_city; | ||
194 | + /** | ||
195 | + * 发货人洲名 | ||
196 | + */ | ||
197 | + private String co_deltaname; | ||
198 | + /** | ||
199 | + * 发货人国家名字 | ||
200 | + */ | ||
201 | + private String co_country; | ||
202 | + /** | ||
203 | + * 发货人电话 | ||
204 | + */ | ||
205 | + private String co_telephone; | ||
206 | + /** | ||
207 | + * 发货人传真 | ||
208 | + */ | ||
209 | + private String co_fax; | ||
210 | + /** | ||
211 | + * 发货人名字 | ||
212 | + */ | ||
213 | + private String co_name; | ||
214 | + /** | ||
215 | + * 到达站 | ||
216 | + */ | ||
217 | + private String reach_station; | ||
218 | + /** | ||
219 | + * 承运人 | ||
220 | + */ | ||
221 | + private String carrier1; | ||
222 | + /** | ||
223 | + * 到达站 | ||
224 | + */ | ||
225 | + private String reach_station1; | ||
226 | + /** | ||
227 | + * 承运人 | ||
228 | + */ | ||
229 | + private String carrier2; | ||
230 | + /** | ||
231 | + * 到达站 | ||
232 | + */ | ||
233 | + private String reach_station2; | ||
234 | + /** | ||
235 | + * 货物品名 | ||
236 | + */ | ||
237 | + private String name_ofgoods; | ||
238 | + /** | ||
239 | + * 交运货站 | ||
240 | + */ | ||
241 | + private String delivery_station; | ||
242 | + | ||
243 | + /** | ||
244 | + * 收货人省份代码 | ||
245 | + */ | ||
246 | + private String sh_provincecode; | ||
247 | + /** | ||
248 | + * 收货人省份 | ||
249 | + */ | ||
250 | + private String sh_provincename; | ||
251 | + /** | ||
252 | + * 交运件数 | ||
253 | + */ | ||
254 | + private String de_number; | ||
255 | + /** | ||
256 | + * 交运重量 | ||
257 | + */ | ||
258 | + private String de_weight; | ||
259 | + /** | ||
260 | + * 交运计费重量 | ||
261 | + */ | ||
262 | + private String de_chweight; | ||
263 | + /** | ||
264 | + * 交运体尺寸 | ||
265 | + */ | ||
266 | + private String de_size; | ||
267 | + /** | ||
268 | + * 交运体积 | ||
269 | + */ | ||
270 | + private String de_volume; | ||
271 | + /** | ||
272 | + * 交运类型 | ||
273 | + */ | ||
274 | + private String de_type; | ||
275 | + /** | ||
276 | + * 交运中转站 | ||
277 | + */ | ||
278 | + private String de_trstation; | ||
279 | + /** | ||
280 | + * 交运包装信息 | ||
281 | + */ | ||
282 | + private String de_packing; | ||
283 | + /** | ||
284 | + * 交运备注 | ||
285 | + */ | ||
286 | + private String de_remarks; | ||
287 | + | ||
288 | + /** | ||
289 | + * 交运发送状态 1发送 | ||
290 | + */ | ||
291 | + private Integer de_ids; | ||
292 | + // 回执代码 | ||
293 | + private String response_code; | ||
294 | + // 回执文本 | ||
295 | + private String response_text; | ||
296 | + | ||
297 | + private Long save_time; | ||
298 | + | ||
299 | + private Long USER_ID; | ||
300 | + | ||
301 | + private Date createDate; | ||
302 | + private Date modifyDate; | ||
303 | + private Long creator; | ||
304 | + private Long modifier; | ||
305 | + | ||
306 | + /** | ||
307 | + * 是否删除 1删除 在里不让在修改主单号 | ||
308 | + */ | ||
309 | + private Integer isdelete = 0; | ||
310 | + | ||
311 | + protected Long id; | ||
312 | + | ||
313 | + @Id | ||
314 | + @GeneratedValue(strategy = GenerationType.SEQUENCE) | ||
315 | + @Column(name = "ID") | ||
316 | + public Long getId() { | ||
317 | + return id; | ||
318 | + } | ||
319 | + | ||
320 | + public void setId(Long id) { | ||
321 | + this.id = id; | ||
322 | + } | ||
323 | + | ||
324 | + @Column(name = "CREATE_DATE", updatable = false) | ||
325 | + public Date getCreateDate() { | ||
326 | + return createDate; | ||
327 | + } | ||
328 | + | ||
329 | + public void setCreateDate(Date createDate) { | ||
330 | + this.createDate = createDate; | ||
331 | + } | ||
332 | + | ||
333 | + @Column(name = "MODIFY_DATE") | ||
334 | + public Date getModifyDate() { | ||
335 | + return modifyDate; | ||
336 | + } | ||
337 | + | ||
338 | + public void setModifyDate(Date modifyDate) { | ||
339 | + this.modifyDate = modifyDate; | ||
340 | + } | ||
341 | + | ||
342 | + public Long getCreator() { | ||
343 | + return creator; | ||
344 | + } | ||
345 | + | ||
346 | + public void setCreator(Long creator) { | ||
347 | + this.creator = creator; | ||
348 | + } | ||
349 | + | ||
350 | + public Long getModifier() { | ||
351 | + return modifier; | ||
352 | + } | ||
353 | + | ||
354 | + public void setModifier(Long modifier) { | ||
355 | + this.modifier = modifier; | ||
356 | + } | ||
357 | + | ||
358 | + @Column(name = "IS_DELETE") | ||
359 | + public Integer getIsdelete() { | ||
360 | + return isdelete; | ||
361 | + } | ||
362 | + | ||
363 | + public void setIsdelete(Integer isdelete) { | ||
364 | + this.isdelete = isdelete; | ||
365 | + } | ||
366 | + | ||
367 | + public String getUnlodingcode() { | ||
368 | + return StringUtils.isBlank(unlodingcode) ? getDestinationstation() : unlodingcode; | ||
369 | + } | ||
370 | + | ||
371 | + public void setUnlodingcode(String unlodingcode) { | ||
372 | + this.unlodingcode = unlodingcode; | ||
373 | + } | ||
374 | + | ||
375 | + public String getCnecusid() { | ||
376 | + return cnecusid; | ||
377 | + } | ||
378 | + | ||
379 | + public void setCnecusid(String cnecusid) { | ||
380 | + this.cnecusid = cnecusid; | ||
381 | + } | ||
382 | + | ||
383 | + public String getShpcusid() { | ||
384 | + return shpcusid; | ||
385 | + } | ||
386 | + | ||
387 | + public void setShpcusid(String shpcusid) { | ||
388 | + this.shpcusid = shpcusid; | ||
389 | + } | ||
390 | + | ||
391 | + public String getShpaeo() { | ||
392 | + return shpaeo; | ||
393 | + } | ||
394 | + | ||
395 | + public void setShpaeo(String shpaeo) { | ||
396 | + this.shpaeo = shpaeo; | ||
397 | + } | ||
398 | + | ||
399 | + public String getCneaeo() { | ||
400 | + return cneaeo; | ||
401 | + } | ||
402 | + | ||
403 | + public void setCneaeo(String cneaeo) { | ||
404 | + this.cneaeo = cneaeo; | ||
405 | + } | ||
406 | + | ||
407 | + @Column(name = "USER_ID") | ||
408 | + public Long getUSER_ID() { | ||
409 | + return USER_ID; | ||
410 | + } | ||
411 | + | ||
412 | + public void setUSER_ID(Long uSER_ID) { | ||
413 | + USER_ID = uSER_ID; | ||
414 | + } | ||
415 | + | ||
416 | + @Column(name = "SAVE_TIME") | ||
417 | + public Long getSave_time() { | ||
418 | + return save_time; | ||
419 | + } | ||
420 | + | ||
421 | + public void setSave_time(Long save_time) { | ||
422 | + this.save_time = save_time; | ||
423 | + } | ||
424 | + | ||
425 | + @Column(name = "RESPONSE_CODE") | ||
426 | + public String getResponse_code() { | ||
427 | + return response_code; | ||
428 | + } | ||
429 | + | ||
430 | + public void setResponse_code(String response_code) { | ||
431 | + this.response_code = response_code; | ||
432 | + } | ||
433 | + | ||
434 | + @Column(name = "RESPONSE_TEXT") | ||
435 | + public String getResponse_text() { | ||
436 | + return response_text; | ||
437 | + } | ||
438 | + | ||
439 | + public void setResponse_text(String response_text) { | ||
440 | + this.response_text = response_text; | ||
441 | + } | ||
442 | + | ||
443 | + @Column(name = "DE_IDS") | ||
444 | + public Integer getDe_ids() { | ||
445 | + return de_ids; | ||
446 | + } | ||
447 | + | ||
448 | + public void setDe_ids(Integer de_ids) { | ||
449 | + this.de_ids = de_ids; | ||
450 | + } | ||
451 | + | ||
452 | + @Column(name = "DE_NUMBER") | ||
453 | + public String getDe_number() { | ||
454 | + return getTotalpiece(); | ||
455 | + } | ||
456 | + | ||
457 | + public void setDe_number(String de_number) { | ||
458 | + this.de_number = de_number; | ||
459 | + } | ||
460 | + | ||
461 | + @Column(name = "DE_WEIGHT") | ||
462 | + public String getDe_weight() { | ||
463 | + return getTotalweight(); | ||
464 | + } | ||
465 | + | ||
466 | + public void setDe_weight(String de_weight) { | ||
467 | + this.de_weight = de_weight; | ||
468 | + } | ||
469 | + | ||
470 | + @Column(name = "DE_CHWEIGHT") | ||
471 | + public String getDe_chweight() { | ||
472 | + return getTotalweight(); | ||
473 | + } | ||
474 | + | ||
475 | + public void setDe_chweight(String de_chweight) { | ||
476 | + this.de_chweight = de_chweight; | ||
477 | + } | ||
478 | + | ||
479 | + @Column(name = "DE_SIZE") | ||
480 | + public String getDe_size() { | ||
481 | + return de_size; | ||
482 | + } | ||
483 | + | ||
484 | + public void setDe_size(String de_size) { | ||
485 | + this.de_size = de_size; | ||
486 | + } | ||
487 | + | ||
488 | + @Column(name = "DE_VOLUME") | ||
489 | + public String getDe_volume() { | ||
490 | + return de_volume; | ||
491 | + } | ||
492 | + | ||
493 | + public void setDe_volume(String de_volume) { | ||
494 | + this.de_volume = de_volume; | ||
495 | + } | ||
496 | + | ||
497 | + @Column(name = "DE_TYPE") | ||
498 | + public String getDe_type() { | ||
499 | + return de_type; | ||
500 | + } | ||
501 | + | ||
502 | + public void setDe_type(String de_type) { | ||
503 | + this.de_type = de_type; | ||
504 | + } | ||
505 | + | ||
506 | + @Column(name = "DE_TRSTATION") | ||
507 | + public String getDe_trstation() { | ||
508 | + return de_trstation; | ||
509 | + } | ||
510 | + | ||
511 | + public void setDe_trstation(String de_trstation) { | ||
512 | + this.de_trstation = de_trstation; | ||
513 | + } | ||
514 | + | ||
515 | + @Column(name = "DE_PACKING") | ||
516 | + public String getDe_packing() { | ||
517 | + return de_packing; | ||
518 | + } | ||
519 | + | ||
520 | + public void setDe_packing(String de_packing) { | ||
521 | + this.de_packing = de_packing; | ||
522 | + } | ||
523 | + | ||
524 | + @Column(name = "DE_REMARKS") | ||
525 | + public String getDe_remarks() { | ||
526 | + return de_remarks; | ||
527 | + } | ||
528 | + | ||
529 | + public void setDe_remarks(String de_remarks) { | ||
530 | + this.de_remarks = de_remarks; | ||
531 | + } | ||
532 | + | ||
533 | + @Column(name = "SH_PROVINCECODE") | ||
534 | + public String getSh_provincecode() { | ||
535 | + return sh_provincecode; | ||
536 | + } | ||
537 | + | ||
538 | + public void setSh_provincecode(String sh_provincecode) { | ||
539 | + this.sh_provincecode = sh_provincecode; | ||
540 | + } | ||
541 | + | ||
542 | + @Column(name = "SH_PROVINCENAME") | ||
543 | + public String getSh_provincename() { | ||
544 | + return sh_provincename; | ||
545 | + } | ||
546 | + | ||
547 | + public void setSh_provincename(String sh_provincename) { | ||
548 | + this.sh_provincename = sh_provincename; | ||
549 | + } | ||
550 | + | ||
551 | + @Column(name = "FLIGHTNO") | ||
552 | + public String getFlightno() { | ||
553 | + return flightno; | ||
554 | + } | ||
555 | + | ||
556 | + public void setFlightno(String flightno) { | ||
557 | + this.flightno = flightno; | ||
558 | + } | ||
559 | + | ||
560 | + @Column(name = "AUTOID") | ||
561 | + public String getAutoid() { | ||
562 | + return autoid; | ||
563 | + } | ||
564 | + | ||
565 | + public void setAutoid(String autoid) { | ||
566 | + this.autoid = autoid; | ||
567 | + } | ||
568 | + | ||
569 | + @Column(name = "WAYBILLNOMASTER") | ||
570 | + public String getWaybillnomaster() { | ||
571 | + return waybillnomaster; | ||
572 | + } | ||
573 | + | ||
574 | + public void setWaybillnomaster(String waybillnomaster) { | ||
575 | + this.waybillnomaster = waybillnomaster; | ||
576 | + } | ||
577 | + | ||
578 | + @Column(name = "WAYBILLNOSECONDARY") | ||
579 | + public String getWaybillnosecondary() { | ||
580 | + return waybillnosecondary; | ||
581 | + } | ||
582 | + | ||
583 | + public void setWaybillnosecondary(String waybillnosecondary) { | ||
584 | + this.waybillnosecondary = waybillnosecondary; | ||
585 | + } | ||
586 | + | ||
587 | + @Column(name = "TOTALWEIGHT") | ||
588 | + public String getTotalweight() { | ||
589 | + return totalweight; | ||
590 | + } | ||
591 | + | ||
592 | + public void setTotalweight(String totalweight) { | ||
593 | + this.totalweight = totalweight; | ||
594 | + } | ||
595 | + | ||
596 | + @Column(name = "TOTALPIECE") | ||
597 | + public String getTotalpiece() { | ||
598 | + return totalpiece; | ||
599 | + } | ||
600 | + | ||
601 | + public void setTotalpiece(String totalpiece) { | ||
602 | + this.totalpiece = totalpiece; | ||
603 | + } | ||
604 | + | ||
605 | + @Column(name = "PREPAREPIECE") | ||
606 | + public String getPreparepiece() { | ||
607 | + return getTotalpiece(); | ||
608 | + } | ||
609 | + | ||
610 | + public void setPreparepiece(String preparepiece) { | ||
611 | + this.preparepiece = preparepiece; | ||
612 | + } | ||
613 | + | ||
614 | + @Column(name = "PREPAREWEIGHT") | ||
615 | + public String getPrepareweight() { | ||
616 | + return getTotalweight(); | ||
617 | + } | ||
618 | + | ||
619 | + public void setPrepareweight(String prepareweight) { | ||
620 | + this.prepareweight = prepareweight; | ||
621 | + } | ||
622 | + | ||
623 | + @Column(name = "PRODUCTNAME") | ||
624 | + public String getProductname() { | ||
625 | + return productname; | ||
626 | + } | ||
627 | + | ||
628 | + public void setProductname(String productname) { | ||
629 | + this.productname = productname; | ||
630 | + } | ||
631 | + | ||
632 | + public Date getStowagedate(String datestr) { | ||
633 | + if (datestr == null) | ||
634 | + return null; | ||
635 | + | ||
636 | + Calendar calendar = Calendar.getInstance(); | ||
637 | + String year = null; | ||
638 | + String time = null; | ||
639 | + if (datestr.indexOf(":") < 0) { | ||
640 | + // 只有日期,没有时分秒等时间 | ||
641 | + year = datestr.split(" ")[0]; | ||
642 | + | ||
643 | + } else { | ||
644 | + year = datestr.split(" ")[0]; | ||
645 | + time = datestr.split(" ")[1]; | ||
646 | + } | ||
647 | + | ||
648 | + String[] years = year.split("-"); | ||
649 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2])); | ||
650 | + if (StringUtils.isNotBlank(time)) { | ||
651 | + String[] times = time.split(":"); | ||
652 | + calendar.set(Integer.parseInt(years[0]), Integer.parseInt(years[1]) - 1, Integer.parseInt(years[2]), | ||
653 | + Integer.parseInt(times[0]), Integer.parseInt(times[1]), Integer.parseInt(times[2])); | ||
654 | + } | ||
655 | + return calendar.getTime(); | ||
656 | + } | ||
657 | + | ||
658 | + @Column(name = "STOWAGEDATE") | ||
659 | + public Date getStowagedate() { | ||
660 | +// return stowagedate; | ||
661 | + return new Date(System.currentTimeMillis() + 6 * 3600); | ||
662 | + } | ||
663 | + | ||
664 | + public void setStowagedate(Date stowagedate) { | ||
665 | + this.stowagedate = stowagedate; | ||
666 | + } | ||
667 | + | ||
668 | + @Column(name = "CREATEDATE") | ||
669 | + public Date getCreatedate() { | ||
670 | + return createdate; | ||
671 | + } | ||
672 | + | ||
673 | + public void setCreatedate(Date createdate) { | ||
674 | + this.createdate = createdate; | ||
675 | + } | ||
676 | + | ||
677 | + @Column(name = "PREPAREMASTERID") | ||
678 | + public Long getPreparemasterid() { | ||
679 | + return preparemasterid; | ||
680 | + } | ||
681 | + | ||
682 | + public void setPreparemasterid(Long preparemasterid) { | ||
683 | + this.preparemasterid = preparemasterid; | ||
684 | + } | ||
685 | + | ||
686 | + @Column(name = "FLIGHTDATE") | ||
687 | + public Date getFlightdate() { | ||
688 | + return flightdate; | ||
689 | + } | ||
690 | + | ||
691 | + public void setFlightdate(Date flightdate) { | ||
692 | + this.flightdate = flightdate; | ||
693 | + } | ||
694 | + | ||
695 | + @Column(name = "ORIGINATINGSTATION") | ||
696 | + public String getOriginatingstation() { | ||
697 | + return originatingstation; | ||
698 | + } | ||
699 | + | ||
700 | + public void setOriginatingstation(String originatingstation) { | ||
701 | + this.originatingstation = originatingstation; | ||
702 | + } | ||
703 | + | ||
704 | + @Column(name = "DESTINATIONSTATION") | ||
705 | + public String getDestinationstation() { | ||
706 | + return destinationstation; | ||
707 | + } | ||
708 | + | ||
709 | + public void setDestinationstation(String destinationstation) { | ||
710 | + this.destinationstation = destinationstation; | ||
711 | + } | ||
712 | + | ||
713 | + @Column(name = "AGENTCOMPANYCODE") | ||
714 | + public String getAgentcompanycode() { | ||
715 | + return agentcompanycode; | ||
716 | + } | ||
717 | + | ||
718 | + public void setAgentcompanycode(String agentcompanycode) { | ||
719 | + this.agentcompanycode = agentcompanycode; | ||
720 | + } | ||
721 | + | ||
722 | + @Column(name = "STATUS") | ||
723 | + public String getStatus() { | ||
724 | + return status; | ||
725 | + } | ||
726 | + | ||
727 | + public void setStatus(String status) { | ||
728 | + this.status = status; | ||
729 | + } | ||
730 | + | ||
731 | + @Column(name = "CARRIER") | ||
732 | + public String getCarrier() { | ||
733 | + return carrier; | ||
734 | + } | ||
735 | + | ||
736 | + public void setCarrier(String carrier) { | ||
737 | + this.carrier = carrier; | ||
738 | + } | ||
739 | + | ||
740 | + @Column(name = "CUSTOMSSTATUS") | ||
741 | + public String getCustomsstatus() { | ||
742 | + return customsstatus; | ||
743 | + } | ||
744 | + | ||
745 | + public void setCustomsstatus(String customsstatus) { | ||
746 | + this.customsstatus = customsstatus; | ||
747 | + } | ||
748 | + | ||
749 | + @Column(name = "PAYMODE") | ||
750 | + public String getPaymode() { | ||
751 | + return paymode; | ||
752 | + } | ||
753 | + | ||
754 | + public void setPaymode(String paymode) { | ||
755 | + this.paymode = paymode; | ||
756 | + } | ||
757 | + | ||
758 | + @Column(name = "SPECIALGOODSCODE") | ||
759 | + public String getSpecialgoodscode() { | ||
760 | + return specialgoodscode; | ||
761 | + } | ||
762 | + | ||
763 | + public void setSpecialgoodscode(String specialgoodscode) { | ||
764 | + this.specialgoodscode = specialgoodscode; | ||
765 | + } | ||
766 | + | ||
767 | + @Column(name = "CUSTOMSCODE") | ||
768 | + public String getCustomscode() { | ||
769 | + return customscode; | ||
770 | + } | ||
771 | + | ||
772 | + public void setCustomscode(String customscode) { | ||
773 | + this.customscode = customscode; | ||
774 | + } | ||
775 | + | ||
776 | + @Column(name = "AGENTMAN") | ||
777 | + public String getAgentman() { | ||
778 | + return agentman; | ||
779 | + } | ||
780 | + | ||
781 | + public void setAgentman(String agentman) { | ||
782 | + this.agentman = agentman; | ||
783 | + } | ||
784 | + | ||
785 | + @Column(name = "AGENTCOMPANY") | ||
786 | + public String getAgentcompany() { | ||
787 | + return agentcompany; | ||
788 | + } | ||
789 | + | ||
790 | + public void setAgentcompany(String agentcompany) { | ||
791 | + this.agentcompany = agentcompany; | ||
792 | + } | ||
793 | + | ||
794 | + @Column(name = "RECEIPTINFORMATION") | ||
795 | + public String getReceiptinformation() { | ||
796 | + return receiptinformation; | ||
797 | + } | ||
798 | + | ||
799 | + public void setReceiptinformation(String receiptinformation) { | ||
800 | + this.receiptinformation = receiptinformation; | ||
801 | + } | ||
802 | + | ||
803 | + @Column(name = "UNNUMBER") | ||
804 | + public String getUnnumber() { | ||
805 | + return unnumber; | ||
806 | + } | ||
807 | + | ||
808 | + public void setUnnumber(String unnumber) { | ||
809 | + this.unnumber = unnumber; | ||
810 | + } | ||
811 | + | ||
812 | + @Column(name = "CATEGORY") | ||
813 | + public String getCategory() { | ||
814 | + return category; | ||
815 | + } | ||
816 | + | ||
817 | + public void setCategory(String category) { | ||
818 | + this.category = category; | ||
819 | + } | ||
820 | + | ||
821 | + @Column(name = "SH_COMPANY") | ||
822 | + public String getSh_company() { | ||
823 | + return sh_company; | ||
824 | + } | ||
825 | + | ||
826 | + public void setSh_company(String sh_company) { | ||
827 | + this.sh_company = sh_company; | ||
828 | + } | ||
829 | + | ||
830 | + @Column(name = "SH_ADDRESS") | ||
831 | + public String getSh_address() { | ||
832 | + return sh_address; | ||
833 | + } | ||
834 | + | ||
835 | + public void setSh_address(String sh_address) { | ||
836 | + this.sh_address = sh_address; | ||
837 | + } | ||
838 | + | ||
839 | + @Column(name = "SH_ZIPCODE") | ||
840 | + public String getSh_zipcode() { | ||
841 | + return sh_zipcode; | ||
842 | + } | ||
843 | + | ||
844 | + public void setSh_zipcode(String sh_zipcode) { | ||
845 | + this.sh_zipcode = sh_zipcode; | ||
846 | + } | ||
847 | + | ||
848 | + @Column(name = "SH_CITY") | ||
849 | + public String getSh_city() { | ||
850 | + return sh_city; | ||
851 | + } | ||
852 | + | ||
853 | + public void setSh_city(String sh_city) { | ||
854 | + this.sh_city = sh_city; | ||
855 | + } | ||
856 | + | ||
857 | + @Column(name = "SH_DELTANAME") | ||
858 | + public String getSh_deltaname() { | ||
859 | + return sh_deltaname; | ||
860 | + } | ||
861 | + | ||
862 | + public void setSh_deltaname(String sh_deltaname) { | ||
863 | + this.sh_deltaname = sh_deltaname; | ||
864 | + } | ||
865 | + | ||
866 | + @Column(name = "SH_COUNTRY") | ||
867 | + public String getSh_country() { | ||
868 | + return sh_country != null ? sh_country.toUpperCase() : ""; | ||
869 | + } | ||
870 | + | ||
871 | + public void setSh_country(String sh_country) { | ||
872 | + this.sh_country = sh_country; | ||
873 | + } | ||
874 | + | ||
875 | + @Column(name = "SH_TELEPHONE") | ||
876 | + public String getSh_telephone() { | ||
877 | + return sh_telephone; | ||
878 | + } | ||
879 | + | ||
880 | + public void setSh_telephone(String sh_telephone) { | ||
881 | + this.sh_telephone = sh_telephone; | ||
882 | + } | ||
883 | + | ||
884 | + @Column(name = "SH_FAX") | ||
885 | + public String getSh_fax() { | ||
886 | + return sh_fax; | ||
887 | + } | ||
888 | + | ||
889 | + public void setSh_fax(String sh_fax) { | ||
890 | + this.sh_fax = sh_fax; | ||
891 | + } | ||
892 | + | ||
893 | + @Column(name = "SH_NAME") | ||
894 | + public String getSh_name() { | ||
895 | + return sh_name; | ||
896 | + } | ||
897 | + | ||
898 | + public void setSh_name(String sh_name) { | ||
899 | + this.sh_name = sh_name; | ||
900 | + } | ||
901 | + | ||
902 | + @Column(name = "CO_COMPANY") | ||
903 | + public String getCo_company() { | ||
904 | + return co_company; | ||
905 | + } | ||
906 | + | ||
907 | + public void setCo_company(String co_company) { | ||
908 | + this.co_company = co_company; | ||
909 | + } | ||
910 | + | ||
911 | + @Column(name = "CO_ADDRESS") | ||
912 | + public String getCo_address() { | ||
913 | + return co_address; | ||
914 | + } | ||
915 | + | ||
916 | + public void setCo_address(String co_address) { | ||
917 | + this.co_address = co_address; | ||
918 | + } | ||
919 | + | ||
920 | + @Column(name = "CO_ZIPCODE") | ||
921 | + public String getCo_zipcode() { | ||
922 | + return co_zipcode; | ||
923 | + } | ||
924 | + | ||
925 | + public void setCo_zipcode(String co_zipcode) { | ||
926 | + this.co_zipcode = co_zipcode; | ||
927 | + } | ||
928 | + | ||
929 | + @Column(name = "CO_CITY") | ||
930 | + public String getCo_city() { | ||
931 | + return co_city; | ||
932 | + } | ||
933 | + | ||
934 | + public void setCo_city(String co_city) { | ||
935 | + this.co_city = co_city; | ||
936 | + } | ||
937 | + | ||
938 | + @Column(name = "CO_DELTANAME") | ||
939 | + public String getCo_deltaname() { | ||
940 | + return co_deltaname; | ||
941 | + } | ||
942 | + | ||
943 | + public void setCo_deltaname(String co_deltaname) { | ||
944 | + this.co_deltaname = co_deltaname; | ||
945 | + } | ||
946 | + | ||
947 | + @Column(name = "CO_COUNTRY") | ||
948 | + public String getCo_country() { | ||
949 | + return co_country; | ||
950 | + } | ||
951 | + | ||
952 | + public void setCo_country(String co_country) { | ||
953 | + this.co_country = co_country; | ||
954 | + } | ||
955 | + | ||
956 | + @Column(name = "CO_TELEPHONE") | ||
957 | + public String getCo_telephone() { | ||
958 | + return co_telephone; | ||
959 | + } | ||
960 | + | ||
961 | + public void setCo_telephone(String co_telephone) { | ||
962 | + this.co_telephone = co_telephone; | ||
963 | + } | ||
964 | + | ||
965 | + @Column(name = "CO_FAX") | ||
966 | + public String getCo_fax() { | ||
967 | + return co_fax; | ||
968 | + } | ||
969 | + | ||
970 | + public void setCo_fax(String co_fax) { | ||
971 | + this.co_fax = co_fax; | ||
972 | + } | ||
973 | + | ||
974 | + @Column(name = "CO_NAME") | ||
975 | + public String getCo_name() { | ||
976 | + return co_name; | ||
977 | + } | ||
978 | + | ||
979 | + public void setCo_name(String co_name) { | ||
980 | + this.co_name = co_name; | ||
981 | + } | ||
982 | + | ||
983 | + @Column(name = "REACH_STATION") | ||
984 | + public String getReach_station() { | ||
985 | + return StringUtils.isBlank(reach_station) ? getDestinationstation() : reach_station; | ||
986 | + } | ||
987 | + | ||
988 | + public void setReach_station(String reach_station) { | ||
989 | + this.reach_station = reach_station; | ||
990 | + } | ||
991 | + | ||
992 | + @Column(name = "CARRIER1") | ||
993 | + public String getCarrier1() { | ||
994 | + return carrier1; | ||
995 | + } | ||
996 | + | ||
997 | + public void setCarrier1(String carrier1) { | ||
998 | + this.carrier1 = carrier1; | ||
999 | + } | ||
1000 | + | ||
1001 | + @Column(name = "REACH_STATION1") | ||
1002 | + public String getReach_station1() { | ||
1003 | + return reach_station1; | ||
1004 | + } | ||
1005 | + | ||
1006 | + public void setReach_station1(String reach_station1) { | ||
1007 | + this.reach_station1 = reach_station1; | ||
1008 | + } | ||
1009 | + | ||
1010 | + @Column(name = "CARRIER2") | ||
1011 | + public String getCarrier2() { | ||
1012 | + return carrier2; | ||
1013 | + } | ||
1014 | + | ||
1015 | + public void setCarrier2(String carrier2) { | ||
1016 | + this.carrier2 = carrier2; | ||
1017 | + } | ||
1018 | + | ||
1019 | + @Column(name = "REACH_STATION2") | ||
1020 | + public String getReach_station2() { | ||
1021 | + return reach_station2; | ||
1022 | + } | ||
1023 | + | ||
1024 | + public void setReach_station2(String reach_station2) { | ||
1025 | + this.reach_station2 = reach_station2; | ||
1026 | + } | ||
1027 | + | ||
1028 | + @Column(name = "NAME_OFGOODS") | ||
1029 | + public String getName_ofgoods() { | ||
1030 | + return name_ofgoods; | ||
1031 | + } | ||
1032 | + | ||
1033 | + public void setName_ofgoods(String name_ofgoods) { | ||
1034 | + this.name_ofgoods = name_ofgoods; | ||
1035 | + } | ||
1036 | + | ||
1037 | + @Column(name = "DELIVERY_STATION") | ||
1038 | + public String getDelivery_station() { | ||
1039 | + return delivery_station; | ||
1040 | + } | ||
1041 | + | ||
1042 | + public void setDelivery_station(String delivery_station) { | ||
1043 | + this.delivery_station = delivery_station; | ||
1044 | + } | ||
1045 | + | ||
1046 | + // 主要用于List的contains函数里 | ||
1047 | + public boolean equals(Object mme) { | ||
1048 | + if (mme == null) | ||
1049 | + return false; | ||
1050 | + PreparesecondaryEntity pe = (PreparesecondaryEntity) mme; | ||
1051 | + if (pe.getCo_company() == null && this.getCo_company() == null) | ||
1052 | + return true; | ||
1053 | + else if (this.getCo_company() != null) { | ||
1054 | + // 在值相等的情况下,判断时间的大小 | ||
1055 | + if (this.getCo_company().equals(pe.getCo_company())) { | ||
1056 | + if (this.getSave_time() == null) | ||
1057 | + return true; | ||
1058 | + else if (pe.getSave_time() == null) | ||
1059 | + return false; | ||
1060 | + else | ||
1061 | + return this.getSave_time() > pe.getSave_time(); | ||
1062 | + } | ||
1063 | + } | ||
1064 | + return false; | ||
1065 | + } | ||
1066 | + | ||
1067 | + @Override | ||
1068 | + public String toString() { | ||
1069 | + return "PreparesecondaryEntity [unlodingcode=" + unlodingcode + ", cnecusid=" + cnecusid + ", shpcusid=" | ||
1070 | + + shpcusid + ", shpaeo=" + shpaeo + ", cneaeo=" + cneaeo + ", autoid=" + autoid + ", waybillnomaster=" | ||
1071 | + + waybillnomaster + ", waybillnosecondary=" + waybillnosecondary + ", totalweight=" + totalweight | ||
1072 | + + ", totalpiece=" + totalpiece + ", preparepiece=" + preparepiece + ", prepareweight=" + prepareweight | ||
1073 | + + ", productname=" + productname + ", stowagedate=" + stowagedate + ", createdate=" + createdate | ||
1074 | + + ", preparemasterid=" + preparemasterid + ", flightdate=" + flightdate + ", originatingstation=" | ||
1075 | + + originatingstation + ", destinationstation=" + destinationstation + ", agentcompanycode=" | ||
1076 | + + agentcompanycode + ", status=" + status + ", carrier=" + carrier + ", customsstatus=" + customsstatus | ||
1077 | + + ", paymode=" + paymode + ", specialgoodscode=" + specialgoodscode + ", customscode=" + customscode | ||
1078 | + + ", agentman=" + agentman + ", agentcompany=" + agentcompany + ", receiptinformation=" | ||
1079 | + + receiptinformation + ", unnumber=" + unnumber + ", category=" + category + ", flightno=" + flightno | ||
1080 | + + ", sh_company=" + sh_company + ", sh_address=" + sh_address + ", sh_zipcode=" + sh_zipcode | ||
1081 | + + ", sh_city=" + sh_city + ", sh_deltaname=" + sh_deltaname + ", sh_country=" + sh_country | ||
1082 | + + ", sh_telephone=" + sh_telephone + ", sh_fax=" + sh_fax + ", sh_name=" + sh_name + ", co_company=" | ||
1083 | + + co_company + ", co_address=" + co_address + ", co_zipcode=" + co_zipcode + ", co_city=" + co_city | ||
1084 | + + ", co_deltaname=" + co_deltaname + ", co_country=" + co_country + ", co_telephone=" + co_telephone | ||
1085 | + + ", co_fax=" + co_fax + ", co_name=" + co_name + ", reach_station=" + reach_station + ", carrier1=" | ||
1086 | + + carrier1 + ", reach_station1=" + reach_station1 + ", carrier2=" + carrier2 + ", reach_station2=" | ||
1087 | + + reach_station2 + ", name_ofgoods=" + name_ofgoods + ", delivery_station=" + delivery_station | ||
1088 | + + ", sh_provincecode=" + sh_provincecode + ", sh_provincename=" + sh_provincename + ", de_number=" | ||
1089 | + + de_number + ", de_weight=" + de_weight + ", de_chweight=" + de_chweight + ", de_size=" + de_size | ||
1090 | + + ", de_volume=" + de_volume + ", de_type=" + de_type + ", de_trstation=" + de_trstation | ||
1091 | + + ", de_packing=" + de_packing + ", de_remarks=" + de_remarks + ", de_ids=" + de_ids | ||
1092 | + + ", response_code=" + response_code + ", response_text=" + response_text + ", save_time=" + save_time | ||
1093 | + + ", USER_ID=" + USER_ID + ", createDate=" + createDate + ", modifyDate=" + modifyDate + ", creator=" | ||
1094 | + + creator + ", modifier=" + modifier + ", isdelete=" + isdelete + ", id=" + id + "]"; | ||
1095 | + } | ||
1096 | + | ||
1097 | +} |
1 | +package com.air.agent.imf.bean; | ||
2 | + | ||
3 | +import java.util.Date; | ||
4 | + | ||
5 | +import com.airport.util.parse.XMPParse; | ||
6 | + | ||
7 | +public class SubKit { | ||
8 | + | ||
9 | + private static final String TAG_HEADER = "/MSG/DECLAREPREPAREMASTERXMLBODY/Declaration"; | ||
10 | + | ||
11 | + public static PreparesecondaryEntity parseXml(String message) { | ||
12 | + PreparesecondaryEntity bean = new PreparesecondaryEntity(); | ||
13 | + try { | ||
14 | + String Carrier = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Carrier/ID"); | ||
15 | + String ORG = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/ORG/ID"); | ||
16 | + String DES = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/DES/ID"); | ||
17 | + String BorderTransportMeans = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/BorderTransportMeans/JourneyID"); | ||
18 | + String TransportContractDocument = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TransportContractDocument/ID"); | ||
19 | + String AssociatedTransportDocument = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/AssociatedTransportDocument/ID"); | ||
20 | +// String LoadingLocation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/LoadingLocation/ID"); | ||
21 | + String LoadingDate = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/LoadingLocation/LoadingDate"); | ||
22 | +// String UnloadingLocation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/UnloadingLocation/ID"); | ||
23 | +// String TransportSplitIndicator = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TransportSplitIndicator"); | ||
24 | + String QuantityQuantity = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/ConsignmentPackaging/QuantityQuantity"); | ||
25 | + String TotalGrossMassMeasure = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/TotalGrossMassMeasure"); | ||
26 | + String PreQuantityQuantity = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PreQuantityQuantity"); | ||
27 | + String PreTotalGrossMassMeasure = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PreTotalGrossMassMeasure"); | ||
28 | + String CustomsStatus = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/CustomsStatus"); | ||
29 | + String MethodCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/FreightPayment/MethodCode"); | ||
30 | + String ProductName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/ProductName"); | ||
31 | +// String PrepareTime = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/PrepareTime"); | ||
32 | + String CustomsCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/CustomsCode"); | ||
33 | + String AgentName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/AgentName"); | ||
34 | + String AgentCompany = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/AgentCompany"); | ||
35 | + String NameOfgoods = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/NameOfgoods"); | ||
36 | + String DeliveryStation = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/DeliveryStation"); | ||
37 | + String UNnumber = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/UNnumber"); | ||
38 | + String Category = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Category"); | ||
39 | + | ||
40 | + bean.setAgentcompany(AgentCompany); | ||
41 | + bean.setAgentcompanycode("WK"); | ||
42 | + bean.setAgentman(AgentName); | ||
43 | + bean.setCreator(1583l); | ||
44 | + | ||
45 | + bean.setCarrier(Carrier); | ||
46 | + bean.setCategory(Category); | ||
47 | + | ||
48 | + bean.setCreatedate(new Date()); | ||
49 | + bean.setCustomscode(CustomsCode); | ||
50 | + bean.setCustomsstatus(CustomsStatus); | ||
51 | + bean.setDe_chweight(TotalGrossMassMeasure); | ||
52 | +// bean.setDe_ids(de_ids); | ||
53 | + bean.setDe_number(QuantityQuantity); | ||
54 | +// bean.setDe_packing(de_packing); | ||
55 | +// bean.setDe_remarks(de_remarks); | ||
56 | +// bean.setDe_size(de_size); | ||
57 | +// bean.setDe_trstation(de_trstation); | ||
58 | +// bean.setDe_type(de_type); | ||
59 | +// bean.setDe_volume(de_volume); | ||
60 | + bean.setDe_weight(TotalGrossMassMeasure); | ||
61 | + bean.setDelivery_station(DeliveryStation); | ||
62 | + bean.setDestinationstation(DES); | ||
63 | + String fdate = BorderTransportMeans.split("/")[1]; | ||
64 | + bean.setFlightdate(DateKit.getDate(fdate)); | ||
65 | + bean.setFlightno(BorderTransportMeans.split("/")[0]); | ||
66 | + bean.setName_ofgoods(NameOfgoods); | ||
67 | + bean.setOriginatingstation(ORG); | ||
68 | + bean.setPaymode(MethodCode); | ||
69 | + bean.setPreparepiece(PreQuantityQuantity); | ||
70 | + bean.setPrepareweight(PreTotalGrossMassMeasure); | ||
71 | + bean.setProductname(ProductName); | ||
72 | + bean.setReach_station(DES); | ||
73 | + | ||
74 | +// bean.setSpecialgoodscode(specialgoodscode); | ||
75 | +// bean.setStatus(status); | ||
76 | + bean.setStowagedate(DateKit.getDate(LoadingDate)); | ||
77 | + bean.setTotalpiece(QuantityQuantity); | ||
78 | + bean.setTotalweight(TotalGrossMassMeasure); | ||
79 | + bean.setUnnumber(UNnumber); | ||
80 | +// bean.setUSER_ID(uSER_ID); | ||
81 | + bean.setWaybillnomaster(TransportContractDocument); | ||
82 | + bean.setWaybillnosecondary(AssociatedTransportDocument); | ||
83 | + | ||
84 | + | ||
85 | + String Consignee_Name = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Name"); | ||
86 | + String Consignee_Address_Line = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Line"); | ||
87 | + String Consignee_Address_CityName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CityName"); | ||
88 | + String Consignee_Address_CountryCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CountryCode"); | ||
89 | + String Consignee_Address_ZipCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/ZipCode"); | ||
90 | + String Consignee_Address_PROVINCECODE = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/PROVINCECODE"); | ||
91 | + String Consignee_Address_PROVINCENAME = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/PROVINCENAME"); | ||
92 | + String Consignee_Address_Deltaname = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Deltaname"); | ||
93 | + String Consignee_Address_TelePhone = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/TelePhone"); | ||
94 | + String Consignee_Address_Fax = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Fax"); | ||
95 | + String Consignee_Address_CNECUSID = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CNECUSID"); | ||
96 | + String Consignee_Address_CNEAEO = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/CNEAEO"); | ||
97 | + String Consignee_Address_Unlodingcode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignee/Address/Unlodingcode"); | ||
98 | + bean.setSh_address(Consignee_Address_Line); | ||
99 | + bean.setSh_city(Consignee_Address_CityName); | ||
100 | + bean.setSh_company(Consignee_Name); | ||
101 | + bean.setSh_country(Consignee_Address_CountryCode); | ||
102 | + bean.setSh_deltaname(Consignee_Address_Deltaname); | ||
103 | + bean.setSh_fax(Consignee_Address_Fax); | ||
104 | + bean.setSh_name(Consignee_Name); | ||
105 | + bean.setSh_provincecode(Consignee_Address_PROVINCECODE); | ||
106 | + bean.setSh_provincename(Consignee_Address_PROVINCENAME); | ||
107 | + bean.setSh_telephone(Consignee_Address_TelePhone); | ||
108 | + bean.setSh_zipcode(Consignee_Address_ZipCode); | ||
109 | + bean.setCneaeo(Consignee_Address_CNEAEO); | ||
110 | + bean.setCnecusid(Consignee_Address_CNECUSID); | ||
111 | + bean.setUnlodingcode(Consignee_Address_Unlodingcode); | ||
112 | + | ||
113 | + String Consignor_name = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/name"); | ||
114 | + String Consignor_Address_Line = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Line"); | ||
115 | + String Consignor_Address_CityName = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/CityName"); | ||
116 | + String Consignor_Address_CountryCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/CountryCode"); | ||
117 | + String Consignor_Address_ZipCode = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/ZipCode"); | ||
118 | +// String Consignor_Address_PROVINCECODE = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/PROVINCECODE"); | ||
119 | +// String Consignor_Address_PROVINCENAME = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/PROVINCENAME"); | ||
120 | + String Consignor_Address_Deltaname = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Deltaname"); | ||
121 | + String Consignor_Address_TelePhone = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/TelePhone"); | ||
122 | + String Consignor_Address_Fax = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/Fax"); | ||
123 | + String Consignor_Address_SHPCUSID = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/SHPCUSID"); | ||
124 | + String Consignor_Address_SHPAEO = XMPParse.getNodeValueFromXmlString(message, TAG_HEADER+"/Consignment/Consignor/Address/SHPAEO"); | ||
125 | + bean.setCo_address(Consignor_Address_Line); | ||
126 | + bean.setCo_city(Consignor_Address_CityName); | ||
127 | + bean.setCo_company(Consignor_name); | ||
128 | + bean.setCo_country(Consignor_Address_CountryCode); | ||
129 | + bean.setCo_deltaname(Consignor_Address_Deltaname); | ||
130 | + bean.setCo_fax(Consignor_Address_Fax); | ||
131 | + bean.setCo_name(Consignor_name); | ||
132 | + bean.setCo_telephone(Consignor_Address_TelePhone); | ||
133 | + bean.setCo_zipcode(Consignor_Address_ZipCode); | ||
134 | + bean.setShpaeo(Consignor_Address_SHPAEO); | ||
135 | + bean.setShpcusid(Consignor_Address_SHPCUSID); | ||
136 | + | ||
137 | + } catch (Exception e) { | ||
138 | + e.printStackTrace(); | ||
139 | + } | ||
140 | + return bean; | ||
141 | + } | ||
142 | + | ||
143 | +} |
src/main/java/com/air/agent/imf/dao/Dao.java
0 → 100644
1 | +package com.air.agent.imf.dao; | ||
2 | + | ||
3 | +import com.air.agent.imf.bean.ManifestEntity; | ||
4 | +import com.air.agent.imf.bean.PreparesecondaryEntity; | ||
5 | + | ||
6 | +public interface Dao { | ||
7 | + long saveMain(ManifestEntity bean); | ||
8 | + | ||
9 | + long saveSub(PreparesecondaryEntity bean); | ||
10 | + | ||
11 | + long getMasterId(String masterNo); | ||
12 | + | ||
13 | + long getMaxMasterId(); | ||
14 | + | ||
15 | + long getMaxSubId(); | ||
16 | +} |
1 | +package com.air.agent.imf.dao.impl; | ||
2 | + | ||
3 | +import java.sql.Connection; | ||
4 | +import java.sql.Date; | ||
5 | +import java.sql.PreparedStatement; | ||
6 | +import java.sql.ResultSet; | ||
7 | +import java.sql.SQLException; | ||
8 | +import java.sql.Statement; | ||
9 | + | ||
10 | +import org.apache.log4j.Logger; | ||
11 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
12 | +import org.springframework.jdbc.core.PreparedStatementCreator; | ||
13 | +import org.springframework.jdbc.support.GeneratedKeyHolder; | ||
14 | +import org.springframework.jdbc.support.KeyHolder; | ||
15 | + | ||
16 | +import com.air.agent.imf.bean.ManifestEntity; | ||
17 | +import com.air.agent.imf.bean.PreparesecondaryEntity; | ||
18 | +import com.air.agent.imf.dao.Dao; | ||
19 | +import com.jfinal.kit.StrKit; | ||
20 | + | ||
21 | +public class DaoImpl implements Dao { | ||
22 | + public static final Logger logger = Logger.getLogger(DaoImpl.class); | ||
23 | + private JdbcTemplate jdbcTemplate; | ||
24 | + | ||
25 | + public DaoImpl() { | ||
26 | + } | ||
27 | + | ||
28 | + public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { | ||
29 | + this.jdbcTemplate = jdbcTemplate; | ||
30 | + } | ||
31 | + | ||
32 | + @Override | ||
33 | + public long saveMain(ManifestEntity bean) { | ||
34 | + long generatedId = 0; | ||
35 | + try { | ||
36 | + KeyHolder keyHolder = new GeneratedKeyHolder(); | ||
37 | + this.jdbcTemplate.update(new PreparedStatementCreator() { | ||
38 | + public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { | ||
39 | + StringBuilder sb = new StringBuilder(); | ||
40 | + sb.append("insert into MANIFEST("); | ||
41 | + sb.append("FLIGHTNO,FLIGHTDATE,ORIGINATINGSTATION,DESTINATIONSTATION,WAYBILLNOMASTER,"); | ||
42 | + sb.append("TOTALWEIGHT,TOTALPIECE,PREPARETOTALPIECE,PREPARETOTALWEIGHT,AGENTCOMPANYCODE,"); | ||
43 | + sb.append("STOWAGEDATE,CARRIER,CUSTOMSSTATUS,PAYMODE,CUSTOMSCODE,AGENTMAN,AGENTCOMPANY,"); | ||
44 | + sb.append("CREATEDATE,PRODUCTNAME,USER_ID,UNNUMBER,CATEGORY,SH_COMPANY,SH_ADDRESS,SH_ZIPCODE,"); | ||
45 | + sb.append("SH_CITY,SH_DELTANAME,SH_COUNTRY,SH_TELEPHONE,SH_FAX,SH_NAME,CO_COMPANY,CO_ADDRESS,"); | ||
46 | + sb.append("CO_ZIPCODE,CO_CITY,CO_DELTANAME,CO_COUNTRY,CO_TELEPHONE,CO_FAX,CO_NAME,REACH_STATION,"); | ||
47 | + sb.append("NAME_OFGOODS,DELIVERY_STATION,SH_PROVINCECODE,SH_PROVINCENAME,DE_NUMBER,DE_WEIGHT,"); | ||
48 | + sb.append("DE_CHWEIGHT,SHPAEO,CNEAEO,SHPCUSID,CNECUSID,UNLODINGCODE,ID)"); | ||
49 | + sb.append( | ||
50 | + " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); | ||
51 | + | ||
52 | + PreparedStatement ps = connection.prepareStatement(sb.toString(), new String[] { "ID" }); | ||
53 | + ps.setString(1, bean.getFlightno()); | ||
54 | + ps.setDate(2, new Date(bean.getFlightdate().getTime())); | ||
55 | + ps.setString(3, StrKit.isBlank(bean.getOriginatingstation()) ? "" : bean.getOriginatingstation()); | ||
56 | + ps.setString(4, StrKit.isBlank(bean.getDestinationstation()) ? "" : bean.getDestinationstation()); | ||
57 | + ps.setString(5, StrKit.isBlank(bean.getWaybillnomaster()) ? "" : bean.getWaybillnomaster()); | ||
58 | + | ||
59 | + ps.setString(6, StrKit.isBlank(bean.getTotalweight()) ? "" : bean.getTotalweight()); | ||
60 | + ps.setString(7, StrKit.isBlank(bean.getTotalpiece()) ? "" : bean.getTotalpiece()); | ||
61 | + ps.setString(8, StrKit.isBlank(bean.getPreparetotalpiece()) ? "" : bean.getPreparetotalpiece()); | ||
62 | + ps.setString(9, StrKit.isBlank(bean.getPreparetotalweight()) ? "" : bean.getPreparetotalweight()); | ||
63 | + ps.setString(10, StrKit.isBlank(bean.getAgentcompanycode()) ? "" : bean.getAgentcompanycode()); | ||
64 | + | ||
65 | + ps.setDate(11, new Date(bean.getStowagedate().getTime())); | ||
66 | + ps.setString(12, StrKit.isBlank(bean.getCarrier()) ? "" : bean.getCarrier()); | ||
67 | + ps.setString(13, StrKit.isBlank(bean.getCustomsstatus()) ? "" : bean.getCustomsstatus()); | ||
68 | + ps.setString(14, StrKit.isBlank(bean.getPaymode()) ? "" : bean.getPaymode()); | ||
69 | + ps.setString(15, StrKit.isBlank(bean.getCustomscode()) ? "" : bean.getCustomscode()); | ||
70 | + ps.setString(16, StrKit.isBlank(bean.getAgentman()) ? "" : bean.getAgentman()); | ||
71 | + ps.setString(17, StrKit.isBlank(bean.getAgentcompany()) ? "" : bean.getAgentcompany()); | ||
72 | + | ||
73 | + ps.setDate(18, new Date(bean.getCreatedate().getTime())); | ||
74 | + ps.setString(19, StrKit.isBlank(bean.getProductname()) ? "" : bean.getProductname()); | ||
75 | + ps.setLong(20, bean.getCreator()); | ||
76 | + ps.setString(21, StrKit.isBlank(bean.getUnnumber()) ? "" : bean.getUnnumber()); | ||
77 | + ps.setString(22, StrKit.isBlank(bean.getCategory()) ? "" : bean.getCategory()); | ||
78 | + ps.setString(23, StrKit.isBlank(bean.getSh_company()) ? "" : bean.getSh_company()); | ||
79 | + ps.setString(24, StrKit.isBlank(bean.getSh_address()) ? "" : bean.getSh_address()); | ||
80 | + ps.setString(25, StrKit.isBlank(bean.getSh_zipcode()) ? "" : bean.getSh_zipcode()); | ||
81 | + | ||
82 | + ps.setString(26, StrKit.isBlank(bean.getSh_city()) ? "" : bean.getSh_city()); | ||
83 | + ps.setString(27, StrKit.isBlank(bean.getSh_deltaname()) ? "" : bean.getSh_deltaname()); | ||
84 | + ps.setString(28, StrKit.isBlank(bean.getSh_country()) ? "" : bean.getSh_country()); | ||
85 | + ps.setString(29, StrKit.isBlank(bean.getSh_telephone()) ? "" : bean.getSh_telephone()); | ||
86 | + ps.setString(30, StrKit.isBlank(bean.getSh_fax()) ? "" : bean.getSh_fax()); | ||
87 | + ps.setString(31, StrKit.isBlank(bean.getSh_name()) ? "" : bean.getSh_name()); | ||
88 | + ps.setString(32, StrKit.isBlank(bean.getCo_company()) ? "" : bean.getCo_company()); | ||
89 | + ps.setString(33, StrKit.isBlank(bean.getCo_address()) ? "" : bean.getCo_address()); | ||
90 | + | ||
91 | + ps.setString(34, StrKit.isBlank(bean.getCo_zipcode()) ? "" : bean.getCo_zipcode()); | ||
92 | + ps.setString(35, StrKit.isBlank(bean.getCo_city()) ? "" : bean.getCo_city()); | ||
93 | + ps.setString(36, StrKit.isBlank(bean.getCo_deltaname()) ? "" : bean.getCo_deltaname()); | ||
94 | + ps.setString(37, StrKit.isBlank(bean.getCo_country()) ? "" : bean.getCo_country()); | ||
95 | + ps.setString(38, StrKit.isBlank(bean.getCo_telephone()) ? "" : bean.getCo_telephone()); | ||
96 | + ps.setString(39, StrKit.isBlank(bean.getCo_fax()) ? "" : bean.getCo_fax()); | ||
97 | + ps.setString(40, StrKit.isBlank(bean.getCo_name()) ? "" : bean.getCo_name()); | ||
98 | + ps.setString(41, StrKit.isBlank(bean.getReach_station()) ? "" : bean.getReach_station()); | ||
99 | + | ||
100 | + ps.setString(42, StrKit.isBlank(bean.getName_ofgoods()) ? "" : bean.getName_ofgoods()); | ||
101 | + ps.setString(43, StrKit.isBlank(bean.getDelivery_station()) ? "" : bean.getDelivery_station()); | ||
102 | + ps.setString(44, StrKit.isBlank(bean.getSh_provincecode()) ? "" : bean.getSh_provincecode()); | ||
103 | + ps.setString(45, StrKit.isBlank(bean.getSh_provincename()) ? "" : bean.getSh_provincename()); | ||
104 | + ps.setString(46, StrKit.isBlank(bean.getDe_number()) ? "" : bean.getDe_number()); | ||
105 | + ps.setString(47, StrKit.isBlank(bean.getDe_weight()) ? "" : bean.getDe_weight()); | ||
106 | + | ||
107 | + ps.setString(48, StrKit.isBlank(bean.getDe_chweight()) ? "" : bean.getDe_chweight()); | ||
108 | + ps.setString(49, StrKit.isBlank(bean.getShpaeo()) ? "" : bean.getShpaeo()); | ||
109 | + ps.setString(50, StrKit.isBlank(bean.getCneaeo()) ? "" : bean.getCneaeo()); | ||
110 | + ps.setString(51, StrKit.isBlank(bean.getShpcusid()) ? "" : bean.getShpcusid()); | ||
111 | + ps.setString(52, StrKit.isBlank(bean.getCnecusid()) ? "" : bean.getCnecusid()); | ||
112 | + ps.setString(53, StrKit.isBlank(bean.getUnlodingcode()) ? "" : bean.getUnlodingcode()); | ||
113 | + ps.setLong(54, bean.getId()); | ||
114 | + | ||
115 | + return ps; | ||
116 | + } | ||
117 | + }, keyHolder); | ||
118 | + generatedId = keyHolder.getKey().longValue(); | ||
119 | + } catch (Exception e) { | ||
120 | + System.err.println("保存主单失败:" + e.toString()); | ||
121 | + } | ||
122 | + | ||
123 | + if(generatedId<1) { | ||
124 | + bean.setId(bean.getId()+1); | ||
125 | + saveMain(bean); | ||
126 | + } | ||
127 | + | ||
128 | + return generatedId; | ||
129 | + } | ||
130 | + | ||
131 | + @Override | ||
132 | + public long saveSub(PreparesecondaryEntity bean) { | ||
133 | + long generatedId = 0l; | ||
134 | + try { | ||
135 | + | ||
136 | + KeyHolder keyHolder = new GeneratedKeyHolder(); | ||
137 | + this.jdbcTemplate.update(new PreparedStatementCreator() { | ||
138 | + public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { | ||
139 | + StringBuilder sb = new StringBuilder(); | ||
140 | + sb.append("insert into PREPARESECONDARY("); | ||
141 | + sb.append("FLIGHTNO,FLIGHTDATE,ORIGINATINGSTATION,DESTINATIONSTATION,WAYBILLNOMASTER,"); | ||
142 | + sb.append("TOTALWEIGHT,TOTALPIECE,PREPAREPIECE,PREPAREWEIGHT,AGENTCOMPANYCODE,"); | ||
143 | + sb.append("STOWAGEDATE,CARRIER,CUSTOMSSTATUS,PAYMODE,CUSTOMSCODE,AGENTMAN,AGENTCOMPANY,"); | ||
144 | + sb.append("CREATEDATE,PRODUCTNAME,USER_ID,UNNUMBER,CATEGORY,SH_COMPANY,SH_ADDRESS,SH_ZIPCODE,"); | ||
145 | + sb.append("SH_CITY,SH_DELTANAME,SH_COUNTRY,SH_TELEPHONE,SH_FAX,SH_NAME,CO_COMPANY,CO_ADDRESS,"); | ||
146 | + sb.append("CO_ZIPCODE,CO_CITY,CO_DELTANAME,CO_COUNTRY,CO_TELEPHONE,CO_FAX,CO_NAME,REACH_STATION,"); | ||
147 | + sb.append("NAME_OFGOODS,DELIVERY_STATION,SH_PROVINCECODE,SH_PROVINCENAME,DE_NUMBER,DE_WEIGHT,"); | ||
148 | + sb.append( | ||
149 | + "DE_CHWEIGHT,SHPAEO,CNEAEO,SHPCUSID,CNECUSID,UNLODINGCODE,WAYBILLNOSECONDARY,PREPAREMASTERID,ID)"); | ||
150 | + sb.append( | ||
151 | + " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); | ||
152 | + | ||
153 | + PreparedStatement ps = connection.prepareStatement(sb.toString(), new String[] { "ID" }); | ||
154 | + ps.setString(1, bean.getFlightno()); | ||
155 | + ps.setDate(2, new Date(bean.getFlightdate().getTime())); | ||
156 | + ps.setString(3, StrKit.isBlank(bean.getOriginatingstation()) ? "" : bean.getOriginatingstation()); | ||
157 | + ps.setString(4, StrKit.isBlank(bean.getDestinationstation()) ? "" : bean.getDestinationstation()); | ||
158 | + ps.setString(5, StrKit.isBlank(bean.getWaybillnomaster()) ? "" : bean.getWaybillnomaster()); | ||
159 | + | ||
160 | + ps.setString(6, StrKit.isBlank(bean.getTotalweight()) ? "" : bean.getTotalweight()); | ||
161 | + ps.setString(7, StrKit.isBlank(bean.getTotalpiece()) ? "" : bean.getTotalpiece()); | ||
162 | + ps.setString(8, StrKit.isBlank(bean.getPreparepiece()) ? "" : bean.getPreparepiece()); | ||
163 | + ps.setString(9, StrKit.isBlank(bean.getPrepareweight()) ? "" : bean.getPrepareweight()); | ||
164 | + ps.setString(10, StrKit.isBlank(bean.getAgentcompanycode()) ? "" : bean.getAgentcompanycode()); | ||
165 | + | ||
166 | + ps.setDate(11, new Date(bean.getStowagedate().getTime())); | ||
167 | + ps.setString(12, StrKit.isBlank(bean.getCarrier()) ? "" : bean.getCarrier()); | ||
168 | + ps.setString(13, StrKit.isBlank(bean.getCustomsstatus()) ? "" : bean.getCustomsstatus()); | ||
169 | + ps.setString(14, StrKit.isBlank(bean.getPaymode()) ? "" : bean.getPaymode()); | ||
170 | + ps.setString(15, StrKit.isBlank(bean.getCustomscode()) ? "" : bean.getCustomscode()); | ||
171 | + ps.setString(16, StrKit.isBlank(bean.getAgentman()) ? "" : bean.getAgentman()); | ||
172 | + ps.setString(17, StrKit.isBlank(bean.getAgentcompany()) ? "" : bean.getAgentcompany()); | ||
173 | + | ||
174 | + ps.setDate(18, new Date(bean.getCreatedate().getTime())); | ||
175 | + ps.setString(19, StrKit.isBlank(bean.getProductname()) ? "" : bean.getProductname()); | ||
176 | + ps.setLong(20, bean.getCreator()); | ||
177 | + ps.setString(21, StrKit.isBlank(bean.getUnnumber()) ? "" : bean.getUnnumber()); | ||
178 | + ps.setString(22, StrKit.isBlank(bean.getCategory()) ? "" : bean.getCategory()); | ||
179 | + ps.setString(23, StrKit.isBlank(bean.getSh_company()) ? "" : bean.getSh_company()); | ||
180 | + ps.setString(24, StrKit.isBlank(bean.getSh_address()) ? "" : bean.getSh_address()); | ||
181 | + ps.setString(25, StrKit.isBlank(bean.getSh_zipcode()) ? "" : bean.getSh_zipcode()); | ||
182 | + | ||
183 | + ps.setString(26, StrKit.isBlank(bean.getSh_city()) ? "" : bean.getSh_city()); | ||
184 | + ps.setString(27, StrKit.isBlank(bean.getSh_deltaname()) ? "" : bean.getSh_deltaname()); | ||
185 | + ps.setString(28, StrKit.isBlank(bean.getSh_country()) ? "" : bean.getSh_country()); | ||
186 | + ps.setString(29, StrKit.isBlank(bean.getSh_telephone()) ? "" : bean.getSh_telephone()); | ||
187 | + ps.setString(30, StrKit.isBlank(bean.getSh_fax()) ? "" : bean.getSh_fax()); | ||
188 | + ps.setString(31, StrKit.isBlank(bean.getSh_name()) ? "" : bean.getSh_name()); | ||
189 | + ps.setString(32, StrKit.isBlank(bean.getCo_company()) ? "" : bean.getCo_company()); | ||
190 | + ps.setString(33, StrKit.isBlank(bean.getCo_address()) ? "" : bean.getCo_address()); | ||
191 | + | ||
192 | + ps.setString(34, StrKit.isBlank(bean.getCo_zipcode()) ? "" : bean.getCo_zipcode()); | ||
193 | + ps.setString(35, StrKit.isBlank(bean.getCo_city()) ? "" : bean.getCo_city()); | ||
194 | + ps.setString(36, StrKit.isBlank(bean.getCo_deltaname()) ? "" : bean.getCo_deltaname()); | ||
195 | + ps.setString(37, StrKit.isBlank(bean.getCo_country()) ? "" : bean.getCo_country()); | ||
196 | + ps.setString(38, StrKit.isBlank(bean.getCo_telephone()) ? "" : bean.getCo_telephone()); | ||
197 | + ps.setString(39, StrKit.isBlank(bean.getCo_fax()) ? "" : bean.getCo_fax()); | ||
198 | + ps.setString(40, StrKit.isBlank(bean.getCo_name()) ? "" : bean.getCo_name()); | ||
199 | + ps.setString(41, StrKit.isBlank(bean.getReach_station()) ? "" : bean.getReach_station()); | ||
200 | + | ||
201 | + ps.setString(42, StrKit.isBlank(bean.getName_ofgoods()) ? "" : bean.getName_ofgoods()); | ||
202 | + ps.setString(43, StrKit.isBlank(bean.getDelivery_station()) ? "" : bean.getDelivery_station()); | ||
203 | + ps.setString(44, StrKit.isBlank(bean.getSh_provincecode()) ? "" : bean.getSh_provincecode()); | ||
204 | + ps.setString(45, StrKit.isBlank(bean.getSh_provincename()) ? "" : bean.getSh_provincename()); | ||
205 | + ps.setString(46, StrKit.isBlank(bean.getDe_number()) ? "" : bean.getDe_number()); | ||
206 | + ps.setString(47, StrKit.isBlank(bean.getDe_weight()) ? "" : bean.getDe_weight()); | ||
207 | + | ||
208 | + ps.setString(48, StrKit.isBlank(bean.getDe_chweight()) ? "" : bean.getDe_chweight()); | ||
209 | + ps.setString(49, StrKit.isBlank(bean.getShpaeo()) ? "" : bean.getShpaeo()); | ||
210 | + ps.setString(50, StrKit.isBlank(bean.getCneaeo()) ? "" : bean.getCneaeo()); | ||
211 | + ps.setString(51, StrKit.isBlank(bean.getShpcusid()) ? "" : bean.getShpcusid()); | ||
212 | + ps.setString(52, StrKit.isBlank(bean.getCnecusid()) ? "" : bean.getCnecusid()); | ||
213 | + ps.setString(53, StrKit.isBlank(bean.getUnlodingcode()) ? "" : bean.getUnlodingcode()); | ||
214 | + ps.setString(54, StrKit.isBlank(bean.getWaybillnosecondary()) ? "" : bean.getWaybillnosecondary()); | ||
215 | + ps.setLong(55, bean.getPreparemasterid()); | ||
216 | + ps.setLong(56, bean.getId()); | ||
217 | + | ||
218 | + return ps; | ||
219 | + } | ||
220 | + }, keyHolder); | ||
221 | + generatedId = keyHolder.getKey().longValue(); | ||
222 | + } catch (Exception e) { | ||
223 | + logger.info("保存分单失败:" + e.toString()); | ||
224 | + } | ||
225 | + | ||
226 | + if(generatedId<1) { | ||
227 | + bean.setId(bean.getId()+1); | ||
228 | + saveSub(bean); | ||
229 | + } | ||
230 | + | ||
231 | + return generatedId; | ||
232 | + } | ||
233 | + | ||
234 | + @Override | ||
235 | + public long getMasterId(String masterNo) { | ||
236 | + String sql = "select ID from MANIFEST WHERE ROWNUM<=1 and WAYBILLNOMASTER='" + masterNo + "'"; | ||
237 | + return getId(sql); | ||
238 | + } | ||
239 | + | ||
240 | + @Override | ||
241 | + public long getMaxMasterId() { | ||
242 | + String sql = "select ID from MANIFEST WHERE ROWNUM<=1 order by ID desc"; | ||
243 | + return getId(sql); | ||
244 | + } | ||
245 | + | ||
246 | + @Override | ||
247 | + public long getMaxSubId() { | ||
248 | + String sql = "select ID from PREPARESECONDARY WHERE ROWNUM<=1 order by ID desc"; | ||
249 | + return getId(sql); | ||
250 | + } | ||
251 | + | ||
252 | + private long getId(String sql) { | ||
253 | + Connection conn = null; | ||
254 | + Statement stmt = null; | ||
255 | + ResultSet rs = null; | ||
256 | + long id = 0; | ||
257 | + | ||
258 | + try { | ||
259 | + conn = this.jdbcTemplate.getDataSource().getConnection(); | ||
260 | + conn.setAutoCommit(false); | ||
261 | + stmt = conn.createStatement(); | ||
262 | + rs = stmt.executeQuery(sql); | ||
263 | + if (rs != null) { | ||
264 | + while (rs.next()) { | ||
265 | + id = rs.getLong("ID"); | ||
266 | + } | ||
267 | + } | ||
268 | + | ||
269 | + conn.commit(); | ||
270 | + } catch (SQLException e) { | ||
271 | + try { | ||
272 | + conn.rollback(); | ||
273 | + } catch (SQLException e1) { | ||
274 | + e1.printStackTrace(); | ||
275 | + } | ||
276 | + } finally { | ||
277 | + try { | ||
278 | + if (conn != null) { | ||
279 | + conn.setAutoCommit(true); | ||
280 | + } | ||
281 | + | ||
282 | + if (rs != null) { | ||
283 | + rs.close(); | ||
284 | + } | ||
285 | + | ||
286 | + if (stmt != null) { | ||
287 | + stmt.close(); | ||
288 | + } | ||
289 | + | ||
290 | + if (conn != null) { | ||
291 | + conn.close(); | ||
292 | + } | ||
293 | + } catch (SQLException e) { | ||
294 | + e.printStackTrace(); | ||
295 | + } | ||
296 | + } | ||
297 | + | ||
298 | + return id; | ||
299 | + } | ||
300 | + | ||
301 | +} |
src/resources/ApplicationContext.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xmlns:jee="http://www.springframework.org/schema/jee" | ||
5 | + xmlns:tx="http://www.springframework.org/schema/tx" | ||
6 | + xmlns:jaxws="http://cxf.apache.org/jaxws" | ||
7 | + xmlns:context="http://www.springframework.org/schema/context" | ||
8 | + xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
9 | + classpath:org/springframework/beans/factory/xml/spring-beans-2.5.xsd | ||
10 | + http://www.springframework.org/schema/tx | ||
11 | + http://www.springframework.org/schema/tx/spring-tx-2.5.xsd | ||
12 | + http://www.springframework.org/schema/jee | ||
13 | + http://www.springframework.org/schema/jee/spring-jee-2.5.xsd | ||
14 | + http://www.springframework.org/schema/context | ||
15 | + http://www.springframework.org/schema/context/spring-context-2.5.xsd | ||
16 | + http://cxf.apache.org/jaxws | ||
17 | + http://cxf.apache.org/schemas/jaxws.xsd" | ||
18 | + default-lazy-init="false"> | ||
19 | + <bean id="dataSource" | ||
20 | + class="com.mchange.v2.c3p0.ComboPooledDataSource" | ||
21 | + destroy-method="close"> | ||
22 | + <property name="driverClass" | ||
23 | + value="oracle.jdbc.driver.OracleDriver" /> | ||
24 | + <property name="jdbcUrl" | ||
25 | + value="jdbc:oracle:thin:@10.50.3.69:1521:CGODB" /> | ||
26 | + <property name="user" value="CGOASM" /> | ||
27 | + <property name="password" value="vmvnv1v2" /> | ||
28 | + <!-- <property name="driverClass" value="${db_driver}" /> <property name="jdbcUrl" | ||
29 | + value="${db_url}" /> <property name="user" value="${db_user}" /> <property | ||
30 | + name="password" value="${db_pass}" /> --> | ||
31 | + <property name="minPoolSize" value="1" /> | ||
32 | + <property name="maxPoolSize" value="1" /> | ||
33 | + <property name="initialPoolSize" value="1" /> | ||
34 | + <property name="maxIdleTime" value="1800" /> | ||
35 | + <property name="acquireIncrement" value="1" /> | ||
36 | + <property name="idleConnectionTestPeriod" value="10000" /> | ||
37 | + <property name="acquireRetryAttempts" value="30" /> | ||
38 | + <property name="testConnectionOnCheckin" value="true" /> | ||
39 | + <property name="acquireRetryDelay" value="1000" /> | ||
40 | + <property name="automaticTestTable" value="c3p0TestTable_jwe" /> | ||
41 | + <property name="checkoutTimeout" value="60000" /> | ||
42 | + <property name="numHelperThreads" value="5" /> | ||
43 | + </bean> | ||
44 | + | ||
45 | + <!-- <bean id='configurationBean' class="com.airport.util.Configuration"> | ||
46 | + <property name="location" value="file:config.properties" /> </bean> --> | ||
47 | + | ||
48 | + <bean id="jdbcTemplate" | ||
49 | + class="org.springframework.jdbc.core.JdbcTemplate"> | ||
50 | + <property name="dataSource" ref="dataSource" /> | ||
51 | + </bean> | ||
52 | + | ||
53 | + <bean id="dao" class="com.air.agent.imf.dao.impl.DaoImpl"> | ||
54 | + <property name="jdbcTemplate" ref="jdbcTemplate" /> | ||
55 | + </bean> | ||
56 | + | ||
57 | + | ||
58 | +</beans> |
src/resources/config.properties
0 → 100644
1 | + | ||
2 | +######################################################### | ||
3 | +#db property | ||
4 | +db_driver=oracle.jdbc.driver.OracleDriver | ||
5 | +db_url=jdbc:oracle:thin:@10.50.3.69:1521:CGODB | ||
6 | +db_user=CGOASM | ||
7 | +db_pass=vmvnv1v2 | ||
8 | + | ||
9 | +######################################################### | ||
10 | +#R:receiver S:sender, | ||
11 | +role=R | ||
12 | +imf_username=AGTZ | ||
13 | +imf_password=AGTZ | ||
14 | +retry_times=5 | ||
15 | + |
src/resources/imf_config.properties
0 → 100644
src/resources/log4j.properties
0 → 100644
1 | +########Log4j configuration##################################### | ||
2 | +log4j.rootLogger=INFO, stdout, fileout | ||
3 | + | ||
4 | + | ||
5 | +log4j.logger.com.fiscal = INFO | ||
6 | +#******************************* | ||
7 | +log4j.logger.com.system = INFO | ||
8 | +#******************************* | ||
9 | +log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
10 | +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
11 | +log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n | ||
12 | + | ||
13 | +#yyyy-MM-dd HH:mm:ss | ||
14 | + | ||
15 | + | ||
16 | +log4j.appender.fileout=org.apache.log4j.RollingFileAppender | ||
17 | +log4j.appender.fileout.File=logs/zhongwaiyun_imf.log | ||
18 | +log4j.appender.fileout.MaxFileSize=50MB | ||
19 | +log4j.appender.fileout.MaxBackupIndex=10 | ||
20 | +log4j.appender.fileout.layout=org.apache.log4j.PatternLayout | ||
21 | +log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n |
target/.DS_Store
0 → 100644
不能预览此文件类型
-
请 注册 或 登录 后发表评论