Merge branches 'master' and 'test' of http://git.estsh.com/i3-IMPP/i3plus-pojo

yun-zuoyi
许心洁 6 years ago
commit 208410340e

@ -25,5 +25,6 @@ public @interface FieldAnnotation {
String defaultValue() default ""; // 字段的默认值
boolean popSearch() default false; // 弹出选择对象时是否显示
EDIT_TYPE editType() default EDIT_TYPE.NONE; // 定义字段的编辑类型
Class<?> multiEnumClass() default Object.class; // 多选枚举的类型。
String typeName() default ""; // 定义字段类型的简单名称,对于多选关联对象时有用。
}

@ -1,6 +1,12 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
/**
* @Description :
@ -9,5 +15,11 @@ import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
@MappedSuperclass
@Api("规则参数基类")
public class BaseRule extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="规则编码")
private String code;
}

@ -75,7 +75,7 @@ public class FieldInfo extends BaseCode {
@Column(name="POSITION")
@ApiParam(value ="位置")
private String position;
private Integer position;
@Column(name="MAIN_KEY")
@ApiParam(value ="主键标识")

@ -1,9 +1,12 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.enums.EDIT_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.ORDER_DEL_LIMIT;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.Fetch;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -39,6 +42,7 @@ public class MatCalcRule extends BaseRule {
@Column(name="DEL_LIMIT")
@ApiParam(value ="删除补充订单限制条件")
@FieldAnnotation(defaultValue = "NONE")
private ORDER_DEL_LIMIT delLimit;
@Column(name="KEEP_RELATION")
@ -55,6 +59,7 @@ public class MatCalcRule extends BaseRule {
@Column(name="ASSIGN_LIMIT")
@ApiParam(value ="物料分配制约")
@FieldAnnotation(editType = EDIT_TYPE.MULTI_ENUM, defaultValue = "NONE")
private Integer assignLimit;
}

@ -3,6 +3,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.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.CALENDAR_WEEK;
import cn.estsh.i3plus.pojo.aps.enums.EDIT_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EResCalendar;
import com.fasterxml.jackson.annotation.JsonBackReference;
@ -34,6 +35,7 @@ public class ResCalendar extends BaseAPS {
@Column(name="WEEKS")
@ApiParam(value ="星期")
@FieldAnnotation(multiEnumClass = CALENDAR_WEEK.class)
private Integer weeks;
@Column(name="DATES")

@ -0,0 +1,56 @@
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.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.RULE_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.ERuleDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-05
* @Modify:
**/
@Data
@Entity
@Table(name = "APS_RULE_DETAIL")
@Api("规则明细")
public class RuleDetail extends BaseAPS {
@Column(name="TYPE")
@ApiParam(value ="规则类型")
private RULE_TYPE type;
@Column(name="RULE_GROUP_ID")
@ApiParam(value ="规则组合ID")
@FieldAnnotation(property = false)
private Long ruleGroupId;
@Column(name="RULE_ID")
@ApiParam(value ="规则配置ID")
@FieldAnnotation(property = false)
private Long ruleId;
public RuleGroup getRuleGroup() { return BeanRelation.get(this, ERuleDetail.RuleGroup); }
public void setRuleGroup(RuleGroup ruleGroup) {
this.ruleGroupId = ruleGroup != null ? ruleGroup.getId() : 0;
BeanRelation.set(this, ERuleDetail.RuleGroup, ruleGroup);
}
public BaseRule getRule() { return BeanRelation.get(this, ERuleDetail.Rule); }
public void setRule(BaseRule rule) {
this.ruleId = rule != null ? rule.getId() : 0;
BeanRelation.set(this, ERuleDetail.Rule, rule);
}
}

@ -1,11 +1,17 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.ERuleGroup;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -19,4 +25,14 @@ import javax.persistence.Table;
@Table(name = "APS_RULE_GROUP")
@Api("规则组合")
public class RuleGroup extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")
private String code;
@Column(name="ORDER_NUMBER")
@ApiParam(value ="序号")
private Integer orderNumber;
@JsonBackReference
List<RuleDetail> getDetails() { return BeanRelation.list(this, ERuleGroup.Details); }
}

@ -0,0 +1,25 @@
package cn.estsh.i3plus.pojo.aps.converter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class CustomDateDeserializer extends JsonDeserializer<Date> {
public static SimpleDateFormat DATETIME_FORMATOR = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Override
public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
try {
return DATETIME_FORMATOR.parse(jsonParser.getText());
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}
}

