yun-zuoyi
WYnneaoapc 6 years ago
commit 35f625ac21

@ -1,10 +1,13 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.RESOURCE_CLASS;
import cn.estsh.i3plus.pojo.aps.enums.RESOURCE_LOCK_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.RESOURCE_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.TIME_ROUND_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EResource;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -12,6 +15,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -96,4 +100,7 @@ public class Resource extends BaseCode {
@Column(name="LOCK_TIME")
@ApiParam(value ="锁定时间长度")
private String lockTime;
@JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EResource.WorkPlans); }
}

@ -0,0 +1,47 @@
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.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
@Entity
@Table(name = "APS_SHIPPING_TIME")
@Api("运输时间")
public class ShippingTime extends BaseAPS {
@Column(name="PREV_RES_CODE")
@ApiParam(value ="前资源编码")
private String prevResCode;
@Column(name="POST_RES_CODE")
@ApiParam(value ="后资源编码")
private String postResCode;
@Column(name="PREV_STAND_CODE")
@ApiParam(value ="前标准工序编码")
private String prevStandCode;
@Column(name="POST_STAND_CODE")
@ApiParam(value ="后标准工序编码")
private String postStandCode;
@Column(name="TIME")
@ApiParam(value ="运输时间")
private String time;
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
private Integer priority;
}

@ -1,8 +1,10 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.RippleAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.WORK_PLAN_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EWorkPlan;
import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation;
import io.swagger.annotations.Api;
@ -33,6 +35,11 @@ import java.util.List;
@Table(name="APS_WORK_PLAN")
@Api("工作计划")
public class WorkPlan extends BaseAPS {
@Column(name="TYPE")
@ApiParam(value ="工作计划类型")
@FieldAnnotation(modify = false, display = false)
private WORK_PLAN_TYPE type;
@Column(name="PREV_SET_BEGIN")
@ApiParam(value ="前设置开始时间")
@FieldAnnotation(modify = false)
@ -51,6 +58,8 @@ public class WorkPlan extends BaseAPS {
@Column(name="PRODUCE_BEGIN")
@ApiParam(value ="生产开始时间")
@FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"Work.PrevRelations.PrevWork.WorkPlan.produceBegin",
"PrevPlan.produceBegin"}, method = "calcPositive")
private Date produceBegin;
@Column(name="PRODUCE_END")
@ -81,6 +90,7 @@ public class WorkPlan extends BaseAPS {
@Column(name="LOCK_BEGIN")
@ApiParam(value ="锁定开始时间")
@FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"PostRelations.PostWork.WorkPlan.produceBegin"}, method = "calcPositiveLockBegin")
private Date lockBegin;
@Column(name="LOCK_END")

@ -34,17 +34,17 @@ public class WorkResource extends BaseAPS {
@Column(name="PREV_TIME")
@ApiParam(value ="前设置时间")
@FieldAnnotation(modify = false)
private Long prevTime;
private Integer prevTime;
@Column(name="PRODUCE_TIME")
@ApiParam(value ="制造时间")
@FieldAnnotation(modify = false)
private Long produceTime;
private Integer produceTime;
@Column(name="POST_TIME")
@ApiParam(value ="后设置时间")
@FieldAnnotation(modify = false)
private Long postTime;
private Integer postTime;
@Column(name="PRIORITY")
@ApiParam(value ="优先级")

@ -48,7 +48,7 @@ public class BeanRelation {
return result;
}
for (Enum<?> holder : beanInfo.getAllHolders()) {
result.put(holder, new ArrayList<>());
result.put(holder, new LinkedList<>());
}
return result;
}

