yun-zuoyi
WYnneaoapc 6 years ago
commit 35f625ac21

@ -1,10 +1,13 @@
package cn.estsh.i3plus.pojo.aps.bean; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseCode; 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_CLASS;
import cn.estsh.i3plus.pojo.aps.enums.RESOURCE_LOCK_TYPE; 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.RESOURCE_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.TIME_ROUND_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.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -12,6 +15,7 @@ import lombok.Data;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import java.util.List;
/** /**
* @Description : * @Description :
@ -96,4 +100,7 @@ public class Resource extends BaseCode {
@Column(name="LOCK_TIME") @Column(name="LOCK_TIME")
@ApiParam(value ="锁定时间长度") @ApiParam(value ="锁定时间长度")
private String lockTime; 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; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation; 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.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation; 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.EWorkPlan;
import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation; import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -33,6 +35,11 @@ import java.util.List;
@Table(name="APS_WORK_PLAN") @Table(name="APS_WORK_PLAN")
@Api("工作计划") @Api("工作计划")
public class WorkPlan extends BaseAPS { 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") @Column(name="PREV_SET_BEGIN")
@ApiParam(value ="前设置开始时间") @ApiParam(value ="前设置开始时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@ -51,6 +58,8 @@ public class WorkPlan extends BaseAPS {
@Column(name="PRODUCE_BEGIN") @Column(name="PRODUCE_BEGIN")
@ApiParam(value ="生产开始时间") @ApiParam(value ="生产开始时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"Work.PrevRelations.PrevWork.WorkPlan.produceBegin",
"PrevPlan.produceBegin"}, method = "calcPositive")
private Date produceBegin; private Date produceBegin;
@Column(name="PRODUCE_END") @Column(name="PRODUCE_END")
@ -81,6 +90,7 @@ public class WorkPlan extends BaseAPS {
@Column(name="LOCK_BEGIN") @Column(name="LOCK_BEGIN")
@ApiParam(value ="锁定开始时间") @ApiParam(value ="锁定开始时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"PostRelations.PostWork.WorkPlan.produceBegin"}, method = "calcPositiveLockBegin")
private Date lockBegin; private Date lockBegin;
@Column(name="LOCK_END") @Column(name="LOCK_END")

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

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

@ -139,12 +139,12 @@ public class DateDuration {
* @param amount * @param amount
* @return * @return
*/ */
public long getTime(double amount) { public int getTime(double amount) {
if (amount < PRECISION) if (amount < PRECISION)
return getTime(); return getTime();
double result = (amount * this.rate) + this.time; 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: * @Modify:
**/ **/
public enum RESOURCE_CLASS { public enum RESOURCE_CLASS {
MAIN, // 主资源 LIMITLESS, // 无限能力
ASS // 副资源 SINGLE, // 单能力
BATCH // 炉资源
} }

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

@ -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; package cn.estsh.i3plus.pojo.aps.holders;
public enum EResource { 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"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="Resource"> <Class name="Resource">
<Relation field="WorkPlans" name="WorkPlan" reverse="Resource" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class> </Class>

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkPlan"> <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 field="WorkResource" name="WorkResource" type="ONE_TO_ONE" owner="false">
</Relation> </Relation>
<Relation field="AssPlans" name="WorkPlan" reverse="MainPlan" type="ONE_TO_MULTI" owner="false"> <Relation field="AssPlans" name="WorkPlan" reverse="MainPlan" type="ONE_TO_MULTI" owner="false">

@ -862,6 +862,5 @@ public class BlockSoftSwitchEnumUtil {
} }
return null; return null;
} }
} }
} }

