作者 zhangFan

analysis_imf for station version 1.0

正在显示 100 个修改的文件 包含 581 行增加0 行删除

要显示太多修改。

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

  1 +/target/
  2 +!.mvn/wrapper/maven-wrapper.jar
  3 +
  4 +### STS ###
  5 +.apt_generated
  6 +.classpath
  7 +.factorypath
  8 +.project
  9 +.settings
  10 +.springBeans
  11 +.sts4-cache
  12 +
  13 +### IntelliJ IDEA ###
  14 +.idea
  15 +*.iws
  16 +*.iml
  17 +*.ipr
  18 +
  19 +### NetBeans ###
  20 +/nbproject/private/
  21 +/build/
  22 +/nbbuild/
  23 +/dist/
  24 +/nbdist/
  25 +/.nb-gradle/
  1 +log4j=log_api.xml
  2 +
  3 +isneedlog=N
  4 +
  5 +psip=10.50.3.74
  6 +
  7 +psport=7484
  8 +
  9 +
  10 +
  11 +
  1 +#log4j.rootLogger=DEBUG, Console
  2 +#Console
  3 +#log4j.appender.Console=org.apache.log4j.ConsoleAppender
  4 +#log4j.appender.Console.layout=org.apache.log4j.PatternLayout
  5 +#log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
  6 +#log4j.logger.java.sql.ResultSet=INFO
  7 +#log4j.logger.org.apache=INFO
  8 +#log4j.logger.net.cxp.blog.dao=DEBUG
  9 +#log4j.logger.java.sql.Connection=DEBUG
  10 +#log4j.logger.java.sql.Statement=DEBUG
  11 +#log4j.logger.java.sql.PreparedStatement=DEBUG
  12 +# Output pattern : date [thread] priority category - message FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7
  13 +log4j.rootLogger=INFO, stdout, fileout
  14 +
  15 +log4j.logger.com.fiscal = INFO
  16 +#*******************************
  17 +log4j.logger.com.system = INFO
  18 +#*******************************
  19 +log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  20 +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  21 +log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n
  22 +
  23 +#RollingFile
  24 +log4j.appender.fileout=org.apache.log4j.RollingFileAppender
  25 +log4j.appender.fileout.File=logs/imf.log
  26 +log4j.appender.fileout.MaxFileSize=50MB
  27 +log4j.appender.fileout.MaxBackupIndex=10
  28 +log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
  29 +log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd HH:mm:ss,SSSS}[%p] %m%n
  30 +
  31 +
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
  3 +<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
  4 + <appender name="INFOFILE" class="org.apache.log4j.RollingFileAppender">
  5 + <param name="File" value="Logs/INFO.log" />
  6 + <param name="MaxFileSize" value="3000KB" />
  7 + <param name="MaxBackupIndex" value="20" />
  8 + <param name="Encoding" value="UTF-8" />
  9 + <layout class="org.apache.log4j.PatternLayout">
  10 + <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" />
  11 + </layout>
  12 + <filter class="org.apache.log4j.varia.LevelRangeFilter">
  13 + <param name="levelMin" value="debug" />
  14 + <param name="levelMax" value="info" />
  15 + <param name="AcceptOnMatch" value="true" />
  16 + </filter>
  17 + </appender>
  18 + <appender name="ERRFILE" class="org.apache.log4j.RollingFileAppender">
  19 + <param name="File" value="Logs/ERROR.log" />
  20 + <param name="MaxFileSize" value="3000KB" />
  21 + <param name="MaxBackupIndex" value="20" />
  22 + <param name="Encoding" value="UTF-8" />
  23 + <layout class="org.apache.log4j.PatternLayout">
  24 + <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" />
  25 + </layout>
  26 + <filter class="org.apache.log4j.varia.LevelRangeFilter">
  27 + <param name="levelMin" value="error" />
  28 + <param name="levelMax" value="error" />
  29 + <param name="AcceptOnMatch" value="true" />
  30 + </filter>
  31 + </appender>
  32 + <appender name="WSINFOFILE" class="org.apache.log4j.RollingFileAppender">
  33 + <param name="File" value="Logs/wsINFO.log" />
  34 + <param name="MaxFileSize" value="3000KB" />
  35 + <param name="MaxBackupIndex" value="20" />
  36 + <param name="Encoding" value="UTF-8" />
  37 + <layout class="org.apache.log4j.PatternLayout">
  38 + <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" />
  39 + </layout>
  40 + <filter class="org.apache.log4j.varia.LevelRangeFilter">
  41 + <param name="levelMin" value="debug" />
  42 + <param name="levelMax" value="info" />
  43 + <param name="AcceptOnMatch" value="true" />
  44 + </filter>
  45 + </appender>
  46 + <appender name="WSERRFILE" class="org.apache.log4j.RollingFileAppender">
  47 + <param name="File" value="Logs/wsERROR.log" />
  48 + <param name="MaxFileSize" value="3000KB" />
  49 + <param name="MaxBackupIndex" value="20" />
  50 + <param name="Encoding" value="UTF-8" />
  51 + <layout class="org.apache.log4j.PatternLayout">
  52 + <param name="ConversionPattern" value="[runtime] %d -%-4r [%t] %x - %m%n" />
  53 + </layout>
  54 + <filter class="org.apache.log4j.varia.LevelRangeFilter">
  55 + <param name="levelMin" value="error" />
  56 + <param name="levelMax" value="error" />
  57 + <param name="AcceptOnMatch" value="true" />
  58 + </filter>
  59 + </appender>
  60 + <logger name="apiLog">
  61 + <level value="INFO" />
  62 + <appender-ref ref="INFOFILE" />
  63 + <appender-ref ref="ERRFILE" />
  64 + </logger>
  65 + <logger name="WS">
  66 + <appender-ref ref="WSINFOFILE" />
  67 + <appender-ref ref="WSERRFILE" />
  68 + </logger>
  69 + <root>
  70 + <priority value="ERROR" />
  71 + </root>
  72 +</log4j:configuration>
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0" 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.sy</groupId>
  7 + <artifactId>analysis_imf</artifactId>
  8 + <version>0.0.1-SNAPSHOT</version>
  9 + <packaging>war</packaging>
  10 +
  11 + <name>analysis_imf</name>
  12 + <description>Demo project for Spring Boot</description>
  13 +
  14 + <parent>
  15 + <groupId>org.springframework.boot</groupId>
  16 + <artifactId>spring-boot-starter-parent</artifactId>
  17 + <version>2.1.0.RELEASE</version>
  18 + <relativePath/> <!-- lookup parent from repository -->
  19 + </parent>
  20 +
  21 + <properties>
  22 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  23 + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  24 + <java.version>1.8</java.version>
  25 + </properties>
  26 +
  27 + <dependencies>
  28 + <dependency>
  29 + <groupId>org.springframework.boot</groupId>
  30 + <artifactId>spring-boot-starter-jdbc</artifactId>
  31 + </dependency>
  32 + <dependency>
  33 + <groupId>org.springframework.boot</groupId>
  34 + <artifactId>spring-boot-starter-web</artifactId>
  35 + </dependency>
  36 + <dependency>
  37 + <groupId>org.mybatis.spring.boot</groupId>
  38 + <artifactId>mybatis-spring-boot-starter</artifactId>
  39 + <version>1.3.2</version>
  40 + </dependency>
  41 +
  42 + <dependency>
  43 + <groupId>mysql</groupId>
  44 + <artifactId>mysql-connector-java</artifactId>
  45 + <scope>runtime</scope>
  46 + </dependency>
  47 + <dependency>
  48 + <groupId>org.springframework.boot</groupId>
  49 + <artifactId>spring-boot-starter-tomcat</artifactId>
  50 + <scope>provided</scope>
  51 + </dependency>
  52 + <dependency>
  53 + <groupId>org.springframework.boot</groupId>
  54 + <artifactId>spring-boot-starter-test</artifactId>
  55 + <scope>test</scope>
  56 + </dependency>
  57 + <!--使用durid连接池的依赖-->
  58 + <dependency>
  59 + <groupId>com.alibaba</groupId>
  60 + <artifactId>druid-spring-boot-starter</artifactId>
  61 + <version>1.1.9</version>
  62 + </dependency>
  63 +
  64 + <dependency>
  65 + <groupId>org.apache.tomcat.embed</groupId>
  66 + <artifactId>tomcat-embed-jasper</artifactId>
  67 + <scope>provided</scope>
  68 + </dependency>
  69 +
  70 + <dependency>
  71 + <groupId>com.thoughtworks.xstream</groupId>
  72 + <artifactId>xstream</artifactId>
  73 + <version>1.4.7</version>
  74 + </dependency>
  75 +
  76 + <dependency>
  77 + <groupId>net.sf.sociaal</groupId>
  78 + <artifactId>xmlpull-xpp3</artifactId>
  79 + <version>3.0.0.20130526</version>
  80 + </dependency>
  81 +
  82 + <dependency>
  83 + <groupId>com.github.pagehelper</groupId>
  84 + <artifactId>pagehelper-spring-boot-starter</artifactId>
  85 + <version>1.2.3</version>
  86 + </dependency>
  87 +
  88 + <dependency>
  89 + <groupId>org.mybatis.generator</groupId>
  90 + <artifactId>mybatis-generator-core</artifactId>
  91 + <version>1.3.6</version>
  92 + </dependency>
  93 +
  94 + <dependency>
  95 + <groupId>log4j</groupId>
  96 + <artifactId>log4j</artifactId>
  97 + <version>1.2.17</version>
  98 + </dependency>
  99 +
  100 + </dependencies>
  101 +
  102 + <build>
  103 + <plugins>
  104 + <plugin>
  105 + <groupId>org.springframework.boot</groupId>
  106 + <artifactId>spring-boot-maven-plugin</artifactId>
  107 + </plugin>
  108 + <!-- mybatis generator 自动生成代码插件 -->
  109 + <plugin>
  110 + <groupId>org.mybatis.generator</groupId>
  111 + <artifactId>mybatis-generator-maven-plugin</artifactId>
  112 + <version>1.3.5</version>
  113 + <configuration>
  114 + <configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
  115 + <overwrite>true</overwrite>
  116 + <verbose>true</verbose>
  117 + </configuration>
  118 + </plugin>
  119 + </plugins>
  120 + </build>
  121 +
  122 +
  123 +</project>
  1 +package com.sy;
  2 +
  3 +import org.mybatis.spring.annotation.MapperScan;
  4 +import org.springframework.boot.SpringApplication;
  5 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  6 +import org.springframework.scheduling.annotation.EnableScheduling;
  7 +
  8 +@SpringBootApplication
  9 +@EnableScheduling
  10 +@MapperScan(value = "com.sy.mapper")
  11 +public class AnalysisImfApplication {
  12 +
  13 + public static void main(String[] args) {
  14 + SpringApplication.run(AnalysisImfApplication.class, args);
  15 + }
  16 +}
  1 +package com.sy.IMF;
  2 +
  3 +import com.caac.imf.api.IMFClient;
  4 +import com.caac.imf.api.IMFClientFactory;
  5 +import org.apache.log4j.Logger;
  6 +import org.apache.log4j.PropertyConfigurator;
  7 +import org.springframework.scheduling.annotation.Scheduled;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +/**
  11 + * @author zhangfan
  12 + * @web www.sy.com
  13 + * @company 郑州商友科技有限公司
  14 + * @time 2018-11-27 16:05
  15 + */
  16 +@Component
  17 +public class IMF_Tesk {
  18 +
  19 + protected static final Logger logger = Logger.getLogger(IMF_Tesk.class);
  20 +
  21 + public static boolean LOGIN_OK = false;
  22 + public static boolean isSuc = true;
  23 + public static IMFClient client = null;
  24 +
  25 + @Scheduled(fixedRate = 5000)
  26 + private static void start() throws Exception {
  27 + PropertyConfigurator.configure("config/log4j.properties");
  28 + client = IMFClientFactory.createInstance();
  29 +
  30 +
  31 + if (client != null) {
  32 + if (!KAKO_Reader.isrunning) {
  33 + KAKO_Reader kako_reader = new KAKO_Reader(client);
  34 + kako_reader.start();
  35 + logger.info("*********KAKO读取线程已开启***********");
  36 + } else {
  37 + logger.info("*********KAKO读取线程已开启-不再启动线程*********");
  38 + }
  39 +
  40 + if(!KAKO_Sender.isrunning){
  41 + KAKO_Sender kako_sender = new KAKO_Sender(client);
  42 + kako_sender.start();
  43 + logger.info("<<<<<<<<<KAKO发送线程已开启>>>>>>>>>>>>");
  44 + }else {
  45 + logger.info("<<<<<<<<<KAKO发送线程已开启-不再启动线程>>>>>>>>>>>>");
  46 + }
  47 +
  48 + }
  49 + if (!LOGIN_OK){
  50 + loginIMF(client, "KAOR", "KAOR", "config/imf_config.properties");
  51 + }
  52 +
  53 +
  54 +
  55 + }
  56 +
  57 + private static void loginIMF(IMFClient client, String userName, String password, String confFileName) {
  58 + if (client.initial(confFileName)) {
  59 + String message = client.login(userName, password);
  60 + logger.info("message=" + message);
  61 + if (message.indexOf("<CODE>1</CODE>") > 0) {
  62 + logger.info("登陆成功");
  63 + LOGIN_OK = true;
  64 + } else {
  65 + int times = 0;
  66 +
  67 + while(times <= 3) {
  68 + logger.info("try connection...");
  69 + ++times;
  70 + logger.info("message.=" + message);
  71 + if (message.indexOf("<CODE>1</CODE>") > 0) {
  72 + logger.info("登陆成功");
  73 + LOGIN_OK = true;
  74 + break;
  75 + }
  76 +
  77 + logger.info("登录失败~~~~");
  78 + message = client.login(userName, password);
  79 +
  80 + try {
  81 + Thread.sleep(4000L);
  82 + } catch (InterruptedException var7) {
  83 + var7.printStackTrace();
  84 + }
  85 + }
  86 +
  87 + if (!LOGIN_OK) {
  88 + logger.info("多次尝试登录失败,退出登陆");
  89 + client.disconnect();
  90 + isSuc =false;
  91 + System.exit(-1);
  92 + }
  93 + }
  94 + }
  95 +
  96 + }
  97 +}
  1 +package com.sy.IMF;
  2 +
  3 +import com.caac.imf.api.IMFClient;
  4 +import com.sy.controller.AnalysisRoute;
  5 +import org.apache.log4j.Logger;
  6 +
  7 +public class KAKO_Reader extends Thread{
  8 + protected static final Logger logger = Logger.getLogger(KAKO_Reader.class);
  9 + private IMFClient client;
  10 + public static boolean isrunning;
  11 +
  12 + public KAKO_Reader(IMFClient client) {
  13 + this.client = client;
  14 + }
  15 +
  16 + public void run() {
  17 +
  18 + try{
  19 + isrunning =true;
  20 + while(true) {
  21 + if (IMF_Tesk.LOGIN_OK) synchronized (this) {
  22 + String message = this.client.getMSG();
  23 + if (message != null) {
  24 + logger.info(message);
  25 + AnalysisRoute route = new AnalysisRoute();
  26 + route.analysis(message);
  27 + }
  28 + }
  29 + else {
  30 + //logger.info("***");
  31 + }
  32 +
  33 + try {
  34 + Thread.sleep(100L);
  35 + } catch (InterruptedException var3) {
  36 + var3.printStackTrace();
  37 +
  38 + }
  39 + }
  40 +
  41 + }catch (Exception e){
  42 +
  43 + }
  44 + isrunning=false;
  45 + logger.info("****************读取线程不在了****************");
  46 + }
  47 +}
  1 +package com.sy.IMF;
  2 +
  3 +import com.caac.imf.api.IMFClient;
  4 +import org.apache.log4j.Logger;
  5 +
  6 +public class KAKO_Sender extends Thread{
  7 +
  8 + protected static final Logger logger = Logger.getLogger(KAKO_Sender.class);
  9 + public static boolean isrunning;
  10 + private IMFClient client;
  11 + public KAKO_Sender(IMFClient client) {
  12 + this.client = client;
  13 + }
  14 + private String SendMsg = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
  15 + "<Msg>\n" +
  16 + "\t<META>\n" +
  17 + "\t\t<SNDR>ZWY</SNDR>\n" +
  18 + "\t\t<RCVR/>\n" +
  19 + "\t\t<SEQN>16078357182</SEQN>\n" +
  20 + "\t\t<DDTM>20181116175107671</DDTM>\n" +
  21 + "\t\t<TYPE>HYXX</TYPE>\n" +
  22 + "\t\t<STYP>NDLR</STYP>\n" +
  23 + "\t</META>\n" +
  24 + "\t<DECLAREPREPAREMASTERXMLBODY>\n" +
  25 + "\t\t<Head>\n" +
  26 + "\t\t\t<MessageID>CN_MT2201_1p1_4604729604327_20181116174636305</MessageID>\n" +
  27 + "\t\t\t<FunctionCode>9</FunctionCode>\n" +
  28 + "\t\t\t<MessageType>MT2201MASTER</MessageType>\n" +
  29 + "\t\t\t<SenderID>460470678920X_DXPENT0000460002_20181116175107671</SenderID>\n" +
  30 + "\t\t\t<ReceiverID>4604_20181116175107671</ReceiverID>\n" +
  31 + "\t\t\t<SendTime>20181116175107671</SendTime>\n" +
  32 + "\t\t\t<Version>1.0</Version>\n" +
  33 + "\t\t</Head>\n" +
  34 + "\t\t<Declaration>\n" +
  35 + "\t\t\t<Carrier>\n" +
  36 + "\t\t\t\t<ID>KA</ID>\n" +
  37 + "\t\t\t</Carrier>\n" +
  38 + "\t\t\t<ORG>\n" +
  39 + "\t\t\t\t<ID>CGO</ID>\n" +
  40 + "\t\t\t</ORG>\n" +
  41 + "\t\t\t<DES>\n" +
  42 + "\t\t\t\t<ID>LAX</ID>\n" +
  43 + "\t\t\t</DES>\n" +
  44 + "\t\t\t<BorderTransportMeans>\n" +
  45 + "\t\t\t\t<JourneyID>749/2018-11-18</JourneyID>\n" +
  46 + "\t\t\t</BorderTransportMeans>\n" +
  47 + "\t\t\t<Consignment>\n" +
  48 + "\t\t\t\t<TransportContractDocument>\n" +
  49 + "\t\t\t\t\t<ID>160-78357182</ID>\n" +
  50 + "\t\t\t\t</TransportContractDocument>\n" +
  51 + "\t\t\t\t<AssociatedTransportDocument>\n" +
  52 + "\t\t\t\t\t<ID/>\n" +
  53 + "\t\t\t\t</AssociatedTransportDocument>\n" +
  54 + "\t\t\t\t<LoadingLocation>\n" +
  55 + "\t\t\t\t\t<ID>CGO/4620</ID>\n" +
  56 + "\t\t\t\t\t<LoadingDate>2018-11-16 21:46</LoadingDate>\n" +
  57 + "\t\t\t\t</LoadingLocation>\n" +
  58 + "\t\t\t\t<UnloadingLocation>\n" +
  59 + "\t\t\t\t\t<ID>CGO/4620</ID>\n" +
  60 + "\t\t\t\t</UnloadingLocation>\n" +
  61 + "\t\t\t\t<TransportSplitIndicator>0</TransportSplitIndicator>\n" +
  62 + "\t\t\t\t<ConsignmentPackaging>\n" +
  63 + "\t\t\t\t\t<QuantityQuantity>1</QuantityQuantity>\n" +
  64 + "\t\t\t\t</ConsignmentPackaging>\n" +
  65 + "\t\t\t\t<TotalGrossMassMeasure>65</TotalGrossMassMeasure>\n" +
  66 + "\t\t\t\t<PreQuantityQuantity>1</PreQuantityQuantity>\n" +
  67 + "\t\t\t\t<PreTotalGrossMassMeasure>65</PreTotalGrossMassMeasure>\n" +
  68 + "\t\t\t\t<CustomsStatus>001</CustomsStatus>\n" +
  69 + "\t\t\t\t<FreightPayment>\n" +
  70 + "\t\t\t\t\t<MethodCode>PP</MethodCode>\n" +
  71 + "\t\t\t\t</FreightPayment>\n" +
  72 + "\t\t\t\t<ProductName>CELL PHONE</ProductName>\n" +
  73 + "\t\t\t\t<PrepareTime>2018-11-16 21:46</PrepareTime>\n" +
  74 + "\t\t\t\t<CustomsCode>4620</CustomsCode>\n" +
  75 + "\t\t\t\t<AgentName>中外运空运发展股份有限公司郑州分公司</AgentName>\n" +
  76 + "\t\t\t\t<AgentCompany>中外运空运发展股份有限公司郑州分公司</AgentCompany>\n" +
  77 + "\t\t\t\t<NameOfgoods>CELL PHONE</NameOfgoods>\n" +
  78 + "\t\t\t\t<DeliveryStation>001</DeliveryStation>\n" +
  79 + "\t\t\t\t<UNnumber/>\n" +
  80 + "\t\t\t\t<Category/>\n" +
  81 + "\t\t\t\t<Consignee>\n" +
  82 + "\t\t\t\t\t<Name>FEDEX TRADE NETWORKS TRANSPORT</Name>\n" +
  83 + "\t\t\t\t\t<Address>\n" +
  84 + "\t\t\t\t\t\t<Line>17210 SOUTH MAIN STREET GARDENA</Line>\n" +
  85 + "\t\t\t\t\t\t<CityName>LOS ANGELES</CityName>\n" +
  86 + "\t\t\t\t\t\t<CountryCode>US</CountryCode>\n" +
  87 + "\t\t\t\t\t\t<ZipCode/>\n" +
  88 + "\t\t\t\t\t\t<PROVINCECODE/>\n" +
  89 + "\t\t\t\t\t\t<PROVINCENAME/>\n" +
  90 + "\t\t\t\t\t\t<Deltaname/>\n" +
  91 + "\t\t\t\t\t\t<TelePhone>3109655000</TelePhone>\n" +
  92 + "\t\t\t\t\t\t<Fax/>\n" +
  93 + "\t\t\t\t\t\t<CNECUSID>EIN+160807223</CNECUSID>\n" +
  94 + "\t\t\t\t\t\t<CNEAEO/>\n" +
  95 + "\t\t\t\t\t\t<Unlodingcode>LAX</Unlodingcode>\n" +
  96 + "\t\t\t\t\t</Address>\n" +
  97 + "\t\t\t\t</Consignee>\n" +
  98 + "\t\t\t\t<Consignor>\n" +
  99 + "\t\t\t\t\t<name>FEDEX</name>\n" +
  100 + "\t\t\t\t\t<Address>\n" +
  101 + "\t\t\t\t\t\t<Line>ROOM7</Line>\n" +
  102 + "\t\t\t\t\t\t<CountryCode>CN</CountryCode>\n" +
  103 + "\t\t\t\t\t\t<ZipCode/>\n" +
  104 + "\t\t\t\t\t\t<Deltaname/>\n" +
  105 + "\t\t\t\t\t\t<TelePhone>8637155131789</TelePhone>\n" +
  106 + "\t\t\t\t\t\t<Fax/>\n" +
  107 + "\t\t\t\t\t\t<SHPAEO/>\n" +
  108 + "\t\t\t\t\t\t<SHPCUSID>USCI+91410100053384175K</SHPCUSID>\n" +
  109 + "\t\t\t\t\t</Address>\n" +
  110 + "\t\t\t\t</Consignor>\n" +
  111 + "\t\t\t</Consignment>\n" +
  112 + "\t\t</Declaration>\n" +
  113 + "\t</DECLAREPREPAREMASTERXMLBODY>\n" +
  114 + "</Msg>";
  115 +
  116 + public void run(){
  117 + try {
  118 +
  119 + if (this.client == null) {
  120 + logger.info("IMFClient has been closed");
  121 + return;
  122 + }
  123 + isrunning=true;
  124 + if(IMF_Tesk.isSuc){
  125 +// logger.info("<<<<<<<<<<<主线程初始化成功>>>>>>>>>>>>");
  126 + if(IMF_Tesk.LOGIN_OK){
  127 +
  128 + String returnMsg = this.client.sendMSG(SendMsg);
  129 + logger.info("《--------发送信息成功开始轮询500mm一次--------"+returnMsg);
  130 + }else{
  131 + logger.info("<<<<<<<<<<<登陆中>>>>>>>>>>>>");
  132 + }
  133 + }
  134 +
  135 + }catch (Exception var14) {
  136 + var14.printStackTrace();
  137 + logger.info(var14.getMessage());
  138 + }
  139 +
  140 +
  141 +
  142 +
  143 + isrunning=false;
  144 + logger.info("<<<<<<<<<<<发送线程不在了>>>>>>>>>>>>");
  145 + }
  146 +}
  1 +package com.sy;
  2 +
  3 +import org.springframework.boot.builder.SpringApplicationBuilder;
  4 +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  5 +
  6 +public class ServletInitializer extends SpringBootServletInitializer {
  7 +
  8 + @Override
  9 + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  10 + return application.sources(AnalysisImfApplication.class);
  11 + }
  12 +
  13 +}