软适配微服务接口

yun-zuoyi
汪云昊 6 years ago
parent abd2321850
commit f3867c64f4

@ -766,4 +766,50 @@ public class BlockSoftSwitchEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_DATA_TYPE {
XML(10, "XML"),
JSON(20, "JSON");
private int value;
private String description;
private SUIT_DATA_TYPE (int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static SUIT_DATA_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
}

@ -6,6 +6,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitRecord;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -41,6 +42,7 @@ public class SuitClientModel {
/**
*
*/
@XStreamImplicit
private BsSuitRecord bsSuitRecord;
/**
@ -87,7 +89,7 @@ public class SuitClientModel {
*
*/
@XStreamCDATA
private String suitResultMessage;
private Object suitResultMessage;
public SuitClientModel() {
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.softswitch.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.BlockSoftSwitchEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@ -108,6 +109,18 @@ public class BsSuitCase extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class)
private Long sslKeyId;
@Column(name = "SUIT_DATA_TYPE")
@ApiParam(value = "适配报文类型")
private Integer suitDataType;
public Integer getSuitDataType(){
if(suitDataType == null){
suitDataType = BlockSoftSwitchEnumUtil.SUIT_DATA_TYPE.XML.getValue();
}
return suitDataType;
}
@Column(name = "REGULAR_SUIT_NUM")
@ApiParam(value = "定时适配次数")
private Integer regularSuitNum;

@ -13,6 +13,8 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
@ -82,5 +84,9 @@ public class BsSuitDataDetail extends BaseBean {
@ApiParam(value = "处理时间")
private String processTime;
@Transient
@ApiParam(value = "适配请求文件列表")
private List<BsSuitFile> bsSuitFileList;
}

@ -34,6 +34,11 @@ public class BsSuitFile extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class)
private Long suitCaseId;
@Column(name = "SUIT_RECORD_ID")
@ApiParam(value = "适配记录id")
@JsonSerialize(using = ToStringSerializer.class)
private Long suitRecordId;
@Column(name = "SUIT_CASE_NAME_RDD")
@ApiParam(value = "适配套件名称")
private String suitCaseName;

@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
@ -95,6 +96,7 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "适配结果")
private Integer suitResult;
@Lob
@Column(name = "SUIT_MESSAGE")
@ApiParam(value = "适配信息")
private String suitMessage;
@ -119,5 +121,9 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "适配请求记录")
private BsSuitRequestRecord bsSuitRequestRecord;
@Transient
@ApiParam(value = "适配请求文件列表")
private List<BsSuitFile> bsSuitFileList;
}

@ -362,7 +362,6 @@ public class SoftSwitchHqlPack {
return ddlPackBean;
}
/**
*
* @param bsSuitFile
@ -381,4 +380,25 @@ public class SoftSwitchHqlPack {
return ddlPackBean;
}
public static DdlPackBean packHqlSuitRecordBySuitCaseCodeAndProcessState(String suitCaseCode, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getStringEqualPack(suitCaseCode,"suitCaseCodeRdd",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
public static DdlPackBean packHqlSuitRecordBySuitRecordIdAndProcessState(Long[] suitRecordIds, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getInPackArray(suitRecordIds,"suitCaseCodeRdd",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
}

Loading…
Cancel
Save