@ -139,12 +139,12 @@ public class DateDuration {
* @param amount
* @return
*/
public long getTime(double amount) {
public int getTime(double amount) {
if (amount < PRECISION)
return getTime();
double result = (amount * this.rate) + this.time;
return (long)Math.ceil(result);
return (int)Math.ceil(result);
}
/**

@ -8,6 +8,7 @@ package cn.estsh.i3plus.pojo.aps.enums;
* @Modify:
**/
public enum RESOURCE_CLASS {
MAIN, // 主资源
ASS // 副资源
LIMITLESS, // 无限能力
SINGLE, // 单能力
BATCH // 炉资源
}

@ -8,7 +8,6 @@ package cn.estsh.i3plus.pojo.aps.enums;
* @Modify:
**/
public enum RESOURCE_TYPE {
LIMITLESS, // 无限能力
SINGLE, // 单能力
BATCH // 炉资源
MAIN, // 主资源
ASS // 副资源
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum WORK_PLAN_TYPE {
MAIN_PLAN, // 主资源计划
ASS_PLAN, // 副资源计划
BATCH_PLAN // 炉资源计划
}

@ -1,4 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EResource {
WorkPlans
}

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

@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="Resource">
<Relation field="WorkPlans" name="WorkPlan" reverse="Resource" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkPlan">
<Relation field="Resource" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<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">

@ -0,0 +1,179 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 13:37
* @Modify:
**/
public class LacEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_CASE_TYPE {
SOFTWARE(10, "软件"),
HARDWARE(20, "硬件");
private int value;
private String description;
private SUIT_CASE_TYPE (int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static LacEnumUtil.SUIT_CASE_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum HARDWARE_TYPE {
OPC_READ(10, "读OPC"),
OPC_WRITE(20, "写OPC");
private int value;
private String description;
private HARDWARE_TYPE (int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static LacEnumUtil.HARDWARE_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PARAM_TYPE{
OUT_PARAM(1,"出参"),
IN_PARAM(2,"入参");
private int value;
private String description;
PARAM_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum STACK_STATUS{
RUNNING(1,"运行中"),
PAUSE(2,"暂停"),
FINISH(3,"完成");
private int value;
private String description;
STACK_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static boolean isRunning(int val) {
return RUNNING.getValue() == val;
}
}
}

@ -12,6 +12,43 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* MesRepair
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_REPAIR_TYPE {
SCRATCH(10, "划痕"),
FRACTURE(20, "破碎"),
SCRAP_TYPE3(30, "缺失");
private int value;
private String description;
MES_REPAIR_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -848,15 +885,15 @@ public class MesEnumUtil {
* pcn
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_IS_KEY {
public enum MES_IS_BIND_KEY {
IS_KEY(10, "是"),
NO_KEY(20, "否");
IS_BIND_KEY(1, "是"),
NO_BIND_KEY(2, "否");
private int value;
private String description;
MES_IS_KEY(int value, String description) {
MES_IS_BIND_KEY(int value, String description) {
this.value = value;
this.description = description;
}
@ -870,8 +907,8 @@ public class MesEnumUtil {
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_IS_KEY getByValue(int value) {
for (MES_IS_KEY mesInsertExcel : values()) {
public static MES_IS_BIND_KEY getByValue(int value) {
for (MES_IS_BIND_KEY mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) {
return mesInsertExcel;
}

@ -285,6 +285,7 @@ public class WmsEnumUtil {
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
@ -799,7 +800,8 @@ public class WmsEnumUtil {
VDA_PICKING_GOODS("VDA_PICKING_GOODS", "VDA生产领料"),
VDA_NC_FREEZE("VDA_NC_FREEZE", "VDA_NC冻结"),
VDA_ONE_PICKING_GOODS("VDA_ONE_PICKING_GOODS", "VDA单箱领料"),
VDA_NC_UN_FREEZE("VDA_NC_UN_FREEZE", "VDA_NC解冻");
VDA_NC_UN_FREEZE("VDA_NC_UN_FREEZE", "VDA_NC解冻"),
VDA_PART_BOXING_ERROR_PROOFING("VDA_PART_BOXING_ERROR_PROOFING", "VDA装箱防错");
private String value;
private String description;
@ -3440,7 +3442,8 @@ public class WmsEnumUtil {
COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"),
PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"),
OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"),
OTHER("ELSE", "其他"),;
OTHER("ELSE", "其他"),
;
private String value;
private String description;
@ -3560,7 +3563,8 @@ public class WmsEnumUtil {
public enum PART_ASSOCIATE_TYPE {
LINE(10, "LINE", "产线"),
CUSTOMER(20, "CUSTOMER", "客户"),
VENDOR(30, "VENDOR", "供应商");
VENDOR(30, "VENDOR", "供应商"),
BOXING_ERROR_PROOFING(40, "BOXING_ERROR_PROOFING","装箱防错");
private int value;
private String code;
@ -3729,6 +3733,7 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@ -3782,6 +3787,7 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@ -3836,4 +3842,77 @@ public class WmsEnumUtil {
}
}
/**
* MOVE_TO_ERP
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MOVE_TO_ERP_IS_SYNC {
SYNCHRONIZED(1, "已同步"), UN_SYNCHRONIZED(2, "未同步"), NON_SYNCHRONIZED(3, "不同步");
private int value;
private String description;
MOVE_TO_ERP_IS_SYNC(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;
}
}
/**
*
* 10=20=30=BMW40=BMW50=BMW60=
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PART_BOXING_ERROR_PROOFING_TYPE {
PART_NO(10, "零件装箱防错"),
SN(20, "条码装箱防错"),
BMW_TAG(30, "BMW标签防错"),
BMW_PART(40, "BMW零件防错"),
BMW_DISPATCH(50, "BMW发运防错"),
SINGLE_DISPATCH(60, "单件发运防错");
private int value;
private String description;
PART_BOXING_ERROR_PROOFING_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;
}
}
}

@ -9,11 +9,12 @@ 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.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
@ -92,4 +93,8 @@ public class LacCommandStackRecord extends BaseBean {
@ApiParam(value ="执行说明")
private String executionDescription;
@Transient
@ApiParam(value ="步骤列表")
private List<LacCommandStackStep> stepList;
}

@ -9,10 +9,11 @@ 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;
import java.util.List;
/**
* @Description :
@ -47,7 +48,7 @@ import javax.persistence.Table;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="LAC_COMMAND_STACK_STEP")
@Api(value="指令集模板",description = "指令集模板信息")
@Api(value="指令集步骤",description = "指令集步骤")
public class LacCommandStackStep extends BaseBean {
@Column(name="TEMPLATE_ID")
@ -69,10 +70,13 @@ public class LacCommandStackStep extends BaseBean {
@Column(name="STEP_EXEC_COND")
@ApiParam(value ="步骤执行条件")
private Integer stepExecCond;
private Double stepExecCond;
@Column(name="STEP_DESCRIPTION")
@ApiParam(value ="步骤执行条件")
private String stepDescription;
@Transient
@ApiParam(value ="步骤任务列表")
private List<LacCommandStackStepTask> stepTaskList;
}

@ -13,6 +13,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -67,11 +68,15 @@ public class LacCommandStackStepTask extends BaseBean {
// @ApiParam(value ="模板代码")
// private String templateCodeRdd;
@Column(name="STEP_ID")
@ApiParam(value ="步骤ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long stepId;
@Column(name="TASK_INSTANCE_ID")
@ApiParam(value ="任务实例ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long taskInstanceId;
//
// @Column(name="STEP_NAME_RDD")
// @ApiParam(value ="步骤名称")
@ -94,9 +99,10 @@ public class LacCommandStackStepTask extends BaseBean {
@ApiParam(value ="任务代码")
private String taskCodeRdd;
@Column(name="IS_CRUX")
@ApiParam(value ="是否关键")
private Integer isCrux;
@Transient
@ApiParam(value ="适配任务")
private LacSuitTask lacSuitTask;
}

@ -9,10 +9,11 @@ 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;
import java.util.List;
/**
* @Description :
@ -77,4 +78,7 @@ public class LacCommandStackTemplate extends BaseBean {
@ApiParam(value ="模板描述")
private String templateDescription;
@Transient
@ApiParam(value ="步骤列表")
private List<LacCommandStackStep> stepList;
}

@ -13,6 +13,8 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
@ -71,6 +73,10 @@ public class LacSuitTask extends BaseBean {
@ApiParam(value ="超时时间")
private Integer taskTimeout;
public int getTaskTimeoutVal(){
return taskTimeout == null ? -1 : taskTimeout.intValue();
}
@Column(name="TASK_RETRY_NUM")
@ApiParam(value ="重试次数")
private Integer taskRetryNum;
@ -113,4 +119,23 @@ public class LacSuitTask extends BaseBean {
@ApiParam(value ="任务描述")
private String taskDescription;
@Transient
@ApiParam(value ="适配套件")
private LacSuitCase lacSuitCase;
@Transient
@ApiParam(value ="任务实例id")
private Long taskInstanceId;
@Transient
@ApiParam(value ="适配参数")
private List<LacSuitTaskParam> lacSuitTaskParamList;
@Transient
@ApiParam(value ="入参适配")
private List<LacSuitTaskParamAdapter> inputParamAdapterList;
@Transient
@ApiParam(value ="出参适配")
private List<LacSuitTaskParamAdapter> outputParamAdapterList;
}

@ -13,6 +13,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -87,4 +88,8 @@ public class LacSuitTaskParam extends BaseBean {
@Column(name="PARAM_DESCRIPTION")
@ApiParam(value ="参数描述")
private String paramDescription;
@Transient
@ApiParam(value ="参数值")
private Object value;
}

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.lac.sqlpack;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.lac.bean.*;
/**
@ -44,4 +46,15 @@ public class LacHqlPack {
return ddlPackBean;
}
public static DdlPackBean packHqlLacCommandStackStepByTemplateId(Long templateId) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getNumEqualPack(templateId, "templateId", ddlPackBean);
DdlPreparedPack.getOrderByPack(
new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},
new String[]{"stepSort"},
ddlPackBean
);
return ddlPackBean;
}
}

@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
@ -83,4 +84,7 @@ public class MesDismantleRecord extends BaseBean {
@Column(name = "MEMO")
@ApiParam("备注")
private String memo;
@Transient
private String serialNumber;
}

@ -83,10 +83,6 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "是否绑定关键件")
private Integer isBindKey;
@Column(name = "IS_KEY")
@ApiParam(value = "是否关键件")
private Integer isKey;
@Transient
@ApiParam("是否已绑定")
private Boolean isBind;

@ -85,9 +85,9 @@ public class MesProdBindRecord extends BaseBean {
@ApiParam(value = "结果")
private String result;
@Column(name = "IS_KEY")
@ApiParam(value = "是否关键件")
private Integer isKey;
@Column(name = "is_BIND_KEY")
@ApiParam(value = "是否绑定关键件")
private Integer isBindKey;
@Column(name = "ACTION_TYPE")
@ApiParam(value = "动作类型")

@ -43,4 +43,16 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PICTURE_NAME")
@ApiParam("图片名称")
private String pictureName;
@Column(name = "FILE_SIZE")
@ApiParam("FILE_SIZE")
private String fileSize;
@Column(name = "FILE_TYPE_ID")
@ApiParam("FILE_TYPE_ID")
private String fileTypeId;
@Column(name = "FILE_TYPE_NAME")
@ApiParam("FILE_TYPE_NAME")
private String fileTypeName;
}

@ -65,11 +65,11 @@ public class MesProduceSn extends BaseBean implements Serializable {
private Integer printStatus;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
@ApiParam("工")
private String workCellCode;
@Column(name = "ROUTE_CODE")

@ -108,6 +108,10 @@ public class MesProduceSnTravel extends BaseBean {
@ApiParam("包装条码")
private String packageSn;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;
@Transient
@ApiParam("返回信息")
private String resultMsg;

@ -60,7 +60,7 @@ public class MesDatasource extends BaseBean {
@ApiParam("设备代码")
private String equipmentCode;
@Column(name = "DS_DB_NAME")
@Column(name = "DS_DB_NAMsE")
@ApiParam("数据库名称")
private String dsDbName;

@ -83,4 +83,8 @@ public class MesEquTaskDetail extends BaseBean {
@ApiParam(value = "处理方法")
private String fmCode;
@Transient
@ApiParam(value = "任务类型")
private Integer taskType;
}

@ -53,6 +53,10 @@ public class MesEquTaskPlan extends BaseBean {
@ApiParam("创建提前天数")
private Integer daysInAdvance;
@Column(name = "MEMO")
@ApiParam("备注")
private String memo;
@Transient
@ApiParam(value = "生产线")
private String workCenterCode;

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -65,4 +66,24 @@ public class MesEquTaskRepairRecord extends BaseBean {
@ApiParam("备注")
private String memo;
@Transient
@ApiParam("故障现象")
private String fpName;
@Transient
@ApiParam("故障原因")
private String fcName;
@Transient
@ApiParam("处理方法")
private String fmName;
@Transient
@ApiParam("作业类型")
private String taskTypeName;
@Transient
@ApiParam("整体结果")
private String finalResultName;
}

@ -74,4 +74,16 @@ public class MesEquTaskStandardRecord extends BaseBean {
@ApiParam("备注")
private String memo;
@Transient
@ApiParam("作业类型")
private String taskTypeName;
@Transient
@ApiParam("整体结果")
private String finalResultName;
@Transient
@ApiParam("判定结果")
private String checkResultName;
}

@ -87,10 +87,6 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "是否绑定关键件")
private Integer isBindKey;
@Column(name = "IS_KEY")
@ApiParam(value = "是否关键件")
private Integer isKey;
@Transient
@ApiParam("是否已绑定")
private Boolean isBind;

@ -86,9 +86,9 @@ public class MesProdBindRecord extends BaseBean {
@ApiParam(value = "结果")
private String result;
@Column(name = "IS_KEY")
@ApiParam(value = "是否关键件")
private String isKey;
@Column(name = "is_BIND_KEY")
@ApiParam(value = "是否绑定关键件")
private Integer isBindKey;
@Column(name = "ACTION_TYPE")
@ApiParam(value = "动作类型")

@ -30,7 +30,7 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PRODUCE_CTGY_CODE")
@ApiParam("产品类型代码")
private String produceCtgyCode;
private String produceCategoryCode;
@Column(name = "SIDE_LOCATION")
@ApiParam("面位")
@ -43,4 +43,16 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PICTURE_NAME")
@ApiParam("图片名称")
private String pictureName;
@Column(name = "FILE_SIZE")
@ApiParam("FILE_SIZE")
private String fileSize;
@Column(name = "FILE_TYPE_ID")
@ApiParam("FILE_TYPE_ID")
private String fileTypeId;
@Column(name = "FILE_TYPE_NAME")
@ApiParam("FILE_TYPE_NAME")
private String fileTypeName;
}

@ -117,6 +117,10 @@ public class MesProduceSn extends BaseBean {
@ApiParam("托盘号")
private String tray;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;
@Transient
@ApiParam("返回信息")
private String resultMsg;

@ -108,6 +108,10 @@ public class MesProduceSnTravel extends BaseBean {
@ApiParam("包装条码")
private String packageSn;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;
@Transient
@ApiParam("返回信息")
private String resultMsg;

@ -28,6 +28,9 @@ public class MesEquTaskPlanModel implements Serializable {
@ApiParam("创建提前天数")
private Integer daysInAdvance;
@ApiParam("备注")
private String memo;
@ApiParam("生产线")
private String workCenterCode;
@ -66,7 +69,7 @@ public class MesEquTaskPlanModel implements Serializable {
}
public MesEquTaskPlanModel(Long id, String equipmentCode, String equipmentName, Integer taskType, Integer taskCycle, String lastTime, Integer daysInAdvance, String workCenterCode, String equipmentCategory, String organizeCode, Integer isValid, Integer isDeleted, String createUser, String createDatetime, String modifyUser, String modifyDatetime) {
public MesEquTaskPlanModel(Long id, String equipmentCode, String equipmentName, Integer taskType, Integer taskCycle, String lastTime, Integer daysInAdvance, String memo, String workCenterCode, String equipmentCategory, String organizeCode, Integer isValid, Integer isDeleted, String createUser, String createDatetime, String modifyUser, String modifyDatetime) {
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
@ -74,6 +77,7 @@ public class MesEquTaskPlanModel implements Serializable {
this.taskCycle = taskCycle;
this.lastTime = lastTime;
this.daysInAdvance = daysInAdvance;
this.memo = memo;
this.workCenterCode = workCenterCode;
this.equipmentCategory = equipmentCategory;
this.organizeCode = organizeCode;

@ -8,7 +8,9 @@ import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Transient;
/**
* @Description:
@ -60,4 +62,8 @@ public class ProdOrgModel extends BaseBean {
@ApiParam("当前级")
private Integer level;
@Transient
@ApiParam("工位类型")
private Integer workCellType;
}

@ -459,7 +459,7 @@ public class MesHqlPack {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairName(), "repairName", packBean);
}
if (mesRepair.getRepairType() != null) {
DdlPreparedPack.getNumEqualPack(mesRepair.getRepairType(), "repairType", packBean);
DdlPreparedPack.getStringEqualPack(mesRepair.getRepairType(), "repairType", packBean);
}
if (mesRepair.getIsValid() != null) {
DdlPreparedPack.getNumEqualPack(mesRepair.getIsValid(), "isValid", packBean);
@ -1427,8 +1427,8 @@ public class MesHqlPack {
*/
public static DdlPackBean getMesProduceCtgyPicture(MesProduceCtgyPicture mesProduceCtgyPicture, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProduceCtgyPicture, organizeCode);
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getProduceCtgyCode())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getProduceCtgyCode(), "produceCtgyCode", packBean);
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getProduceCategoryCode())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getProduceCategoryCode(), "produceCtgyCode", packBean);
}
if (!StringUtils.isEmpty(mesProduceCtgyPicture.getPictureName())) {
DdlPreparedPack.getStringLikerPack(mesProduceCtgyPicture.getPictureName(), "pictureName", packBean);

@ -43,15 +43,22 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-wms</artifactId>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-form</artifactId>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-softswitch</artifactId>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-lac</artifactId>
</dependency>
</dependencies>

@ -0,0 +1,93 @@
package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
import cn.estsh.i3plus.pojo.lac.bean.LacSuitTask;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @Description : lacmodel
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 15:29
* @Modify:
**/
@Data
public class LacCommandStackModel {
/**
* id
*/
private Long recordId;
/**
*
*/
private LacCommandStackRecord commandStackRecord;
/**
*
*/
private LacSuitRequest request;
/**
*
*/
private LacSuitResponse response;
/**
*
* key :
* value
*/
private Map<Long, Object> orginMessageMap = new ConcurrentHashMap<>();
/**
*
* key :
* value
*/
private Map<Long, Object> transMessageMap = new ConcurrentHashMap<>();
/**
*
*/
private Exception exception;
public void setException(Exception exception){
LoggerFactory.getLogger("YYYY").error("异常信息:{}",exception);
this.exception = exception;
}
public void setCommandStackRecord(LacCommandStackRecord commandStackRecord){
this.commandStackRecord = commandStackRecord;
this.recordId = commandStackRecord.getId();
}
public List<TaskParam> getTaskRequestParam(String taskCode){
for (Task task : this.getRequest().getTaskList()) {
if(task.getCode().equals(taskCode)){
return task.getParamList();
}
}
return null;
}
public void putOrginMessage(LacSuitTask lacSuitTask,Object orginMessage){
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
return;
}
this.orginMessageMap.put(lacSuitTask.getTaskInstanceId(), orginMessage == null ? StringUtils.EMPTY : orginMessage);
}
public void putTransMessage(LacSuitTask lacSuitTask,Object transMessage){
if(lacSuitTask == null || lacSuitTask.getTaskInstanceId() ==null){
return;
}
this.transMessageMap.put(lacSuitTask.getTaskInstanceId(), transMessage == null ? StringUtils.EMPTY : transMessage);
}
}

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.model.lac;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;
import java.util.List;
/**
* @Description : lac
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 15:07
* @Modify:
**/
@Data
@XStreamAlias("request")
public class LacSuitRequest {
/**
*
*/
private String commandStackCode;
/**
*
*/
private List<Task> taskList;
}

@ -0,0 +1,44 @@
package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;
/**
* @Description : lac
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 15:07
* @Modify:
**/
@Data
@XStreamAlias("response")
public class LacSuitResponse {
/**
*
*/
private boolean success;
/**
*
*/
private String code;
/**
*
*/
private String message;
/**
*
*/
private Object result;
public LacSuitResponse(){
this.success = true;
this.code = ResourceEnumUtil.MESSAGE.SUCCESS.getCode();
this.message = ResourceEnumUtil.MESSAGE.SUCCESS.getDescription();
}
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.model.lac;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 17:06
* @Modify:
**/
@Data
@XStreamAlias("task")
public class Task {
private String code;
private List<TaskParam> paramList;
}

@ -0,0 +1,24 @@
package cn.estsh.i3plus.pojo.model.lac;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.converters.extended.ToAttributedValueConverter;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-10-29 15:10
* @Modify:
**/
@Data
@XStreamAlias("param")
@XStreamConverter(value= ToAttributedValueConverter.class, strings={"value"})
public class TaskParam {
private String name;
private String value;
}

@ -26,6 +26,7 @@ import javax.persistence.*;
@Table(name = "WMS_MOVE_TO_ERP", indexes = {
@Index(columnList = "TRANS_TYPE_CODE"),
@Index(columnList = "ORDER_NO"),
@Index(columnList = "ITEM"),
@Index(columnList = "ORGANIZE_CODE"),
@Index(columnList = "PART_NO")
})

@ -134,6 +134,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-lac</artifactId>
<version>${project.version}</version>
</dependency>
<!-- spring-json转换 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

Loading…
Cancel
Save