Merge remote-tracking branch 'origin/dev' into dev

yun-zuoyi
1111 6 years ago
commit f0290a758d

@ -28,4 +28,5 @@ public @interface FieldAnnotation {
Class<?> multiEnumClass() default Object.class; // 多选枚举的类型。
String typeName() default ""; // 定义字段类型的简单名称,对于多选关联对象时有用。
String relation() default ""; // 关联字段标识
boolean notEmpty() default false; // 是否不允许为空
}

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
@ -26,25 +27,31 @@ import javax.persistence.Table;
public class AssistResourceSetTime extends BaseAPS {
@Column(name="RES_CODE")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCode;
@Column(name="TYPE")
@ApiParam(value ="副资源使用类型")
@FieldAnnotation(defaultValue = "FIRST_ASS")
private ApsEnumUtil.USE_TYPE type;
@Column(name="PREV_RESOURCE")
@ApiParam(value ="前资源编码")
@ApiParam(value ="前资源")
@FieldAnnotation(notEmpty = true)
private String prevResource;
@Column(name="POST_RESOURCE")
@ApiParam(value ="后资源编码")
@ApiParam(value ="后资源")
@FieldAnnotation(notEmpty = true)
private String postResource;
@Column(name="TIME")
@ApiParam(value ="设置时间")
@FieldAnnotation(notEmpty = true)
private String time;
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
@FieldAnnotation(defaultValue = "10")
private int priority;
}