@ -0,0 +1,18 @@
package cn.estsh.i3plus.pojo.aps.converter;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class CustomDateSerializer extends JsonSerializer<Date> {
public static SimpleDateFormat DATETIME_FORMATOR = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Override
public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeString(DATETIME_FORMATOR.format(date));
}
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum CALENDAR_WEEK {
MONDAY(1), // 星期一
TUESDAY(2), // 星期二
WEDNESDAY(4), // 星期三
THURSDAY(8), // 星期四
FRIDAY(16), // 星期五
SATURDAY(32), // 星期六
SUNDAY(64); // 星期天
private int _value;
CALENDAR_WEEK(int value) {
_value = value;
}
public int value() {
return this._value;
}
}

@ -0,0 +1,8 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum RULE_TYPE {
CANCEL_PLAN,
MAT_CALC,
HEURISTIC,
FIELD_SET
}

@ -0,0 +1,4 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EBaseRule {
}

@ -0,0 +1,6 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum ERuleDetail {
RuleGroup,
Rule
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum ERuleGroup {
Details
}

@ -1,25 +1,23 @@
package cn.estsh.i3plus.pojo.aps.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.estsh.i3plus.pojo.aps.converter.CustomDateDeserializer;
import cn.estsh.i3plus.pojo.aps.converter.CustomDateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class GanttCalendarModel {
@Data
public static class Block {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date beginTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
private Boolean onDuty;
}
private Long resourceId;
private List<Block> timeBlocks = new ArrayList<>();
private Long parent;
@JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class)
private Date start_date;
@JsonSerialize(using = CustomDateSerializer.class)
@JsonDeserialize(using = CustomDateDeserializer.class)
private Date end_date;
private String color;
private Long id;
private String text;
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.RuleDetail;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface RuleDetailRepository extends CrudRepository<RuleDetail, Long> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="RuleDetail">
<Relation field="Rule" name="BaseRule" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="RuleGroup">
<Relation field="Details" name="RuleDetail" reverse="RuleGroup" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -3,6 +3,7 @@ package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal;
import java.util.Date;
/**
@ -2284,7 +2285,7 @@ public class BlockFormEnumUtil {
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"),
BIG_DECIMAL(32, "BigDecimal", "大浮点型", "java.math.BigDecimal", BigDecimal.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");

@ -1134,4 +1134,51 @@ public class CommonEnumUtil {
// 数据未删除的静态常量
public static final int FALSE = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOG_DETAIL_SHOW_TYPE {
DEBUG(1, "DEBUG"),
OVER_TIME(2, "记录超时服务"),
ALL_METHOD(3, "所有服务"),
ALL_METHOD_PARAMETER(4, "所有服务和入参");
private int value;
private String description;
private LOG_DETAIL_SHOW_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
}

@ -14,6 +14,101 @@ public class MesEnumUtil {
/**
* Mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORGANIZATION_INIT_DATA {
MES_CONFIG("MesConfig", "MES_CONFIG", "配置表"),
MES_NUMBER_RULE("MesNumberRule", "MES_NUMBER_RULE", "编码规则表"),
MES_STEP("MesStep", "MES_STEP", "工步"),
MES_STEP_PARAM("MesStepParam", "MES_STEP_PARAM", "工步参数表"),
MES_PCN_SYNC_CFG("MesPcnSyncCfg", "MES_PCN_SYNC_CFG", "同步配置"),
MES_BUTTON_STATUS("MesButtonStatus", "MES_BUTTON_STATUS", "按钮状态配置表"),
MES_WORK_CELL_PARAM("MesWorkCellParam", "MES_WORK_CELL_PARAM", "工作单元参数"),
MES_STATUS_CFG("MesStatusCfg", "MES_STATUS_CFG", "状态配置"),
MES_EVENT("MesEvent", "MES_EVENT", "事件清单"),
MES_METHOD("MesMethod", "MES_METHOD", "方法清单"),
MES_ACTION("MesAction", "MES_ACTION", "动作"),
MES_EVENT_ACTION("MesEventAction", "MES_EVENT_ACTION", "事件动作配置"),
MES_ACTION_METHOD("MesActionMethod", "MES_ACTION_METHOD", "动作方法配置");
private String value;
private String code;
private String description;
ORGANIZATION_INIT_DATA(String value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static ORGANIZATION_INIT_DATA getByValue(String value) {
for (ORGANIZATION_INIT_DATA mesInsertExcel : values()) {
if (mesInsertExcel.getValue().equals(value)) {
return mesInsertExcel;
}
}
return null;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* Mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OBJECT_CFG_IS_SAVE {
SAVE(1, "存储"),
NO_SAVE(2, "不存储");
private int value;
private String description;
OBJECT_CFG_IS_SAVE(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;
}
}
/**
* Mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -2703,22 +2798,33 @@ public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CONFIG_TYPE {
FASTDFS_SAVE_PATH(10, "SAVE_PATH"),
NGINX_IP(20, "NGINX_HOST"),
MES_STATION_SOCKET(30, "mes_station_socket"),
GATEWAY_IP(40, "GATEWAY_HOST"),
UPDATE_SYNC_TIME(50, "UPDATE_SYNC_TIME"),
PCN_PULL(60, "PCN_PULL"),
PCN_PUSH(70, "PCN_PUSH"),
FDFS_DOWNLOAD(80, "FDFS_DOWNLOAD"),
REWORK_REPAIR(90, "REWORK_REPAIR"),
PCN_LOGIN(100, "PCN_LOGIN");
FASTDFS_SAVE_PATH(10, "SAVE_PATH", ""),
NGINX_IP(20, "NGINX_HOST", ""),
MES_STATION_SOCKET(30, "mes_station_socket", ""),
GATEWAY_IP(40, "GATEWAY_HOST", ""),
UPDATE_SYNC_TIME(50, "SYNC_DATA_URL", "UPDATE_SYNC_TIME"),
PCN_PULL(60, "SYNC_DATA_URL", "PCN_PULL"),
PCN_PUSH(70, "SYNC_DATA_URL", "PCN_PUSH"),
FDFS_DOWNLOAD(80, "SYNC_DATA_URL", "FDFS_DOWNLOAD"),
REWORK_REPAIR(90, "REWORK_REPAIR", ""),
OPC_LINK_SERVER_URL(100, "OPC_LINK", "OPC_LINK_SERVER_URL"),
OPC_LINK_USERNAME(110, "OPC_LINK", "OPC_LINK_USERNAME"),
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","");
private int value;
private String code;
private String description;
CONFIG_TYPE(int value, String description) {
CONFIG_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
@ -2726,6 +2832,10 @@ public class MesEnumUtil {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}

@ -543,7 +543,8 @@ public class WmsEnumUtil {
IN_STORE(10, "IN", "入库"),
OUT_STORE(20, "OUT", "出库"),
MOVE_STORE(30, "MOVE", "移库"),
OTHER(40, "OTHER", "其他");
OTHER(40, "OTHER", "其他"),
NC_HANDLE(50, "NC_HANDLE", "NC处理");
private int value;
private String code;
@ -627,7 +628,16 @@ public class WmsEnumUtil {
VDA_ONE_PICKING_GOODS(280, "VDA_ONE_PICKING_GOODS", "VDA单箱领料"),
VDA_QC(290, "VDA_QC", "VDA质检"),
VDA_SN_SPLIT(300, "VDA_SN_SPLIT", "VDA物料拆分"),
VDA_SN_MERGE(310, "VDA_SN_MERGE", "VDA物料合并");
VDA_SN_MERGE(310, "VDA_SN_MERGE", "VDA物料合并"),
KT_RECEPTION(320, "KT_RECEPTION", "KT让步接收"),
KT_SCRAP(330, "KT_SCRAP", "KT报废"),
KT_QUARANTINE(340, "KT_QUARANTINE", "KT隔离"),
KT_BACK_QUARANTINE(350, "KT_BACK_QUARANTINE", "KT反隔离"),
KT_DEFINITE_FAIL(360, "KT_DEFINITE_FAIL", "KT不合格"),
KT_RETURN(370, "KT_RETURN", "KT退货"),
KT_REWORK(380, "KT_REWORK", "KT返工"),
KT_MISCALCULATION(390, "KT_MISCALCULATION", "KT误判"),
KT_SORTING(400, "KT_SORTING", "KT分选");
private int value;
@ -808,8 +818,8 @@ public class WmsEnumUtil {
VDA_SN_SPLIT("VDA_SN_SPLIT", "VDA条码拆分"),
VDA_SN_("VDA_SN_MERGE", "VDA条码合并"),
VDA_SCAN_QUERY("VDA_SCAN_QUERY", "VDA扫描查询"),
VDA_TRANSACTION_QUERY("VDA_TRANSACTION_QUERY","VDA事务查询");
VDA_TRANSACTION_QUERY("VDA_TRANSACTION_QUERY","VDA事务查询"),
VDA_STATIC_CS("VDA_STATIC_CS", "VDA静态盘点");
private String value;
private String description;
@ -1976,7 +1986,8 @@ public class WmsEnumUtil {
LOCATE(30, "LOCATE", "库位对象"),
MATERIAL(40, "MATERIAL", "物料对象"),
TRANS_TYPE(50, "TRANS_TYPE", "交易代码对象"),
BUSI_TYPE(60, "BUSI_TYPE", "业务类型对象");
BUSI_TYPE(60, "BUSI_TYPE", "业务类型对象"),
BUSI_OPERATION_TYPE(70, "BUSI_OPERATION_TYPE", "业务操作对象");
private String code;
private String description;
@ -2317,6 +2328,56 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
* NC
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BUSI_OPERATION_TYPE {
//收货改数
GOODS_CHANGE_NUMBER(10, "GOODS_CHANGE_NUMBER", "收货改数") ;
private int value;
private String code;
private String description;
BUSI_OPERATION_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
@ -2811,6 +2872,7 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@ -3496,10 +3558,7 @@ public class WmsEnumUtil {
public enum REC_STATUS {
UNRECEIVED("UNRECEIVED", "未收货"),
COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"),
PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"),
OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"),
OTHER("ELSE", "其他"),
;
PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货");
private String value;
private String description;
@ -3971,4 +4030,73 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
* MQ
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOG_TO_MQ_HANDLE_TYPE {
INSERT(10, "新增"), UPDATE(20, "修改"), DELETE(30, "删除");
private int value;
private String description;
LOG_TO_MQ_HANDLE_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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;
}
}
/**
* MQ
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SPEC_LEVEL {
FIRST_LEVEL(10, "一层"), SECOND_LEVEL(20, "二层"), THIRD_LEVEL(30, "三层"), FOURTH_LEVEL(40, "四层"), FIFTH_LEVEL(50, "五层");
private int value;
private String description;
SPEC_LEVEL(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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;
}
}
}

@ -85,6 +85,10 @@ public class MesDismantleRecord extends BaseBean {
@ApiParam("备注")
private String memo;
@Column(name = "LOT_NO")
@ApiParam("关联批次")
private String lotNo;
@Transient
private String serialNumber;
}

@ -51,4 +51,8 @@ public class MesObjectCfg extends BaseBean {
@ApiParam("对应的pojo属性")
private String pojoAttr;
@Column(name = "IS_SAVE")
@ApiParam("是否保存 1存 2不存")
private Integer isSave;
}

@ -46,22 +46,23 @@ public class MesPcnSysUserOffline extends BaseBean {
@ApiParam(value = "登陆名称", access = "登陆名称")
private String loginName;
@Column(name = "ORGANIZE_ID")
@ApiParam(value = "部门ID", example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long organizeId;
@Column(name = "ORGANIZE_NAME")
@ApiParam(value = "部门名称", access = "部门名称")
private String organizeName;
@Column(name="USER_TYPE")
@ApiParam(value ="账号类型(枚举,待定)" , example ="-1")
private Integer userType;
@Lob
@Column(name="LOGIN_INFO")
@ApiParam(value ="登陆信息" , access ="登陆信息")
private String loginInfo;
@Lob
@Column(name="MENU_LIST")
@ApiParam(value ="菜单" , access ="菜单")
private String menuList;
@Lob
@Column(name="MODULE_LIST")
@ApiParam(value ="模块" , access ="模块")
private String moduleList;
}

@ -92,6 +92,10 @@ public class MesPlc extends BaseBean {
@ApiParam("是否解析")
private String isAnalysis;
@Column(name = "FEED_VALUE")
@ApiParam("反馈值")
private String feedValue;
@Transient
@ApiParam("设备名称")
private String equipmentName;

@ -100,14 +100,14 @@ public class MesProduceSnTravel extends BaseBean {
@ApiParam("客户条码")
private String custSn;
@Column(name = "CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name = "CUST_PART_NO")
@ApiParam("客户零件号")
private String custPartNo;
@Column(name = "PACKAGE_SN")
@ApiParam("包装条码")
private String packageSn;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;

@ -46,11 +46,13 @@ public class MesProdBindRecordModel {
private String modifyDatetime;
@ApiParam("产品条码")
private String serialNumber;
@ApiParam("关联批次")
private String lotNo;
public MesProdBindRecordModel() {
}
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, Double dismantleQty) {
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, Double dismantleQty, String lotNo) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
@ -64,9 +66,10 @@ public class MesProdBindRecordModel {
this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName;
this.dismantleQty = dismantleQty;
this.lotNo = lotNo;
}
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName) {
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String lotNo) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
@ -80,9 +83,10 @@ public class MesProdBindRecordModel {
this.kpSn = kpSn;
this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName;
this.lotNo = lotNo;
}
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String serialNumber) {
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String serialNumber, String lotNo) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
@ -101,9 +105,10 @@ public class MesProdBindRecordModel {
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
this.serialNumber = serialNumber;
this.lotNo = lotNo;
}
public MesProdBindRecordModel(String itemPartNo, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String serialNumber) {
public MesProdBindRecordModel(String itemPartNo, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String serialNumber, String lotNo) {
this.itemPartNo = itemPartNo;
this.qty = qty;
this.isValid = isValid;
@ -115,5 +120,6 @@ public class MesProdBindRecordModel {
this.kpSn = kpSn;
this.parentPartNo = parentPartNo;
this.serialNumber = serialNumber;
this.lotNo = lotNo;
}
}

@ -51,4 +51,8 @@ public class MesObjectCfg extends BaseBean {
@ApiParam("对应的pojo属性")
private String pojoAttr;
@Column(name = "IS_SAVE")
@ApiParam("是否存储")
private Integer isSave;
}

@ -94,6 +94,10 @@ public class MesPlc extends BaseBean {
@ApiParam("是否解析")
private String isAnalysis;
@Column(name = "FEED_VALUE")
@ApiParam("反馈值")
private String feedValue;
@Transient
@ApiParam("设备名称")
private String equipmentName;

@ -100,14 +100,14 @@ public class MesProduceSnTravel extends BaseBean {
@ApiParam("客户条码")
private String custSn;
@Column(name = "CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name = "CUST_PART_NO")
@ApiParam("客户零件号")
private String custPartNo;
@Column(name = "PACKAGE_SN")
@ApiParam("包装条码")
private String packageSn;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;

@ -1718,11 +1718,14 @@ public class MesHqlPack {
if (!StringUtils.isEmpty(mesCustOrder.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesCustOrder.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesCustOrder.getOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesCustOrder.getOrderNo(), "orderNo", packBean);
}
if (!StringUtils.isEmpty(mesCustOrder.getCustCode())) {
DdlPreparedPack.getStringEqualPack(mesCustOrder.getCustCode(), "custCode", packBean);
DdlPreparedPack.getStringLikerPack(mesCustOrder.getCustCode(), "custCode", packBean);
}
if (!StringUtils.isEmpty(mesCustOrder.getCustOrderNo())) {
DdlPreparedPack.getStringEqualPack(mesCustOrder.getCustOrderNo(), "custOrderNo", packBean);
DdlPreparedPack.getStringLikerPack(mesCustOrder.getCustOrderNo(), "custOrderNo", packBean);
}
if (!StringUtils.isEmpty(mesCustOrder.getCreateUser())) {
DdlPreparedPack.getStringLikerPack(mesCustOrder.getCreateUser(), "createUser", packBean);
@ -1737,6 +1740,10 @@ public class MesHqlPack {
mesCustOrder.getOrderTimeStart(),
mesCustOrder.getOrderTimeEnd(),
"orderDate", packBean, true);
DdlPreparedPack.timeBuilder(
mesCustOrder.getCreateDateTimeStart(),
mesCustOrder.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
return packBean;
}
}

@ -0,0 +1,29 @@
package cn.estsh.i3plus.pojo.model.wms;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
/**
*
*/
@Data
public class WmsLogInfoSendToMqModel implements Serializable {
private static final long serialVersionUID = -5490167040159056107L;
@ApiParam("处理类型")
private int handleType;
@ApiParam("日志对象DAO层")
private String baseRepository;
@ApiParam("日志对象(新增)")
private BaseBean logBean;
@ApiParam("查询条件名称(修改)")
private String[] conditionNames;
@ApiParam("查询条件值(修改)")
private Object[] conditionValues;
@ApiParam("更新条件名称(修改)")
private String[] updateNames;
@ApiParam("更新条件值(修改)")
private Object[] updateValues;
}

@ -0,0 +1,51 @@
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;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-07 16:06
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_CONTAINER_TYPE")
@Api("容器类型")
public class WmsContainerType extends BaseBean {
private static final long serialVersionUID = 4849044986767609347L;
@Column(name = "CT_CODE",unique = true)
@ApiParam(value = "容器类型代码")
private String ctCode;
@Column(name = "CT_NAME")
@ApiParam(value = "容器类型名称")
private String ctName;
@Column(name = "USE_LIMIT")
@ApiParam(value = "使用期限")
private Integer useLimit;
@Column(name = "IS_RECYCLE")
@ApiParam(value = "是否回收")
@AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
private Integer isRecycle;
}

@ -27,6 +27,7 @@ import javax.persistence.*;
@Table(name = "WMS_MOVE_DETAILS", indexes = {
@Index(columnList = "PART_NO"),
@Index(columnList = "ORDER_NO"),
@Index(columnList = "ITEM_STATUS"),
@Index(columnList = "ORGANIZE_CODE")
})
@Api("库存移动单明细信息")

@ -27,6 +27,7 @@ import javax.persistence.*;
@Table(name = "WMS_MOVE_MASTER", indexes = {
@Index(columnList = "TRANS_TYPE_CODE"),
@Index(columnList = "ORDER_NO"),
@Index(columnList = "ORDER_STATUS"),
@Index(columnList = "ORGANIZE_CODE")
})
@Api("库存移动单主表信息")

@ -28,6 +28,7 @@ import javax.persistence.*;
@Table(name = "WMS_MOVE_SN", indexes = {
@Index(columnList = "PART_NO"),
@Index(columnList = "ORDER_NO"),
@Index(columnList = "ITEM_STATUS"),
@Index(columnList = "SN"),
@Index(columnList = "ORGANIZE_CODE")
})
@ -232,14 +233,14 @@ public class WmsMoveSn extends BaseBean {
this.refSrc = refSrc;
}
public WmsMoveSn(String partNo, String srcLocateNo, String destLocateNo, String createUser, String createDatetime, Integer busiTypeCode, Double qty) {
public WmsMoveSn(String partNo, String srcLocateNo, String destLocateNo, String createUser, String createDatetime, Integer busiTypeCode, Double destQty) {
this.partNo = partNo;
this.srcLocateNo = srcLocateNo;
this.destLocateNo = destLocateNo;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.busiTypeCode = busiTypeCode;
this.qty = qty;
this.destQty = destQty;
}
public WmsMoveSn(String organizeCode, String orderNo, Integer item, String partNo, String partNameRdd,

@ -0,0 +1,64 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Reference :
* @Author :
* @CreateDate : 2019-11-07 16:06
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_PACKAGE_SPEC")
@Api("包装规格")
public class WmsPackageSpec extends BaseBean {
private static final long serialVersionUID = 4849044986767609445L;
@Column(name = "SPEC_CODE",unique = true)
@ApiParam(value = "包装规格代码")
private String specCode;
@Column(name = "SPEC_NAME")
@ApiParam(value = "包装规格名称")
private String specName;
@Column(name = "QTY")
@ApiParam(value = "包装数量")
private Double qty;
@Column(name = "PARENT_SPEC")
@ApiParam(value = "上级规格")
private String parentSpec;
@Column(name = "SPEC_LEVEL")
@ApiParam(value = "规格层级")
private String specLevel;
@Column(name = "IS_MIXED")
@ApiParam(value = "是否混包")
private Integer isMixed;
@Column(name = "POCKET_TYPE")
@ApiParam(value = "默认容器类型")
private String pocketType;
@ApiParam(value = "上级规格名称")
@Transient
private String parentName;
}

@ -194,6 +194,19 @@ public class WmsPart extends BaseBean {
public WmsPart() {
}
public Double getQty() {
return qty == null? 0:qty;
}
public Double getMin() {
return min == null? 0: min;
}
public Double getMax() {
return max == null? 0:max;
}
public WmsPart(String partNo, String partName, Double maxQty, Double minQty, Double cqty, String partType) {
this.partNo = partNo;
this.partName = partName;

@ -0,0 +1,68 @@
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;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author :
* @CreateDate : 2019-11-07 16:06
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_PART_PACKAGE")
@Api("物料包装关系")
public class WmsPartPackage extends BaseBean {
private static final long serialVersionUID = 4849044986767609345L;
@Column(name = "PART_NO",unique = true)
@ApiParam(value = "物料编码")
private String partNo;
@Column(name = "SPEC_CODE")
@ApiParam(value = "包装规格代码")
private String specCode;
@Column(name = "SNP_QTY")
@ApiParam(value = "单包装数量")
private String snpQty;
@Column(name = "BOX_QTY")
@ApiParam(value = "包装箱数")
private String boxQty;
@Column(name = "IS_DEFAULT")
@ApiParam(value = "是否默认包规")
private String isDefault;
@Column(name = "IS_MIXED")
@ApiParam(value = "是否混包")
private String isMixed;
@Column(name = "IS_PRINT")
@ApiParam(value = "是否打印包装清单")
private String isPrint;
@Column(name = "TEMPLATE_NO")
@ApiParam(value = "包装清单模板")
private String templateNo;
@Column(name = "POCKET_TYPE")
@ApiParam(value = "容器类型")
private String pocketType;
}

@ -0,0 +1,27 @@
package cn.estsh.i3plus.pojo.wms.dto;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.wms.bean.WmsPartPackage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-07 16:06
* @Modify:
**/
@Data
@Api("物料包装关系入参")
public class PartPackagDto{
@ApiParam(value = "物料编码")
private String partNo;
@ApiParam(value = "工厂代码")
private List<WmsPartPackage> partPackages;
}

@ -2,15 +2,27 @@ package cn.estsh.i3plus.pojo.wms.dto;
import cn.estsh.i3plus.pojo.base.common.Pager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-07 16:06
* @Modify:
**/
@Data
@Api("库存预警入参")
public class QuanWarnDto extends Pager {
@ApiParam(value = "工厂代码")
private String organizeCode;
@ApiParam(value = "是否选择")
private Integer checked;
@ApiParam(value = "物料编码")
private String partNo;
@ApiParam(value = "物料类型")
private String partType;
public Integer getChecked() {

@ -45,6 +45,9 @@ public class WmsDataAuthModel extends BaseBean {
@ApiParam("业务类型列表")
private List<String> busiTypeList;
@ApiParam("业务类型列表")
private List<String> busiOperationTypeList;
@ApiParam(
value = "新增操作",
example = "0"

@ -0,0 +1,43 @@
package cn.estsh.i3plus.pojo.wms.modelbean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Entity;
/**
* @Description : model
* @Reference :
* @Author : qianhuasheng
* @CreateDate : 2019-10-31 20:04
* @Modify:
**/
@Data
@Entity
@Api("静态盘点查询输出model")
public class WmsStaticCsModel extends BaseBean {
public WmsStaticCsModel(String staticStr,String orderNo, String locateNo, String sn, double qty ) {
this.orderNo = orderNo;
this.locateNo = locateNo;
this.sn = sn;
this.qty = qty;
this.staticStr = staticStr;
}
@ApiParam(value = "订单号")
private String orderNo;
@ApiParam(value = "库存号")
private String locateNo;
@ApiParam(value = "条码")
private String sn;
@ApiParam(value = "数量")
private double qty;
@ApiParam(value = "状态")
private String staticStr;
public WmsStaticCsModel() {
}
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsContainerType;
import org.springframework.stereotype.Repository;
/**
* @Description :Repository
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-08 10:19
* @Modify:
**/
@Repository
public interface WmsContainerTypeRepository extends BaseRepository<WmsContainerType, Long> {
}

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsContainerType;
import cn.estsh.i3plus.pojo.wms.bean.WmsPackageSpec;
import org.springframework.stereotype.Repository;
/**
* @Description :Repository
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-08 10:19
* @Modify:
**/
@Repository
public interface WmsPackageSpecRepository extends BaseRepository<WmsPackageSpec, Long> {
}

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsPackageSpec;
import cn.estsh.i3plus.pojo.wms.bean.WmsPartPackage;
import org.springframework.stereotype.Repository;
/**
* @Description :Repository
* @Reference :
* @Author : gcj
* @CreateDate : 2019-11-08 10:19
* @Modify:
**/
@Repository
public interface WmsPartPackageRepository extends BaseRepository<WmsPartPackage, Long> {
}
Loading…
Cancel
Save