yun-zuoyi
曾贞一 6 years ago
commit bb92161133

@ -17,6 +17,10 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,18 @@
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;
/**
* @Description : bean
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-29
* @Modify:
**/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcludeImportExport {
}

@ -0,0 +1,26 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import cn.estsh.i3plus.pojo.aps.validator.MainKeyValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-29
* @Modify:
**/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={MainKeyValidator.class})
public @interface MainKey {
String message() default "主键重复";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
@ -13,6 +14,8 @@ import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;
@ -27,6 +30,7 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
@Api("订单基类")
@ExcludeImportExport
public class BaseOrder extends BaseCode {
@Column(name="MATERIAL_ID")
@ -37,6 +41,7 @@ public class BaseOrder extends BaseCode {
@Column(name="COUNT")
@ApiParam(value ="数量")
@FieldAnnotation(notEmpty = true)
@Min(0)
private Double count;
@Column(name="PRIORITY")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
@ -21,6 +22,7 @@ import javax.persistence.MappedSuperclass;
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
@Api("规则参数基类")
@ExcludeImportExport
public class BaseRule extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="规则编码")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
@ -17,6 +18,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@Api("BOM树")
@ExcludeImportExport
public class BomTree extends BaseAPS {
@ApiParam(value ="物料类型")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
@ -32,6 +33,7 @@ import java.sql.JDBCType;
@EqualsAndHashCode(callSuper = true)
@Table(name="APS_FIELD_INFO")
@Api("字段信息")
@ExcludeImportExport
public class FieldInfo extends BaseCode {
@Column(name="CLASS_NAME")
@ApiParam(value ="所属类简称")

@ -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.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -11,6 +13,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Min;
/**
* @Description :
@ -30,17 +33,21 @@ public class FurnaceCapacity extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="STAND_CODE")
@ApiParam(value ="标准工序编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "StandOperation")
private String standCode;
@Column(name="MATERIAL_CODE")
@ApiParam(value ="物料编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Material")
private String materialCode;
@Column(name="CAPACITY")
@ApiParam(value ="容量限制")
@Min(0)
private Double capacity;
}

@ -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.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -30,6 +32,7 @@ public class FurnaceSetting extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="SAME_MATERIAL")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
@ -21,6 +22,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@Api("订单树")
@ExcludeImportExport
public class OrderTree extends BaseAPS {
@ApiParam(value ="物料编码")
private String material;

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
@ -29,6 +30,7 @@ import java.util.List;
@Entity
@Table(name = "APS_PARENT_WORK")
@Api("父工作")
@ExcludeImportExport
public class ParentWork extends BaseAPS {
@Column(name="count")
@ApiParam(value ="数量")

@ -24,7 +24,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_PLAN_FEEDBACK")
@Api("物料")
@Api("工作反馈")
public class PlanFeedback extends BaseAPS {
@Column(name="WORK_ID")

@ -27,7 +27,7 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_PRODUCT_ROUTING")
@Api("物料")
@Api("工艺路线")
public class ProductRouting extends BaseCode {
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")

@ -24,7 +24,7 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_PURCHASE_ORDER")
@Api("工艺路线")
@Api("采购订单")
public class PurchaseOrder extends BaseOrder {
@Column(name="SPECIFY_TOP_ORDER")
@ApiParam(value ="指定顶层订单")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
@ -26,6 +27,7 @@ import javax.persistence.Table;
@Entity
@Table(name = "APS_RULE_DETAIL")
@Api("规则明细")
@ExcludeImportExport
public class RuleDetail extends BaseAPS {
@Column(name="TYPE")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.ERuleGroup;
@ -26,6 +27,7 @@ import java.util.List;
@Entity
@Table(name = "APS_RULE_GROUP")
@Api("规则组合")
@ExcludeImportExport
public class RuleGroup extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
@ -21,7 +22,8 @@ import javax.persistence.Table;
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_SERIAL_NUMBER")
@Api("取消计划规则")
@Api("流水号")
@ExcludeImportExport
public class SerialNumber extends BaseAPS {
@Column(name="NUMBER")

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
@ -22,6 +23,7 @@ import java.util.Map;
**/
@Data
@MappedSuperclass
@ExcludeImportExport
public abstract class BaseAPS extends BaseBean {
@JsonIgnore
private transient Map<String, Object> customFields = new HashMap<>();

@ -1,6 +1,9 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -18,6 +21,8 @@ import javax.persistence.MappedSuperclass;
@Data
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
@MainKey(groups = {InsertGroup.class})
@ExcludeImportExport
public abstract class BaseCode extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
/**
* @Description : Bean
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-29
* @Modify:
**/
@Data
public class BeanModel {
private String key;
private String name;
}

@ -19,5 +19,6 @@ public class GanttCalendarModel {
private Date end_date;
private String color;
private Long id;
private Long workId;
private String text;
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
@Data
public class GanttLineModel {
private long id;
private long source;
private long target;
private int type;
}

@ -0,0 +1,4 @@
package cn.estsh.i3plus.pojo.aps.validator;
public interface InsertGroup {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.aps.validator;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
public class MainKeyValidator implements ConstraintValidator<MainKey, BaseBean> {
@Override
public boolean isValid(BaseBean bean, ConstraintValidatorContext constraintValidatorContext) {
return true;
}
}

@ -446,8 +446,8 @@ public class ApsEnumUtil {
NONE("NONE", "不限制"),
NO_PO("NO_PO", "未计划"),
NO_PLAN("NO_PLAN", "计划完毕"),
NO_POR("NO_POR", ""),
NO_PPRS("NO_PPRS", "");
NO_POR("NO_POR", "指示完毕"),
NO_PPRS("NO_PPRS", "已确认");
private String value;
private String description;

@ -1308,7 +1308,7 @@ public class MesEnumUtil {
MES_SHIFT(180, "班次"),
MES_SHIFT_GROUP(190, "班组"),
MES_WORK_CELL_PARAM_CFG(200, "工作单元参数配置"),
MES_PROCESS_BOM(210, "工序BOM表");
MES_STATION_BOM(210, "工位BOM表");
private int value;
private String description;
@ -1461,10 +1461,10 @@ public class MesEnumUtil {
}
/**
* mes
* mes Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_IS_REPEAT {
public enum MES_STATION_BOM_IS_REPEAT {
REPEATABLE(1, "可重复"),
NOT_REPEAT(2, "不可重复");
@ -1472,7 +1472,7 @@ public class MesEnumUtil {
private int value;
private String description;
MES_IS_REPEAT(int value, String description) {
MES_STATION_BOM_IS_REPEAT(int value, String description) {
this.value = value;
this.description = description;
}
@ -1486,8 +1486,8 @@ public class MesEnumUtil {
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_IS_REPEAT getByValue(int value) {
for (MES_IS_REPEAT mesInsertExcel : values()) {
public static MES_STATION_BOM_IS_REPEAT getByValue(int value) {
for (MES_STATION_BOM_IS_REPEAT mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) {
return mesInsertExcel;
}
@ -1506,6 +1506,157 @@ public class MesEnumUtil {
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 Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_CHECK {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_CHECK(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 Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_FEED {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_FEED(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 Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_BIND_KEY {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_BIND_KEY(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;
}
}
/**

@ -12,6 +12,220 @@ import org.apache.commons.lang3.StringUtils;
**/
public class MesPcnEnumUtil {
/**
* mes Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_REPEAT {
REPEATABLE(1, "可重复"),
NOT_REPEAT(2, "不可重复");
private int value;
private String description;
MES_STATION_BOM_IS_REPEAT(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_STATION_BOM_IS_REPEAT getByValue(int value) {
for (MES_STATION_BOM_IS_REPEAT mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == 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 == 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CONFIG_TYPE {
FASTDFS_SAVE_PATH(10, "SAVE_PATH", ""),
NGINX_HOST(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", ""),
PCN_LOGOUT(190, "PCN_LOGOUT", "");
private int value;
private String code;
private String description;
CONFIG_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 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;
}
}
/**
* pcn
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_ACTION_TYPE {
BIND(10, "绑定"),
UNTYING(20, "解绑");
private int value;
private String description;
MES_ACTION_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_ACTION_TYPE getByValue(int value) {
for (MES_ACTION_TYPE mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == 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 == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* pcn
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_IS_BIND_KEY {
IS_BIND_KEY(1, "是"),
NO_BIND_KEY(2, "否");
private int value;
private String description;
MES_IS_BIND_KEY(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_IS_BIND_KEY getByValue(int value) {
for (MES_IS_BIND_KEY mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == 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 == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/

@ -27,9 +27,9 @@ import javax.persistence.Transient;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PROCESS_BOM")
@Table(name = "MES_STATION_BOM")
@Api("工序物料清单")
public class MesProcessBom extends BaseBean {
public class MesStationBom extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("零件号")
private String partNo;
@ -46,14 +46,6 @@ public class MesProcessBom extends BaseBean {
@ApiParam("工作单元")
private String workCellCode;
@Column(name = "ROUTE_CODE")
@ApiParam("流程代码")
private String routeCode;
@Column(name = "PROCESS_CODE")
@ApiParam("工序代码")
private String processCode;
@Column(name = "ITEM_PART_NO")
@ApiParam("子零件")
private String itemPartNo;
@ -67,10 +59,6 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "子零件数量", example = "0")
private Double qty;
@Transient
@ApiParam(value = "绑定数量")
private Double boundQty;
@Column(name = "IS_REPEAT")
@ApiParam(value = "是否可重复")
private Integer isRepeat;
@ -83,11 +71,15 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "是否投料配置")
private Integer isFeed;
@Column(name = "is_BIND_KEY")
@Column(name = "IS_BIND_KEY")
@ApiParam(value = "是否绑定关键件")
private Integer isBindKey;
@Transient
@ApiParam(value = "绑定数量")
private Double boundQty;
@Transient
@ApiParam("是否已绑定")
private Boolean isBind;
@ -129,9 +121,8 @@ public class MesProcessBom extends BaseBean {
@Override
public String toString() {
return "MesProcessBom{" +
return "MesStationBom{" +
"partNo='" + partNo + '\'' +
", processCode='" + processCode + '\'' +
", itemPartNo='" + itemPartNo + '\'' +
", qty=" + qty +
", isRepeat=" + isRepeat +

@ -0,0 +1,49 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesDefect;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\11\28 19:50
* @Modify:
**/
@Data
public class DefectModel {
private Long id;
@ApiParam("缺陷代码")
private String defectCode;
@ApiParam("缺陷名称")
private String defectName;
@ApiParam("缺陷类型")
private String defectType;
@ApiParam("缺陷类型名称")
private String defectTypeName;
@ApiParam("缺陷位置")
private String defectLocation;
@ApiParam("缺陷类型子集")
private List<DefectModel> mesDefectList;
public DefectModel() {
}
public DefectModel(Long id, String defectCode, String defectName, String defectType, String defectTypeName) {
this.id = id;
this.defectCode = defectCode;
this.defectName = defectName;
this.defectType = defectType;
this.defectTypeName = defectTypeName;
}
}

@ -11,7 +11,7 @@ import lombok.Data;
* @Modify:
**/
@Data
public class MesProcessBomModel {
public class MesStationBomModel {
private Long id;
@ApiParam("子物料编码")
@ -40,11 +40,11 @@ public class MesProcessBomModel {
@ApiParam("报废数")
private Integer scrapQty;
public MesProcessBomModel() {
public MesStationBomModel() {
}
public MesProcessBomModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) {
public MesStationBomModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
@ -59,7 +59,7 @@ public class MesProcessBomModel {
this.parentPartName = parentPartName;
}
public MesProcessBomModel(String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) {
public MesStationBomModel(String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) {
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
this.qty = qty;

@ -33,6 +33,8 @@ public class RequestModel {
private Integer destStatus; // 目的状态
private List<String> orderNoList;//工单编号
public RequestModel(List<MesQueueOrder> queueOrderList, Double currentSeq, Double nextSeq) {
this.queueOrderList = queueOrderList;
this.currentSeq = currentSeq;
@ -101,6 +103,14 @@ public class RequestModel {
this.queueOrderList = queueOrderList;
}
public void setOrderNoList(List<String> orderNoList) {
this.orderNoList = orderNoList;
}
public List<String> getOrderNoList() {
return orderNoList;
}
public Double getCurrentSeq() {
return currentSeq == null ? 0.0d : currentSeq;
}

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProcessBom;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesStationBom;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
@ -16,8 +16,8 @@ import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("工BOM model")
public class ProcessBomModel extends MesProcessBom {
@Api("工BOM model")
public class StationBomModel extends MesStationBom {
@ApiParam("上料数量")
private Long cellFeedQty;

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProcessBom;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesStationBom;
import org.springframework.stereotype.Repository;
/**
@ -12,5 +12,5 @@ import org.springframework.stereotype.Repository;
* @Modify:
**/
@Repository
public interface MesProcessBomRepository extends BaseRepository<MesProcessBom, Long> {
public interface MesStationBomRepository extends BaseRepository<MesStationBom, Long> {
}

@ -98,17 +98,17 @@ public class MesHqlPack {
/**
* BOM
*
* @param mesProcessBom
* @param mesRawPartSn
* @param stationBom
* @param rawPartSn
* @return
*/
public static DdlPackBean getMesProcessBomRawPartSn(MesProcessBom mesProcessBom, MesRawPartSn mesRawPartSn) {
DdlPackBean packBean = getAllBaseData(mesProcessBom.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(mesProcessBom.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getPartNo(), "partNo", packBean);
public static DdlPackBean getStationBomRawPartSn(MesStationBom stationBom, MesRawPartSn rawPartSn) {
DdlPackBean packBean = getAllBaseData(stationBom.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(stationBom.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getPartNo(), "partNo", packBean);
DdlPreparedPack.getNumEqualPack(MesPcnEnumUtil.PROCESS_BOM_ISFEED.FEED.getValue(), "isFeed", packBean);
DdlPreparedPack.getStringEqualPack(mesRawPartSn.getPartNo(), "itemPartNo", packBean);
DdlPreparedPack.getStringEqualPack(rawPartSn.getPartNo(), "itemPartNo", packBean);
return packBean;
}

@ -94,4 +94,28 @@ public class MesQcCheckData extends BaseBean {
@ApiParam("客户代码")
private String custCode;
@Transient
@ApiParam("班次")
private String shiftCode;
@Transient
@ApiParam("班组")
private String shiftGroup;
@Transient
@ApiParam("班长")
private String squadLeader;
@Transient
@ApiParam("工作单元名称")
private String workCellName;
@Transient
@ApiParam("物料名称")
private String partNoName;
public MesQcCheckData(String createDatetime, String createUser) {
super.createDatetime = createDatetime;
super.createUser = createUser;
}
}

@ -9,16 +9,14 @@ import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
/**
* @Description :
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
@ -29,9 +27,9 @@ import java.util.Date;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PROCESS_BOM")
@Api("工物料清单")
public class MesProcessBom extends BaseBean {
@Table(name = "MES_STATION_BOM")
@Api("工物料清单")
public class MesStationBom extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("零件号")
private String partNo;
@ -48,15 +46,6 @@ public class MesProcessBom extends BaseBean {
@ApiParam("工作单元")
private String workCellCode;
@Column(name = "ROUTE_CODE")
@ApiParam("流程代码")
private String routeCode;
@Column(name = "PROCESS_CODE")
@ApiParam("工序代码")
private String processCode;
@Column(name = "ITEM_PART_NO")
@ApiParam("子零件")
private String itemPartNo;
@ -69,10 +58,6 @@ public class MesProcessBom extends BaseBean {
@ColumnDefault("0")
@ApiParam(value = "子零件数量", example = "0")
private Double qty;
@Transient
@ApiParam(value = "绑定数量")
private Double boundQty;
@Column(name = "IS_REPEAT")
@ApiParam(value = "是否可重复")
@ -99,6 +84,9 @@ public class MesProcessBom extends BaseBean {
@ApiParam("显示颜色")
private String color;
@Transient
@ApiParam(value = "绑定数量")
private Double boundQty;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
@ -122,9 +110,8 @@ public class MesProcessBom extends BaseBean {
@Override
public String toString() {
return "MesProcessBom{" +
return "MesStationBom{" +
"partNo='" + partNo + '\'' +
", processCode='" + processCode + '\'' +
", itemPartNo='" + itemPartNo + '\'' +
", qty=" + qty +
", isRepeat=" + isRepeat +

@ -66,4 +66,8 @@ public class ProdOrgModel extends BaseBean {
@Transient
@ApiParam("工位类型")
private Integer workCellType;
@Transient
@ApiParam("序号")
private Integer seq;
}

@ -32,6 +32,10 @@ public class RequestModel {
private Integer destStatus; // 目的状态
private List<String> orderNoList;//工单编号
private List<ActionRequestBean> requestBeanList;//工单下达
public RequestModel(List<MesQueueOrder> queueOrderList, Double currentSeq, Double nextSeq) {
this.queueOrderList = queueOrderList;
this.currentSeq = currentSeq;
@ -84,6 +88,20 @@ public class RequestModel {
this.queueOrderList = queueOrderList;
}
public void setOrderNoList(List<String> orderNoList) {
this.orderNoList = orderNoList;
}
public List<String> getOrderNoList() {
return orderNoList;
}
public void setRequestBeanList(List<ActionRequestBean> requestBeanList) {
this.requestBeanList = requestBeanList;
}
public List<ActionRequestBean> getRequestBeanList() { return requestBeanList; }
public Double getCurrentSeq() {
return currentSeq == null ? 0.0d : currentSeq;
}

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesProcessBom;
import cn.estsh.i3plus.pojo.mes.bean.MesStationBom;
import org.springframework.stereotype.Repository;
/**
@ -12,5 +12,5 @@ import org.springframework.stereotype.Repository;
* @Modify:
**/
@Repository
public interface MesProcessBomRepository extends BaseRepository<MesProcessBom, Long> {
public interface MesStationBomRepository extends BaseRepository<MesStationBom, Long> {
}

@ -746,25 +746,24 @@ public class MesHqlPack {
/**
* MESBOM
*
* @param processBom
* @param stationBom
* @return
*/
public static DdlPackBean getMesProcessBom(MesProcessBom processBom, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(processBom, organizeCode);
DdlPreparedPack.getStringLikerPack(processBom.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringLikerPack(processBom.getItemPartNo(), "itemPartNo", packBean);
DdlPreparedPack.getStringLikerPack(processBom.getProcessCode(), "processCode", packBean);
public static DdlPackBean getStationBom(MesStationBom stationBom, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(stationBom, organizeCode);
DdlPreparedPack.getStringLikerPack(stationBom.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringLikerPack(stationBom.getItemPartNo(), "itemPartNo", packBean);
return packBean;
}
public static DdlPackBean getMesProcessBomExcludeById(MesProcessBom mesProcessBom, String org) {
public static DdlPackBean getStationBomExcludeById(MesStationBom stationBom, String org) {
DdlPackBean packBean = getAllBaseData(org);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getItemPartNo(), "itemPartNo", packBean);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(mesProcessBom.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getNumEqualPack(mesProcessBom.getIsFeed(), "isFeed", packBean);
DdlPreparedPack.getNumNOEqualPack(mesProcessBom.getId(), "id", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getItemPartNo(), "itemPartNo", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringEqualPack(stationBom.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getNumEqualPack(stationBom.getIsFeed(), "isFeed", packBean);
DdlPreparedPack.getNumNOEqualPack(stationBom.getId(), "id", packBean);
return packBean;
}
@ -1621,6 +1620,7 @@ public class MesHqlPack {
/**
*
*
* @param mesObjectCfg
* @param organizeCode
* @return
@ -1644,6 +1644,7 @@ public class MesHqlPack {
/**
*
*
* @param mesDataObject
* @param organizeCode
* @return
@ -1667,6 +1668,7 @@ public class MesHqlPack {
/**
*
*
* @param mesProdPack
* @param organizeCode
* @return
@ -1693,6 +1695,7 @@ public class MesHqlPack {
/**
*
*
* @param mesProductEncodeCfg
* @param organizeCode
* @return
@ -1716,6 +1719,7 @@ public class MesHqlPack {
/**
*
*
* @param mesCustOrder
* @param organizeCode
* @return
@ -1756,6 +1760,7 @@ public class MesHqlPack {
/**
*
*
* @param mesLabelTemplate
* @param organizeCode
* @return
@ -1773,6 +1778,7 @@ public class MesHqlPack {
/**
*
*
* @param mesKeyAction
* @param organizeCode
* @return
@ -1796,6 +1802,7 @@ public class MesHqlPack {
/**
*
*
* @param mesActionIf
* @param organizeCode
* @return
@ -1813,6 +1820,7 @@ public class MesHqlPack {
/**
*
*
* @param mesIf
* @param organizeCode
* @return
@ -1836,6 +1844,7 @@ public class MesHqlPack {
/**
*
*
* @param mesProduceSn
* @param organizeCode
* @return
@ -1872,6 +1881,7 @@ public class MesHqlPack {
/**
*
*
* @param mesProdBindRecord
* @param organizeCode
* @return
@ -1914,6 +1924,7 @@ public class MesHqlPack {
/**
*
*
* @param ifPackageDetail
* @param organizeCode
* @return
@ -1935,6 +1946,7 @@ public class MesHqlPack {
/**
*
*
* @param mesRepairRecord
* @param organizeCode
* @return
@ -1971,6 +1983,7 @@ public class MesHqlPack {
/**
*
*
* @param mesQcCheckData
* @param organizeCode
* @return
@ -2001,6 +2014,7 @@ public class MesHqlPack {
/**
*
*
* @param mesProduceSnTravel
* @param organizeCode
* @return

@ -42,7 +42,7 @@ public class SwebProcurementPlanOrder extends BaseBean {
private String vendorName;
@Column(name = "PART_NO")
@ApiParam(value = "物料名称")
@ApiParam(value = "物料编号")
private String partNo;
@Column(name = "PART_NAME")
@ -53,8 +53,4 @@ public class SwebProcurementPlanOrder extends BaseBean {
@ApiParam(value = "是否寄售")
private Integer consignment=2;
@Column(name = "organize_code")
@ApiParam(value = "组织代码")
private String organizeCode;
}

@ -23,13 +23,13 @@ import javax.persistence.*;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_TRANS_QUAN", indexes = {
@Table(name = "WMS_TRANS_QUAN"/*, indexes = {
@Index(columnList = "WH_NO"),
@Index(columnList = "ZONE_NO"),
@Index(columnList = "LOCATE_NO"),
@Index(columnList = "REF_SRC"),
@Index(columnList = "ORGANIZE_CODE")
})
}*/)
@Api("库存交易信息")
public class WmsTransQuan extends BaseBean {

@ -163,8 +163,8 @@ public class WmsHqlPack {
//查询参数封装
DdlPreparedPack.getNumEqualPack(swebProcurementPlanOrder.getOrganizeCode(), "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(swebProcurementPlanOrder.getPartNo(), "partNo", packBean);
DdlPreparedPack.getNumEqualPack(swebProcurementPlanOrder.getPartName(), "partName", packBean);
DdlPreparedPack.getStringEqualPack(swebProcurementPlanOrder.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(swebProcurementPlanOrder.getPartName(), "partName", packBean);
DdlPreparedPack.getStringEqualPack(swebProcurementPlanOrder.getVendorCode(), "vendorCode", packBean);
DdlPreparedPack.getStringEqualPack(swebProcurementPlanOrder.getVendorName(), "vendorName", packBean);
DdlPreparedPack.getStringRightLikerPack(swebProcurementPlanOrder.getOrderNo(), "orderNo", packBean);

Loading…
Cancel
Save