Merge branch 'dev' of i3-IMPP/i3plus-pojo into test

yun-zuoyi
刘辉 6 years ago committed by nancy.li
commit 722146acd8

@ -766,4 +766,50 @@ public class BlockSoftSwitchEnumUtil {
return tmp; 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;
}
}
} }

@ -3701,5 +3701,111 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_RULE_TYPE {
PROMOTION_TYPE(10, "REPLENISH_TYPE", "推动规则"),
REPLENISH_TYPE(20, "PROMOTION_TYPE", "补货规则");
private int value;
private String code;
private String description;
ROUTING_RULE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 String valueOfDescription(int val) {
return valueOf(val);
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_DELAY_UNIT {
M(10, "M", "分"),
D(20, "D", "天");
private int value;
private String code;
private String description;
ROUTING_DELAY_UNIT(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 String valueOfDescription(int val) {
return valueOf(val);
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
} }

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

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.softswitch.bean; package cn.estsh.i3plus.pojo.softswitch.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; 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 cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@ -103,11 +104,26 @@ public class BsSuitCase extends BaseBean {
return isNeedCertification.intValue(); return isNeedCertification.intValue();
} }
@Column(name = "IS_PUSH_MQ")
@ApiParam(value = "是否推送MQ")
private Integer isPushMQ;
@Column(name = "SSL_KEY_ID") @Column(name = "SSL_KEY_ID")
@ApiParam(value = "证书id") @ApiParam(value = "证书id")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long sslKeyId; 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") @Column(name = "REGULAR_SUIT_NUM")
@ApiParam(value = "定时适配次数") @ApiParam(value = "定时适配次数")
private Integer regularSuitNum; private Integer regularSuitNum;

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

@ -34,14 +34,23 @@ public class BsSuitFile extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long suitCaseId; private Long suitCaseId;
@Column(name = "SUIT_RECORD_ID")
@ApiParam(value = "适配记录id")
@JsonSerialize(using = ToStringSerializer.class)
private Long suitRecordId;
@Column(name = "SUIT_CASE_NAME_RDD") @Column(name = "SUIT_CASE_NAME_RDD")
@ApiParam(value = "适配套件名称") @ApiParam(value = "适配套件名称")
private String suitCaseName; private String suitCaseNameRdd;
@Column(name = "SUIT_CASE_CODE") @Column(name = "SUIT_CASE_CODE")
@ApiParam(value = "适配套件代码") @ApiParam(value = "适配套件代码")
private String suitCaseCode; private String suitCaseCode;
@Column(name = "CASE_TYPE_ID")
@ApiParam(value = "套件类型id(枚举)")
private Integer caseTypeId;
@Column(name = "FOLDER_PATH") @Column(name = "FOLDER_PATH")
@ApiParam(value = "文件夹路径") @ApiParam(value = "文件夹路径")
private String folderPath; private String folderPath;

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

@ -333,7 +333,7 @@ public class SoftSwitchHqlPack {
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitTypeId(),"suitTypeId",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitTypeId(),"suitTypeId",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseCodeRdd(),"suitCaseCodeRdd",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseCode(),"suitCaseCode",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getCaseTypeId(),"caseTypeId",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitRecord.getCaseTypeId(),"caseTypeId",ddlPackBean);
DdlPreparedPack.timeBuilder(bsSuitRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true); DdlPreparedPack.timeBuilder(bsSuitRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
@ -362,7 +362,6 @@ public class SoftSwitchHqlPack {
return ddlPackBean; return ddlPackBean;
} }
/** /**
* *
* @param bsSuitFile * @param bsSuitFile
@ -371,7 +370,7 @@ public class SoftSwitchHqlPack {
public static DdlPackBean packHqlBsSuitCaseFile(BsSuitFile bsSuitFile){ public static DdlPackBean packHqlBsSuitCaseFile(BsSuitFile bsSuitFile){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseName(),"suitCaseName",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseCode(),"suitCaseCode",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseCode(),"suitCaseCode",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitFile.getSuitCaseId(), "suitCaseId", ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitFile.getSuitCaseId(), "suitCaseId", ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitFile.getFileName(), "fileName", ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitFile.getFileName(), "fileName", ddlPackBean);
@ -381,4 +380,25 @@ public class SoftSwitchHqlPack {
return ddlPackBean; 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;
}
} }

@ -21,7 +21,6 @@ public interface WmsStockSnRepository extends BaseRepository<WmsStockSn, Long> {
*/ */
WmsStockSn findFirstBySn(String sn); WmsStockSn findFirstBySn(String sn);
/** /**
* Rock.Yu at 2019-06-22 11:05 * Rock.Yu at 2019-06-22 11:05
* *

Loading…
Cancel
Save