保存进度!
This commit is contained in:
parent
2fe8043791
commit
dddf8520a1
@ -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>
|
||||||
@ -104,11 +104,9 @@
|
|||||||
<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-from-nhs.jar</systemPath>
|
<systemPath>${project.basedir}/lib/zephyr-api-sdk-cx.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
@ -128,8 +126,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<!-- <version>1.2.83</version> -->
|
<version>1.2.83</version>
|
||||||
<version>2.0.56</version>
|
<!-- <version>2.0.56</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -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(
|
||||||
@ -254,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();
|
||||||
@ -294,18 +299,21 @@ public class CpicximToXMNHS
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.info( "发送请求内容:" + requestObject.toJSONString() );
|
data.remove("data");
|
||||||
|
data.put( "data", requestObject );
|
||||||
|
|
||||||
|
logger.info( "发送请求内容:" + data.toJSONString() );
|
||||||
logger.info( "请求地址:" + HuixiabaoConfig.getUrl() );
|
logger.info( "请求地址:" + HuixiabaoConfig.getUrl() );
|
||||||
|
|
||||||
req.setData( requestObject );
|
req.setData( data );
|
||||||
resp = client.execute( req );
|
resp = client.execute( req );
|
||||||
|
|
||||||
if ( resp != null )
|
if ( resp != null )
|
||||||
{
|
{
|
||||||
logger.info( "发送成功,返回消息:" + resp.getData() );
|
logger.info( "发送成功,返回消息:" + resp.getBody() );
|
||||||
|
|
||||||
// 将已发送的数据从HmbXyxInfo_update表中清理掉
|
// 将已发送的数据从HmbXyxInfo_update表中清理掉
|
||||||
removePostedHmbXyxInfo( postedInfo );
|
// removePostedHmbXyxInfo( postedInfo );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -30,8 +30,8 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,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" );
|
||||||
@ -98,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 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user