@ -31,11 +31,12 @@ public class BaseOrder extends BaseCode {
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(relation = "Material")
@FieldAnnotation(relation = "Material", notEmpty = true)
private Long materialId;
@Column(name="COUNT")
@ApiParam(value ="数量")
@FieldAnnotation(notEmpty = true)
private Double count;
@Column(name="PRIORITY")
@ -45,6 +46,7 @@ public class BaseOrder extends BaseCode {
@Column(name="LET")
@ApiParam(value ="最晚结束时刻")
@FieldAnnotation(notEmpty = true)
private Date let;
@Column(name="CALC_EST")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
@ -26,14 +27,17 @@ import javax.persistence.Table;
public class DataLink extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")
@FieldAnnotation(notEmpty = true)
private String code;
@Column(name="TYPE")
@ApiParam(value ="链接类型")
@FieldAnnotation(defaultValue = "CSV")
private ApsEnumUtil.DATA_LINK_TYPE type;
@Column(name="PATH")
@ApiParam(value ="IP/文件路径")
@FieldAnnotation(notEmpty = true)
private String path;
@Column(name="PORT")

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -22,12 +24,9 @@ import javax.persistence.Table;
@Entity
@Table(name = "APS_DAY_SHIFT")
@Api("班次")
public class DayShift extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")
private String code;
public class DayShift extends BaseCode {
@Column(name="WORK_TIMES")
@ApiParam(value ="工作时间")
@FieldAnnotation(notEmpty = true)
private String workTimes;
}

@ -27,6 +27,7 @@ import javax.persistence.Table;
public class DynamicSetTime extends BaseAPS {
@Column(name="RES_CODE")
@ApiParam(value ="资源代码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCode;
@Column(name="TYPE")

@ -26,13 +26,6 @@ import javax.persistence.Table;
@Table(name = "APS_EXPORT_DETAIL")
@Api("数据导出明细")
public class ExportDetail extends BaseAPS {
@Column(name="FILTER")
@ApiParam(value ="筛选")
private String filter;
@Column(name="SORT_BY")
@ApiParam(value ="排序")
private String sortBy;
@Column(name="OUT_NAME")
@ApiParam(value ="外部表名")
@ -42,9 +35,22 @@ public class ExportDetail extends BaseAPS {
@ApiParam(value ="内部表名")
private String inName;
@Column(name="FILTER")
@ApiParam(value ="筛选")
private String filter;
@Column(name="SORT_BY")
@ApiParam(value ="排序")
private String sortBy;
@Column(name="ORDER_NUMBER")
@ApiParam(value ="序号")
@FieldAnnotation(display = false)
private Integer orderNumber;
@Column(name="PROJECT_ID")
@ApiParam(value ="导出项目ID")
@FieldAnnotation(property = false)
@FieldAnnotation(relation = "Project")
private Long projectId;
public ExportProject getProject() {

@ -104,6 +104,10 @@ public class FieldInfo extends BaseCode {
@ApiParam(value ="枚举项内容")
private transient Enum<?>[] enumItems;
@Column(name = "NOT_EMPTY")
@ApiParam(value = "不能为空")
private Boolean notEmpty;
@JsonIgnore
private transient Class<? extends BaseBean> clazz;
@JsonIgnore

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
@ -33,6 +34,7 @@ public class FieldSetRule extends BaseRule {
@Column(name="FIELD_NAME")
@ApiParam(value ="字段名")
@FieldAnnotation(notEmpty = true)
private String fieldName;
@Column(name="VALUE")

@ -27,10 +27,6 @@ import javax.persistence.Table;
@Table(name = "APS_IMPORT_DETAIL")
@Api("数据导入明细")
public class ImportDetail extends BaseAPS {
@Column(name="TYPE")
@ApiParam(value ="导入类型")
@FieldAnnotation(defaultValue = "REPLACE")
private ApsEnumUtil.IMPORT_DETAIL_TYPE type;
@Column(name="OUT_NAME")
@ApiParam(value ="外部表名")
@ -40,9 +36,19 @@ public class ImportDetail extends BaseAPS {
@ApiParam(value ="内部表名")
private String inName;
@Column(name="TYPE")
@ApiParam(value ="导入类型")
@FieldAnnotation(defaultValue = "REPLACE")
private ApsEnumUtil.IMPORT_DETAIL_TYPE type;
@Column(name="ORDER_NUMBER")
@ApiParam(value ="序号")
@FieldAnnotation(property = false)
private Integer orderNumber;
@Column(name="PROJECT_ID")
@ApiParam(value ="导入项目ID")
@FieldAnnotation(property = false)
@FieldAnnotation(relation = "Project")
private Long projectId;
public ImportProject getProject() {

@ -38,7 +38,7 @@ public class MatCalcRule extends BaseRule {
@Column(name="DEL_AUTO")
@ApiParam(value ="自动删除补充订单")
@FieldAnnotation(defaultValue = "true")
@FieldAnnotation(defaultValue = "1")
private Boolean delAuto;
@Column(name="DEL_LIMIT")
@ -52,6 +52,7 @@ public class MatCalcRule extends BaseRule {
@Column(name="AUTO_SUPPLY")
@ApiParam(value ="自动补充")
@FieldAnnotation(defaultValue = "1")
private Boolean autoSupply;
@Column(name="BATCH_SUPPLY")

@ -77,7 +77,7 @@ public class Material extends BaseCode {
@Column(name="IS_AUTO_FIX_PEGGING")
@ApiParam(value ="自动补充标识")
@FieldAnnotation(defaultValue = "true")
@FieldAnnotation(defaultValue = "1")
private Boolean autoFixPegging;
@Column(name="MAX_PRODUCT_BATCH")

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -26,18 +27,22 @@ import javax.persistence.Table;
public class MaterialSetTime extends BaseAPS {
@Column(name="RES_CODE")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCode;
@Column(name="PREV_MATERIAL")
@ApiParam(value ="前物料编码")
@ApiParam(value ="前物料")
@FieldAnnotation(notEmpty = true)
private String prevMaterial;
@Column(name="POST_MATERIAL")
@ApiParam(value ="后物料编码")
@ApiParam(value ="后物料")
@FieldAnnotation(notEmpty = true)
private String postMaterial;
@Column(name="TIME")
@ApiParam(value ="设置时间")
@FieldAnnotation(notEmpty = true)
private String time;
@Column(name="PRIORITY")

@ -29,13 +29,18 @@ import java.util.List;
@Table(name = "APS_OPER_INPUT")
@Api("工序输入")
public class OperInput extends BaseAPS {
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(relation = "Operation", notEmpty = true, display = false)
private Long operationId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(relation = "Material")
@FieldAnnotation(relation = "Material", notEmpty = true)
private Long materialId;
@Column(name="INPUT_COUNT")
@ApiParam(value ="输入量")
@ApiParam(value ="单位输入量")
private Double inputCount;
@Column(name="YIELD")
@ -59,11 +64,6 @@ public class OperInput extends BaseAPS {
@ApiParam(value ="最小时间间隔")
private String minSpaceTime;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
public Operation getOperation() {
return BeanRelation.get(this, EOperInput.Operation);
}

@ -28,13 +28,18 @@ import java.util.List;
@Table(name = "APS_OPER_OUTPUT")
@Api("工序输出")
public class OperOutput extends BaseAPS {
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(relation = "Operation", notEmpty = true, display = false)
private Long operationId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(relation = "Material")
@FieldAnnotation(relation = "Material", notEmpty = true)
private Long materialId;
@Column(name="OUTPUT_COUNT")
@ApiParam(value ="输出量")
@ApiParam(value ="单位输出量")
private Double outputCount;
@Column(name="YIELD")
@ -45,11 +50,6 @@ public class OperOutput extends BaseAPS {
@ApiParam(value ="固定报废数")
private Double fixScrapCount;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
public Operation getOperation() {
return BeanRelation.get(this, EOperOutput.Operation);
}

@ -29,10 +29,14 @@ import java.util.List;
@Table(name = "APS_OPER_RESOURCE")
@Api("工序资源")
public class OperResource extends BaseAPS {
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(relation = "Operation", notEmpty = true, display = false)
private Long operationId;
@Column(name="RESOURCE_ID")
@ApiParam(value ="资源")
@FieldAnnotation(relation = "Resource")
@FieldAnnotation(relation = "Resource", notEmpty = true)
private Long resourceId;
@Column(name="USE_TYPE")
@ -46,6 +50,7 @@ public class OperResource extends BaseAPS {
@Column(name="PRODUCE_TIME")
@ApiParam(value ="生产时间")
@FieldAnnotation(notEmpty = true)
private String produceTime;
@Column(name="POST_TIME")
@ -72,11 +77,6 @@ public class OperResource extends BaseAPS {
@ApiParam(value ="资源使用配套号")
private String userMatchNumber;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
public Operation getOperation() {
return BeanRelation.get(this, EOperResource.Operation);
}

@ -29,17 +29,29 @@ import java.util.List;
@Table(name = "APS_OPERATION")
@Api("工序")
public class Operation extends BaseAPS {
@Column(name="NUMBER")
@ApiParam(value ="工序号")
@FieldAnnotation(notEmpty = true)
private Integer number;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(relation = "ProductRouting", notEmpty = true, display = false)
private Long productRoutingId;
@Column(name="STAND_OPERATION_ID")
@ApiParam(value ="标准工序")
@FieldAnnotation(relation = "StandOperation", notEmpty = true)
private Long standOperationId;
@Column(name="PREV_COUNT_RATE")
@ApiParam(value ="前工序数量比")
@FieldAnnotation(notEmpty = true, defaultValue = "1.0")
private Double prevCountRate;
@Column(name="YIELD")
@ApiParam(value ="成品率")
@FieldAnnotation(notEmpty = true, defaultValue = "1.0")
private Double yield;
@Column(name="FIX_SCRAP_COUNT")
@ -71,16 +83,6 @@ public class Operation extends BaseAPS {
@ApiParam(value ="最小时间间隔")
private String minSpaceTime;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)
private Long productRoutingId;
@Column(name="STAND_OPERATION_ID")
@ApiParam(value ="标准工序")
@FieldAnnotation(property = false)
private Long standOperationId;
public ProductRouting getProductRouting() {
return BeanRelation.get(this, EOperation.ProductRouting);
}

@ -29,6 +29,11 @@ import java.util.List;
@Table(name = "APS_PRODUCT_ROUTING")
@Api("物料")
public class ProductRouting extends BaseCode {
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(relation = "Material", notEmpty = true, display = false)
private Long materialId;
@Column(name="VALID_START")
@ApiParam(value ="有效开始时间")
private Date validStart;
@ -42,11 +47,6 @@ public class ProductRouting extends BaseCode {
@FieldAnnotation(defaultValue = "10")
private Integer priority;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public Material getMaterial() {
return BeanRelation.get(this, EProductRouting.Material);
}

@ -31,7 +31,7 @@ import java.util.List;
public class ResCalendar extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源代码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="WEEKS")
@ -45,6 +45,7 @@ public class ResCalendar extends BaseAPS {
@Column(name="SHIFT_CODES")
@ApiParam(value ="班次代码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "DayShift", notEmpty = true)
private String shiftCodes;
@Column(name="PRIORITY")

@ -41,7 +41,7 @@ public class Resource extends BaseCode {
@Column(name="EFFICIENCY")
@ApiParam(value ="生产效率")
@FieldAnnotation(defaultValue = "1.0")
@FieldAnnotation(defaultValue = "1.0", notEmpty = true)
private Double efficiency;
@Column(name="PREV_BUFFER")

@ -38,12 +38,12 @@ public class RuleDetail extends BaseAPS {
@Column(name="RULE_GROUP_ID")
@ApiParam(value ="规则组合ID")
@FieldAnnotation(property = false)
@FieldAnnotation(relation = "RuleGroup", display = false)
private Long ruleGroupId;
@Column(name="RULE_ID")
@ApiParam(value ="规则配置ID")
@FieldAnnotation(property = false)
@FieldAnnotation(relation = "Rule", display = false)
private Long ruleId;
public RuleGroup getRuleGroup() { return BeanRelation.get(this, ERuleDetail.RuleGroup); }

@ -26,35 +26,37 @@ import javax.persistence.Table;
@Table(name = "APS_SHIPPING_TIME")
@Api("运输时间")
public class ShippingTime extends BaseAPS {
@Column(name="TIME")
@ApiParam(value ="运输时间")
private String time;
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
@FieldAnnotation(defaultValue = "10")
private Integer priority;
@Column(name="PREV_RES_CODE")
@ApiParam(value ="前资源对象Id")
@FieldAnnotation(property = false)
@ApiParam(value ="前资源编码")
@FieldAnnotation(relation = "PrevRes")
private Long prevResId;
@Column(name="POST_RES_CODE")
@ApiParam(value ="后资源对象Id")
@FieldAnnotation(property = false)
@ApiParam(value ="后资源编码")
@FieldAnnotation(relation = "PostRes")
private Long postResId;
@Column(name="PREV_STAND_CODE")
@ApiParam(value ="前标准工序对象Id")
@FieldAnnotation(property = false)
@ApiParam(value ="前标准工序编码")
@FieldAnnotation(relation = "PrevStand")
private Long prevStandId;
@Column(name="POST_STAND_CODE")
@ApiParam(value ="后标准工序对象Id")
@FieldAnnotation(property = false)
@ApiParam(value ="后标准工序编码")
@FieldAnnotation(relation = "PostStand")
private Long postStandId;
@Column(name="TIME")
@ApiParam(value ="运输时间")
@FieldAnnotation(notEmpty = true)
private String time;
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
@FieldAnnotation(defaultValue = "10")
private Integer priority;
public Resource getPrevRes() {return BeanRelation.get(this, EShippingTime.PrevRes); }
public void setPrevRes(Resource res) {

@ -33,7 +33,7 @@ public class SysParam extends BaseAPS {
@Column(name="MAX_INTERRUPT_COUNT")
@ApiParam(value ="最大中断次数")
@FieldAnnotation(defaultValue = "20")
private Integer maxInterruptCount;
private Integer maxInterruptCount = 20;
@Column(name="TYPE")
@ApiParam(value ="工艺路径有效判断类型")

@ -135,6 +135,10 @@ public class Work extends BaseAPS {
@FieldAnnotation(modify = false)
private String failedReason;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)

@ -312,6 +312,10 @@ public class BeanRelation {
}
}
public static void setOne(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
get(bean).get(holder).add(relaBean);
}
/**
*
*

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkPlan">
<Class name="ShippingTime">
<Relation field="PrevRes" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="PostRes" name="Resource" type="MULTI_TO_ONE" owner="false">

@ -2,7 +2,7 @@
<Class name="WorkPlan">
<Relation field="WorkResource" name="WorkResource" type="ONE_TO_ONE" owner="false">
</Relation>
<Relation field="AssPlans" name="WorkPlan" reverse="MainPlan" type="ONE_TO_MULTI" owner="false">
<Relation field="AssPlans" name="WorkPlan" reverse="MainPlan" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="PrevPlan" name="WorkPlan" reverse="PostPlan" type="MULTI_TO_MULTI" owner="false">
</Relation>

@ -11,6 +11,51 @@ import org.apache.commons.lang3.StringUtils;
* @Modify:
**/
public class AndonEnumUtil {
/**
*
* 10-20-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ANDON_CONFIG_GROUP {
BROAD_GROUP(10,"广播配置分组");
private int value;
private String description;
ANDON_CONFIG_GROUP(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 int descriptionOfValue(String val) {
int tmp = -1;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, val)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
*

@ -781,10 +781,10 @@ public class ApsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CONSTRAINT_TYPE {
ES("ES", "前工作开始,后工作结束"),
SS("SS", "前工作开始,后工作开始"),
EE("EE", "前工作结束,后工作结束"),
SSEE("SSEE", "前后工同时开始或同时结束");
ES("ES", "前工序结束,后工序开始"),
SS("SS", "前工序开始,后工序开始"),
EE("EE", "前工序结束,后工序结束"),
SSEE("SSEE", "前后工同时开始或同时结束");
private String value;
private String description;

@ -223,9 +223,7 @@ public class CommonEnumUtil {
EXCEPTION_DETAIL(3, "异常明细"),
EXCEPTION_SOLUTION(4, "解决方案"),
ENUM(5, "枚举"),
MODULE(10, "模块"),
METHOD(11, "功能"),
BUTTON(12, "按钮"),
MENU(10, "功能权限"),
WEB(13, "前端");
private int value;
@ -597,6 +595,15 @@ public class CommonEnumUtil {
return tmp;
}
public static METHOD_LEVEL get(int id){
for (int i = 0; i < values().length; i++) {
if (values()[i].value == id) {
return values()[i];
}
}
return null;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {

@ -842,7 +842,8 @@ public class ImppEnumUtil {
NUMBER(2,"number","数字"),
DATE(3,"date","时间"),
SWITCH(4,"switch","布尔"),
SELECT(5,"select","选择");
SELECT(5,"select","选择"),
FILE(6,"select","选择");
private int value;
private String name;

@ -197,6 +197,7 @@ public class MesEnumUtil {
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static ORGANIZATION_INIT_DATA getByValue(String value) {
for (ORGANIZATION_INIT_DATA mesInsertExcel : values()) {
@ -302,7 +303,7 @@ public class MesEnumUtil {
private int value;
private String description;
CUST_ORDER_TYPE(int value, String description) {
CUST_ORDER_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
@ -2959,11 +2960,11 @@ public class MesEnumUtil {
OPC_LINK_PASSWORD(120, "OPC_LINK", "OPC_LINK_PASSWORD"),
OPC_LINK_REALM(130, "OPC_LINK", "OPC_LINK_REALM"),
OPC_LINK_CALLBACK(140, "OPC_LINK", "OPC_LINK_CALLBACK"),
SUPPLY_SWITCH(150,"SUPPLY_SWITCH",""),
PCN_LOGIN(160, "PCN_LOGIN",""),
PCN_MENU(170, "PCN_MENU",""),
PCN_MODULE(180, "PCN_MODULE",""),
PCN_LOGOUT(190, "PCN_LOGOUT","");
SUPPLY_SWITCH(150, "SUPPLY_SWITCH", ""),
PCN_LOGIN(160, "PCN_LOGIN", ""),
PCN_MENU(170, "PCN_MENU", ""),
PCN_MODULE(180, "PCN_MODULE", ""),
PCN_LOGOUT(190, "PCN_LOGOUT", "");
private int value;
@ -3078,6 +3079,7 @@ public class MesEnumUtil {
public enum ONLINE_SEND_TYPE {
PLC("PLC", "PLC"),
SELF_HANDLE("SELF_HANDLE", "自处理"),
DB("DB", "DB");
private String value;
@ -3199,4 +3201,56 @@ public class MesEnumUtil {
}
}
/**
* MesWorkCenter
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_CENTER_RUNNING_STATUS {
RUNNING("Y", "start", "开线"),
STOPPED("N", "stop", "停线");
private String value;
private String code;
private String description;
WORK_CENTER_RUNNING_STATUS(String value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public String getValue() {
return value;
}
public String getCode() {
return code;
}
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 valueOfCode(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].code;
}
}
return tmp;
}
}
}

@ -2154,6 +2154,7 @@ public class MesPcnEnumUtil {
public enum ONLINE_SEND_TYPE {
PLC("PLC", "PLC"),
SELF_HANDLE("SELF_HANDLE", "自处理"),
DB("DB", "DB");
private String value;

@ -4230,4 +4230,51 @@ public class WmsEnumUtil {
}
}
/**
*
* 10
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PULL_WAY_STATUS {
SAFETY_STOCK_PULL(10, "安全库存拉动"),
ELECTRONIC_KANBAN_PULL(20, "电子看板拉动"),
LINE_PULL(30, "巡线拉动"),
PLANNED_PULL(40, "计划拉动");
private int value;
private String description;
PULL_WAY_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static PULL_WAY_STATUS codeOf(int value) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
return values()[i];
}
}
return null;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -73,6 +73,9 @@ public class MesQcCheckStandard extends BaseBean {
@ApiParam("检测值")
private String checkValue;
public MesQcCheckStandard() {
}
public MesQcCheckStandard(String partNo, String workCenterCode, String workCellCode, Integer checkType, String checkItem, String checkStandard, String checkGuide, String checkFrequency, String partName) {
this.partNo = partNo;
this.workCenterCode = workCenterCode;

@ -46,4 +46,8 @@ public class MesWorkCell extends BaseBean {
@Column(name = "WORK_CELL_TYPE")
@ApiParam("工位类型")
private Integer workCellType;
@Column(name = "SEQ")
@ApiParam("序号")
private Integer seq;
}

@ -51,6 +51,9 @@ public class StepPrintSnModel extends MesProduceSn {
@ApiParam("客户名称")
private String customerName;
@ApiParam("客户零件号")
private String customerPartNo;
@ApiParam("客户物料名称")
private String customerPartName;

@ -37,6 +37,10 @@ public class IfDismantleRecord extends BaseBean {
@ApiParam("产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "PARENT_PART_NO")
@ApiParam("产品物料编码")
private String parentPartNo;

@ -129,6 +129,15 @@ public class MesProduceSn extends BaseBean {
@ApiParam("返回信息")
private String resultMsg;
@Transient
@ApiParam("下线时间开始")
private String outWorkCenterTimeStart;
@Transient
@ApiParam("下线时间截止")
private String outWorkCenterTimeEnd;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}
@ -178,6 +187,8 @@ public class MesProduceSn extends BaseBean {
", snType='" + snType + '\'' +
", tray='" + tray + '\'' +
", resultMsg='" + resultMsg + '\'' +
", outWorkCenterTimeStart='" + outWorkCenterTimeStart + '\'' +
", outWorkCenterTimeEnd='" + outWorkCenterTimeEnd + '\'' +
'}';
}
}

@ -51,6 +51,10 @@ public class MesWorkCell extends BaseBean {
@ApiParam("工位类型")
private Integer workCellType;
@Column(name = "SEQ")
@ApiParam("序号")
private Integer seq;
@Transient
@ApiParam(value = "子集列表")
private List<MesEquipment> childTreeList;

@ -53,7 +53,7 @@ public class MesWorkCenter extends BaseBean {
@Column(name = "RUNNING_STATUS")
@ApiParam("运行状态")
private Integer runningStatus;
private String runningStatus;
@Transient
@ApiParam(value = "子集列表")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
@ -19,8 +20,8 @@ import java.math.BigDecimal;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("动作函数关系model")
public class IfRawPartDataModel implements Serializable {
@Api("原材料信息model")
public class IfRawPartDataModel extends BaseBean {
@ApiParam("id")
private Long id;

@ -1,6 +1,5 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -25,7 +24,7 @@ public class ProductBiModel {
private String areaCode;
@ApiParam("运行状态")
private Integer runningStatus;
private String runningStatus;
@ApiParam(value = "物料号")
private String partNo;

@ -0,0 +1,27 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesLabelTemplate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-08-27-13:24
* @Modify:
**/
@Data
@Api("打印信息封装模板")
public class SnPrintDataModel {
@ApiParam("打印数据")
private List<SnPrintValueModel> snPrintValueModel;
@ApiParam("打印模板及参数")
private MesLabelTemplate labelTemplate;
}

@ -0,0 +1,27 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-08-27-13:24
* @Modify:
**/
@Data
@Api("打印信息模板")
public class SnPrintModel extends SnPrintValueModel {
@ApiParam("过程条码")
private SnPrintDataModel snPrintModel;
@ApiParam("产品条码")
private SnPrintDataModel prodPrintModel;
@ApiParam("包装条码")
private SnPrintDataModel packagePrintModel;
}

@ -1,26 +0,0 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesLabelTemplate;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description : /model
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-08-18 11:00
* @Modify:
**/
@Data
public class SnPrintTemplateModel implements Serializable {
@ApiParam("产品条码模板")
private MesLabelTemplate prodSnPrintTemplate;
@ApiParam("包装条码模板集合")
private List<MesLabelTemplate> packageSnPrintTemplateList;
}

@ -0,0 +1,72 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-08-27-13:24
* @Modify:
**/
@Data
@Api("打印信息模板")
public class SnPrintValueModel extends MesProduceSn {
@ApiParam("打印描述")
private String printDesc;
@ApiParam("条码")
private String barCode;
@ApiParam("物料号")
private String partNo;
@ApiParam("批次号")
private String batchNo;
@ApiParam("箱数量")
private String boxQty;
@ApiParam("订单号")
private String orderNo;
@ApiParam("生产日期")
private String productionTime;
@ApiParam("包装编码")
private String packageNo;
@ApiParam("包装规格")
private String packageSpec;
@ApiParam("供应商")
private String supplier;
@ApiParam("客户名称")
private String customerName;
@ApiParam("客户零件号")
private String customerPartNo;
@ApiParam("客户物料名称")
private String customerPartName;
@ApiParam("物料名称")
private String partNameRdd;
@ApiParam("单位")
private String unit;
@ApiParam("特殊批号")
private String fixLotNo;
@ApiParam("生产工单号")
private String workOrderNo;
@ApiParam("生产线代码")
private String workCenterCode;
}

@ -1830,4 +1830,166 @@ public class MesHqlPack {
}
return packBean;
}
/**
*
* @param mesProduceSn
* @param organizeCode
* @return
*/
public static DdlPackBean getMesProduceSn(MesProduceSn mesProduceSn, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProduceSn, organizeCode);
if (!StringUtils.isEmpty(mesProduceSn.getWorkOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getWorkOrderNo(), "workOrderNo", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getSerialNumber())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getSerialNumber(), "serialNumber", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getProductSn())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getProductSn(), "productSn", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getWorkCellCode())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getWorkCellCode(), "workCellCode", packBean);
}
if (mesProduceSn.getSnStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesProduceSn.getSnStatus(), "snStatus", packBean);
}
if (mesProduceSn.getQcStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesProduceSn.getQcStatus(), "qcStatus", packBean);
}
return packBean;
}
/**
*
* @param mesProdBindRecord
* @param organizeCode
* @return
*/
public static DdlPackBean getMesProdBindRecord(MesProdBindRecord mesProdBindRecord, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProdBindRecord, organizeCode);
if (!StringUtils.isEmpty(mesProdBindRecord.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesProdBindRecord.getSerialNumber())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getSerialNumber(), "serialNumber", packBean);
}
if (!StringUtils.isEmpty(mesProdBindRecord.getKpSn())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getKpSn(), "kpSn", packBean);
}
if (!StringUtils.isEmpty(mesProdBindRecord.getWorkCenterCode())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getWorkCenterCode(), "workCenterCode", packBean);
}
if (!StringUtils.isEmpty(mesProdBindRecord.getWorkCellCode())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getWorkCellCode(), "workCellCode", packBean);
}
if (mesProdBindRecord.getIsBindKey() != null) {
DdlPreparedPack.getNumEqualPack(mesProdBindRecord.getIsBindKey(), "isBindKey", packBean);
}
if (mesProdBindRecord.getActionType() != null) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getActionType(), "actionType", packBean);
}
if (!StringUtils.isEmpty(mesProdBindRecord.getSupplierCode())) {
DdlPreparedPack.getStringLikerPack(mesProdBindRecord.getSupplierCode(), "supplierCode", packBean);
}
DdlPreparedPack.timeBuilder(
mesProdBindRecord.getCreateDateTimeStart(),
mesProdBindRecord.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
return packBean;
}
/**
*
* @param ifPackageDetail
* @param organizeCode
* @return
*/
public static DdlPackBean getIfPackageDetail(IfPackageDetail ifPackageDetail, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(ifPackageDetail, organizeCode);
if (!StringUtils.isEmpty(ifPackageDetail.getPartNo())) {
DdlPreparedPack.getStringLikerPack(ifPackageDetail.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(ifPackageDetail.getPackageNo())) {
DdlPreparedPack.getStringLikerPack(ifPackageDetail.getPackageNo(), "partNo", packBean);
}
DdlPreparedPack.timeBuilder(
ifPackageDetail.getCreateDateTimeStart(),
ifPackageDetail.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
return packBean;
}
/**
*
* @param mesProduceSn
* @return
*/
public static DdlPackBean getProdSnPrint(MesProduceSn mesProduceSn) {
DdlPackBean packBean = getMesAllData(mesProduceSn.getOrganizeCode());
if (!StringUtils.isEmpty(mesProduceSn.getSerialNumber())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getSerialNumber(), "serialNumber", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getProductSn())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getProductSn(), "productSn", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesProduceSn.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesProduceSn.getSnStatus())) {
DdlPreparedPack.getNumEqualPack(mesProduceSn.getSnStatus(), "snStatus", packBean);
}
// 时间段查询
DdlPreparedPack.timeBuilder(
mesProduceSn.getCreateDateTimeStart(),
mesProduceSn.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
DdlPreparedPack.timeBuilder(
mesProduceSn.getOutWorkCenterTimeStart(),
mesProduceSn.getOutWorkCenterTimeEnd(),
"outWorkCenterTime", packBean, true);
return packBean;
}
/**
*
* @param mesPackage
* @return
*/
public static DdlPackBean getPackageSnPrint(MesPackage mesPackage) {
DdlPackBean packBean = getMesAllData(mesPackage.getOrganizeCode());
if (!StringUtils.isEmpty(mesPackage.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesPackage.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesPackage.getPackLevel())) {
DdlPreparedPack.getNumEqualPack(mesPackage.getPackLevel(), "packLevel", packBean);
}
if (!StringUtils.isEmpty(mesPackage.getPackageNo())) {
DdlPreparedPack.getStringLikerPack(mesPackage.getPackageNo(), "packageNo", packBean);
}
if (!StringUtils.isEmpty(mesPackage.getWorkCenterCode())) {
DdlPreparedPack.getStringLikerPack(mesPackage.getWorkCenterCode(), "workCenterCode", packBean);
}
// 时间段查询
DdlPreparedPack.timeBuilder(
mesPackage.getCreateDateTimeStart(),
mesPackage.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
return packBean;
}
}

@ -50,8 +50,9 @@ public class SysMenu extends BaseBean {
* , 线.
*/
@Column(name="SOFT_TYPE")
@ApiParam(value ="产品类型", example = "0")
private Integer softTyp;
@ApiParam(value ="产品类型", example = "0",access = "softTyp DOC: http://doc.estsh.com/docs/i3plus_api/i3plus_api-impp")
@AnnoOutputColumn
private Integer softType;
@Column(name="MENU_TYPE")
@ApiParam(value ="功能类型" , example ="-1" ,access = "枚举1.模块2.菜单3.按钮")

@ -257,22 +257,15 @@ public class CoreHqlPack {
DdlPackBean result = DdlPackBean.getDdlPackBean(menu);
DdlPreparedPack.getInPackList(idList,"id",result);
DdlPreparedPack.getNumEqualPack(menu.getParentId(),"parentId",result);
DdlPreparedPack.getNumEqualPack(menu.getMenuType(),"menuType",result);
DdlPreparedPack.getNumEqualPack(menu.getMenuStatus(),"menuStatus",result);
DdlPreparedPack.getStringLikerPack(menu.getName(),"name",result);
DdlPreparedPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result);
result.setOrderByStr(menu.orderBy());
return result;
}
public static DdlPackBean packDdlBeanSysMenu(SysMenu menu){
DdlPackBean result = DdlPackBean.getDdlPackBean(menu);
DdlPreparedPack.getNumEqualPack(menu.getMenuStatus(),"menuStatus",result);
result.setOrderByStr(menu.orderBy());
if(menu != null){
DdlPreparedPack.getNumEqualPack(menu.getParentId(),"parentId",result);
DdlPreparedPack.getNumEqualPack(menu.getMenuType(),"menuType",result);
DdlPreparedPack.getNumEqualPack(menu.getMenuStatus(),"menuStatus",result);
DdlPreparedPack.getStringLikerPack(menu.getName(),"name",result);
DdlPreparedPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result);
result.setOrderByStr(menu.orderBy());
}
return result;
}

@ -52,4 +52,22 @@ public class WmsActionModule extends BaseBean {
@Column(name = "IS_SHOW_INFO")
@ApiParam(value = "是否实现回显", example = "0")
public Integer isShowInfo;
@ApiParam(value = "作业类型名称", example = "0")
public String opTypeName;
public WmsActionModule() {
}
public WmsActionModule(Long id, String amName, String amDesc, String callClass,
Integer amType, String opTypeCode, Integer isShowInfo, String opTypeName) {
this.id = id;
this.amName = amName;
this.amDesc = amDesc;
this.callClass = callClass;
this.amType = amType;
this.opTypeCode = opTypeCode;
this.isShowInfo = isShowInfo;
this.opTypeName = opTypeName;
}
}

@ -187,6 +187,10 @@ public class WmsPart extends BaseBean {
@ApiParam(value = "是否录入生产批次", example = "1")
private Integer isProdLot = 2;
@Column(name = "PULL_WAY")
@ApiParam(value = "拉动方式", example = "0")
private Integer pullWay = 0;
public int getIqcValue(){
return this.iqc == null ? 0 : this.iqc.intValue();
}

@ -51,6 +51,7 @@ public class WmsRoutingRule extends BaseBean {
@Column(name = "RULE_TYPE")
@ApiParam(value = "规则类型(10 推动规则20 补货规则)", example ="10")
@AnnoOutputColumn(refClass = WmsEnumUtil.ROUTING_RULE_TYPE.class, refForeignKey = "value", value = "description")
private Integer ruleType;
@Column(name = "SRC_ZONE_NO")

@ -36,6 +36,9 @@ public class WmsMoveUnfinishedOrderModel extends BaseBean{
@ApiParam("关联单号")
private String refSrc;
public WmsMoveUnfinishedOrderModel(){
}
public WmsMoveUnfinishedOrderModel(String organizeCode, String partNo, String partNameRdd, Double destQty, String transTypeCode, String transTypeName, String refSrc) {
this.organizeCode = organizeCode;
this.partNo = partNo;

@ -2414,7 +2414,9 @@ public class WmsHqlPack {
DdlPreparedPack.getNumEqualPack(wmsRoutingRule.getRuleType(), "ruleType", result);
DdlPreparedPack.getStringEqualPack(wmsRoutingRule.getRoutingCode(), "routingCode", result);
if (StringUtils.isNotBlank(wmsRoutingRule.getOrganizeCode())) {
DdlPreparedPack.getStringEqualPack(wmsRoutingRule.getOrganizeCode(), "organizeCode", result);
}
DdlPreparedPack.getInPack(wmsRoutingRule.getIsValid(), "isValid", result);
DdlPreparedPack.getInPack(wmsRoutingRule.getIsDeleted(), "isDeleted", result);
getStringBuilderPack(wmsRoutingRule, result);

Loading…
Cancel
Save