对SPC-KEY-TATA表的相关接口进行了相关优化。

yun-zuoyi
Liquor 5 years ago
parent 72faca1092
commit 83bfaaceab

@ -20,19 +20,27 @@ public class MesEnumUtil {
POJO_OBJECT(10,"实体对象(单表)"), POJO_OBJECT(10,"实体对象(单表)"),
DYNAMIC(20,"动态对象(生产数据表)"); DYNAMIC(20,"动态对象(生产数据表)");
private Integer objectType; private Integer value;
private String description; private String description;
SPC_KEY_DATA_OBJECT_TYPE(Integer objectType,String description ){ SPC_KEY_DATA_OBJECT_TYPE(Integer value,String description ){
this.objectType = objectType; this.value = value;
this.description = description; this.description = description;
} }
public static String valueOfDesc(String val) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
return values()[i].description;
}
}
return null;
}
public Integer getObjectType() { public Integer getValue() {
return objectType; return value;
} }
public void setObjectType(Integer objectType) { public void setValue(Integer value) {
this.objectType = objectType; this.value = value;
} }
public String getDescription() { public String getDescription() {

@ -2327,6 +2327,25 @@ public class MesHqlPack {
return packBean; return packBean;
} }
public static DdlPackBean getMesSpcKeyData(MesSpcKeyData spcKeyData) {
DdlPackBean packBean = getAllBaseData(spcKeyData.getOrganizeCode());
if (!StringUtils.isEmpty(spcKeyData.getIsValid())) {
DdlPreparedPack.getNumEqualPack(spcKeyData.getIsValid(), "isValid", packBean);
}
if (!StringUtils.isEmpty(spcKeyData.getKdCode())) {
DdlPreparedPack.getStringEqualPack(spcKeyData.getKdCode(), "kdCode", packBean);
}
if (spcKeyData.getObjectType() != null) {
DdlPreparedPack.getNumEqualPack(spcKeyData.getObjectType(), "objectType", packBean);
}
if (!StringUtils.isEmpty(spcKeyData.getObjectCode())) {
DdlPreparedPack.getStringEqualPack(spcKeyData.getObjectCode(), "objectCode", packBean);
}
if (!StringUtils.isEmpty(spcKeyData.getFieldCode())) {
DdlPreparedPack.getStringEqualPack(spcKeyData.getFieldCode(), "fieldCode", packBean);
}
return packBean;
}
/** /**
* *
* *

Loading…
Cancel
Save