保存进度!
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
*/
|
||||
package com.cpic.xim.huixiabao.data.pojo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
// 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 )
|
||||
//@JsonInclude( JsonInclude.Include.NON_EMPTY )
|
||||
//@JsonPropertyOrder( alphabetic = true )
|
||||
public class HmbXyxInfo
|
||||
{
|
||||
|
||||
@@ -91,19 +91,19 @@ public class HmbXyxInfo
|
||||
return "HmbXyxInfo [psnName=" + psnName + ", certNo=" + certNo + ", serviceId=" + serviceId + ", status=" + status + ", xyxNo=" + xyxNo + "]";
|
||||
}
|
||||
|
||||
@JsonProperty( "psnName" )
|
||||
//@JsonProperty( "psnName" )
|
||||
private String psnName;
|
||||
|
||||
@JsonProperty( "certno" )
|
||||
//@JsonProperty( "certno" )
|
||||
private String certNo;
|
||||
|
||||
@JsonProperty( "serviceId" )
|
||||
//@JsonProperty( "serviceId" )
|
||||
private String serviceId;
|
||||
|
||||
@JsonProperty( "status" )
|
||||
//@JsonProperty( "status" )
|
||||
private String status;
|
||||
|
||||
@JsonProperty( "xyxNo" )
|
||||
//@JsonProperty( "xyxNo" )
|
||||
private String xyxNo;
|
||||
|
||||
}
|
@@ -10,12 +10,12 @@
|
||||
package com.cpic.xim.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;
|
||||
// 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 )
|
||||
// @JsonInclude( JsonInclude.Include.NON_EMPTY )
|
||||
// @JsonPropertyOrder( alphabetic = true )
|
||||
public class HmbXyxInfoRequest
|
||||
{
|
||||
public HmbXyxInfoRequest()
|
||||
@@ -51,9 +51,9 @@ public class HmbXyxInfoRequest
|
||||
this.hmbList = hmbList;
|
||||
}
|
||||
|
||||
@JsonProperty("topic")
|
||||
//@JsonProperty("topic")
|
||||
private String topic; // 业务类型
|
||||
|
||||
@JsonProperty("hmbList")
|
||||
//@JsonProperty("hmbList")
|
||||
private Vector<HmbXyxInfo> hmbList;
|
||||
}
|
@@ -9,8 +9,6 @@
|
||||
*/
|
||||
package com.cpic.xim.huixiabao.data.pojo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class NHACommenRequestBody
|
||||
{
|
||||
|
||||
|
@@ -24,14 +24,18 @@ import java.util.Vector;
|
||||
import com.cpic.xim.huixiabao.data.pojo.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import cn.hsa.zephyr.apisdk.DefaultZephyrClient;
|
||||
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.SignTypeEnum;
|
||||
import cn.hsa.zephyr.apisdk.request.DefaultZephyrRequest;
|
||||
import cn.hsa.zephyr.apisdk.response.DefaultZephyrResponse;
|
||||
import cn.hsa.zephyr.apisdk.request.ZephyrCommonRequest;
|
||||
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;
|
||||
|
||||
@SuppressWarnings(
|
||||
@@ -254,10 +258,11 @@ public class CpicximToXMNHS
|
||||
signKey,
|
||||
encType,
|
||||
encKey );
|
||||
DefaultZephyrRequest req = new DefaultZephyrRequest();
|
||||
DefaultZephyrResponse resp = null;
|
||||
ZephyrCommonRequest req = new ZephyrCommonRequest();
|
||||
ZephyrCommonResponse resp = null;
|
||||
|
||||
// 数据
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject requestObject = new JSONObject();
|
||||
JSONObject xyxInfo = null;
|
||||
JSONArray xyxInfoList = new JSONArray();
|
||||
@@ -294,18 +299,21 @@ public class CpicximToXMNHS
|
||||
|
||||
try
|
||||
{
|
||||
logger.info( "发送请求内容:" + requestObject.toJSONString() );
|
||||
data.remove("data");
|
||||
data.put( "data", requestObject );
|
||||
|
||||
logger.info( "发送请求内容:" + data.toJSONString() );
|
||||
logger.info( "请求地址:" + HuixiabaoConfig.getUrl() );
|
||||
|
||||
req.setData( requestObject );
|
||||
req.setData( data );
|
||||
resp = client.execute( req );
|
||||
|
||||
if ( resp != null )
|
||||
{
|
||||
logger.info( "发送成功,返回消息:" + resp.getData() );
|
||||
logger.info( "发送成功,返回消息:" + resp.getBody() );
|
||||
|
||||
// 将已发送的数据从HmbXyxInfo_update表中清理掉
|
||||
removePostedHmbXyxInfo( postedInfo );
|
||||
// removePostedHmbXyxInfo( postedInfo );
|
||||
}
|
||||
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.util.encrypt.EncryptionModeEnum;
|
||||
import cn.hsa.zephyr.apisdk.internal.util.encrypt.SignTypeEnum;
|
||||
import cn.hsa.zephyr.apisdk.request.DefaultZephyrRequest;
|
||||
import cn.hsa.zephyr.apisdk.response.DefaultZephyrResponse;
|
||||
import cn.hsa.zephyr.apisdk.request.ZephyrCommonRequest;
|
||||
import cn.hsa.zephyr.apisdk.response.ZephyrCommonResponse;
|
||||
|
||||
|
||||
/**
|
||||
@@ -88,9 +88,9 @@ public class AppTest
|
||||
encType,
|
||||
encKey );
|
||||
|
||||
DefaultZephyrRequest req = new DefaultZephyrRequest();
|
||||
ZephyrCommonRequest req = new ZephyrCommonRequest();
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
DefaultZephyrResponse resp = null;
|
||||
ZephyrCommonResponse resp = null;
|
||||
|
||||
jsonObject1.put( "code", "XXXXXXXXXXXXXXXXXX" );
|
||||
jsonObject1.put( "scene_code", "XXX" );
|
||||
@@ -98,7 +98,7 @@ public class AppTest
|
||||
req.setData( jsonObject1 );
|
||||
resp = client.execute( req );
|
||||
|
||||
System.out.println( resp.getData() );
|
||||
System.out.println( resp.getBody() );
|
||||
}
|
||||
catch ( ZephyrApiException e )
|
||||
{
|
||||
|
Reference in New Issue
Block a user