Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
dddf8520a1 | |||
2fe8043791 | |||
5d117f7b51 | |||
bec378be36 | |||
66d55f9e87 | |||
d12a7b14e4 | |||
c33b7e8e35 | |||
c3c14048d7 | |||
aaef2bd862 | |||
ae25e50f3d |
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
|
||||||
"java.compile.nullAnalysis.mode": "automatic"
|
|
||||||
}
|
|
@@ -1,4 +0,0 @@
|
|||||||
# Cpicxim-XMNHSA-Repeater
|
|
||||||
|
|
||||||
惠厦保相关项目。
|
|
||||||
宸汐-》厦门太保-》厦门医保局 数据转发。
|
|
@@ -1,162 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<groupId>cpicxim.com.cn</groupId>
|
|
||||||
<artifactId>Cpicxim-XMNHSA-Repeater</artifactId>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
|
|
||||||
<name>Cpicxim-XMNHSA-Repeater Maven Webapp</name>
|
|
||||||
<!-- FIXME change it to the project's website -->
|
|
||||||
<url>http://www.example.com</url>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<spring.version>6.2.3</spring.version>
|
|
||||||
<log4j2.version>2.20.0</log4j2.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>4.13.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-test</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-web</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-webmvc</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
|
||||||
<version>4.0.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!--jackson-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
<version>2.14.2</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
<version>2.13.4</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-annotations</artifactId>
|
|
||||||
<version>2.13.4</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- log-4j -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-core</artifactId>
|
|
||||||
<version>2.20.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-slf4j2-impl</artifactId>
|
|
||||||
<version>2.20.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-api</artifactId>
|
|
||||||
<version>2.20.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- POI -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi</artifactId>
|
|
||||||
<version>5.2.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
<version>5.2.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- mybatis -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mybatis</groupId>
|
|
||||||
<artifactId>mybatis</artifactId>
|
|
||||||
<version>3.5.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>Cpicxim-XMNHSA-Repeater</finalName>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.prorerties</include>
|
|
||||||
<include>**/*.xml</include>
|
|
||||||
</includes>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
|
||||||
<version>3.4.0</version>
|
|
||||||
</plugin>
|
|
||||||
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<version>3.3.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.13.0</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>3.3.0</version>
|
|
||||||
<configuration>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>3.4.0</version>
|
|
||||||
<configuration>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
@@ -1,86 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-03-06 14:33:27
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/data/pojo/HmbListItem.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpicxim.huixiabao.data.pojo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
|
|
||||||
@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
|
||||||
@JsonPropertyOrder( alphabetic = true )
|
|
||||||
public class HmbListItem
|
|
||||||
{
|
|
||||||
|
|
||||||
public String getPsnName()
|
|
||||||
{
|
|
||||||
return psnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPsnName( String psnName )
|
|
||||||
{
|
|
||||||
this.psnName = psnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCertNo()
|
|
||||||
{
|
|
||||||
return certNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCertNo( String certNo )
|
|
||||||
{
|
|
||||||
this.certNo = certNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getServiceId()
|
|
||||||
{
|
|
||||||
return serviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServiceId( String serviceId )
|
|
||||||
{
|
|
||||||
this.serviceId = serviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus( String status )
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getXyxNo()
|
|
||||||
{
|
|
||||||
return xyxNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setXyxNo( String xyxNo )
|
|
||||||
{
|
|
||||||
this.xyxNo = xyxNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonProperty("psnName")
|
|
||||||
private String psnName;
|
|
||||||
|
|
||||||
@JsonProperty("certno")
|
|
||||||
private String certNo;
|
|
||||||
|
|
||||||
@JsonProperty("serviceId")
|
|
||||||
private String serviceId;
|
|
||||||
|
|
||||||
@JsonProperty("status")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
@JsonProperty("xyxNo")
|
|
||||||
private String xyxNo;
|
|
||||||
|
|
||||||
}
|
|
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-03-06 14:27:05
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/data/pojo/HmbXyxInfoRequest.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpicxim.huixiabao.data.pojo;
|
|
||||||
|
|
||||||
import java.util.Vector;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
|
|
||||||
@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
|
||||||
@JsonPropertyOrder( alphabetic = true )
|
|
||||||
public class HmbXyxInfoRequest
|
|
||||||
{
|
|
||||||
public HmbXyxInfoRequest()
|
|
||||||
{
|
|
||||||
this.topic = "hmbXyxInfo";
|
|
||||||
this.hmbList = new Vector<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public HmbXyxInfoRequest( String topic, Vector<HmbListItem> hmbList )
|
|
||||||
{
|
|
||||||
this.topic = topic;
|
|
||||||
this.topic = "hmbXyxInfo";
|
|
||||||
this.hmbList = hmbList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTopic()
|
|
||||||
{
|
|
||||||
return topic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTopic( String topic )
|
|
||||||
{
|
|
||||||
this.topic = topic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector<HmbListItem> getHmbList()
|
|
||||||
{
|
|
||||||
return hmbList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHmbList( Vector<HmbListItem> hmbList )
|
|
||||||
{
|
|
||||||
this.hmbList = hmbList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonProperty("topic")
|
|
||||||
private String topic; // 业务类型
|
|
||||||
|
|
||||||
@JsonProperty("hmbList")
|
|
||||||
private Vector<HmbListItem> hmbList;
|
|
||||||
}
|
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-03-06 14:17:24
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/data/pojo/NHACommenRequestBody.java
|
|
||||||
* @Description: 易联众请求共通报文结构
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpicxim.huixiabao.data.pojo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
public class NHACommenRequestBody
|
|
||||||
{
|
|
||||||
|
|
||||||
public String getChs_fjs_appid()
|
|
||||||
{
|
|
||||||
return chs_fjs_appid;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_appid( String chs_fjs_appid )
|
|
||||||
{
|
|
||||||
this.chs_fjs_appid = chs_fjs_appid;
|
|
||||||
}
|
|
||||||
public String getChs_fjs_appsecret()
|
|
||||||
{
|
|
||||||
return chs_fjs_appsecret;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_appsecret( String chs_fjs_appsecret )
|
|
||||||
{
|
|
||||||
this.chs_fjs_appsecret = chs_fjs_appsecret;
|
|
||||||
}
|
|
||||||
public String getChs_fjs_token()
|
|
||||||
{
|
|
||||||
return chs_fjs_token;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_token( String chs_fjs_token )
|
|
||||||
{
|
|
||||||
this.chs_fjs_token = chs_fjs_token;
|
|
||||||
}
|
|
||||||
public String getChs_fjs_funid()
|
|
||||||
{
|
|
||||||
return chs_fjs_funid;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_funid( String chs_fjs_funid )
|
|
||||||
{
|
|
||||||
this.chs_fjs_funid = chs_fjs_funid;
|
|
||||||
}
|
|
||||||
public String getChs_fjs_encdata()
|
|
||||||
{
|
|
||||||
return chs_fjs_encdata;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_encdata( String chs_fjs_encdata )
|
|
||||||
{
|
|
||||||
this.chs_fjs_encdata = chs_fjs_encdata;
|
|
||||||
}
|
|
||||||
public String getChs_fjs_sign()
|
|
||||||
{
|
|
||||||
return chs_fjs_sign;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_sign( String chs_fjs_sign )
|
|
||||||
{
|
|
||||||
this.chs_fjs_sign = chs_fjs_sign;
|
|
||||||
}
|
|
||||||
public int getChs_fjs_timestamp()
|
|
||||||
{
|
|
||||||
return chs_fjs_timestamp;
|
|
||||||
}
|
|
||||||
public void setChs_fjs_timestamp( int chs_fjs_timestamp )
|
|
||||||
{
|
|
||||||
this.chs_fjs_timestamp = chs_fjs_timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String chs_fjs_appid; // 渠道id
|
|
||||||
private String chs_fjs_appsecret; // 渠道私钥
|
|
||||||
private String chs_fjs_token; // 请求时携带的动态令牌
|
|
||||||
private String chs_fjs_funid; // 服务编号
|
|
||||||
private String chs_fjs_encdata; // 加密后的数据
|
|
||||||
private String chs_fjs_sign; // 签名数据串
|
|
||||||
private String data; // 未加密的数据
|
|
||||||
private int chs_fjs_timestamp; // 时间戳
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-02-20 09:56:32
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/web/controllers/MediCover/MediCoverToCpicxim.java
|
|
||||||
* @Description: 接收宸汐数据的controller。
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpicxim.huixiabao.web.controllers.MediCover;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
@Controller
|
|
||||||
public class MediCoverToCpicxim
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2025-02-18 19:03:23
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /Cpicxim-XMNHSA-Repeater/src/main/java/com/cpicxim/huixiabao/web/controllers/NHSA/CpicximToNHSARepeater.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpicxim.huixiabao.web.controllers.NHSA;
|
|
||||||
|
|
||||||
public class CpicximToNHSARepeater
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@@ -1,37 +0,0 @@
|
|||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
|
||||||
xmlns:jee="http://www.springframework.org/schema/jee"
|
|
||||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
|
||||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
|
||||||
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
|
|
||||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
|
|
||||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
|
|
||||||
|
|
||||||
<context:component-scan base-package="com.cpic.xim" />
|
|
||||||
<mvc:annotation-driven />
|
|
||||||
<mvc:default-servlet-handler />
|
|
||||||
|
|
||||||
<!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
|
||||||
<property
|
|
||||||
name="prefix" value="/WEB-INF/jsp/" />
|
|
||||||
<property name="suffix" value=".jsp" />
|
|
||||||
</bean> -->
|
|
||||||
|
|
||||||
<bean id="multipartResolver"
|
|
||||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
|
||||||
<property name="defaultEncoding" value="UTF-8" />
|
|
||||||
<property name="maxUploadSize" value="-1" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
|
@@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xml-body>
|
|
||||||
<web-app
|
|
||||||
version="4.0"
|
|
||||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
|
||||||
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
|
|
||||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
|
||||||
<display-name>Archetype Created Web Application</display-name>
|
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>springmvc</servlet-name>
|
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>contextConfigLocation</param-name>
|
|
||||||
<param-value>classpath:spring.xml</param-value>
|
|
||||||
</init-param>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>springmvc</servlet-name>
|
|
||||||
<url-pattern>*.do</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
</web-app>
|
|
||||||
</xml-body>
|
|
@@ -1,5 +0,0 @@
|
|||||||
<html>
|
|
||||||
<body>
|
|
||||||
<h2><%= "Hello World!" %></h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compile.source>18</maven.compile.source>
|
<maven.compile.source>1.8</maven.compile.source>
|
||||||
<maven.compile.target>18</maven.compile.target>
|
<maven.compile.target>1.8</maven.compile.target>
|
||||||
<maven.compiler.release>18</maven.compiler.release>
|
<!-- <maven.compiler.release>1.8</maven.compiler.release> -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@@ -45,23 +45,23 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--jackson-->
|
<!--jackson-->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>2.14.2</version>
|
<version>2.14.2</version>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-core</artifactId>
|
<artifactId>jackson-core</artifactId>
|
||||||
<version>2.13.4</version>
|
<version>2.13.4</version>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-annotations</artifactId>
|
<artifactId>jackson-annotations</artifactId>
|
||||||
<version>2.13.4</version>
|
<version>2.13.4</version>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
|
|
||||||
<!-- log-4j -->
|
<!-- log-4j -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- POI -->
|
<!-- POI -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>5.2.3</version>
|
<version>5.2.3</version>
|
||||||
@@ -90,28 +90,21 @@
|
|||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>5.2.3</version>
|
<version>5.2.3</version>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
|
|
||||||
<!-- mybatis -->
|
<!-- mybatis -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.mybatis</groupId>
|
<groupId>org.mybatis</groupId>
|
||||||
<artifactId>mybatis</artifactId>
|
<artifactId>mybatis</artifactId>
|
||||||
<version>3.5.19</version>
|
<version>3.5.19</version>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId> cn.hsa.zephyr</groupId>
|
<groupId> cn.hsa.zephyr</groupId>
|
||||||
<artifactId>zephyr-api-sdk</artifactId>
|
<artifactId>zephyr-api-sdk</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/lib/zephyr-api-sdk.jar</systemPath>
|
<systemPath>${project.basedir}/lib/zephyr-api-sdk-cx.jar</systemPath>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<!-- <version>1.2.83</version> -->
|
|
||||||
<version>2.0.56</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -125,12 +118,16 @@
|
|||||||
<artifactId>bcprov-jdk18on</artifactId>
|
<artifactId>bcprov-jdk18on</artifactId>
|
||||||
<version>1.80</version>
|
<version>1.80</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<version>1.3.5</version>
|
<version>1.3.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>1.2.83</version>
|
||||||
|
<!-- <version>2.0.56</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -149,6 +146,9 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.14.0</version>
|
<version>3.14.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
<compilerArguments>
|
<compilerArguments>
|
||||||
<extdirs>${project.basedir}/lib</extdirs>
|
<extdirs>${project.basedir}/lib</extdirs>
|
||||||
</compilerArguments>
|
</compilerArguments>
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>3.4.3</version>
|
<version>2.6.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
|
<mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
|
||||||
<includeSystemScope>true</includeSystemScope>
|
<includeSystemScope>true</includeSystemScope>
|
||||||
|
@@ -40,10 +40,16 @@ public class AppMain
|
|||||||
Vector<HmbXyxInfo> xyxInfo = CpicximToXMNHS.getNeverTransHmbList();
|
Vector<HmbXyxInfo> xyxInfo = CpicximToXMNHS.getNeverTransHmbList();
|
||||||
|
|
||||||
// 发送
|
// 发送
|
||||||
CpicximToXMNHS.postHmbList( xyxInfo );
|
if ( xyxInfo.isEmpty() == false )
|
||||||
|
{
|
||||||
|
logger.info( "查询到" + String.valueOf( xyxInfo.size() ) + "条数据,开始发送!" );
|
||||||
|
|
||||||
|
CpicximToXMNHS.postHmbXyxInfo( xyxInfo );
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
logger.info( "等待" + String.valueOf( HuixiabaoConfig.getSleepSeconds() ) + "秒。" );
|
||||||
Thread.sleep( HuixiabaoConfig.getSleepSeconds() * 1000 );
|
Thread.sleep( HuixiabaoConfig.getSleepSeconds() * 1000 );
|
||||||
}
|
}
|
||||||
catch ( InterruptedException error )
|
catch ( InterruptedException error )
|
||||||
|
@@ -46,6 +46,11 @@ public class HuixiabaoConfig
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getFunId()
|
||||||
|
{
|
||||||
|
return funId;
|
||||||
|
}
|
||||||
|
|
||||||
public static int getSleepSeconds()
|
public static int getSleepSeconds()
|
||||||
{
|
{
|
||||||
return SLEEP_SECONDS;
|
return SLEEP_SECONDS;
|
||||||
@@ -54,9 +59,10 @@ public class HuixiabaoConfig
|
|||||||
private static final int MAX_COUNT_PER_REQUEST = 500;
|
private static final int MAX_COUNT_PER_REQUEST = 500;
|
||||||
private static final int SLEEP_SECONDS = 10;
|
private static final int SLEEP_SECONDS = 10;
|
||||||
|
|
||||||
private static final String url = "https://172.18.1.150:9040";
|
private static final String url = "http://172.18.1.150:9040/h3c/new/test/api/gafe/rest";
|
||||||
private static final String appid = "hxb-tb";
|
private static final String appid = "hxb-tb";
|
||||||
private static final String appSecret = "60F468FB46170DD4CF6CBECE215DBFC0";
|
private static final String appSecret = "60F468FB46170DD4CF6CBECE215DBFC0";
|
||||||
|
private static final String funId = "XY00.00.00.03";
|
||||||
private static final String signKey = "1A2F447BD0F930798D8031B137EC6E25";
|
private static final String signKey = "1A2F447BD0F930798D8031B137EC6E25";
|
||||||
private static final String encKey = "08307695B1668EB9FD6210250FED874F";
|
private static final String encKey = "08307695B1668EB9FD6210250FED874F";
|
||||||
}
|
}
|
||||||
|
@@ -13,12 +13,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.cpic.xim.huixiabao.data.pojo;
|
package com.cpic.xim.huixiabao.data.pojo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
// import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
// import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
// import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
//@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
||||||
@JsonPropertyOrder( alphabetic = true )
|
//@JsonPropertyOrder( alphabetic = true )
|
||||||
public class HmbXyxInfo
|
public class HmbXyxInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -91,19 +91,19 @@ public class HmbXyxInfo
|
|||||||
return "HmbXyxInfo [psnName=" + psnName + ", certNo=" + certNo + ", serviceId=" + serviceId + ", status=" + status + ", xyxNo=" + xyxNo + "]";
|
return "HmbXyxInfo [psnName=" + psnName + ", certNo=" + certNo + ", serviceId=" + serviceId + ", status=" + status + ", xyxNo=" + xyxNo + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty( "psnName" )
|
//@JsonProperty( "psnName" )
|
||||||
private String psnName;
|
private String psnName;
|
||||||
|
|
||||||
@JsonProperty( "certno" )
|
//@JsonProperty( "certno" )
|
||||||
private String certNo;
|
private String certNo;
|
||||||
|
|
||||||
@JsonProperty( "serviceId" )
|
//@JsonProperty( "serviceId" )
|
||||||
private String serviceId;
|
private String serviceId;
|
||||||
|
|
||||||
@JsonProperty( "status" )
|
//@JsonProperty( "status" )
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@JsonProperty( "xyxNo" )
|
//@JsonProperty( "xyxNo" )
|
||||||
private String xyxNo;
|
private String xyxNo;
|
||||||
|
|
||||||
}
|
}
|
@@ -10,12 +10,12 @@
|
|||||||
package com.cpic.xim.huixiabao.data.pojo;
|
package com.cpic.xim.huixiabao.data.pojo;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
// import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
// import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
// import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
// @JsonInclude( JsonInclude.Include.NON_EMPTY )
|
||||||
@JsonPropertyOrder( alphabetic = true )
|
// @JsonPropertyOrder( alphabetic = true )
|
||||||
public class HmbXyxInfoRequest
|
public class HmbXyxInfoRequest
|
||||||
{
|
{
|
||||||
public HmbXyxInfoRequest()
|
public HmbXyxInfoRequest()
|
||||||
@@ -51,9 +51,9 @@ public class HmbXyxInfoRequest
|
|||||||
this.hmbList = hmbList;
|
this.hmbList = hmbList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty("topic")
|
//@JsonProperty("topic")
|
||||||
private String topic; // 业务类型
|
private String topic; // 业务类型
|
||||||
|
|
||||||
@JsonProperty("hmbList")
|
//@JsonProperty("hmbList")
|
||||||
private Vector<HmbXyxInfo> hmbList;
|
private Vector<HmbXyxInfo> hmbList;
|
||||||
}
|
}
|
@@ -9,8 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.cpic.xim.huixiabao.data.pojo;
|
package com.cpic.xim.huixiabao.data.pojo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
public class NHACommenRequestBody
|
public class NHACommenRequestBody
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -24,14 +24,18 @@ import java.util.Vector;
|
|||||||
import com.cpic.xim.huixiabao.data.pojo.*;
|
import com.cpic.xim.huixiabao.data.pojo.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import cn.hsa.zephyr.apisdk.DefaultZephyrClient;
|
import cn.hsa.zephyr.apisdk.DefaultZephyrClient;
|
||||||
import cn.hsa.zephyr.apisdk.internal.exception.ZephyrApiException;
|
import cn.hsa.zephyr.apisdk.internal.exception.ZephyrApiException;
|
||||||
import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum;
|
import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum;
|
||||||
import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum;
|
import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum;
|
||||||
import cn.hsa.zephyr.apisdk.request.DefaultZephyrRequest;
|
import cn.hsa.zephyr.apisdk.request.ZephyrCommonRequest;
|
||||||
import cn.hsa.zephyr.apisdk.response.DefaultZephyrResponse;
|
import cn.hsa.zephyr.apisdk.response.ZephyrCommonResponse;
|
||||||
|
import cn.hsa.zephyr.apisdk.ZephyrRequest;
|
||||||
|
import cn.hsa.zephyr.apisdk.ZephyrResponse;
|
||||||
import com.cpic.xim.huixiabao.data.config.HuixiabaoConfig;
|
import com.cpic.xim.huixiabao.data.config.HuixiabaoConfig;
|
||||||
|
|
||||||
@SuppressWarnings(
|
@SuppressWarnings(
|
||||||
@@ -47,7 +51,7 @@ public class CpicximToXMNHS
|
|||||||
private static String password = "Kane@1981";
|
private static String password = "Kane@1981";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从数据库中获取未发送过的小药箱数据。
|
* 从HmbXyxInfo_Update中获取未发送过的小药箱数据。
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -68,11 +72,16 @@ public class CpicximToXMNHS
|
|||||||
String url = CpicximToXMNHS.url;
|
String url = CpicximToXMNHS.url;
|
||||||
String userName = CpicximToXMNHS.userName;
|
String userName = CpicximToXMNHS.userName;
|
||||||
String password = CpicximToXMNHS.password;
|
String password = CpicximToXMNHS.password;
|
||||||
String sql = """
|
// String sql = """
|
||||||
select info.psnName, info.certNo, info.serviceId, info.status, info.xyxNo
|
// select info.psnName, info.certNo, info.serviceId, info.status, info.xyxNo
|
||||||
from HmbXyxInfo info,
|
// from HmbXyxInfo info,
|
||||||
HmbXyxInfo_Update u
|
// HmbXyxInfo_Update u
|
||||||
where info.xyxNo = u.xyxNo """;
|
// where info.xyxNo = u.xyxNo """;
|
||||||
|
|
||||||
|
String sql = "select info.psnName, info.certNo, info.serviceId, info.status, info.xyxNo \n" +
|
||||||
|
" from HmbXyxInfo info, \n" +
|
||||||
|
" HmbXyxInfo_Update u \n" +
|
||||||
|
" where info.xyxNo = u.xyxNo";
|
||||||
|
|
||||||
connection = DriverManager.getConnection( url, userName, password );
|
connection = DriverManager.getConnection( url, userName, password );
|
||||||
statement = connection.createStatement();
|
statement = connection.createStatement();
|
||||||
@@ -139,6 +148,11 @@ public class CpicximToXMNHS
|
|||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 postedItems 中的小药箱数据,冲HmbXyxInfo_update中清除。
|
||||||
|
*
|
||||||
|
* @param postedItems 已发送的小药箱数据
|
||||||
|
*/
|
||||||
public static void removePostedHmbXyxInfo( Vector<HmbXyxInfo> postedItems )
|
public static void removePostedHmbXyxInfo( Vector<HmbXyxInfo> postedItems )
|
||||||
{
|
{
|
||||||
Vector<HmbXyxInfo> items = new Vector<HmbXyxInfo>();
|
Vector<HmbXyxInfo> items = new Vector<HmbXyxInfo>();
|
||||||
@@ -155,8 +169,7 @@ public class CpicximToXMNHS
|
|||||||
String url = CpicximToXMNHS.url;
|
String url = CpicximToXMNHS.url;
|
||||||
String userName = CpicximToXMNHS.userName;
|
String userName = CpicximToXMNHS.userName;
|
||||||
String password = CpicximToXMNHS.password;
|
String password = CpicximToXMNHS.password;
|
||||||
String sql = """
|
String sql = "delete from HmbXyxInfo_Update where xyxNo = ?";
|
||||||
delete from HmbXyxInfo_Update where xyxNo = ?""";
|
|
||||||
|
|
||||||
connection = DriverManager.getConnection( url, userName, password );
|
connection = DriverManager.getConnection( url, userName, password );
|
||||||
statement = connection.prepareStatement( sql.trim() );
|
statement = connection.prepareStatement( sql.trim() );
|
||||||
@@ -166,8 +179,6 @@ public class CpicximToXMNHS
|
|||||||
statement.setString( 1, info.getXyxNo() );
|
statement.setString( 1, info.getXyxNo() );
|
||||||
statement.execute();
|
statement.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
connection.commit();
|
|
||||||
}
|
}
|
||||||
catch ( SQLException error )
|
catch ( SQLException error )
|
||||||
{
|
{
|
||||||
@@ -226,12 +237,12 @@ public class CpicximToXMNHS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void postHmbList( Vector<HmbXyxInfo> items )
|
public static void postHmbXyxInfo( Vector<HmbXyxInfo> items )
|
||||||
{
|
{
|
||||||
String url = HuixiabaoConfig.getUrl();
|
String url = HuixiabaoConfig.getUrl();
|
||||||
String appId = HuixiabaoConfig.getAppid();
|
String appId = HuixiabaoConfig.getAppid();
|
||||||
String appSecret = HuixiabaoConfig.getAppSecret();
|
String appSecret = HuixiabaoConfig.getAppSecret();
|
||||||
String funId = "xxx";
|
String funId = HuixiabaoConfig.getFunId();
|
||||||
String encKey = HuixiabaoConfig.getEncKey();
|
String encKey = HuixiabaoConfig.getEncKey();
|
||||||
String signKey = HuixiabaoConfig.getSignKey();
|
String signKey = HuixiabaoConfig.getSignKey();
|
||||||
|
|
||||||
@@ -247,10 +258,11 @@ public class CpicximToXMNHS
|
|||||||
signKey,
|
signKey,
|
||||||
encType,
|
encType,
|
||||||
encKey );
|
encKey );
|
||||||
DefaultZephyrRequest req = new DefaultZephyrRequest();
|
ZephyrCommonRequest req = new ZephyrCommonRequest();
|
||||||
DefaultZephyrResponse resp = null;
|
ZephyrCommonResponse resp = null;
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
JSONObject requestObject = new JSONObject();
|
JSONObject requestObject = new JSONObject();
|
||||||
JSONObject xyxInfo = null;
|
JSONObject xyxInfo = null;
|
||||||
JSONArray xyxInfoList = new JSONArray();
|
JSONArray xyxInfoList = new JSONArray();
|
||||||
@@ -287,19 +299,32 @@ public class CpicximToXMNHS
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
req.setData( requestObject );
|
data.remove("data");
|
||||||
|
data.put( "data", requestObject );
|
||||||
|
|
||||||
|
logger.info( "发送请求内容:" + data.toJSONString() );
|
||||||
|
logger.info( "请求地址:" + HuixiabaoConfig.getUrl() );
|
||||||
|
|
||||||
|
req.setData( data );
|
||||||
resp = client.execute( req );
|
resp = client.execute( req );
|
||||||
|
|
||||||
logger.info( "发送成功,返回消息:" + resp.getData() );
|
if ( resp != null )
|
||||||
|
{
|
||||||
|
logger.info( "发送成功,返回消息:" + resp.getBody() );
|
||||||
|
|
||||||
// 将已发送的数据从update表中清理掉
|
// 将已发送的数据从HmbXyxInfo_update表中清理掉
|
||||||
removePostedHmbXyxInfo( postedInfo );
|
// removePostedHmbXyxInfo( postedInfo );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.info( "已发送请求,但获取的DefaultZephyrResponse为null!" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch ( ZephyrApiException error )
|
catch ( ZephyrApiException error )
|
||||||
{
|
{
|
||||||
// 发送不成功,记录日志
|
// 发送不成功,记录日志
|
||||||
// 失败的数据就留在update表中,待以后重新发送
|
// 不从HmbXyxInfo_update中清理当前这批数据,待以后重新发送
|
||||||
logger.error( error.getMessage() );
|
logger.error( "发送异常:" + error.getMessage() );
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@@ -30,8 +30,9 @@ import cn.hsa.zephyr.apisdk.DefaultZephyrClient;
|
|||||||
import cn.hsa.zephyr.apisdk.internal.exception.ZephyrApiException;
|
import cn.hsa.zephyr.apisdk.internal.exception.ZephyrApiException;
|
||||||
import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum;
|
import cn.hsa.zephyr.apisdk.internal.util.encrypt.EncryptionModeEnum;
|
||||||
import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum;
|
import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum;
|
||||||
import cn.hsa.zephyr.apisdk.request.DefaultZephyrRequest;
|
import cn.hsa.zephyr.apisdk.request.ZephyrCommonRequest;
|
||||||
import cn.hsa.zephyr.apisdk.response.DefaultZephyrResponse;
|
import cn.hsa.zephyr.apisdk.response.ZephyrCommonResponse;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test for simple App.
|
* Unit test for simple App.
|
||||||
@@ -87,9 +88,9 @@ public class AppTest
|
|||||||
encType,
|
encType,
|
||||||
encKey );
|
encKey );
|
||||||
|
|
||||||
DefaultZephyrRequest req = new DefaultZephyrRequest();
|
ZephyrCommonRequest req = new ZephyrCommonRequest();
|
||||||
JSONObject jsonObject1 = new JSONObject();
|
JSONObject jsonObject1 = new JSONObject();
|
||||||
DefaultZephyrResponse resp = null;
|
ZephyrCommonResponse resp = null;
|
||||||
|
|
||||||
jsonObject1.put( "code", "XXXXXXXXXXXXXXXXXX" );
|
jsonObject1.put( "code", "XXXXXXXXXXXXXXXXXX" );
|
||||||
jsonObject1.put( "scene_code", "XXX" );
|
jsonObject1.put( "scene_code", "XXX" );
|
||||||
@@ -97,7 +98,7 @@ public class AppTest
|
|||||||
req.setData( jsonObject1 );
|
req.setData( jsonObject1 );
|
||||||
resp = client.execute( req );
|
resp = client.execute( req );
|
||||||
|
|
||||||
System.out.println( resp.getData() );
|
System.out.println( resp.getBody() );
|
||||||
}
|
}
|
||||||
catch ( ZephyrApiException e )
|
catch ( ZephyrApiException e )
|
||||||
{
|
{
|
||||||
|
16
code/sql/调试.sql
Normal file
16
code/sql/调试.sql
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
delete from HmbXyxInfo;
|
||||||
|
insert into HmbXyxInfo( psnName, certno, serviceid, status, xyxno)
|
||||||
|
values( '王炜', '350402198106130016', '100007', '1', '100001');
|
||||||
|
insert into HmbXyxInfo( psnName, certno, serviceid, status, xyxno)
|
||||||
|
values( '王炜', '350402198106130016', '100007', '1', '100002');
|
||||||
|
insert into HmbXyxInfo( psnName, certno, serviceid, status, xyxno)
|
||||||
|
values( '王炜', '350402198106130016', '100007', '1', '100003');
|
||||||
|
commit;
|
||||||
|
/*
|
||||||
|
|
||||||
|
select * from HmbXyxInfo_Update;
|
||||||
|
select a.*
|
||||||
|
from HmbXyxInfo a,
|
||||||
|
HmbXyxInfo_Update b
|
||||||
|
where a.xyxNo = b.xyxNo;
|
Reference in New Issue
Block a user