@ -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,7 +12,44 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil { 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) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EQUIPMENT_REPORT_TYPE { public enum EQUIPMENT_REPORT_TYPE {
@ -848,15 +885,15 @@ public class MesEnumUtil {
* pcn * pcn
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_IS_KEY { public enum MES_IS_BIND_KEY {
IS_KEY(10, "是"), IS_BIND_KEY(1, "是"),
NO_KEY(20, "否"); NO_BIND_KEY(2, "否");
private int value; private int value;
private String description; private String description;
MES_IS_KEY(int value, String description) { MES_IS_BIND_KEY(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -870,8 +907,8 @@ public class MesEnumUtil {
} }
// 根据value返回枚举类型,主要在switch中使用 // 根据value返回枚举类型,主要在switch中使用
public static MES_IS_KEY getByValue(int value) { public static MES_IS_BIND_KEY getByValue(int value) {
for (MES_IS_KEY mesInsertExcel : values()) { for (MES_IS_BIND_KEY mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) { if (mesInsertExcel.getValue() == value) {
return mesInsertExcel; return mesInsertExcel;
} }

@ -25,7 +25,7 @@ public class WmsEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum GROUP_COMMIT_CHECK { public enum GROUP_COMMIT_CHECK {
DISABLE(1, "禁止提交"), CHECK_MOVE(2, "校验移动单"), DISABLE(1, "禁止提交"), CHECK_MOVE(2, "校验移动单"),
NO_CHECK(3, "不校验"),CHECK_OLD_MOVE_NO(4, "校验是否已产生移动单"); NO_CHECK(3, "不校验"), CHECK_OLD_MOVE_NO(4, "校验是否已产生移动单");
private int value; private int value;
private String description; private String description;
@ -285,6 +285,7 @@ public class WmsEnumUtil {
} }
return tmp; return tmp;
} }
public static String valueOfDescription(int val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -799,7 +800,8 @@ public class WmsEnumUtil {
VDA_PICKING_GOODS("VDA_PICKING_GOODS", "VDA生产领料"), VDA_PICKING_GOODS("VDA_PICKING_GOODS", "VDA生产领料"),
VDA_NC_FREEZE("VDA_NC_FREEZE", "VDA_NC冻结"), VDA_NC_FREEZE("VDA_NC_FREEZE", "VDA_NC冻结"),
VDA_ONE_PICKING_GOODS("VDA_ONE_PICKING_GOODS", "VDA单箱领料"), 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 value;
private String description; private String description;
@ -860,7 +862,7 @@ public class WmsEnumUtil {
return null; return null;
} else { } else {
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value,value)) { if (StringUtils.equalsIgnoreCase(values()[i].value, value)) {
return values()[i]; return values()[i];
} }
} }
@ -917,7 +919,7 @@ public class WmsEnumUtil {
INIT(20, "INIT", "初始化"), INIT(20, "INIT", "初始化"),
IS_GENERAL(30, "IS_GENERAL", "已生成"), IS_GENERAL(30, "IS_GENERAL", "已生成"),
NO_GENERAL(40, "NO_GENERAL", "不生成"), NO_GENERAL(40, "NO_GENERAL", "不生成"),
CANCEL(50,"CANCEL","撤销"); CANCEL(50, "CANCEL", "撤销");
private int value; private int value;
private String code; private String code;
@ -1098,7 +1100,7 @@ public class WmsEnumUtil {
MONTH_INVENTORY(20, "月度盘点"), MONTH_INVENTORY(20, "月度盘点"),
SEASON_INVENTORY(30, "季度盘点"), SEASON_INVENTORY(30, "季度盘点"),
YEAR_INVENTORY(40, "年度盘点"), YEAR_INVENTORY(40, "年度盘点"),
AJUST_INVENTORY(50, "库存调整盘点"); AJUST_INVENTORY(50, "库存调整盘点");
private int value; private int value;
private String description; private String description;
@ -3435,12 +3437,13 @@ public class WmsEnumUtil {
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REC_STATUS{ public enum REC_STATUS {
UNRECEIVED("UNRECEIVED", "未收货"), UNRECEIVED("UNRECEIVED", "未收货"),
COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"), COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"),
PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"), PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"),
OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"), OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"),
OTHER("ELSE", "其他"),; OTHER("ELSE", "其他"),
;
private String value; private String value;
private String description; private String description;
@ -3476,7 +3479,7 @@ public class WmsEnumUtil {
public static String valueOfDescription(String val) { public static String valueOfDescription(String val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val) ) { if (values()[i].value.equals(val)) {
tmp = values()[i].description; tmp = values()[i].description;
} }
} }
@ -3523,7 +3526,7 @@ public class WmsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ETC_PRINT_STATUS { public enum ETC_PRINT_STATUS {
NOT_HIT (10, "未打"), NOT_HIT(10, "未打"),
ALREADY_HIT(20, "已打"); ALREADY_HIT(20, "已打");
private int value; private int value;
@ -3560,7 +3563,8 @@ public class WmsEnumUtil {
public enum PART_ASSOCIATE_TYPE { public enum PART_ASSOCIATE_TYPE {
LINE(10, "LINE", "产线"), LINE(10, "LINE", "产线"),
CUSTOMER(20, "CUSTOMER", "客户"), CUSTOMER(20, "CUSTOMER", "客户"),
VENDOR(30, "VENDOR", "供应商"); VENDOR(30, "VENDOR", "供应商"),
BOXING_ERROR_PROOFING(40, "BOXING_ERROR_PROOFING","装箱防错");
private int value; private int value;
private String code; private String code;
@ -3681,8 +3685,8 @@ public class WmsEnumUtil {
public enum ROUTING_RULE_MODE { public enum ROUTING_RULE_MODE {
CREATE_TASK(10, "CREATE_TASK", "生成任务"), CREATE_TASK(10, "CREATE_TASK", "生成任务"),
AUTO_OPT(20, "AUTO_OPT", "自动操作"), AUTO_OPT(20, "AUTO_OPT", "自动操作"),
MENU_OPT(30, "MENU_OPT", "手工操作"), MENU_OPT(30, "MENU_OPT", "手工操作"),
AUTO_OPT_NON_TRANS(40, "AUTO_OPT_NON_TRANS", "自动操作无交易"); AUTO_OPT_NON_TRANS(40, "AUTO_OPT_NON_TRANS", "自动操作无交易");
private int value; private int value;
private String code; private String code;
private String description; private String description;
@ -3729,13 +3733,14 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
} }
/** /**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_RULE_TYPE { public enum ROUTING_RULE_TYPE {
PROMOTION_TYPE(10, "REPLENISH_TYPE", "推动规则"), PROMOTION_TYPE(10, "REPLENISH_TYPE", "推动规则"),
REPLENISH_TYPE(20, "PROMOTION_TYPE", "补货规则"); REPLENISH_TYPE(20, "PROMOTION_TYPE", "补货规则");
private int value; private int value;
private String code; private String code;
private String description; private String description;
@ -3782,12 +3787,13 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
} }
/** /**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_DELAY_UNIT { public enum ROUTING_DELAY_UNIT {
M(10, "M", "分"), M(10, "M", "分"),
D(20, "D", "天"); D(20, "D", "天");
private int value; private int value;
private String code; private String code;
@ -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 lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Lob; import javax.persistence.Lob;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/** /**
* @Description : * @Description :
@ -92,4 +93,8 @@ public class LacCommandStackRecord extends BaseBean {
@ApiParam(value ="执行说明") @ApiParam(value ="执行说明")
private String executionDescription; private String executionDescription;
@Transient
@ApiParam(value ="步骤列表")
private List<LacCommandStackStep> stepList;
} }

@ -9,10 +9,11 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/** /**
* @Description : * @Description :
@ -47,7 +48,7 @@ import javax.persistence.Table;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="LAC_COMMAND_STACK_STEP") @Table(name="LAC_COMMAND_STACK_STEP")
@Api(value="指令集模板",description = "指令集模板信息") @Api(value="指令集步骤",description = "指令集步骤")
public class LacCommandStackStep extends BaseBean { public class LacCommandStackStep extends BaseBean {
@Column(name="TEMPLATE_ID") @Column(name="TEMPLATE_ID")
@ -69,10 +70,13 @@ public class LacCommandStackStep extends BaseBean {
@Column(name="STEP_EXEC_COND") @Column(name="STEP_EXEC_COND")
@ApiParam(value ="步骤执行条件") @ApiParam(value ="步骤执行条件")
private Integer stepExecCond; private Double stepExecCond;
@Column(name="STEP_DESCRIPTION") @Column(name="STEP_DESCRIPTION")
@ApiParam(value ="步骤执行条件") @ApiParam(value ="步骤执行条件")
private String stepDescription; 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.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Description : * @Description :
@ -67,11 +68,15 @@ public class LacCommandStackStepTask extends BaseBean {
// @ApiParam(value ="模板代码") // @ApiParam(value ="模板代码")
// private String templateCodeRdd; // private String templateCodeRdd;
@Column(name="STEP_ID") @Column(name="STEP_ID")
@ApiParam(value ="步骤ID") @ApiParam(value ="步骤ID")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long stepId; private Long stepId;
@Column(name="TASK_INSTANCE_ID")
@ApiParam(value ="任务实例ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long taskInstanceId;
// //
// @Column(name="STEP_NAME_RDD") // @Column(name="STEP_NAME_RDD")
// @ApiParam(value ="步骤名称") // @ApiParam(value ="步骤名称")
@ -94,9 +99,10 @@ public class LacCommandStackStepTask extends BaseBean {
@ApiParam(value ="任务代码") @ApiParam(value ="任务代码")
private String taskCodeRdd; private String taskCodeRdd;
@Column(name="IS_CRUX") @Column(name="IS_CRUX")
@ApiParam(value ="是否关键") @ApiParam(value ="是否关键")
private Integer isCrux; private Integer isCrux;
@Transient
@ApiParam(value ="适配任务")
private LacSuitTask lacSuitTask;
} }

@ -9,10 +9,11 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/** /**
* @Description : * @Description :
@ -77,4 +78,7 @@ public class LacCommandStackTemplate extends BaseBean {
@ApiParam(value ="模板描述") @ApiParam(value ="模板描述")
private String templateDescription; 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.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/** /**
* @Description : * @Description :
@ -71,6 +73,10 @@ public class LacSuitTask extends BaseBean {
@ApiParam(value ="超时时间") @ApiParam(value ="超时时间")
private Integer taskTimeout; private Integer taskTimeout;
public int getTaskTimeoutVal(){
return taskTimeout == null ? -1 : taskTimeout.intValue();
}
@Column(name="TASK_RETRY_NUM") @Column(name="TASK_RETRY_NUM")
@ApiParam(value ="重试次数") @ApiParam(value ="重试次数")
private Integer taskRetryNum; private Integer taskRetryNum;
@ -113,4 +119,23 @@ public class LacSuitTask extends BaseBean {
@ApiParam(value ="任务描述") @ApiParam(value ="任务描述")
private String taskDescription; 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.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Description : * @Description :
@ -87,4 +88,8 @@ public class LacSuitTaskParam extends BaseBean {
@Column(name="PARAM_DESCRIPTION") @Column(name="PARAM_DESCRIPTION")
@ApiParam(value ="参数描述") @ApiParam(value ="参数描述")
private String paramDescription; private String paramDescription;
@Transient
@ApiParam(value ="参数值")
private Object value;
} }

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.lac.sqlpack; package cn.estsh.i3plus.pojo.lac.sqlpack;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; 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.*; import cn.estsh.i3plus.pojo.lac.bean.*;
/** /**
@ -15,33 +17,44 @@ public class LacHqlPack {
private LacHqlPack() { private LacHqlPack() {
} }
public static DdlPackBean packHqlLacTaskType(LacTaskType bean){ public static DdlPackBean packHqlLacTaskType(LacTaskType bean) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return ddlPackBean; return ddlPackBean;
} }
public static DdlPackBean packHqlLacLogTaskDetail(LacLogTaskDetail bean){ public static DdlPackBean packHqlLacLogTaskDetail(LacLogTaskDetail bean) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return ddlPackBean; return ddlPackBean;
} }
public static DdlPackBean packHqlLacLogTask(LacLogTask bean){ public static DdlPackBean packHqlLacLogTask(LacLogTask bean) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return ddlPackBean; return ddlPackBean;
} }
public static DdlPackBean packHqlLacCommandStackType(LacCommandStackType bean){ public static DdlPackBean packHqlLacCommandStackType(LacCommandStackType bean) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return ddlPackBean; return ddlPackBean;
} }
public static DdlPackBean packHqlLacCommandStackRecord(LacCommandStackRecord bean){ public static DdlPackBean packHqlLacCommandStackRecord(LacCommandStackRecord bean) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return ddlPackBean; 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.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Description: * @Description:
@ -83,4 +84,7 @@ public class MesDismantleRecord extends BaseBean {
@Column(name = "MEMO") @Column(name = "MEMO")
@ApiParam("备注") @ApiParam("备注")
private String memo; private String memo;
@Transient
private String serialNumber;
} }

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

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

@ -43,4 +43,16 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PICTURE_NAME") @Column(name = "PICTURE_NAME")
@ApiParam("图片名称") @ApiParam("图片名称")
private String pictureName; 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; private Integer printStatus;
@Column(name = "WORK_CENTER_CODE") @Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码") @ApiParam("生产线")
private String workCenterCode; private String workCenterCode;
@Column(name = "WORK_CELL_CODE") @Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码") @ApiParam("工")
private String workCellCode; private String workCellCode;
@Column(name = "ROUTE_CODE") @Column(name = "ROUTE_CODE")

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

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

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

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

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
/** /**
* @Description : * @Description :
@ -65,4 +66,24 @@ public class MesEquTaskRepairRecord extends BaseBean {
@ApiParam("备注") @ApiParam("备注")
private String memo; 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("备注") @ApiParam("备注")
private String memo; 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 = "是否绑定关键件") @ApiParam(value = "是否绑定关键件")
private Integer isBindKey; private Integer isBindKey;
@Column(name = "IS_KEY")
@ApiParam(value = "是否关键件")
private Integer isKey;
@Transient @Transient
@ApiParam("是否已绑定") @ApiParam("是否已绑定")
private Boolean isBind; private Boolean isBind;

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

@ -30,7 +30,7 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PRODUCE_CTGY_CODE") @Column(name = "PRODUCE_CTGY_CODE")
@ApiParam("产品类型代码") @ApiParam("产品类型代码")
private String produceCtgyCode; private String produceCategoryCode;
@Column(name = "SIDE_LOCATION") @Column(name = "SIDE_LOCATION")
@ApiParam("面位") @ApiParam("面位")
@ -43,4 +43,16 @@ public class MesProduceCtgyPicture extends BaseBean {
@Column(name = "PICTURE_NAME") @Column(name = "PICTURE_NAME")
@ApiParam("图片名称") @ApiParam("图片名称")
private String pictureName; 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("托盘号") @ApiParam("托盘号")
private String tray; private String tray;
@Column(name="OPERATE_TYPE")
@ApiParam("操作类型")
private Integer operateType;
@Transient @Transient
@ApiParam("返回信息") @ApiParam("返回信息")
private String resultMsg; private String resultMsg;

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

@ -28,6 +28,9 @@ public class MesEquTaskPlanModel implements Serializable {
@ApiParam("创建提前天数") @ApiParam("创建提前天数")
private Integer daysInAdvance; private Integer daysInAdvance;
@ApiParam("备注")
private String memo;
@ApiParam("生产线") @ApiParam("生产线")
private String workCenterCode; 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.id = id;
this.equipmentCode = equipmentCode; this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName; this.equipmentName = equipmentName;
@ -74,6 +77,7 @@ public class MesEquTaskPlanModel implements Serializable {
this.taskCycle = taskCycle; this.taskCycle = taskCycle;
this.lastTime = lastTime; this.lastTime = lastTime;
this.daysInAdvance = daysInAdvance; this.daysInAdvance = daysInAdvance;
this.memo = memo;
this.workCenterCode = workCenterCode; this.workCenterCode = workCenterCode;
this.equipmentCategory = equipmentCategory; this.equipmentCategory = equipmentCategory;
this.organizeCode = organizeCode; this.organizeCode = organizeCode;

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

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

@ -43,15 +43,22 @@
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-wms</artifactId> <artifactId>i3plus-pojo-wms</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-form</artifactId> <artifactId>i3plus-pojo-form</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-softswitch</artifactId> <artifactId>i3plus-pojo-softswitch</artifactId>
</dependency> </dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-lac</artifactId>
</dependency>
</dependencies> </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 = { @Table(name = "WMS_MOVE_TO_ERP", indexes = {
@Index(columnList = "TRANS_TYPE_CODE"), @Index(columnList = "TRANS_TYPE_CODE"),
@Index(columnList = "ORDER_NO"), @Index(columnList = "ORDER_NO"),
@Index(columnList = "ITEM"),
@Index(columnList = "ORGANIZE_CODE"), @Index(columnList = "ORGANIZE_CODE"),
@Index(columnList = "PART_NO") @Index(columnList = "PART_NO")
}) })

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

Loading…
Cancel
Save