Merge branch 'test'

yun-zuoyi
crish 6 years ago
commit 0924810e64

@ -25,7 +25,7 @@ import javax.persistence.Table;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="ANDON_MANAGE_ATTACH")
@Api(value="安灯任务附属信息")
@Api(value="安灯附属表")
public class AndonQueueAttach extends BaseBean {
@Column(name="PROD_INFO")

@ -0,0 +1,13 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RippleAnnotation {
String[] dependence() default {};
String method() default "";
}

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.RippleAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.MATERIAL_TYPE;
@ -66,6 +67,7 @@ public class Material extends BaseCode {
@Column(name="LEVEL")
@ApiParam(value ="低阶码")
@RippleAnnotation(dependence = {"OperOutputs.Operation.ProductRouting.Material"}, method = "calcLevel")
private Integer level;
@Column(name="IS_AUTO_FIX_PEGGING")

@ -24,7 +24,7 @@ import java.util.List;
**/
@Data
@Entity
@Table(name = "APS_PRODUCTROUTING")
@Table(name = "APS_PRODUCT_ROUTING")
@Api("物料")
public class ProductRouting extends BaseCode {
@Column(name="VALID_START")

@ -155,13 +155,13 @@ public class Work extends BaseCode {
}
@JsonBackReference
public List<WorkRelation> getWorkRelationInputs() {
return BeanRelation.list(this, EWork.WorkRelationInputs);
public List<WorkRelation> getPrevRelations() {
return BeanRelation.list(this, EWork.PrevRelations);
}
@JsonBackReference
public List<WorkRelation> getWorkRelationOutputs() {
return BeanRelation.list(this, EWork.WorkRelationOutputs);
public List<WorkRelation> getPostRelations() {
return BeanRelation.list(this, EWork.PostRelations);
}
@JsonBackReference

@ -117,6 +117,17 @@ public class BeanRelation {
return result;
}
public static <T extends BaseBean> List<T> listByClass(BaseBean bean, Class<T> cls, Enum<?> holder, Enum<?>... args) {
List<T> beans = new ArrayList<>();
List<BaseBean> nextBeans = list(bean, holder, args);
for (BaseBean nextBean : nextBeans) {
if (nextBean.getClass() == cls) {
beans.add((T)nextBean);
}
}
return beans;
}
private static <T extends BaseBean> void listImpl(List<T> result, BaseBean bean, Predicate<T> pred, Enum<?>[] holders, int index) {
if (index >= holders.length) {
if (pred == null || pred.test((T)bean)) {
@ -191,7 +202,7 @@ public class BeanRelation {
* @param holder
*/
private static void remove(BaseBean bean, Enum<?> holder) {
if (holder == null) {
if (bean == null || holder == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
@ -215,7 +226,7 @@ public class BeanRelation {
* @param relaBean
*/
private static void remove(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
if (bean == null) {
if (bean == null || holder == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());

@ -6,8 +6,8 @@ public enum EWork {
WorkResources,
WorkInputs,
WorkOutputs,
WorkRelationInputs,
WorkRelationOutputs,
PrevRelations,
PostRelations,
Operation,
PlanFeedbacks
}

@ -4,8 +4,8 @@
</Relation>
<Relation field="Works" name="Work" reverse="Order" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="PrevRelations" name="WorkRelation" reverse="PrevOrder" type="ONE_TO_MULTI" owner="false">
<Relation field="PostRelations" name="WorkRelation" reverse="PrevOrder" type="ONE_TO_MULTI" owner="false">
</Relation>
<Relation field="PostRelations" name="WorkRelation" reverse="PostOrder" type="ONE_TO_MULTI" owner="false">
<Relation field="PrevRelations" name="WorkRelation" reverse="PostOrder" type="ONE_TO_MULTI" owner="false">
</Relation>
</Class>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="OperResource">
<Relation field="Resource" name="Resource" reverse="OperResources" type="MULTI_TO_ONE" owner="false">
<Relation field="Resource" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class>

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="Operation">
<Relation field="StandOperation" name="StandOperation" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="OperInputs" name="OperInput" reverse="Operation" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="OperOutputs" name="OperOutput" reverse="Operation" type="ONE_TO_MULTI" owner="true">

@ -1,5 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="StandOperation">
<Relation field="Operations" name="Operation" reverse="StandOperation" type="ONE_TO_MULTI" owner="false">
</Relation>
</Class>

@ -6,9 +6,9 @@
</Relation>
<Relation field="WORK_RESOURCES" name="WorkResource" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="WorkRelationOutputs" name="WorkRelation" reverse="PrevWork" type="ONE_TO_MULTI" owner="false">
<Relation field="PostRelations" name="WorkRelation" reverse="PrevWork" type="ONE_TO_MULTI" owner="false">
</Relation>
<Relation field="WorkRelationInputs" name="WorkRelation" reverse="PostWork" type="ONE_TO_MULTI" owner="false">
<Relation field="PrevRelations" name="WorkRelation" reverse="PostWork" type="ONE_TO_MULTI" owner="false">
</Relation>
<Relation field="Operation" name="Operation" type="MULTI_TO_ONE" owner="false">
</Relation>

@ -30,4 +30,6 @@ public class BaseConstWords {
public static final String DICTIONARY_EMPLOYEE_TYPE ="EMPLOYEE_TYPE";
// 系统参数配置 PROPERTIES
public static final String DICTIONARY_PROPERTIES ="PROPERTIES";
// 打印模板分组
public static final String DICTIONARY_LABEL_TEMPLATE_GROUP ="LABEL_TEMPLATE_GROUP";
}

@ -11,6 +11,54 @@ import org.apache.commons.lang3.StringUtils;
* @Modify:
**/
public class AndonEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ANDON_VOICE_TYPE{
MIC_EN("10","Microsoft Anna - English (United States)"),
MIC_LILI("20","Microsoft Lili - Chinese (China)"),
AI_MALE("30","Aisound_male"),
AI_FEMALE("40","Aisound_female"),
MIC_ZIRE_EN("50","Microsoft Zira Desktop - English (United States)"),
MIC_HUI_CH("60","Microsoft Huihui Desktop - Chinese (Simplified)");
private String value;
private String description;
ANDON_VOICE_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value,val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String descriptionOfValue(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, val)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* = 10 = 20

@ -823,114 +823,6 @@ public class BlockFormEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PROPERTY_CONTROL_TYPE {
RADIO(100, "RADIO", "单选"),
CHECKBOX(110, "CHECKBOX", "复选"),
TEXT(200, "TEXT", "文本"),
NUMBER(210, "NUMBER", "数字"),
PASSWORD(230, "PASSWORD", "密码"),
DATE_TIME(300, "DATE", "日期",SQL_WHERE.BETWEEN),
// DATE(300, "DATE", "日期(yyyy-MM-dd)"),
// DATE_TIME(310, "DATE_TIME", "时间(yyyy-MM-dd hh:mm:ss)"),
// ELEMENT(700, "DICT_SELECT", "元素"),
DICTIONARY(800, "DICT_SELECT", "字典"),
CASCADE(900, "CASCADE", "级联");
//FILE(400, "file", "文件"),
//IMAGE(410, "image", "image"),
//OFF(500, "color", "颜色"),
private int value;
private String code;
private String description;
/**
*
*/
private SQL_WHERE defaultWhere;
PROPERTY_CONTROL_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
PROPERTY_CONTROL_TYPE(int value, String code, String description, SQL_WHERE defaultWhere) {
this.value = value;
this.code = code;
this.description = description;
this.defaultWhere = defaultWhere;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public SQL_WHERE getDefaultWhere() {
return defaultWhere;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 PROPERTY_CONTROL_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;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
@ -1172,102 +1064,26 @@ public class BlockFormEnumUtil {
}
}
/**
* ()
* <per>
* <br/> Form
* <br/> Java
* <br/> Java
* </per>
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PROPERTY_TYPE {
STRING(10, "String", "字符串", "java.lang.String", String.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.LIKE,""),
CHAR(11, "Character", "单字符", "java.lang.Character", Character.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.EQUAL,""),
INTEGER(20, "Integer", "短整型", "java.lang.Integer", Integer.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0"),
LONG(21, "Long", "长整型", "java.lang.Long", Long.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0"),
DOUBLE(30, "Double", "大浮点型", "java.lang.Double", Double.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
FLOAT(31, "Float", "小浮点型", "java.lang.Float", Float.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
BIG_DECIMAL(32, "Double", "大浮点型", "java.math.BigDecimal", Double.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
BOOLEAN(40, "Boolean", "布尔值", "java.lang.Boolean", Boolean.class,PROPERTY_CONTROL_TYPE.RADIO,SQL_WHERE.EQUAL,null),
BYTE(50, "Byte", "字节", "java.lang.Byte", Byte.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.EQUAL,null),
DATE_TIME(12, "String", "日期时分秒", "java.sql.Timestamp", String.class,PROPERTY_CONTROL_TYPE.DATE_TIME,SQL_WHERE.BETWEEN,null,"yyyy-MM-dd hh:mm:ss");
public enum EXECUTION_TYPE {
SQL(10, "SQL", "SQL脚本"),
CLASS_METHOD(20, "ClassMethod", "类方法"),
SYSTEM_JAVA(30, "SystemClassMethod", "系统类方法"),
SCRIPT(40, "Script", "脚本");
/**
*
*/
private int value;
/**
*
*/
private String code;
/**
*
*/
private String description;
/**
* ClassPath
*/
private String classPath;
/**
* Class
*/
private Class clzFullName;
/**
*
*/
private PROPERTY_CONTROL_TYPE controlType;
/**
*
*/
private SQL_WHERE defaultWhere;
/**
*
*/
private String defaultFormat;
/**
*
*/
private String defaultValue;
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
}
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
this.defaultValue = defaultValue;
this.defaultFormat = defaultFormat;
}
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue,String defaultFormat) {
private EXECUTION_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
this.defaultValue = defaultValue;
this.defaultFormat = defaultFormat;
}
public int getValue() {
@ -1282,30 +1098,6 @@ public class BlockFormEnumUtil {
return description;
}
public String getClassPath() {
return classPath;
}
public Class getClzFullName() {
return clzFullName;
}
public PROPERTY_CONTROL_TYPE getControlType() {
return controlType;
}
public SQL_WHERE getDefaultWhere() {
return defaultWhere;
}
public String getDefaultFormat() {
return defaultFormat;
}
public String getDefaultValue() {
return defaultValue;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
@ -1316,182 +1108,38 @@ public class BlockFormEnumUtil {
return tmp;
}
public static PROPERTY_TYPE valueOfClzFullName(int val) {
PROPERTY_TYPE tmp = null;
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i];
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static PROPERTY_CONTROL_TYPE valueOfControlType(int val) {
PROPERTY_CONTROL_TYPE tmp = null;
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].controlType;
tmp = values()[i].description;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
public static EXECUTION_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
if (values()[i].value == val) {
return values()[i];
}
}
return tmp;
return null;
}
public static int codeOfClzFullName(Class clzFullName) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].clzFullName.equals(clzFullName)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static int codeOfClassPath(String classPath) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].classPath.equals(classPath)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 PROPERTY_TYPE valueOfClassPath(String classPath) {
PROPERTY_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].classPath.equals(classPath)) {
tmp = values()[i];
}
}
return tmp;
}
public static PROPERTY_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;
}
public static PROPERTY_TYPE indexOf(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (val.indexOf(values()[i].value) >= 0) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EXECUTION_TYPE {
SQL(10, "SQL", "SQL脚本"),
CLASS_METHOD(20, "ClassMethod", "类方法"),
SYSTEM_JAVA(30, "SystemClassMethod", "系统类方法"),
SCRIPT(40, "Script", "脚本");
private int value;
private String code;
private String description;
private EXECUTION_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 EXECUTION_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;
}
public static String codeOfDescription(String code) {
String tmp = null;
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
@ -2423,6 +2071,115 @@ public class BlockFormEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PROPERTY_CONTROL_TYPE {
RADIO(100, "RADIO", "单选"),
CHECKBOX(110, "CHECKBOX", "复选"),
TEXT(200, "TEXT", "文本"),
NUMBER(210, "NUMBER", "数字"),
PASSWORD(230, "PASSWORD", "密码"),
DATE_TIME(300, "DATE", "日期",SQL_WHERE.BETWEEN),
// DATE(300, "DATE", "日期(yyyy-MM-dd)"),
// DATE_TIME(310, "DATE_TIME", "时间(yyyy-MM-dd hh:mm:ss)"),
// ELEMENT(700, "DICT_SELECT", "元素"),
DICTIONARY(800, "DICT_SELECT", "字典"),
CASCADE(900, "CASCADE", "级联");
//FILE(400, "file", "文件"),
//IMAGE(410, "image", "image"),
//OFF(500, "color", "颜色"),
private int value;
private String code;
private String description;
/**
*
*/
private SQL_WHERE defaultWhere;
PROPERTY_CONTROL_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
PROPERTY_CONTROL_TYPE(int value, String code, String description, SQL_WHERE defaultWhere) {
this.value = value;
this.code = code;
this.description = description;
this.defaultWhere = defaultWhere;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public SQL_WHERE getDefaultWhere() {
return defaultWhere;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 PROPERTY_CONTROL_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;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -2510,4 +2267,250 @@ public class BlockFormEnumUtil {
return tmp;
}
}
/**
* ()
* <per>
* <br/> Form
* <br/> Java
* <br/> Java
* </per>
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PROPERTY_TYPE {
STRING(10, "String", "字符串", "java.lang.String", String.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.LIKE,""),
CHAR(11, "Character", "单字符", "java.lang.Character", Character.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.EQUAL,""),
INTEGER(20, "Integer", "短整型", "java.lang.Integer", Integer.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0"),
LONG(21, "Long", "长整型", "java.lang.Long", Long.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0"),
DOUBLE(30, "Double", "大浮点型", "java.lang.Double", Double.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
FLOAT(31, "Float", "小浮点型", "java.lang.Float", Float.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
BIG_DECIMAL(32, "Double", "大浮点型", "java.math.BigDecimal", Double.class,PROPERTY_CONTROL_TYPE.NUMBER,SQL_WHERE.EQUAL,"0.0"),
BOOLEAN(40, "Boolean", "布尔值", "java.lang.Boolean", Boolean.class,PROPERTY_CONTROL_TYPE.RADIO,SQL_WHERE.EQUAL,null),
BYTE(50, "Byte", "字节", "java.lang.Byte", Byte.class,PROPERTY_CONTROL_TYPE.TEXT,SQL_WHERE.EQUAL,null),
DATE_TIME(12, "String", "日期时分秒", "java.sql.Timestamp", String.class,PROPERTY_CONTROL_TYPE.DATE_TIME,SQL_WHERE.BETWEEN,null,"yyyy-MM-dd hh:mm:ss");
/**
*
*/
private int value;
/**
*
*/
private String code;
/**
*
*/
private String description;
/**
* ClassPath
*/
private String classPath;
/**
* Class
*/
private Class clzFullName;
/**
*
*/
private PROPERTY_CONTROL_TYPE controlType;
/**
*
*/
private SQL_WHERE defaultWhere;
/**
*
*/
private String defaultFormat;
/**
*
*/
private String defaultValue;
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
}
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
this.defaultValue = defaultValue;
this.defaultFormat = defaultFormat;
}
private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName,
PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue,String defaultFormat) {
this.value = value;
this.code = code;
this.description = description;
this.classPath = classPath;
this.clzFullName = clzFullName;
this.controlType = controlType;
this.defaultWhere = defaultWhere;
this.defaultValue = defaultValue;
this.defaultFormat = defaultFormat;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public String getClassPath() {
return classPath;
}
public Class getClzFullName() {
return clzFullName;
}
public PROPERTY_CONTROL_TYPE getControlType() {
return controlType;
}
public SQL_WHERE getDefaultWhere() {
return defaultWhere;
}
public String getDefaultFormat() {
return defaultFormat;
}
public String getDefaultValue() {
return defaultValue;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static PROPERTY_TYPE valueOfClzFullName(int val) {
PROPERTY_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i];
}
}
return tmp;
}
public static PROPERTY_CONTROL_TYPE valueOfControlType(int val) {
PROPERTY_CONTROL_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].controlType;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static int codeOfClzFullName(Class clzFullName) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].clzFullName.equals(clzFullName)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static int codeOfClassPath(String classPath) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].classPath.equals(classPath)) {
tmp = values()[i].value;
}
}
return tmp;
}
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 PROPERTY_TYPE valueOfClassPath(String classPath) {
PROPERTY_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].classPath.equals(classPath)) {
tmp = values()[i];
}
}
return tmp;
}
public static PROPERTY_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;
}
public static PROPERTY_TYPE indexOf(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (val.indexOf(values()[i].value) >= 0) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -521,6 +521,15 @@ public class BlockSoftSwitchEnumUtil {
}
return result;
}
public static PARAM_VALUE_TYPE valueOf(int value){
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
return values()[i];
}
}
return null;
}
}
/**

@ -1161,7 +1161,7 @@ public class ImppEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DICTIONARY_GROUP {
SYSTEM(1, "系统字典"),
EXTERNAL(2, "外部人员");
EXTERNAL(2, "业务字典");
private int value;
private String description;

@ -12,6 +12,196 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQUIPMENT_TYPE {
PHYSICAL(10, "物理设备"),
LOGIC(20, "逻辑设备");
private int value;
private String description;
MES_EQUIPMENT_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 Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQUIPMENT_CONNECT_TYPE {
PLC(10, "PLC"),
DB(20, "DB"),
OTHER(30, "其他");
private int value;
private String description;
MES_EQUIPMENT_CONNECT_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 Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQUIPMENT_STATUS {
INUSE(10, "在用"),
SPARE(20, "备用"),
FAULT(30, "故障"),
SERVICE(40, "检修"),
STOPUSING(50, "停用");
private int value;
private String description;
MES_EQUIPMENT_STATUS(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 Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQUIPMENT_CATEGORY {
A("A", "A"),
B("B", "B"),
C("C", "C"),
D("D", "D");
private String value;
private String description;
MES_EQUIPMENT_CATEGORY(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String descriptionOfValue(String description) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -215,6 +215,8 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
List<T> findByProperty(String propertyName, Object value);
List<Map<String,Object>> findByWasProperty(String[] propertyNames, Object[] values);
List<T> findByProperty(String[] propertyNames, Object[] values);
List<T> findByProperty(String propertyName, Object value,String orderByStuff);
@ -231,6 +233,8 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
int findByPropertyCount(String propertyName, Object value);
T findByVendorNoProperty(String vendorNo);
int findByPropertyCount(String[] propertyNames, Object[] values);
List<T> findByPropertyPage(String propertyName, Object value,String orderByStuff,Pager pager);

@ -3,10 +3,16 @@ package cn.estsh.i3plus.pojo.base.jpa.daoimpl;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.base.codemaker.SnowflakeIdMaker;
import cn.estsh.i3plus.pojo.base.util.BeanMapUtils;
import cn.estsh.i3plus.pojo.base.util.StringCastUtils;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.NonUniqueResultException;
import org.hibernate.SQLQuery;
import org.hibernate.transform.Transformers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
@ -37,7 +43,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
private Class<T> persistentClass;
private SnowflakeIdMaker snowflakeIdMaker;
public BaseRepositoryImpl(Class<T> clz, EntityManager em,SnowflakeIdMaker snowflakeIdMaker) {
public BaseRepositoryImpl(Class<T> clz, EntityManager em, SnowflakeIdMaker snowflakeIdMaker) {
super(clz, em);
this.entityManager = em;
this.persistentClass = clz;
@ -83,7 +89,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public T insert(T item) {
return insert(item,true);
return insert(item, true);
}
@Override
@ -94,7 +100,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public <S extends T> S save(S entity) {
//复写save方法若id为0或空则新增不然则修改
return (S) innerSave(entity,true);
return (S) innerSave(entity, true);
}
@Override
@ -136,100 +142,101 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public void deleteById(ID id){
public void deleteById(ID id) {
deleteByProperty("id", id);
}
@Override
public int deleteByProperty(String propName, Object propValue) {
return deleteByProperties(new String[] { propName }, new Object[] { propValue });
return deleteByProperties(new String[]{propName}, new Object[]{propValue});
}
@Override
public int deleteByProperties(String[] propName, Object[] propValue) {
if ((propName != null) && (propName.length > 0) && (propValue != null) && (propValue.length > 0) && (propValue.length == propName.length)) {
StringBuffer sb = new StringBuffer("delete from " + persistentClass.getName() + " model where 1=1 ");
appendQL(sb,propName,propValue);
appendQL(sb, propName, propValue);
Query query = entityManager.createQuery(sb.toString());
setParameter(query,propName,propValue);
setParameter(query, propName, propValue);
return query.executeUpdate();
}else{
} else {
throw new IllegalArgumentException("删除错误!propName:" + propName + ",propValue:" + propValue);
}
}
@Override
public int deleteByIds(ID[] ids) {
return deleteByPropertyIn("id", ids);
return deleteByPropertyIn("id", ids);
}
@Override
public int deleteByPropertyIn(String propName, Object[] propValues) {
if ((propName != null && propName.length() > 0) && (propValues != null && propValues.length > 0)) {
String hql = "delete from " + persistentClass.getName() + " model where model."+propName+" in(:"+propName+") ";
String hql = "delete from " + persistentClass.getName() + " model where model." + propName + " in(:" + propName + ") ";
Query query = entityManager.createQuery(hql);
query.setParameter(propName, Arrays.asList(propValues));
return query.executeUpdate();
}else{
throw new IllegalArgumentException("删除出错:"+propName+":" + propValues);
} else {
throw new IllegalArgumentException("删除出错:" + propName + ":" + propValues);
}
}
@Override
public int updateByProperties(String conditionName, Object conditionValue, String propertyName, Object propertyValue) {
return updateByProperties(new String[] { conditionName }, new Object[] { conditionValue }, new String[] { propertyName }, new Object[] { propertyValue });
return updateByProperties(new String[]{conditionName}, new Object[]{conditionValue}, new String[]{propertyName}, new Object[]{propertyValue});
}
@Override
public int updateByProperties(String conditionName, Object conditionValue, String[] propertyName, Object[] propertyValue) {
return updateByProperties(new String[] { conditionName }, new Object[] { conditionValue }, propertyName, propertyValue);
return updateByProperties(new String[]{conditionName}, new Object[]{conditionValue}, propertyName, propertyValue);
}
@Override
public int updateByProperties(String[] conditionName, Object[] conditionValue, String propertyName, Object propertyValue) {
return updateByProperties(conditionName, conditionValue, new String[] { propertyName }, new Object[] { propertyValue });
return updateByProperties(conditionName, conditionValue, new String[]{propertyName}, new Object[]{propertyValue});
}
@Override
public int updateByProperties(String[] conditionName, Object[] conditionValue, String[] propertyName, Object[] propertyValue) {
return updateByPropertiesMain(conditionName, conditionValue, propertyName, propertyValue,true);
return updateByPropertiesMain(conditionName, conditionValue, propertyName, propertyValue, true);
}
@Override
public int updateByPropertiesWithVal(String conditionName, Object conditionValue, String propertyName, Object propertyValue) {
return updateByPropertiesWithVal(new String[] { conditionName }, new Object[] { conditionValue }, new String[] { propertyName }, new Object[] { propertyValue });
return updateByPropertiesWithVal(new String[]{conditionName}, new Object[]{conditionValue}, new String[]{propertyName}, new Object[]{propertyValue});
}
@Override
public int updateByPropertiesWithVal(String conditionName, Object conditionValue, String[] propertyName, Object[] propertyValue) {
return updateByPropertiesWithVal(new String[] { conditionName }, new Object[] { conditionValue }, propertyName, propertyValue);
return updateByPropertiesWithVal(new String[]{conditionName}, new Object[]{conditionValue}, propertyName, propertyValue);
}
@Override
public int updateByPropertiesWithVal(String[] conditionName, Object[] conditionValue, String propertyName, Object propertyValue) {
return updateByPropertiesWithVal(conditionName, conditionValue, new String[] { propertyName }, new Object[] { propertyValue });
return updateByPropertiesWithVal(conditionName, conditionValue, new String[]{propertyName}, new Object[]{propertyValue});
}
@Override
public int updateByPropertiesWithVal(String[] conditionName, Object[] conditionValue, String[] propertyName, Object[] propertyValue) {
return updateByPropertiesMain(conditionName, conditionValue, propertyName, propertyValue,false);
return updateByPropertiesMain(conditionName, conditionValue, propertyName, propertyValue, false);
}
/**
*
* @param conditionName
*
* @param conditionName
* @param conditionValue
* @param propertyName
* @param propertyValue
* @param valWithSimple
* trueeg price = :price
* falseeg price = price + :price
* @param propertyName
* @param propertyValue
* @param valWithSimple
* trueeg price = :price
* falseeg price = price + :price
* @return
*/
private int updateByPropertiesMain(String[] conditionName, Object[] conditionValue,
String[] propertyName, Object[] propertyValue,boolean valWithSimple) {
String[] propertyName, Object[] propertyValue, boolean valWithSimple) {
if ((propertyName != null) && (propertyName.length > 0) && (propertyValue != null)
&& (propertyValue.length > 0) && (propertyName.length == propertyValue.length)
&& (conditionValue != null) && (conditionValue.length > 0)) {
@ -237,9 +244,9 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
sb.append("update " + persistentClass.getName() + " model set ");
for (int i = 0; i < propertyName.length; i++) {
if(valWithSimple) {
if (valWithSimple) {
sb.append(propertyName[i] + " = :p_" + propertyName[i] + ",");
}else{
} else {
sb.append(propertyName[i] + " = " + propertyName[i] + " + :p_" + propertyName[i] + ",");
}
}
@ -261,36 +268,36 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public int updateByProperties(String propertyName, Object propertyValue,DdlPackBean packBean) {
return updateByProperties(new String[] { propertyName }, new Object[] { propertyValue },packBean);
public int updateByProperties(String propertyName, Object propertyValue, DdlPackBean packBean) {
return updateByProperties(new String[]{propertyName}, new Object[]{propertyValue}, packBean);
}
@Override
public int updateByProperties(String[] propertyName, Object[] propertyValue,DdlPackBean packBean) {
return updateByPropertiesDdlPack(propertyName, propertyValue,packBean,true);
public int updateByProperties(String[] propertyName, Object[] propertyValue, DdlPackBean packBean) {
return updateByPropertiesDdlPack(propertyName, propertyValue, packBean, true);
}
@Override
public int updateByPropertiesWithVal(String propertyName, Object propertyValue,DdlPackBean packBean) {
return updateByPropertiesWithVal(new String[] { propertyName }, new Object[] { propertyValue },packBean);
public int updateByPropertiesWithVal(String propertyName, Object propertyValue, DdlPackBean packBean) {
return updateByPropertiesWithVal(new String[]{propertyName}, new Object[]{propertyValue}, packBean);
}
@Override
public int updateByPropertiesWithVal(String[] propertyName, Object[] propertyValue,DdlPackBean packBean) {
return updateByPropertiesDdlPack(propertyName, propertyValue,packBean,false);
public int updateByPropertiesWithVal(String[] propertyName, Object[] propertyValue, DdlPackBean packBean) {
return updateByPropertiesDdlPack(propertyName, propertyValue, packBean, false);
}
private int updateByPropertiesDdlPack(String[] propertyName, Object[] propertyValue,
DdlPackBean packBean,boolean valWithSimple) {
DdlPackBean packBean, boolean valWithSimple) {
if ((propertyName != null) && (propertyName.length > 0) && (propertyValue != null)
&& (propertyValue.length > 0) && (propertyName.length == propertyValue.length)) {
StringBuffer sb = new StringBuffer();
sb.append("update " + persistentClass.getName() + " model set ");
for (int i = 0; i < propertyName.length; i++) {
if(valWithSimple) {
if (valWithSimple) {
sb.append(propertyName[i] + " = :p_" + propertyName[i] + ",");
}else{
} else {
sb.append(propertyName[i] + " = " + propertyName[i] + " + :p_" + propertyName[i] + ",");
}
}
@ -304,7 +311,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
//查询条件
for (String key : packBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key));
query.setParameter("m_" + key, packBean.getHqlPreparedMap().get(key));
}
return query.executeUpdate();
@ -345,9 +352,9 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public T getById(long id) {
try{
return entityManager.find(persistentClass,id);
}catch (Exception e){
try {
return entityManager.find(persistentClass, id);
} catch (Exception e) {
return null;
}
}
@ -361,12 +368,12 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public List<T> listPager(Pager pager) {
if(pager.getTotalRows() > 0) {
if (pager.getTotalRows() > 0) {
return entityManager.createQuery("from " + persistentClass.getName())
.setFirstResult(pager.getStartRow())
.setMaxResults(pager.getPageSize())
.getResultList();
}else{
} else {
return new ArrayList<T>();
}
}
@ -379,16 +386,16 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public List<T> findByPage(DdlPackBean packBean, int offset, int pageSize) {
Query query = null;
String ddl = "from " + persistentClass.getName() + " where 1=1 " +packBean.getPackedHql();
String ddl = "from " + persistentClass.getName() + " where 1=1 " + packBean.getPackedHql();
if(packBean.isHql()){
if (packBean.isHql()) {
query = entityManager.createQuery(ddl);
}else{
} else {
query = entityManager.createNativeQuery(ddl);
}
for (String key : packBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key));
query.setParameter("m_" + key, packBean.getHqlPreparedMap().get(key));
}
return query.setFirstResult(offset)
@ -412,6 +419,37 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public List<Map<String,Object>> findByWasProperty(String[] propertyNames, Object[] values) {
if (propertyNames.length != values.length) {
throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length);
}
StringBuffer queryString = new StringBuffer();
queryString.append(" SELECT \n" +
" a.sn_status AS snStatus,\n" +
" a.wh_no AS whNo,\n" +
" a.locate_no AS locateNo,\n" +
" a.part_no AS partNo,\n" +
" a.part_name_rdd AS partNameRdd,\n" +
" a.lot_no AS lotNo,\n" +
" CAST(IFNULL(SUM(a.qty), 0) AS DOUBLE) AS qty \n" +
"FROM\n" +
" `wms_stock_sn` a ");
int size = propertyNames.length;
if (size > 0) {
queryString.append("where 1=1 and a.sn_status in ('"+ WmsEnumUtil.STOCK_SN_STATUS.PRE_INSTOCK.getValue()+"', '"+WmsEnumUtil.STOCK_SN_STATUS.INSTOCKED.getValue()+"','"+WmsEnumUtil.STOCK_SN_STATUS.PICKED.getValue()+"','"+WmsEnumUtil.STOCK_SN_STATUS.QUALITY_CONTROL.getValue()+"') ");
}
for (int i = 0; i < size; i++) {
if (values[i] != null) {
queryString.append(" and a." + StringCastUtils.upperCharToUnderLine(propertyNames[i]) + "= '" + values[i]+"'");
}
}
queryString.append(" group by a.lot_no,a.date_code");
return entityManager.createNativeQuery(queryString.toString()).unwrap(SQLQuery.class).setResultTransformer(
Transformers.ALIAS_TO_ENTITY_MAP).getResultList();
}
@Override
public List<T> findByProperty(String[] propertyNames, Object[] values) {
if(propertyNames.length != values.length){
throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length);
@ -570,6 +608,22 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public T findByVendorNoProperty(String vendorNoStr) {
List<T> list=null;
try {
if(!StringUtil.isEmpty(vendorNoStr)){
String queryString = "from " + persistentClass.getSimpleName() + " as model where model.vendorNo= :vendorNo";
list=entityManager.createQuery(queryString)
.setParameter("vendorNo", vendorNoStr)
.getResultList();
}
} catch (Exception e) {
e.printStackTrace();
}
return list!=null ? list.get(0): null;
}
@Override
public int findByPropertyCount(String[] propertyNames, Object[] values) {
if(propertyNames.length != values.length){
throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length);
@ -1529,4 +1583,6 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
return num;
}
}

@ -0,0 +1,33 @@
package cn.estsh.i3plus.pojo.base.util;
import org.springframework.cglib.beans.BeanMap;
import java.util.HashMap;
import java.util.Map;
public class BeanMapUtils {
/**
* map
*/
public static <T> Map<String, Object> beanToMap(T bean) {
Map<String, Object> map = new HashMap<>();
if (bean != null) {
BeanMap beanMap = BeanMap.create(bean);
for (Object key : beanMap.keySet()) {
map.put(key + "", beanMap.get(key));
}
}
return map;
}
/**
* map
*/
public static <T> T mapToBean(Map<String, Object> map, Class<T> clazz) throws Exception {
T bean = clazz.newInstance();
BeanMap beanMap = BeanMap.create(bean);
beanMap.putAll(map);
return bean;
}
}

@ -0,0 +1,36 @@
package cn.estsh.i3plus.pojo.base.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 线
*/
public class StringCastUtils {
public static String upperCharToUnderLine(String param) {
Pattern p= Pattern.compile("[A-Z]");
if(param==null ||param.equals("")){
return "";
}
StringBuilder builder=new StringBuilder(param);
Matcher mc=p.matcher(param);
int i=0;
while (mc.find()) {
System.out.println(builder.toString());
System.out.println("mc.start():" + mc.start() + ", i: " + i);
System.out.println("mc.end():" + mc.start() + ", i: " + i);
builder.replace(mc.start()+i, mc.end()+i, "_"+mc.group().toLowerCase());
i++;
}
if('_' == builder.charAt(0)){
builder.deleteCharAt(0);
}
System.out.println(builder.toString());
return builder.toString();
}
// public static void main(String[] args) {
// upperCharToUnderLine("snStatus");
// }
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.pojo.base.util;
public class StringUtil {
public static boolean isEmpty(Object obj){
if(obj ==null || obj.toString().trim().equals("")){
return true;
}
return false;
}
}

@ -55,8 +55,8 @@ public class MesDb extends BaseBean {
@ApiParam("密码")
private String dsPassword;
@Column(name="EQU_CODE")
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equCode;
private String equipmentCode;
}

@ -41,19 +41,40 @@ public class MesEquipment extends BaseBean {
@Column(name="STATUS")
@ApiParam("设备状态")
private String status;
private Integer status;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQUIPMENT_TYPE")
@ApiParam("设备类型")
private Integer equipmentType;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="EQUIPMENT_CATEGORY")
@ApiParam("设备类别")
private String equipmentCategory;
@Column(name="EQUIPMENT_MODEL")
@ApiParam("型号")
private String equipmentModel;
@Column(name="EQUIPMENT_SPEC")
@ApiParam("规格")
private String equipmentSpec;
@Column(name="EQUIPMENT_MAKER")
@ApiParam("制造商")
private String equipmentMaker;
@Column(name="RELEASE_DATE")
@ApiParam("出厂日期")
private String releaseDate;
@Column(name="RECEIVE_DATE")
@ApiParam("接收日期")
private String receiveDate;
@Column(name="ENABLE_DATE")
@ApiParam("启用日期")
private String enableDate;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
@Column(name="CONNECT_TYPE")
@ApiParam("连接类型")

@ -63,9 +63,9 @@ public class MesPlc extends BaseBean {
@ApiParam("分组名称")
private String groupName;
@Column(name = "EQU_CODE")
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equCode;
private String equipmentCode;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")

@ -34,6 +34,10 @@ public class MesProcessBom extends BaseBean {
@ApiParam("零件号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("产品物料名称")
private String partName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@ -54,6 +58,10 @@ public class MesProcessBom extends BaseBean {
@ApiParam("子零件")
private String itemPartNo;
@Column(name = "ITEM_PART_NAME")
@ApiParam("原材料物料名称")
private String itemPartName;
@Column(name = "QTY")
@ColumnDefault("0")
@ApiParam(value = "子零件数量", example = "0")

@ -34,8 +34,8 @@ public class MesWcEquipment extends BaseBean {
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQU_CODE")
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equCode;
private String equipmentCode;
}

@ -38,6 +38,9 @@ public class StationResultBean<T> implements Serializable {
@ApiParam("List结果集")
private List<T> resultList;
@ApiParam("结果对象")
private Object resultObj;
@ApiParam("Map结果集")
public Map<String, Object> resultMap;

@ -55,8 +55,8 @@ public class MesDb extends BaseBean {
@ApiParam("密码")
private String dsPassword;
@Column(name = "EQU_CODE")
@Column(name = "EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equCode;
private String equipmentCode;
}

@ -17,7 +17,7 @@ import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
@ -41,19 +41,39 @@ public class MesEquipment extends BaseBean {
@Column(name="STATUS")
@ApiParam("设备状态")
private String status;
private Integer status;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQUIPMENT_TYPE")
@ApiParam("设备类型")
private Integer equipmentType;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="EQUIPMENT_CATEGORY")
@ApiParam("设备类别")
private String equipmentCategory;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
@Column(name="EQUIPMENT_MODEL")
@ApiParam("型号")
private String equipmentModel;
@Column(name="EQUIPMENT_SPEC")
@ApiParam("规格")
private String equipmentSpec;
@Column(name="EQUIPMENT_MAKER")
@ApiParam("制造商")
private String equipmentMaker;
@Column(name="RELEASE_DATE")
@ApiParam("出厂日期")
private String releaseDate;
@Column(name="RECEIVE_DATE")
@ApiParam("接收日期")
private String receiveDate;
@Column(name="ENABLE_DATE")
@ApiParam("启用日期")
private String enableDate;
@Column(name="CONNECT_TYPE")
@ApiParam("连接类型")
@ -63,6 +83,18 @@ public class MesEquipment extends BaseBean {
@ApiParam(value ="名称")
private String name;
@Transient
@ApiParam(value ="生产线")
private String workCenterCode;
@Transient
@ApiParam(value ="工位")
private String workCellCode;
@Transient
@ApiParam(value ="区域")
private String areaCode;
// 默认值 -1
@Transient
@ApiParam(value ="父节点" , access ="父节点" ,example = "-1")

@ -36,6 +36,10 @@ public class MesProcessBom extends BaseBean {
@ApiParam("零件号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("产品物料名称")
private String partName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@ -57,6 +61,10 @@ public class MesProcessBom extends BaseBean {
@ApiParam("子零件")
private String itemPartNo;
@Column(name = "ITEM_PART_NAME")
@ApiParam("原材料物料名称")
private String itemPartName;
@Column(name = "QTY")
@ColumnDefault("0")
@ApiParam(value = "子零件数量", example = "0")

@ -35,8 +35,8 @@ public class MesWcEquipment extends BaseBean {
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQU_CODE")
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equCode;
private String equipmentCode;
}

@ -0,0 +1,72 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class MesEquipmentModel implements Serializable {
@ApiParam(value ="id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam("设备状态")
private Integer status;
@ApiParam(value ="生产线")
private String workCenterCode;
@ApiParam(value ="工位")
private String workCellCode;
@ApiParam(value ="区域")
private String areaCode;
@ApiParam(value ="设备工位关联ID")
private Long wcId;
@ApiParam(value ="设备代码&工位")
private String equipmentCodeAndworkCellCode;
public MesEquipmentModel() {
}
public MesEquipmentModel(Long wcId, Long id, String equipmentCode, String equipmentName, Integer status, String workCenterCode, String workCellCode, String areaCode) {
this.wcId = wcId;
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.status = status;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.areaCode = areaCode;
}
public MesEquipmentModel(Long wcId, Long id, String equipmentCode, String equipmentName, Integer status, String workCenterCode, String workCellCode) {
this.wcId = wcId;
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.status = status;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
}
public MesEquipmentModel(Long id, String equipmentCodeAndworkCellCode, String equipmentCode, String equipmentName, Integer status, String workCenterCode, String workCellCode) {
this.id = id;
this.equipmentCodeAndworkCellCode = equipmentCodeAndworkCellCode;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.status = status;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
}
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesWcEquipment;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-09
* @Modify:
**/
@Repository
public interface MesWcEquipmentRepository extends BaseRepository<MesWcEquipment, Long> {
}

@ -6,7 +6,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.MesEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.StringUtils;
/**
* @Description:
@ -32,16 +32,16 @@ public class MesHqlPack {
public static DdlPackBean getMesPcnByCondition(MesPcn mesPcn, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesPcn.getConnectIp())) {
if (!StringUtils.isEmpty(mesPcn.getConnectIp())) {
DdlPreparedPack.getStringLikerPack(mesPcn.getConnectIp(), "connectIp", packBean);
}
if (StringUtils.isNotEmpty(mesPcn.getPcnName())) {
if (!StringUtils.isEmpty(mesPcn.getPcnName())) {
DdlPreparedPack.getStringLikerPack(mesPcn.getPcnName(), "pcnName", packBean);
}
if (StringUtils.isNotEmpty(mesPcn.getPcnCode())) {
if (!StringUtils.isEmpty(mesPcn.getPcnCode())) {
DdlPreparedPack.getStringLikerPack(mesPcn.getPcnCode(), "pcnCode", packBean);
}
if (StringUtils.isNotEmpty(mesPcn.getAreaCode())) {
if (!StringUtils.isEmpty(mesPcn.getAreaCode())) {
DdlPreparedPack.getStringLikerPack(mesPcn.getAreaCode(), "areaCode", packBean);
}
if (mesPcn.getIsValid() != null) {
@ -62,23 +62,23 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
if (StringUtils.isNotEmpty(mesPlanOrder.getOrderNo())) {
if (!StringUtils.isEmpty(mesPlanOrder.getOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesPlanOrder.getOrderNo(), "orderNo", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getPartNo())) {
if (!StringUtils.isEmpty(mesPlanOrder.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesPlanOrder.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getPlanType() + "") && mesPlanOrder.getPlanTypeVal() != 0) {
if (!StringUtils.isEmpty(mesPlanOrder.getPlanType() + "") && mesPlanOrder.getPlanTypeVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesPlanOrder.getPlanType(), "planType", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getStatus() + "") && mesPlanOrder.getStatusVal() != 0) {
if (!StringUtils.isEmpty(mesPlanOrder.getStatus() + "") && mesPlanOrder.getStatusVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesPlanOrder.getStatus(), "status", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getCreateUser())) {
if (!StringUtils.isEmpty(mesPlanOrder.getCreateUser())) {
DdlPreparedPack.getStringLikerPack(mesPlanOrder.getCreateUser(), "createUser", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getCustOrderNo())) {
if (!StringUtils.isEmpty(mesPlanOrder.getCustOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesPlanOrder.getCustOrderNo(), "custOrderNo", packBean);
}
@ -114,19 +114,19 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
if (StringUtils.isNotEmpty(mesPart.getPartNo())) {
if (!StringUtils.isEmpty(mesPart.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getPartName())) {
if (!StringUtils.isEmpty(mesPart.getPartName())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartName(), "partName", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode1())) {
if (!StringUtils.isEmpty(mesPart.getCategoryCode1())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode1(), "categoryCode1", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode2())) {
if (!StringUtils.isEmpty(mesPart.getCategoryCode2())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode2(), "categoryCode2", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode3())) {
if (!StringUtils.isEmpty(mesPart.getCategoryCode3())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode3(), "categoryCode3", packBean);
}
@ -143,31 +143,31 @@ public class MesHqlPack {
*/
public static DdlPackBean getWorkOrderCondition(MesWorkOrder mesWorkOrder, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesWorkOrder.getOrderNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getOrderNo(), "orderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getPartNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkOrderStatus() + "") && mesWorkOrder.getWorkOrderStatusVal() != 0) {
if (!StringUtils.isEmpty(mesWorkOrder.getWorkOrderStatus() + "") && mesWorkOrder.getWorkOrderStatusVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getWorkOrderStatus(), "workOrderStatus", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkCenterCode())) {
if (!StringUtils.isEmpty(mesWorkOrder.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getWorkCenterCode(), "workCenterCode", packBean);
}
if (mesWorkOrder.getApprovalStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getApprovalStatus(), "approvalStatus", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkOrderType() + "") && mesWorkOrder.getWorkOrderTypeVal() != 0) {
if (!StringUtils.isEmpty(mesWorkOrder.getWorkOrderType() + "") && mesWorkOrder.getWorkOrderTypeVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getWorkOrderType(), "workOrderType", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getCustOrderNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getCustOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getCustOrderNo(), "custOrderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getPlanOrderNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getPlanOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getPlanOrderNo(), "planOrderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getCreateUser())) {
if (!StringUtils.isEmpty(mesWorkOrder.getCreateUser())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getCreateUser(), "createUser", packBean);
}
if (mesWorkOrder.getIsValid() != null) {
@ -200,15 +200,15 @@ public class MesHqlPack {
*/
public static DdlPackBean getQueueOrder(MesQueueOrder mesQueueOrder, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesQueueOrder.getCustFlagNoStart())) {
if (!StringUtils.isEmpty(mesQueueOrder.getCustFlagNoStart())) {
DdlPreparedPack.getStringBiggerPack(mesQueueOrder.getCustFlagNoStart(), "custFlagNo", packBean);
}
if (StringUtils.isNotEmpty(mesQueueOrder.getCustFlagNoEnd() + "")) {
if (!StringUtils.isEmpty(mesQueueOrder.getCustFlagNoEnd() + "")) {
DdlPreparedPack.getStringSmallerPack(mesQueueOrder.getCustFlagNoEnd(), "custFlagNo", packBean);
}
if (StringUtils.isNotEmpty(mesQueueOrder.getOrderNo() + "")) {
if (!StringUtils.isEmpty(mesQueueOrder.getOrderNo() + "")) {
DdlPreparedPack.getStringLikerPack(mesQueueOrder.getOrderNo(), "orderNo", packBean);
}
@ -253,7 +253,7 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesArea(MesArea mesArea, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesArea, organizeCode);
if (StringUtils.isNotEmpty(mesArea.getAreaCode())) {
if (!StringUtils.isEmpty(mesArea.getAreaCode())) {
DdlPreparedPack.getStringEqualPack(mesArea.getAreaCode(), "areaCode", packBean);
}
@ -281,13 +281,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesWorkCell(MesWorkCell mesWorkCell, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesWorkCell, organizeCode);
if (StringUtils.isNotEmpty(mesWorkCell.getWorkCenterCode())) {
if (!StringUtils.isEmpty(mesWorkCell.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(mesWorkCell.getAreaCode())) {
if (!StringUtils.isEmpty(mesWorkCell.getAreaCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getAreaCode(), "areaCode", packBean);
}
if (StringUtils.isNotEmpty(mesWorkCell.getWorkCellCode())) {
if (!StringUtils.isEmpty(mesWorkCell.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getWorkCellCode(), "workCellCode", packBean);
}
@ -295,24 +295,6 @@ public class MesHqlPack {
}
/**
* MES
*
* @param mesEquipment
* @return
*/
public static DdlPackBean getMesEquipment(MesEquipment mesEquipment, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEquipment, organizeCode);
if (StringUtils.isNotEmpty(mesEquipment.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(mesEquipment.getWorkCellCode(), "workCellCode", packBean);
}
if (StringUtils.isNotEmpty(mesEquipment.getEquipmentCode())) {
DdlPreparedPack.getStringEqualPack(mesEquipment.getEquipmentCode(), "equipmentCode", packBean);
}
return packBean;
}
/**
*
*
* @param mesRoute
@ -350,13 +332,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesShift(MesShift shift, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(shift, organizeCode);
if (StringUtils.isNotEmpty(shift.getShiftCode())) {
if (!StringUtils.isEmpty(shift.getShiftCode())) {
DdlPreparedPack.getStringLikerPack(shift.getShiftCode(), "shiftCode", packBean);
}
if (StringUtils.isNotEmpty(shift.getShiftName())) {
if (!StringUtils.isEmpty(shift.getShiftName())) {
DdlPreparedPack.getStringLikerPack(shift.getShiftName(), "shiftName", packBean);
}
if (StringUtils.isNotEmpty(shift.getWorkCenterCode())) {
if (!StringUtils.isEmpty(shift.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(shift.getWorkCenterCode(), "workCenterCode", packBean);
}
@ -373,10 +355,10 @@ public class MesHqlPack {
public static DdlPackBean getMesShiftGroup(MesShiftGroup shiftGroup, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(shiftGroup, organizeCode);
if (StringUtils.isNotEmpty(shiftGroup.getGroupCode())) {
if (!StringUtils.isEmpty(shiftGroup.getGroupCode())) {
DdlPreparedPack.getStringLikerPack(shiftGroup.getGroupCode(), "groupCode", packBean);
}
if (StringUtils.isNotEmpty(shiftGroup.getGroupName())) {
if (!StringUtils.isEmpty(shiftGroup.getGroupName())) {
DdlPreparedPack.getStringLikerPack(shiftGroup.getGroupName(), "groupName", packBean);
}
return packBean;
@ -390,10 +372,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesShiftRest(MesShiftRest shiftRest, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(shiftRest, organizeCode);
if (StringUtils.isNotEmpty(shiftRest.getWorkCenterCode())) {
if (!StringUtils.isEmpty(shiftRest.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(shiftRest.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(shiftRest.getShiftCode())) {
if (!StringUtils.isEmpty(shiftRest.getShiftCode())) {
DdlPreparedPack.getStringEqualPack(shiftRest.getShiftCode(), "shiftCode", packBean);
}
@ -408,10 +390,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesScrap(MesScrap mesScrap, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesScrap.getScrapCode())) {
if (!StringUtils.isEmpty(mesScrap.getScrapCode())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapCode(), "scrapCode", packBean);
}
if (StringUtils.isNotEmpty(mesScrap.getScrapName())) {
if (!StringUtils.isEmpty(mesScrap.getScrapName())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapName(), "scrapName", packBean);
}
if (mesScrap.getIsValid() != null) {
@ -446,10 +428,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesConfig(MesConfig mesConfig, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesConfig.getCfgCode())) {
if (!StringUtils.isEmpty(mesConfig.getCfgCode())) {
DdlPreparedPack.getStringLikerPack(mesConfig.getCfgCode(), "cfgCode", packBean);
}
if (StringUtils.isNotEmpty(mesConfig.getCfgName())) {
if (!StringUtils.isEmpty(mesConfig.getCfgName())) {
DdlPreparedPack.getStringLikerPack(mesConfig.getCfgName(), "cfgName", packBean);
}
if (mesConfig.getIsValid() != null) {
@ -466,10 +448,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesRepair(MesRepair mesRepair, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesRepair.getRepairCode())) {
if (!StringUtils.isEmpty(mesRepair.getRepairCode())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairCode(), "repairCode", packBean);
}
if (StringUtils.isNotEmpty(mesRepair.getRepairName())) {
if (!StringUtils.isEmpty(mesRepair.getRepairName())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairName(), "repairName", packBean);
}
if (mesRepair.getRepairType() != null) {
@ -503,10 +485,10 @@ public class MesHqlPack {
public static DdlPackBean getMesESOP(MesESOP mesESOP, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesESOP, organizeCode);
if (StringUtils.isNotEmpty(mesESOP.getWorkCenterCode())) {
if (!StringUtils.isEmpty(mesESOP.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesESOP.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(mesESOP.getPartNo())) {
if (!StringUtils.isEmpty(mesESOP.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesESOP.getPartNo(), "partNo", packBean);
}
@ -639,13 +621,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesEventAction(MesEventAction mesEventAction, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEventAction, organizeCode);
if (StringUtils.isNotEmpty(mesEventAction.getOrganizeCode())) {
if (!StringUtils.isEmpty(mesEventAction.getOrganizeCode())) {
DdlPreparedPack.getStringEqualPack(mesEventAction.getOrganizeCode(), "organizeCode", packBean);
}
if (StringUtils.isNotEmpty(mesEventAction.getEventCode())) {
if (!StringUtils.isEmpty(mesEventAction.getEventCode())) {
DdlPreparedPack.getStringLikerPack(mesEventAction.getEventCode(), "eventCode", packBean);
}
if (StringUtils.isNotEmpty(mesEventAction.getActionCode())) {
if (!StringUtils.isEmpty(mesEventAction.getActionCode())) {
DdlPreparedPack.getStringLikerPack(mesEventAction.getActionCode(), "actionCode", packBean);
}
@ -661,10 +643,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesProcess(MesProcess process, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(process, organizeCode);
if (StringUtils.isNotEmpty(process.getProcessCode())) {
if (!StringUtils.isEmpty(process.getProcessCode())) {
DdlPreparedPack.getStringLikerPack(process.getProcessCode(), "processCode", packBean);
}
if (StringUtils.isNotEmpty(process.getProcessName())) {
if (!StringUtils.isEmpty(process.getProcessName())) {
DdlPreparedPack.getStringLikerPack(process.getProcessName(), "processName", packBean);
}
@ -679,13 +661,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesStep(MesStep step, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(step, organizeCode);
if (StringUtils.isNotEmpty(step.getStepCode())) {
if (!StringUtils.isEmpty(step.getStepCode())) {
DdlPreparedPack.getStringLikerPack(step.getStepCode(), "stepCode", packBean);
}
if (StringUtils.isNotEmpty(step.getStepName())) {
if (!StringUtils.isEmpty(step.getStepName())) {
DdlPreparedPack.getStringLikerPack(step.getStepName(), "stepName", packBean);
}
if (StringUtils.isNotEmpty(step.getStepType())) {
if (!StringUtils.isEmpty(step.getStepType())) {
DdlPreparedPack.getStringLikerPack(step.getStepType(), "stepType", packBean);
}
@ -700,13 +682,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesStepParam(MesStepParam stepParam, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(stepParam, organizeCode);
if (StringUtils.isNotEmpty(stepParam.getStepCode())) {
if (!StringUtils.isEmpty(stepParam.getStepCode())) {
DdlPreparedPack.getStringEqualPack(stepParam.getStepCode(), "stepCode", packBean);
}
if (StringUtils.isNotEmpty(stepParam.getParamCode())) {
if (!StringUtils.isEmpty(stepParam.getParamCode())) {
DdlPreparedPack.getStringLikerPack(stepParam.getParamCode(), "paramCode", packBean);
}
if (StringUtils.isNotEmpty(stepParam.getParamName())) {
if (!StringUtils.isEmpty(stepParam.getParamName())) {
DdlPreparedPack.getStringLikerPack(stepParam.getParamName(), "paramName", packBean);
}
@ -721,16 +703,16 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesRouteProcessCell(MesRouteProcessCell routeProcessCell, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(routeProcessCell, organizeCode);
if (StringUtils.isNotEmpty(routeProcessCell.getRouteCode())) {
if (!StringUtils.isEmpty(routeProcessCell.getRouteCode())) {
DdlPreparedPack.getStringEqualPack(routeProcessCell.getRouteCode(), "routeCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getProcessCode())) {
if (!StringUtils.isEmpty(routeProcessCell.getProcessCode())) {
DdlPreparedPack.getStringEqualPack(routeProcessCell.getProcessCode(), "processCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getWorkCellCode())) {
if (!StringUtils.isEmpty(routeProcessCell.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(routeProcessCell.getWorkCellCode(), "workCellCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getWorkCenterCode())) {
if (!StringUtils.isEmpty(routeProcessCell.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(routeProcessCell.getWorkCenterCode(), "workCenterCode", packBean);
}
@ -745,13 +727,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesBom(MesBom bom, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(bom, organizeCode);
if (StringUtils.isNotEmpty(bom.getPartNo())) {
if (!StringUtils.isEmpty(bom.getPartNo())) {
DdlPreparedPack.getStringLikerPack(bom.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(bom.getItemPartNo())) {
if (!StringUtils.isEmpty(bom.getItemPartNo())) {
DdlPreparedPack.getStringLikerPack(bom.getItemPartNo(), "itemPartNo", packBean);
}
if (StringUtils.isNotEmpty(bom.getBomVersion())) {
if (!StringUtils.isEmpty(bom.getBomVersion())) {
DdlPreparedPack.getStringLikerPack(bom.getBomVersion(), "bomVersion", packBean);
}
@ -791,10 +773,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesCustomer(MesCustomer customer, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(customer, organizeCode);
if (StringUtils.isNotEmpty(customer.getCustomerCode())) {
if (!StringUtils.isEmpty(customer.getCustomerCode())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerCode(), "customerCode", packBean);
}
if (StringUtils.isNotEmpty(customer.getCustomerName())) {
if (!StringUtils.isEmpty(customer.getCustomerName())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerName(), "customerName", packBean);
}
@ -809,10 +791,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesCustProdLine(MesCustProdLine custProdLine, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(custProdLine, organizeCode);
if (StringUtils.isNotEmpty(custProdLine.getCustProdLineCode())) {
if (!StringUtils.isEmpty(custProdLine.getCustProdLineCode())) {
DdlPreparedPack.getStringLikerPack(custProdLine.getCustProdLineCode(), "custProdLineCode", packBean);
}
if (StringUtils.isNotEmpty(custProdLine.getCustProdLineName())) {
if (!StringUtils.isEmpty(custProdLine.getCustProdLineName())) {
DdlPreparedPack.getStringLikerPack(custProdLine.getCustProdLineName(), "custProdLineName", packBean);
}
@ -827,13 +809,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesCustomerPart(MesCustomerPart customerPart, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(customerPart, organizeCode);
if (StringUtils.isNotEmpty(customerPart.getCustomerCode())) {
if (!StringUtils.isEmpty(customerPart.getCustomerCode())) {
DdlPreparedPack.getStringEqualPack(customerPart.getCustomerCode(), "customerCode", packBean);
}
if (StringUtils.isNotEmpty(customerPart.getPartNo())) {
if (!StringUtils.isEmpty(customerPart.getPartNo())) {
DdlPreparedPack.getStringLikerPack(customerPart.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(customerPart.getCustomerPartNo())) {
if (!StringUtils.isEmpty(customerPart.getCustomerPartNo())) {
DdlPreparedPack.getStringLikerPack(customerPart.getCustomerPartNo(), "customerPartNo", packBean);
}
@ -874,10 +856,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesProdCfgType(MesProdCfgType prodCfgType, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(prodCfgType, organizeCode);
if (StringUtils.isNotEmpty(prodCfgType.getProdCfgTypeCode())) {
if (!StringUtils.isEmpty(prodCfgType.getProdCfgTypeCode())) {
DdlPreparedPack.getStringLikerPack(prodCfgType.getProdCfgTypeCode(), "prodCfgTypeCode", packBean);
}
if (StringUtils.isNotEmpty(prodCfgType.getProdCfgTypeName())) {
if (!StringUtils.isEmpty(prodCfgType.getProdCfgTypeName())) {
DdlPreparedPack.getStringLikerPack(prodCfgType.getProdCfgTypeName(), "prodCfgTypeName", packBean);
}
@ -902,13 +884,13 @@ public class MesHqlPack {
public static DdlPackBean getMesProdCfg(MesProdCfg prodCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(prodCfg, organizeCode);
if (StringUtils.isNotEmpty(prodCfg.getProdCfgCode())) {
if (!StringUtils.isEmpty(prodCfg.getProdCfgCode())) {
DdlPreparedPack.getStringLikerPack(prodCfg.getProdCfgCode(), "prodCfgCode", packBean);
}
if (StringUtils.isNotEmpty(prodCfg.getProdCfgName())) {
if (!StringUtils.isEmpty(prodCfg.getProdCfgName())) {
DdlPreparedPack.getStringLikerPack(prodCfg.getProdCfgName(), "prodCfgName", packBean);
}
if (StringUtils.isNotEmpty(prodCfg.getProdCfgTypeCode())) {
if (!StringUtils.isEmpty(prodCfg.getProdCfgTypeCode())) {
DdlPreparedPack.getStringEqualPack(prodCfg.getProdCfgTypeCode(), "prodCfgTypeCode", packBean);
}
@ -923,10 +905,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesProdCfgDetail(MesProdCfgDetail prodCfgDetail, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(prodCfgDetail, organizeCode);
if (StringUtils.isNotEmpty(prodCfgDetail.getProdCfgCode())) {
if (!StringUtils.isEmpty(prodCfgDetail.getProdCfgCode())) {
DdlPreparedPack.getStringEqualPack(prodCfgDetail.getProdCfgCode(), "prodCfgCode", packBean);
}
if (StringUtils.isNotEmpty(prodCfgDetail.getPartNo())) {
if (!StringUtils.isEmpty(prodCfgDetail.getPartNo())) {
DdlPreparedPack.getStringLikerPack(prodCfgDetail.getPartNo(), "partNo", packBean);
}
@ -941,19 +923,19 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPart(MesPart part, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(part, organizeCode);
if (StringUtils.isNotEmpty(part.getPartNo())) {
if (!StringUtils.isEmpty(part.getPartNo())) {
DdlPreparedPack.getStringLikerPack(part.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(part.getPartName())) {
if (!StringUtils.isEmpty(part.getPartName())) {
DdlPreparedPack.getStringLikerPack(part.getPartName(), "partName", packBean);
}
if (StringUtils.isNotEmpty(part.getCategoryCode1())) {
if (!StringUtils.isEmpty(part.getCategoryCode1())) {
DdlPreparedPack.getStringEqualPack(part.getCategoryCode1(), "categoryCode1", packBean);
}
if (StringUtils.isNotEmpty(part.getCategoryCode2())) {
if (!StringUtils.isEmpty(part.getCategoryCode2())) {
DdlPreparedPack.getStringEqualPack(part.getCategoryCode2(), "categoryCode2", packBean);
}
if (StringUtils.isNotEmpty(part.getCategoryCode3())) {
if (!StringUtils.isEmpty(part.getCategoryCode3())) {
DdlPreparedPack.getStringEqualPack(part.getCategoryCode3(), "categoryCode3", packBean);
}
@ -968,10 +950,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPartCategory(MesPartCategory partCategory, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(partCategory, organizeCode);
if (StringUtils.isNotEmpty(partCategory.getCategoryCode())) {
if (!StringUtils.isEmpty(partCategory.getCategoryCode())) {
DdlPreparedPack.getStringLikerPack(partCategory.getCategoryCode(), "categoryCode", packBean);
}
if (StringUtils.isNotEmpty(partCategory.getCategoryName())) {
if (!StringUtils.isEmpty(partCategory.getCategoryName())) {
DdlPreparedPack.getStringLikerPack(partCategory.getCategoryName(), "categoryName", packBean);
}
@ -986,13 +968,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPackSpec(MesPackSpec packSpec, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(packSpec, organizeCode);
if (StringUtils.isNotEmpty(packSpec.getSpecCode())) {
if (!StringUtils.isEmpty(packSpec.getSpecCode())) {
DdlPreparedPack.getStringLikerPack(packSpec.getSpecCode(), "specCode", packBean);
}
if (StringUtils.isNotEmpty(packSpec.getSpecName())) {
if (!StringUtils.isEmpty(packSpec.getSpecName())) {
DdlPreparedPack.getStringLikerPack(packSpec.getSpecName(), "specName", packBean);
}
if (StringUtils.isNotEmpty(packSpec.getParentSpec())) {
if (!StringUtils.isEmpty(packSpec.getParentSpec())) {
DdlPreparedPack.getStringEqualPack(packSpec.getParentSpec(), "parentSpec", packBean);
}
@ -1007,10 +989,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesProduceCategory(MesProduceCategory produceCategory, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(produceCategory, organizeCode);
if (StringUtils.isNotEmpty(produceCategory.getProduceCategoryCode())) {
if (!StringUtils.isEmpty(produceCategory.getProduceCategoryCode())) {
DdlPreparedPack.getStringLikerPack(produceCategory.getProduceCategoryCode(), "produceCategoryCode", packBean);
}
if (StringUtils.isNotEmpty(produceCategory.getProduceCategoryName())) {
if (!StringUtils.isEmpty(produceCategory.getProduceCategoryName())) {
DdlPreparedPack.getStringLikerPack(produceCategory.getProduceCategoryName(), "produceCategoryName", packBean);
}
@ -1025,7 +1007,7 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesKpsnRule(MesKpsnRule kpsnRule, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(kpsnRule, organizeCode);
if (StringUtils.isNotEmpty(kpsnRule.getPartNo())) {
if (!StringUtils.isEmpty(kpsnRule.getPartNo())) {
DdlPreparedPack.getStringLikerPack(kpsnRule.getPartNo(), "partNo", packBean);
}
@ -1040,10 +1022,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPartScheduleBom(MesPartScheduleBom partScheduleBom, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(partScheduleBom, organizeCode);
if (StringUtils.isNotEmpty(partScheduleBom.getPartNo())) {
if (!StringUtils.isEmpty(partScheduleBom.getPartNo())) {
DdlPreparedPack.getStringLikerPack(partScheduleBom.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(partScheduleBom.getItemPartNo())) {
if (!StringUtils.isEmpty(partScheduleBom.getItemPartNo())) {
DdlPreparedPack.getStringLikerPack(partScheduleBom.getItemPartNo(), "itemPartNo", packBean);
}
@ -1058,10 +1040,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesObjectDao(MesObjectDao objectDao, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(objectDao, organizeCode);
if (StringUtils.isNotEmpty(objectDao.getObjectCode())) {
if (!StringUtils.isEmpty(objectDao.getObjectCode())) {
DdlPreparedPack.getStringLikerPack(objectDao.getObjectCode(), "objectCode", packBean);
}
if (StringUtils.isNotEmpty(objectDao.getDaoClass())) {
if (!StringUtils.isEmpty(objectDao.getDaoClass())) {
DdlPreparedPack.getStringLikerPack(objectDao.getDaoClass(), "daoClass", packBean);
}
@ -1076,10 +1058,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPcnSyncCfg(MesPcnSyncCfg pcnSyncCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(pcnSyncCfg, organizeCode);
if (StringUtils.isNotEmpty(pcnSyncCfg.getObjectCode())) {
if (!StringUtils.isEmpty(pcnSyncCfg.getObjectCode())) {
DdlPreparedPack.getStringLikerPack(pcnSyncCfg.getObjectCode(), "objectCode", packBean);
}
if (StringUtils.isNotEmpty(pcnSyncCfg.getPcnCode())) {
if (!StringUtils.isEmpty(pcnSyncCfg.getPcnCode())) {
DdlPreparedPack.getStringLikerPack(pcnSyncCfg.getPcnCode(), "pcnCode", packBean);
}
if (null != pcnSyncCfg.getSyncType()) {
@ -1097,10 +1079,10 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesWorkCellParamCfg(MesWorkCellParamCfg workCellParamCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(workCellParamCfg, organizeCode);
if (StringUtils.isNotEmpty(workCellParamCfg.getWorkCellCode())) {
if (!StringUtils.isEmpty(workCellParamCfg.getWorkCellCode())) {
DdlPreparedPack.getStringLikerPack(workCellParamCfg.getWorkCellCode(), "workCellCode", packBean);
}
if (StringUtils.isNotEmpty(workCellParamCfg.getParamCode())) {
if (!StringUtils.isEmpty(workCellParamCfg.getParamCode())) {
DdlPreparedPack.getStringLikerPack(workCellParamCfg.getParamCode(), "paramCode", packBean);
}
@ -1115,7 +1097,7 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesWorkCellParam(MesWorkCellParam workCellParam, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(workCellParam, organizeCode);
if (StringUtils.isNotEmpty(workCellParam.getParamCode())) {
if (!StringUtils.isEmpty(workCellParam.getParamCode())) {
DdlPreparedPack.getStringLikerPack(workCellParam.getParamCode(), "paramCode", packBean);
}
if (null != workCellParam.getParamType()) {
@ -1136,7 +1118,7 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesWorkCellPoint(MesWorkCellPoint workCellPoint, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(workCellPoint, organizeCode);
if (StringUtils.isNotEmpty(workCellPoint.getWorkCellCode())) {
if (!StringUtils.isEmpty(workCellPoint.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(workCellPoint.getWorkCellCode(), "workCellCode", packBean);
}
return packBean;
@ -1150,13 +1132,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesPLCConfigure(MesPLCConfigure plcConfigure, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(plcConfigure, organizeCode);
if (StringUtils.isNotEmpty(plcConfigure.getAreaCode())) {
if (!StringUtils.isEmpty(plcConfigure.getAreaCode())) {
DdlPreparedPack.getStringEqualPack(plcConfigure.getAreaCode(), "areaCode", packBean);
}
if (StringUtils.isNotEmpty(plcConfigure.getWorkCenterCode())) {
if (!StringUtils.isEmpty(plcConfigure.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(plcConfigure.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(plcConfigure.getWorkCellCode())) {
if (!StringUtils.isEmpty(plcConfigure.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(plcConfigure.getWorkCellCode(), "workCellCode", packBean);
}
return packBean;
@ -1172,13 +1154,13 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesNumberRule(MesNumberRule numberRule, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(numberRule, organizeCode);
if (StringUtils.isNotEmpty(numberRule.getRuleCode())) {
if (!StringUtils.isEmpty(numberRule.getRuleCode())) {
DdlPreparedPack.getStringLikerPack(numberRule.getRuleCode(), "ruleCode", packBean);
}
if (StringUtils.isNotEmpty(numberRule.getNumberRule())) {
if (!StringUtils.isEmpty(numberRule.getNumberRule())) {
DdlPreparedPack.getStringLikerPack(numberRule.getNumberRule(), "numberRule", packBean);
}
if (StringUtils.isNotEmpty(numberRule.getPrefix())) {
if (!StringUtils.isEmpty(numberRule.getPrefix())) {
DdlPreparedPack.getNumEqualPack(numberRule.getPrefix(), "prefix", packBean);
}
if (null != numberRule.getIsCycle()) {
@ -1244,7 +1226,7 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesButtonStatus(MesButtonStatus buttonStatus, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(buttonStatus, organizeCode);
if (StringUtils.isNotEmpty(buttonStatus.getButtonCode())) {
if (!StringUtils.isEmpty(buttonStatus.getButtonCode())) {
DdlPreparedPack.getStringLikerPack(buttonStatus.getButtonCode(), "buttonCode", packBean);
}
packBean.setOrderByStr(buttonStatus.orderBy());
@ -1260,10 +1242,10 @@ public class MesHqlPack {
public static DdlPackBean getApprovalData(MesWorkOrder mesWorkOrder, String organizeCode) {
DdlPackBean packBean = MesHqlPack.getAllBaseData(organizeCode);
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getWorkCenterCode(), "workCenterCode", packBean);
if (!org.springframework.util.StringUtils.isEmpty(mesWorkOrder.getOrderNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getOrderNo())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getOrderNo(), "orderNo", packBean);
}
if (!org.springframework.util.StringUtils.isEmpty(mesWorkOrder.getPartNo())) {
if (!StringUtils.isEmpty(mesWorkOrder.getPartNo())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getPartNo(), "partNo", packBean);
}
DdlPreparedPack.getNumEqualPack(MesEnumUtil.WORK_ORDER_APPROVAL_STATUS.WAIT_APPROVAL.getValue(), "approvalStatus", packBean);
@ -1271,4 +1253,5 @@ public class MesHqlPack {
DdlPreparedPack.getOrderByPack(new String[]{String.valueOf(CommonEnumUtil.ASC_OR_DESC.ASC.getValue())}, new String[]{"startTime", "shiftCode"}, packBean);
return packBean;
}
}

@ -0,0 +1,23 @@
package cn.estsh.i3plus.pojo.model.platform;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.platform.bean.SysLabelTemplate;
import lombok.Data;
import java.io.Serializable;
/**
* @Description : model
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-09 14:15
* @Modify:
**/
@Data
public class LabelTemplatePagerModel implements Serializable {
private static final long serialVersionUID = 8331125246534692455L;
private SysLabelTemplate labelTemplate;
private Pager pager;
}

@ -5,7 +5,6 @@ import cn.estsh.i3plus.pojo.softswitch.bean.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.Serializable;

@ -17,14 +17,18 @@ public class SuitParamModel {
/* 标签名称 */
private String tagName;
/* 标签 id 属性值 */
/* 标签 Class Path */
private String classPath;
/* 标签 调用的方法名称 */
private String methodName;
/* 标签 id 属性值 */
private String id;
/* 标签 name 属性值 */
private String name;
/* 标签唯一标识 */
private String pathKey;
/* 标签内容 */
private String value;
private String vaule;
/* 标签类型 Default:PARAM_VALUE_TYPE.STRING */
private Integer type; // BlockSoftSwitchEnumUtil.PARAM_VALUE_TYPE

@ -7,9 +7,11 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Type;
import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
@ -37,6 +39,16 @@ public class SysLabelTemplate extends BaseBean {
@ApiParam(value ="模板名称")
private String templateName;
//枚举 CommonEnumUtil.SOFT_TYPE
@Column(name="TEMPLATE_SOFT_TYPE")
@ApiParam(value ="模板所属模块")
private Integer templateSoftType;
//枚举 CommonEnumUtil.SOFT_TYPE
@Column(name="TEMPLATE_GROUP_ID")
@ApiParam(value ="模板分组")
private Integer templateGroupId;
@Lob
@Column(name="TEMPLATE_CONTENT")
@ApiParam(value ="模板内容")

@ -65,5 +65,5 @@ public class SysLocaleResource extends BaseBean {
//系统自带需要有初始化表只能修改value无法删除。
@Column(name="is_system")
@ApiParam(value = "是否系统参数",example = "2")
private Integer isSystem = 2;
private Integer isSystem;
}

@ -4,11 +4,32 @@ import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.platform.bean.*;
import cn.estsh.i3plus.pojo.platform.bean.SysBarcodeRule;
import cn.estsh.i3plus.pojo.platform.bean.SysConfig;
import cn.estsh.i3plus.pojo.platform.bean.SysDepartment;
import cn.estsh.i3plus.pojo.platform.bean.SysDictionary;
import cn.estsh.i3plus.pojo.platform.bean.SysFile;
import cn.estsh.i3plus.pojo.platform.bean.SysLabelTemplate;
import cn.estsh.i3plus.pojo.platform.bean.SysLabelTemplateParam;
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleLanguage;
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleResource;
import cn.estsh.i3plus.pojo.platform.bean.SysMenu;
import cn.estsh.i3plus.pojo.platform.bean.SysMessage;
import cn.estsh.i3plus.pojo.platform.bean.SysOrderNoRule;
import cn.estsh.i3plus.pojo.platform.bean.SysOrganize;
import cn.estsh.i3plus.pojo.platform.bean.SysPosition;
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserDepartment;
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserMessage;
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserRole;
import cn.estsh.i3plus.pojo.platform.bean.SysRole;
import cn.estsh.i3plus.pojo.platform.bean.SysTask;
import cn.estsh.i3plus.pojo.platform.bean.SysTaskCycle;
import cn.estsh.i3plus.pojo.platform.bean.SysTaskPlan;
import cn.estsh.i3plus.pojo.platform.bean.SysTool;
import cn.estsh.i3plus.pojo.platform.bean.SysToolType;
import cn.estsh.i3plus.pojo.platform.bean.SysUser;
import cn.estsh.i3plus.pojo.platform.bean.SysUserInfo;
import org.apache.commons.lang3.StringUtils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -849,17 +870,19 @@ public class CoreHqlPack {
* @param sysLabelTemplate
* @return
*/
public static String packHqlSysLabelTemplate(SysLabelTemplate sysLabelTemplate) {
StringBuffer result = new StringBuffer();
public static DdlPackBean packHqlSysLabelTemplate(SysLabelTemplate sysLabelTemplate) {
DdlPackBean ddlPackBean = new DdlPackBean();
// hql拼接
HqlPack.getStringLikerPack(sysLabelTemplate.getTemplateName(),"templateName",result);
HqlPack.getStringEqualPack(sysLabelTemplate.getTemplateCode(),"templateCode",result);
DdlPreparedPack.getStringLikerPack(sysLabelTemplate.getTemplateName(), "templateName", ddlPackBean);
DdlPreparedPack.getStringEqualPack(sysLabelTemplate.getTemplateCode(), "templateCode", ddlPackBean);
DdlPreparedPack.getNumEqualPack(sysLabelTemplate.getTemplateGroupId(), "templateGroupId", ddlPackBean);
DdlPreparedPack.getNumEqualPack(sysLabelTemplate.getTemplateSoftType(), "templateSoftType", ddlPackBean);
// 添加默认排序
HqlPack.getOrderDefault(sysLabelTemplate);
ddlPackBean.setOrderByStr(sysLabelTemplate.orderBy());
return result.toString();
return ddlPackBean;
}
public static DdlPackBean packBeanSysLabelTemplate(SysLabelTemplate sysLabelTemplate) {

@ -69,6 +69,10 @@ public class BsSuitSchedule extends BaseBean {
@ApiParam(value = "任务周期表达式表达式")
private String taskCycleExecuteRdd;
@Column(name = "SUIT_PARAM")
@ApiParam(value = "适配参数")
private String suitParam;
@Column(name = "LAST_EXECUTE_DATE_TIME")
@ApiParam(value = "最后一次执行时间")
private String lastExecuteDateTime;

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -46,6 +48,7 @@ public class WmsPartRelation extends BaseBean {
@Column(name = "ASSOCIATE_TYPE")
@ApiParam(value = "关联类型")
@AnnoOutputColumn(refClass = WmsEnumUtil.PART_ASSOCIATE_TYPE.class, refForeignKey = "value", value = "description")
private Integer associateType;
}

@ -56,5 +56,9 @@ public class WmsProductReturnMovement implements Serializable{
@AnnoOutputColumn
private String planTime;
@ApiParam("移动类型")
@AnnoOutputColumn
public Integer moveType;
}

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -70,6 +72,7 @@ public class WmsSnOperateRecord extends BaseBean {
@Column(name = "OPERATE_TYPE")
@ApiParam(value = "操作类型")
@AnnoOutputColumn(refClass = WmsEnumUtil.SN_OPERATE_TYPE.class, refForeignKey = "value", value = "description")
private Integer operateType;
}

@ -244,6 +244,18 @@ public class WmsStockSn extends BaseBean {
private String snapshotTime;
@Transient
@ApiParam(value = "模板编号")
private String templateNo;
@Transient
@ApiParam(value = "客户物料号")
private String customerPartNo;
@Transient
@ApiParam(value = "箱号")
private String boxNo;
@Transient
private Integer isSnapshot;
public WmsStockSn() {
@ -286,4 +298,15 @@ public class WmsStockSn extends BaseBean {
this.isDeleted = isDeleted;
this.isValid = isValid;
}
public WmsStockSn(Integer snStatus,String whNo,String locateNo,String partNo,String partNameRdd,String lotNo,Double qty){
this.snStatus=snStatus;
this.whNo = whNo;
this.locateNo = locateNo;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.lotNo = lotNo;
this.qty = qty;
}
}

@ -0,0 +1,18 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.BasVendor;
import cn.estsh.i3plus.pojo.wms.bean.WmsZones;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : libiwei
* @CreateDate : 2018-11-06 13:40
* @Modify:
**/
@Repository
public interface WmsBasVendorRepository extends BaseRepository<BasVendor,Long> {
}

@ -2426,7 +2426,7 @@ public class WmsHqlPack {
}
/**
*
*
*
* @param wmsPrinterConfigure
* @return
@ -2441,4 +2441,22 @@ public class WmsHqlPack {
return result;
}
/**
*
*
* @param wmsPrintingQueue
* @return
*/
public static DdlPackBean packHqlwmsPrintingQueueByPrintNo(WmsPrintingQueue wmsPrintingQueue) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringLikerPack(wmsPrintingQueue.getPrintNo(), "printNo", result);
DdlPreparedPack.getNumEqualPack(WmsEnumUtil.ETC_PRINT_STATUS.NOT_HIT.getValue(), "printStatus", result);
DdlPreparedPack.getNumEqualPack(WmsEnumUtil.PRINT_TYPE.SN.getValue(), "printType", result);
getStringBuilderPack(wmsPrintingQueue, result);
return result;
}
}

Loading…
Cancel
Save