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

yun-zuoyi
crish 6 years ago
commit e260045c42

@ -5,12 +5,19 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FieldAnnotation {
boolean property() default true;
boolean modify() default true;
boolean display() default true;
int pric() default 2;
boolean mainkey() default false;
boolean modify() default true; // 是否能修改
boolean display() default true; // 是否需要在界面显示
int pric() default 2; // 对于浮点型,界面显示的精度
boolean mainkey() default false; // 是否为主键
}

@ -5,9 +5,16 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RippleAnnotation {
String[] dependence() default {};
String method() default "";
String[] dependence() default {}; // 字段依赖的路径
String method() default ""; // 字段值计算时调用的方法方法写在service中.
}

@ -58,6 +58,10 @@ public class BaseOrder extends BaseCode {
@ApiParam(value ="接单日期")
private Date receiveDate;
@Column(name="SPECIFY_MATERIAL_NUM")
@ApiParam(value ="专料号")
private String specifyMaterialNum;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)

@ -4,7 +4,6 @@ import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.IMPORT_DETAIL_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EExportDetail;
import cn.estsh.i3plus.pojo.aps.holders.EImportDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;

@ -53,4 +53,8 @@ public class MatCalcRule extends BaseRule {
@ApiParam(value ="批量补充")
private Boolean batchSupply;
@Column(name="ASSIGN_LIMIT")
@ApiParam(value ="物料分配制约")
private Integer assignLimit;
}

@ -72,19 +72,19 @@ public class Material extends BaseCode {
@Column(name="IS_AUTO_FIX_PEGGING")
@ApiParam(value ="自动补充标识")
private boolean autoFixPegging;
private Boolean autoFixPegging;
@Column(name="MAX_MANUF_BATCH")
@Column(name="MAX_PRODUCT_BATCH")
@ApiParam(value ="最大制造批量")
private Double maxManufBatch;
private Double maxProductBatch;
@Column(name="MIN_MANUF_BATCH")
@Column(name="MIN_PRODUCT_BATCH")
@ApiParam(value ="最小制造批量")
private Double minManufBatch;
private Double minProductBatch;
@Column(name="MANUF_UNIT_BATCH")
@Column(name="UNIT_PRODUCT_BATCH")
@ApiParam(value ="制造批量单位")
private Double manufUnitBatch;
private Double UnitProductBatch;
@Column(name="MAX_PUR_BATCH")
@ApiParam(value ="最大采购批量")
@ -94,9 +94,9 @@ public class Material extends BaseCode {
@ApiParam(value ="最小采购批量")
private Double minPurBatch;
@Column(name="PUR_UNIT_BATCH")
@Column(name="UNIT_PUR_BATCH")
@ApiParam(value ="采购批量单位")
private Double purUnitBatch;
private Double unitPurBatch;
@Column(name="MIN_STOCK_COUNT")
@ApiParam(value ="最小库存数量")
@ -110,6 +110,10 @@ public class Material extends BaseCode {
@ApiParam(value ="最大库存数量")
private Double maxStockCount;
@Column(name="ORDER_BATCH_PERIOD")
@ApiParam(value ="订单合并期间")
private String orderBatchPeriod;
@JsonBackReference
public List<ProductRouting> getProductRoutings() {
return BeanRelation.list(this, EMaterial.ProductRoutings);

@ -50,21 +50,13 @@ public class Operation extends BaseAPS {
private String ratio;
@Column(name="COUNT")
@ApiParam(value ="分割")
private Double count;
@ApiParam(value ="分割的工作个数")
private Integer count;
@Column(name="BATCH")
@ApiParam(value ="分割批量")
private Double batch;
@Column(name="MIN_BATCH")
@ApiParam(value ="最小批量")
private Double minBatch;
@Column(name="TAIL_DEAL")
@ApiParam(value ="尾数处理")
private TAIL_DEAL tailDeal;
@Column(name="CONS_TYPE")
@ApiParam(value ="接续方式")
private CONSTRAINT_TYPE consType;

@ -30,21 +30,13 @@ public class StandOperation extends BaseCode {
private String ratio;
@Column(name="COUNT")
@ApiParam(value ="分割")
private Double count;
@ApiParam(value ="分割的工作个数")
private Integer count;
@Column(name="BATCH")
@ApiParam(value ="分割批量")
private Double batch;
@Column(name="MIN_BATCH")
@ApiParam(value ="最小批量")
private Double minBatch;
@Column(name="TAIL_DEAL")
@ApiParam(value ="尾数处理方式")
private TAIL_DEAL tailDeal;
@Column(name="DIRECTION")
@ApiParam(value ="排程方向")
private DIRECTION direction;

@ -97,6 +97,22 @@ public class Work extends BaseCode {
@ApiParam(value ="计划主资源")
private String planResource;
@Column(name="FIX_SPLIT")
@ApiParam(value ="已分割的工作是否重新分割")
private Boolean fixSplit;
@Column(name="NEED_PREV_COUNT")
@ApiParam(value ="需要的前工作数量")
private Double needPrevCount;
@Column(name="SCH_FAILED")
@ApiParam(value ="是否排程失败")
private Boolean schFailed;
@Column(name="FAILED_REASON")
@ApiParam(value ="排程失败原因")
private String failedReason;
@Column(name="ORDER_ID")
@ApiParam(value ="订单")
@FieldAnnotation(property = false)

@ -7,6 +7,14 @@ import javax.persistence.MappedSuperclass;
import java.util.HashMap;
import java.util.Map;
/**
* @Description :APS
* APS
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
@MappedSuperclass
public abstract class BaseAPS extends BaseBean {

@ -6,6 +6,14 @@ import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import java.util.*;
import java.util.function.Consumer;
/**
* @Description :APS
*
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class BeanInfo {
private Class<? extends BaseBean> cls;
private BeanInfo superBeanInfo;

@ -9,6 +9,14 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Predicate;
/**
* @Description :
*
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public class BeanRelation {
Map<Class<? extends BaseBean>, Map<Long, Map<Enum<?>, List<BaseBean>>>> caches = new HashMap<>();
@ -74,6 +82,14 @@ public class BeanRelation {
}
public static <T extends BaseBean> T get(BaseBean bean, Predicate<T> pred, Enum<?> holder, Enum<?>... args) {
List<BaseBean> nextBeans = list(bean, holder);
for (BaseBean nextEntity : nextBeans) {
T result = getImpl(nextEntity, pred, args, 0);
if (result != null) {
return result;
}
}
return null;
}
@ -149,7 +165,7 @@ public class BeanRelation {
* @param relaBean
*/
public static void set(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
if (bean == null) {
if (bean == null || holder == null) {
return;
}
if (relaBean == null) {

@ -0,0 +1,22 @@
package cn.estsh.i3plus.pojo.aps.enums;
/**
*
*
*/
public enum MATERIAL_ASSIGN_LIMIT {
NONE(0), // 不进行任何制约
INVENTORY(1), // 库存制约
PURCHASE(2), // 采购制约
PRODUCT(4); // 制造制约
private int _value;
MATERIAL_ASSIGN_LIMIT(int value) {
_value = value;
}
public int value() {
return this._value;
}
}

@ -0,0 +1,8 @@
package cn.estsh.i3plus.pojo.aps.enums;
public enum WORK_SPLIT_TYPE {
NONE, // 不分割
RATIO, // 按比例分割
COUNT, // 按数量分割
BATCH // 按批量分割
}

@ -0,0 +1,18 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.WorkResource;
import java.util.List;
/**
* @Description :
*
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-11
* @Modify:
**/
public class ResourceCompose {
public WorkResource resource;
public List<WorkResource> assResource;
}

@ -4,7 +4,7 @@
</Relation>
<Relation field="WorkInputs" name="WorkInput" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="WORK_RESOURCES" name="WorkResource" reverse="Work" type="ONE_TO_MULTI" owner="true">
<Relation field="WorkResources" name="WorkResource" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="PostRelations" name="WorkRelation" reverse="PrevWork" type="ONE_TO_MULTI" owner="false">
</Relation>
@ -12,6 +12,6 @@
</Relation>
<Relation field="Operation" name="Operation" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="PlanFeedback" name="PlanFeedback" reverse="Work" type="ONE_TO_MULTI" owner="true">
<Relation field="PlanFeedbacks" name="PlanFeedback" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkResource">
<Relation field="Resource" name="Resource" reverse="WorkResources" type="MULTI_TO_ONE" owner="false">
<Relation field="Resource" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="OperResource" name="OperResource" reverse="WorkResources" type="MULTI_TO_ONE" owner="false">
</Relation>

@ -20,7 +20,7 @@ import java.net.NetworkInterface;
* @CreateDate : 2018-09-11 16:35
* @Modify:
**/
public class SnowflakeIdMaker {
public class SnowflakeIdMaker {
public static final Logger LOGGER = LoggerFactory.getLogger(SnowflakeIdMaker.class);

@ -11,7 +11,6 @@ import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XppDomDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Writer;
import java.lang.reflect.Field;
@ -35,6 +34,9 @@ public class XStreamFactory {
public static final String CDATA_PREFIX = "<![CDATA[";
public static final String CDATA_SUFFIX = "]]>";
private XStreamFactory() {
}
public static XStream getXStream() {
final NameCoder nameCoder = new NoNameCoder();
XStream xStream = new XStream(new XppDomDriver(nameCoder) {

@ -114,15 +114,17 @@ public class BlockSoftSwitchEnumUtil {
/* WebService */
SERVER_WEB_SERVICE_SEND_EMAIL(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240001,"Server IMPP 服务邮件服务"),
SERVER_WEB_SERVICE_HELLO(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240003,"Server Hello测试服务"),
SERVER_WEB_SERVICE_RECORDING_XML(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240004,"记录请求Body"),
// CLIENT_WEB_SERVICE_HELLO(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140002,"Client IMPP邮件测试"),
CLIENT_WEB_SERVICE_DEFAULT(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140003,"Client 默认设置"),
CLIENT_WEB_SERVICE_PARAM_OBJECT(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140004,"Client Param Object"),
/* 数据源 */
CLIENT_DATA_SOURCE_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.DATASOURCE,130001,"Client 数据库适配服务"),
/* Restful */
CLIENT_RESTFUL_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.RESTFUL,120001,"Client REST客户端适配器"),
SERVER_RESTFUL_IMPP(SUIT_MODE.SERVER,CASE_TYPE.RESTFUL,120001,"Client REST服务端适配器"),
SERVER_RESTFUL_IMPP(SUIT_MODE.SERVER,CASE_TYPE.RESTFUL,220001,"Client REST服务端适配器"),
/* Socket */
SERVER_SOCKET_HELLO(SUIT_MODE.SERVER ,CASE_TYPE.SOCKET,210001,"Socket Server Hello测试服务"),
@ -216,7 +218,10 @@ public class BlockSoftSwitchEnumUtil {
SCHEDULE(2,"定时调度"),
RABBITMQ(3,"MQ 调用"),
HTTP(4,"接口调用"),
CLOUD(5,"Cloud调用");
CLOUD(5,"Cloud调用"),
REST(6,"REST调用"),
WEB_SERVICE(7,"WebService"),
SOCKET(8,"socket");
private int value;
private String description;
@ -766,4 +771,97 @@ public class BlockSoftSwitchEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_DATA_TYPE {
XML(10, "XML"),
JSON(20, "JSON");
private int value;
private String description;
private SUIT_DATA_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 SUIT_DATA_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 SUIT_PROCESS_STATUS {
UNPROCESSED(10, "未处理"),
PROCESSING(20, "处理中"),
PROCESS(30, "已处理");
private int value;
private String description;
private SUIT_PROCESS_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 SUIT_PROCESS_STATUS valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
}

@ -11,6 +11,377 @@ import com.fasterxml.jackson.annotation.JsonFormat;
**/
public class MesEnumUtil {
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_DETAIL_ACTION_STATUS {
PENDING(10, "待处理"),
COMPLETE(20, "已完成"),
CANCEL(30, "取消");
private int value;
private String description;
MES_EQU_TASK_DETAIL_ACTION_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;
}
}
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_DETAIL_FINAL_RESULT {
YES(10, "合格"),
NO(20, "不合格");
private int value;
private String description;
MES_EQU_TASK_DETAIL_FINAL_RESULT(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_DETAIL_REPAIR_FLAG {
FALSE(10, "否"),
TRUE(20, "是");
private int value;
private String description;
MES_EQU_TASK_DETAIL_REPAIR_FLAG(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_STATUS {
CREATE(10, "创建"),
LANDED(20, "下达"),
OPEN(30, "开启"),
CLOSE(40, "关闭"),
CANCEL(50, "取消");
private int value;
private String description;
MES_EQU_TASK_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;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_SOURCE {
PLAN(10, "周期计划"),
CREATE(20, "手工创建"),
ANDON(30, "ANDON");
private int value;
private String description;
MES_EQU_TASK_SOURCE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_NOTIFY_FLAG {
FALSE(10, "未通知"),
TRUE(20, "已通知");
private int value;
private String description;
MES_EQU_TASK_NOTIFY_FLAG(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_INSERT_EXCEL {
MES_PLAN_ORDER(10, "生产计划"),
MES_EQUIPMENT(20, "设备台账"),
MES_EQU_TASK_STANDARD(30, "设备作业要求");
private int value;
private String description;
MES_INSERT_EXCEL(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_INSERT_EXCEL getByValue(int value) {
for (MES_INSERT_EXCEL 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;
}
}
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_STANDARD_TASK_TYPE {
CHECK(10, "点检"),
MAINTAIN(20, "保养"),
REPAIR(30, "维修");
private int value;
private String description;
MES_EQU_TASK_STANDARD_TASK_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 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
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QC_CHECK_TYPE {
FIRST_CHECK(10, "首检"),
ON_SITE_CHECK(20, "巡检"),
END_CHECK(30, "尾检");
private int value;
private String description;
MES_QC_CHECK_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 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
*/
@ -1097,7 +1468,9 @@ public class MesEnumUtil {
MODULE_CONTENT("moduleContent", "组件内容"),
CUSTOM_COMPONENT("customComponent", "定制内容"),
TASK_COMPLETE("taskComplete", "整个扫描完成"),
RENEW_REQUEST_PARAMS("renewRequestParams","回传刷新StationResultBean");
STEP_RAN_STATUS("stepRanStatus", "工步列表执行前"),
RENEW_REQUEST_PARAMS("renewRequestParams", "回传刷新StationResultBean");
private String value;
private String description;

@ -817,7 +817,8 @@ public class MesPcnEnumUtil {
OPEN(30, "启动"),
PAUSE(40, "暂停"),
CANCEL(50, "取消"),
CLOSE(60, "关闭");
CLOSE(60, "关闭"),
COMPLETE(70, "完成");
private int value;
private String description;
@ -1163,6 +1164,80 @@ public class MesPcnEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMPANY_TYPE {
RULECODE("ruleCode", "规则编码"),
PREFIX("prefix", "前缀"),
PART_NO("partNo", "物料号"),
CUST_PART_NO("custPartNo", "客户物料号"),
CUST_CODE("custCode", "客户代码"),
PROD_LOCATION("prodLocation", "产地"),
YEAR("year", "年"),
MOTH("month", "月"),
DAY("day", "日"),
HOUR("hour", "小时"),
MINUTE("minute", "分钟"),
SECOND("second", "秒"),
SERIAL("serialNo", "序列号");
private String value;
private String description;
COMPANY_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STEP_TYPE {
AUTO_RUN(10, "自动执行"),
SCAN_RUN(20, "扫描执行");
private Integer value;
private String description;
MES_STEP_TYPE(Integer value, String description) {
this.value = value;
this.description = description;
}
public Integer getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesRoute
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -285,6 +285,26 @@ public class WmsEnumUtil {
}
return tmp;
}
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 String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
@ -1070,8 +1090,8 @@ public class WmsEnumUtil {
DAY_INVENTORY(10, "日常盘点"),
MONTH_INVENTORY(20, "月度盘点"),
SEASON_INVENTORY(30, "季度盘点"),
YEAR_INVENTORY(40, "年度盘点");
YEAR_INVENTORY(40, "年度盘点"),
AJUST_INVENTORY(50, "库存调整盘点");
private int value;
private String description;
@ -1500,6 +1520,7 @@ public class WmsEnumUtil {
CHECKLIST(1, "可选列表"),
NUMBER(10, "数字"),
STRING(20, "字符串"),
CONFIGURABLE_STR(25, "可配字符串"),
OUT_OR_UNNECESSARY(30, "出参或者不必需的参数");
private int value;
@ -3701,5 +3722,111 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_RULE_TYPE {
PROMOTION_TYPE(10, "REPLENISH_TYPE", "推动规则"),
REPLENISH_TYPE(20, "PROMOTION_TYPE", "补货规则");
private int value;
private String code;
private String description;
ROUTING_RULE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ROUTING_DELAY_UNIT {
M(10, "M", "分"),
D(20, "D", "天");
private int value;
private String code;
private String description;
ROUTING_DELAY_UNIT(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
}

@ -23,9 +23,9 @@ import javax.persistence.Table;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB")
@Table(name = "MES_DATASOURCE")
@Api("地址清单")
public class MesDb extends BaseBean {
public class MesDatasource extends BaseBean {
@Column(name="DS_CODE")
@ApiParam("数据源代码")
@ -55,6 +55,10 @@ public class MesDb extends BaseBean {
@ApiParam("密码")
private String dsPassword;
@Column(name = "DS_DB_NAME")
@ApiParam("数据库名称")
private String dsDbName;
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;

@ -0,0 +1,101 @@
package cn.estsh.i3plus.pojo.mes.pcn.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 16:33
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_QC_CHECK_DATA")
@Api("质量过程检测数据")
public class MesQcCheckData extends BaseBean {
@Column(name = "CHECK_ID")
@ApiParam("检测id")
private String checkId;
@Column(name = "PART_NO")
@ApiParam("物料编码")
private String partNo;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "CHECK_TYPE")
@ApiParam("检测类型")
private Integer checkType;
@Column(name = "CHECK_ITEM")
@ApiParam("检测项")
private String checkItem;
@Column(name = "CHECK_STANDARD")
@ApiParam("检测标准")
private String checkStandard;
@Column(name = "CHECK_GUIDE")
@ApiParam("检测指导")
private String checkGuide;
@Column(name = "CHECK_FREQUENCY")
@ApiParam("频率")
private String checkFrequency;
@Column(name = "CHECK_VALUE")
@ApiParam("检测值")
private String checkValue;
@Column(name = "CHECK_RESULT")
@ApiParam("判定结果")
private String checkResult;
@Column(name = "SN")
@ApiParam("产品条码")
private String sn;
@Column(name = "QTY")
@ApiParam("产品数量")
private String qty;
@Column(name = "MEMO")
@ApiParam("备注")
private String memo;
@Column(name = "ORDER_NO")
@ApiParam("工单号")
private String orderNo;
@Column(name = "CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Transient
@ApiParam("过程质量检测数据")
private List<MesQcCheckStandard> mesQcCheckStandardList;
}

@ -0,0 +1,76 @@
package cn.estsh.i3plus.pojo.mes.pcn.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 14:46
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_QC_CHECK_STANDARD")
@Api("质量检测标准")
public class MesQcCheckStandard extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("物料编码")
private String partNo;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "CHECK_TYPE")
@ApiParam("检测类型")
private Integer checkType;
@Column(name = "CHECK_ITEM")
@ApiParam("检测项")
private String checkItem;
@Column(name = "CHECK_STANDARD")
@ApiParam("检测标准")
private String checkStandard;
@Column(name = "CHECK_GUIDE")
@ApiParam("检测指导")
private String checkGuide;
@Column(name = "CHECK_FREQUENCY")
@ApiParam("频率")
private String checkFrequency;
@Transient
@ApiParam("物料名称")
private String partName;
@Transient
@ApiParam("检测结果")
private String checkResult;
@Transient
@ApiParam("检测值")
private String checkValue;
}

@ -35,5 +35,8 @@ public class MesWorkOrderButtonModel implements Serializable {
@ApiParam("关闭按钮")
private boolean closeButton;
@ApiParam("完成按钮")
private boolean completeButton;
}

@ -2,12 +2,12 @@ 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.MesDb;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesDatasource;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/27 1:58 PM
* @Description:
**/
public interface MesDbRepository extends BaseRepository<MesDb,Long> {
public interface MesDatasourceRepository extends BaseRepository<MesDatasource,Long> {
}

@ -0,0 +1,14 @@
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.MesQcCheckData;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 16:43
* @Modify:
**/
public interface MesQcCheckDataRepository extends BaseRepository<MesQcCheckData, Long> {
}

@ -0,0 +1,14 @@
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.MesQcCheckStandard;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 14:58
* @Modify:
**/
public interface MesQcCheckStandardRepository extends BaseRepository<MesQcCheckStandard, Long> {
}

@ -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;
/**
* @Author: Wynne.Lu
@ -23,9 +24,9 @@ import javax.persistence.Table;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB")
@Table(name = "MES_DATASOURCE")
@Api("地址清单")
public class MesDb extends BaseBean {
public class MesDatasource extends BaseBean {
@Column(name = "DS_CODE")
@ApiParam("数据源代码")
@ -59,4 +60,12 @@ public class MesDb extends BaseBean {
@ApiParam("设备代码")
private String equipmentCode;
@Column(name = "DS_DB_NAME")
@ApiParam("数据库名称")
private String dsDbName;
@Transient
@ApiParam("设备名称")
private String equipmentName;
}

@ -0,0 +1,68 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EQU_TASK")
@Api("设备作业任务")
public class MesEquTask extends BaseBean {
@Column(name="TASK_NO")
@ApiParam("作业任务编号")
private String taskNo;
@Column(name="TASK_TYPE")
@ApiParam("作业类型")
private Integer taskType;
@Column(name="TASK_STATUS")
@ApiParam("作业状态")
private Integer taskStatus;
@Column(name="WORK_CENTER_CODE")
@ApiParam(value="生产线")
private String workCenterCode;
@Column(name="PLAN_TIME")
@ApiParam("计划日期")
private String planTime;
@Column(name="TASK_SOURCE")
@ApiParam("任务来源")
private Integer taskSource;
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
@Column(name="NOTIFY_FLAG")
@ApiParam("通知标识")
private Integer notifyFlag;
@Column(name="RELATE_TASK")
@ApiParam("关联任务")
private String relateTask;
}

@ -0,0 +1,61 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EQU_TASK_DETAIL")
@Api("设备作业任务明细")
public class MesEquTaskDetail extends BaseBean {
@Column(name="TASK_NO")
@ApiParam("作业任务编号")
private String taskNo;
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;
@Column(name="EQUIPMENT_NAME")
@ApiParam("设备名称")
private String equipmentName;
@Column(name="ACTION_STATUS")
@ApiParam("执行状态")
private Integer actionStatus;
@Column(name="FINAL_RESULT")
@ApiParam("整体结果")
private Integer finalResult;
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
@Column(name="REPAIR_FLAG")
@ApiParam("维修标识")
private Integer repairFlag;
}

@ -0,0 +1,72 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EQU_TASK_PLAN")
@Api("设备周期作业计划")
public class MesEquTaskPlan extends BaseBean {
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;
@Column(name="EQUIPMENT_NAME")
@ApiParam("设备名称")
private String equipmentName;
@Column(name="TASK_TYPE")
@ApiParam("作业类型")
private Integer taskType;
@Column(name="TASK_CYCLE")
@ApiParam("周期(天)")
private Integer taskCycle;
@Column(name="LAST_TIME")
@ApiParam("上一执行时间")
private String lastTime;
@Column(name="DAYS_IN_ADVANCE")
@ApiParam("创建提前天数")
private Integer daysInAdvance;
@Transient
@ApiParam(value="生产线")
private String workCenterCode;
@Transient
@ApiParam(value="设备类别")
private String equipmentCategory;
@Transient
@ApiParam("计划日期")
private String planTime;
@Transient
@ApiParam("作业任务编号")
private String taskNo;
}

@ -0,0 +1,64 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EQU_TASK_STANDARD")
@Api("设备作业要求")
public class MesEquTaskStandard extends BaseBean {
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;
@Column(name="EQUIPMENT_NAME")
@ApiParam("设备名称")
private String equipmentName;
@Column(name="TASK_TYPE")
@ApiParam("作业类型")
private Integer taskType;
@Column(name="ACTION_ITEM")
@ApiParam("操作项")
private String actionItem;
@Column(name="ACTION_STANDARD")
@ApiParam("操作标准")
private String actionStandard;
@Column(name="ACTION_GUIDE")
@ApiParam("操作指导")
private String actionGuide;
@Transient
@ApiParam(value="生产线")
private String workCenterCode;
@Transient
@ApiParam(value="设备类别")
private String equipmentCategory;
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 11:56
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_FAULT_CAUSE")
@Api("mes设备故障原因表")
public class MesFaultCause extends BaseBean {
@Column(name = "FC_CODE")
@ApiParam("故障原因代码")
private String fcCode;
@Column(name = "FC_NAME")
@ApiParam("故障原因描述")
private String fcName;
@Column(name = "PARENT_FC_CODE")
@ApiParam("父阶原因代码")
private String parentFcCode;
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 11:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_FAULT_METHOD")
@Api("mes设备故障方法表")
public class MesFaultMethod extends BaseBean {
@Column(name = "FM_CODE")
@ApiParam("故障方法代码")
private String fmCode;
@Column(name = "FM_NAME")
@ApiParam("故障方法描述")
private String fmName;
@Column(name = "PARENT_FM_CODE")
@ApiParam("父阶故障代码")
private String parentFmCode;
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 11:42
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_FAULT_PHENOMENON")
@Api("mes设备故障现象表")
public class MesFaultPhenomenon extends BaseBean {
@Column(name = "FP_CODE")
@ApiParam("故障现象代码")
private String fpCode;
@Column(name = "FP_NAME")
@ApiParam("故障现象描述")
private String fpName;
@Column(name = "PARENT_FP_CODE")
@ApiParam("父阶现象代码")
private String parentFpCode;
}

@ -0,0 +1,96 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate:2019\10\9 0009
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PLC")
@Api("PLC配置表")
public class MesPlc extends BaseBean {
@Column(name = "PLC_CODE")
@ApiParam("PLC代码")
private String plcCode;
@Column(name = "PLC_NAME")
@ApiParam("PLC名称")
private String plcName;
@Column(name = "PLC_MODEL")
@ApiParam("PLC型号")
private String plcModel;
@Column(name = "PLC_IP")
@ApiParam("PLC IP")
private String plcIp;
@Column(name = "CHANNEL")
@ApiParam("通道")
private String channel;
@Column(name = "TAG_NAME")
@ApiParam("标签名称")
private String tagName;
@Column(name = "TAG_ADDRESS")
@ApiParam("标签地址")
private String tagAddress;
@Column(name = "DATA_TYPE")
@ApiParam("标签数据类型")
private String dataType;
@Column(name = "GROUP_NAME")
@ApiParam("分组名称")
private String groupName;
@Column(name = "EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("生产线")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工位")
private String workCellCode;
@Column(name = "PLC_CFG")
@ApiParam("PLC的值的设定")
private String plcCfg;
@Column(name = "ANALYSIS_RULE")
@ApiParam("解析规则")
private String analysisRule;
@Column(name = "IS_ANALYSIS")
@ApiParam("是否解析")
private String isAnalysis;
@Transient
@ApiParam("设备名称")
private String equipmentName;
}

@ -0,0 +1,63 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 14:46
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_QC_CHECK_STANDARD")
@Api("质量检测标准")
public class MesQcCheckStandard extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("物料编码")
private String partNo;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "CHECK_TYPE")
@ApiParam("检测类型")
private Integer checkType;
@Column(name = "CHECK_ITEM")
@ApiParam("检测项")
private String checkItem;
@Column(name = "CHECK_STANDARD")
@ApiParam("检测标准")
private String checkStandard;
@Column(name = "CHECK_GUIDE")
@ApiParam("检测指导")
private String checkGuide;
@Column(name = "CHECK_FREQUENCY")
@ApiParam("频率")
private String checkFrequency;
}

@ -0,0 +1,98 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\15 17:20
* @Modify:
**/
@Data
public class MesDatasourceModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam( "有效性")
public Integer isValid;
@ApiParam( "是否已删除")
public Integer isDeleted;
@ApiParam( "创建用户")
public String createUser;
@ApiParam( "创建日期")
public String createDatetime;
@ApiParam( "修改人")
public String modifyUser;
@ApiParam( "修改日期")
public String modifyDatetime;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("数据源代码")
private String dsCode;
@ApiParam("数据源名称")
private String dsName;
@ApiParam("数据源类型")
private String dsType;
@ApiParam("主机")
private String dsHost;
@ApiParam("端口")
private Integer dsPort;
@ApiParam("用户名")
private String dsUser;
@ApiParam("密码")
private String dsPassword;
@ApiParam("数据库名称")
private String dsDbName;
public MesDatasourceModel() {
}
public MesDatasourceModel(Long id, String equipmentCode, String equipmentName, Integer isValid, Integer isDeleted, String createUser, String createDatetime,
String modifyUser, String modifyDatetime, String organizeCode, String dsCode, String dsName, String dsType,
String dsHost, Integer dsPort, String dsUser, String dsPassword, String dsDbName) {
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
this.organizeCode = organizeCode;
this.dsCode = dsCode;
this.dsName = dsName;
this.dsType = dsType;
this.dsHost = dsHost;
this.dsPort = dsPort;
this.dsUser = dsUser;
this.dsPassword = dsPassword;
this.dsDbName = dsDbName;
}
}

@ -0,0 +1,87 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class MesEquTaskPlanModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam("作业类型")
private Integer taskType;
@ApiParam("周期(天)")
private Integer taskCycle;
@ApiParam("上一执行时间")
private String lastTime;
@ApiParam("创建提前天数")
private Integer daysInAdvance;
@ApiParam("生产线")
private String workCenterCode;
@ApiParam("设备类别")
private String equipmentCategory;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("有效性")
public Integer isValid;
@ApiParam("是否已删除")
public Integer isDeleted;
@ApiParam("创建用户")
public String createUser;
@ApiParam("创建日期")
public String createDatetime;
@ApiParam("修改人")
public String modifyUser;
@ApiParam("修改日期")
public String modifyDatetime;
@ApiParam("作业类型")
private String taskTypeName;
@ApiParam("设备类别")
private String equipmentCategoryName;
public MesEquTaskPlanModel() {
}
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) {
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.taskType = taskType;
this.taskCycle = taskCycle;
this.lastTime = lastTime;
this.daysInAdvance = daysInAdvance;
this.workCenterCode = workCenterCode;
this.equipmentCategory = equipmentCategory;
this.organizeCode = organizeCode;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
}
}

@ -0,0 +1,87 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class MesEquTaskStandardModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam("作业类型")
private Integer taskType;
@ApiParam("操作项")
private String actionItem;
@ApiParam("操作标准")
private String actionStandard;
@ApiParam("操作指导")
private String actionGuide;
@ApiParam("生产线")
private String workCenterCode;
@ApiParam("设备类别")
private String equipmentCategory;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("有效性")
public Integer isValid;
@ApiParam("是否已删除")
public Integer isDeleted;
@ApiParam("创建用户")
public String createUser;
@ApiParam("创建日期")
public String createDatetime;
@ApiParam("修改人")
public String modifyUser;
@ApiParam("修改日期")
public String modifyDatetime;
@ApiParam("作业类型")
private String taskTypeName;
@ApiParam("设备类别")
private String equipmentCategoryName;
public MesEquTaskStandardModel() {
}
public MesEquTaskStandardModel(Long id, String equipmentCode, String equipmentName, Integer taskType, String actionItem, String actionStandard, String actionGuide, 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;
this.taskType = taskType;
this.actionItem = actionItem;
this.actionStandard = actionStandard;
this.actionGuide = actionGuide;
this.workCenterCode = workCenterCode;
this.equipmentCategory = equipmentCategory;
this.organizeCode = organizeCode;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
}
}

@ -7,7 +7,7 @@ import java.io.Serializable;
@Data
public class MesEquipmentModel implements Serializable {
@ApiParam(value ="id")
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
@ -19,34 +19,34 @@ public class MesEquipmentModel implements Serializable {
@ApiParam("设备状态")
private Integer status;
@ApiParam(value ="生产线")
@ApiParam("生产线")
private String workCenterCode;
@ApiParam(value ="工位")
@ApiParam("工位")
private String workCellCode;
@ApiParam(value ="区域")
@ApiParam("区域")
private String areaCode;
@ApiParam(value ="设备工位关联ID")
@ApiParam("设备工位关联ID")
private Long wcId;
@ApiParam(value ="设备&工位")
@ApiParam("设备&工位")
private String equipmentNameAndworkCellName;
@ApiParam("设备类型")
private Integer equipmentType;
@ApiParam(value ="设备类别")
@ApiParam("设备类别")
private String equipmentCategory;
@ApiParam(value ="备注")
@ApiParam("备注")
private String memo;
@ApiParam(value ="设备型号")
@ApiParam("设备型号")
private String equipmentModel;
@ApiParam(value ="设备规格")
@ApiParam("设备规格")
private String equipmentSpec;
@ApiParam("制造商")
@ -64,27 +64,39 @@ public class MesEquipmentModel implements Serializable {
@ApiParam("连接类型")
private Integer connectType;
@ApiParam(value ="组织代码")
@ApiParam("组织代码")
public String organizeCode;
@ApiParam(value = "有效性")
@ApiParam( "有效性")
public Integer isValid;
@ApiParam(value = "是否已删除")
@ApiParam( "是否已删除")
public Integer isDeleted;
@ApiParam(value = "创建用户")
@ApiParam( "创建用户")
public String createUser;
@ApiParam(value = "创建日期")
@ApiParam( "创建日期")
public String createDatetime;
@ApiParam(value = "修改人")
@ApiParam( "修改人")
public String modifyUser;
@ApiParam(value = "修改日期")
@ApiParam( "修改日期")
public String modifyDatetime;
@ApiParam("设备状态")
private String statusName;
@ApiParam("设备类型")
private String equipmentTypeName;
@ApiParam("设备类别")
private String equipmentCategoryName;
@ApiParam("连接类型")
private String connectTypeName;
public MesEquipmentModel() {

@ -0,0 +1,122 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\15 15:58
* @Modify:
**/
@Data
public class MesPlcModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam( "有效性")
public Integer isValid;
@ApiParam( "是否已删除")
public Integer isDeleted;
@ApiParam( "创建用户")
public String createUser;
@ApiParam( "创建日期")
public String createDatetime;
@ApiParam( "修改人")
public String modifyUser;
@ApiParam( "修改日期")
public String modifyDatetime;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("PLC代码")
private String plcCode;
@ApiParam("PLC名称")
private String plcName;
@ApiParam("PLC型号")
private String plcModel;
@ApiParam("PLC IP")
private String plcIp;
@ApiParam("通道")
private String channel;
@ApiParam("标签名称")
private String tagName;
@ApiParam("标签地址")
private String tagAddress;
@ApiParam("标签数据类型")
private String dataType;
@ApiParam("分组名称")
private String groupName;
@ApiParam("生产线")
private String workCenterCode;
@ApiParam("工位")
private String workCellCode;
@ApiParam("PLC的值的设定")
private String plcCfg;
@ApiParam("解析规则")
private String analysisRule;
@ApiParam("是否解析")
private String isAnalysis;
public MesPlcModel(){
}
public MesPlcModel(Long id, String equipmentCode, String equipmentName, Integer isValid, Integer isDeleted, String createUser, String createDatetime,
String modifyUser, String modifyDatetime, String organizeCode, String plcCode, String plcName, String plcModel,
String plcIp, String channel, String tagName, String tagAddress, String dataType, String groupName,
String workCenterCode, String workCellCode, String plcCfg, String analysisRule, String isAnalysis){
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
this.organizeCode = organizeCode;
this.plcCode = plcCode;
this.plcName = plcName;
this.plcModel = plcModel;
this.plcIp = plcIp;
this.channel = channel;
this.tagName = tagName;
this.tagAddress = tagAddress;
this.dataType = dataType;
this.groupName = groupName;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.plcCfg = plcCfg;
this.analysisRule = analysisRule;
this.isAnalysis = isAnalysis;
}
}

@ -44,5 +44,8 @@ public class MesWorkOrderButtonModel implements Serializable {
@ApiParam("关闭按钮")
private boolean closeButton;
@ApiParam("完成按钮")
private boolean completeButton;
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesDatasource;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate:2019\10\9
* @Modify:
**/
public interface MesDatasourceRepository extends BaseRepository<MesDatasource,Long> {
}

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

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

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

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

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesFaultCause;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 13:08
* @Modify:
**/
public interface MesFaultCauseRepository extends BaseRepository<MesFaultCause, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesFaultMethod;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 13:07
* @Modify:
**/
public interface MesFaultMethodRepository extends BaseRepository<MesFaultMethod, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesFaultPhenomenon;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\10 0010 13:05
* @Modify:
**/
public interface MesFaultPhenomenonRepository extends BaseRepository<MesFaultPhenomenon, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesPlc;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate:2019\10\9 0009 11:16
* @Modify:
**/
public interface MesPlcRepository extends BaseRepository<MesPlc, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesQcCheckStandard;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\10\12 0012 14:58
* @Modify:
**/
public interface MesQcCheckStandardRepository extends BaseRepository<MesQcCheckStandard, Long> {
}

@ -129,7 +129,11 @@ public class MesHqlPack {
if (!StringUtils.isEmpty(mesPart.getCategoryCode3())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode3(), "categoryCode3", packBean);
}
if (!StringUtils.isEmpty(mesPart.getProduceCategoryCode()) && mesPart.getProduceCategoryCode().toUpperCase().equals("WXJ")) {
DdlPreparedPack.getStringEqualPack("WXJ", "produceCategoryCode", packBean);
} else {
DdlPreparedPack.getStringNoEqualPack("WXJ", "produceCategoryCode", packBean);
}
DdlPreparedPack.getOrderDefault(mesPart);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesPart.getOrderByParam()}, packBean);
return packBean;
@ -1144,7 +1148,6 @@ public class MesHqlPack {
return packBean;
}
/**
* Mes
*
@ -1254,4 +1257,138 @@ public class MesHqlPack {
return packBean;
}
/**
* MES Plc
* @param mesPlc
* @param organizeCode
* @return
*/
public static DdlPackBean getMesPlc(MesPlc mesPlc, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesPlc, organizeCode);
if (!StringUtils.isEmpty(mesPlc.getPlcCode())) {
DdlPreparedPack.getStringLikerPack(mesPlc.getPlcCode(), "plcCode", packBean);
}
if (!StringUtils.isEmpty(mesPlc.getPlcName())) {
DdlPreparedPack.getStringLikerPack(mesPlc.getPlcName(), "plcName", packBean);
}
if (!StringUtils.isEmpty(mesPlc.getChannel())) {
DdlPreparedPack.getStringLikerPack(mesPlc.getChannel(), "channel", packBean);
}
if (!StringUtils.isEmpty(mesPlc.getTagAddress())) {
DdlPreparedPack.getStringLikerPack(mesPlc.getTagAddress(), "tagAddress", packBean);
}
if (!StringUtils.isEmpty(mesPlc.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesPlc.getWorkCenterCode(), "workCenterCode", packBean);
}
if (!StringUtils.isEmpty(mesPlc.getPlcCode())) {
DdlPreparedPack.getStringEqualPack(mesPlc.getWorkCellCode(), "workCellCode", packBean);
}
return packBean;
}
/**
* MES DB
* @param mesDatasource
* @param organizeCode
* @return
*/
public static DdlPackBean getMesDatasource(MesDatasource mesDatasource, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesDatasource, organizeCode);
if (!StringUtils.isEmpty(mesDatasource.getDsCode())) {
DdlPreparedPack.getStringLikerPack(mesDatasource.getDsCode(), "dsCode", packBean);
}
if (!StringUtils.isEmpty(mesDatasource.getDsType())) {
DdlPreparedPack.getStringLikerPack(mesDatasource.getDsType(), "dsType", packBean);
}
if (!StringUtils.isEmpty(mesDatasource.getDsDbName())) {
DdlPreparedPack.getStringLikerPack(mesDatasource.getDsDbName(), "dsDbName", packBean);
}
return packBean;
}
/**
* MES
* @param mesFaultMethod
* @param organizeCode
* @return
*/
public static DdlPackBean getMesFaultMethod(MesFaultMethod mesFaultMethod, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesFaultMethod, organizeCode);
if (!StringUtils.isEmpty(mesFaultMethod.getFmCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultMethod.getFmCode(), "fmCode", packBean);
}
if (!StringUtils.isEmpty(mesFaultMethod.getFmName())) {
DdlPreparedPack.getStringLikerPack(mesFaultMethod.getFmName(), "fmName", packBean);
}
if (!StringUtils.isEmpty(mesFaultMethod.getParentFmCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultMethod.getParentFmCode(), "parentFmCode", packBean);
}
return packBean;
}
/**
* MES
* @param mesFaultCause
* @param organizeCode
* @return
*/
public static DdlPackBean getMesFaultCause(MesFaultCause mesFaultCause, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesFaultCause, organizeCode);
if (!StringUtils.isEmpty(mesFaultCause.getFcCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultCause.getFcCode(), "fcCode", packBean);
}
if (!StringUtils.isEmpty(mesFaultCause.getFcName())) {
DdlPreparedPack.getStringLikerPack(mesFaultCause.getFcName(), "fcName", packBean);
}
if (!StringUtils.isEmpty(mesFaultCause.getParentFcCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultCause.getParentFcCode(), "parentFcCode", packBean);
}
return packBean;
}
/**
* MES
* @param mesFaultPhenomenon
* @param organizeCode
* @return
*/
public static DdlPackBean getMesFaultPhenomenon(MesFaultPhenomenon mesFaultPhenomenon, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesFaultPhenomenon, organizeCode);
if (!StringUtils.isEmpty(mesFaultPhenomenon.getFpCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultPhenomenon.getFpCode(), "fpCode", packBean);
}
if (!StringUtils.isEmpty(mesFaultPhenomenon.getFpName())) {
DdlPreparedPack.getStringLikerPack(mesFaultPhenomenon.getFpName(), "fpName", packBean);
}
if (!StringUtils.isEmpty(mesFaultPhenomenon.getParentFpCode())) {
DdlPreparedPack.getStringLikerPack(mesFaultPhenomenon.getParentFpCode(), "parentFpCode", packBean);
}
return packBean;
}
/**
* MES
* @param mesQcCheckStandard
* @param organizeCode
* @return
*/
public static DdlPackBean getMesQcCheckStandard(MesQcCheckStandard mesQcCheckStandard, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesQcCheckStandard, organizeCode);
if (!StringUtils.isEmpty(mesQcCheckStandard.getPartNo())) {
DdlPreparedPack.getStringEqualPack(mesQcCheckStandard.getPartNo(), "partNo", packBean);
}
if (!StringUtils.isEmpty(mesQcCheckStandard.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(mesQcCheckStandard.getWorkCellCode(), "workCellCode", packBean);
}
if (!StringUtils.isEmpty(mesQcCheckStandard.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesQcCheckStandard.getWorkCenterCode(), "workCenterCode", packBean);
}
if (null == mesQcCheckStandard.getCheckType()) {
DdlPreparedPack.getNumberBiggerEqualPack(mesQcCheckStandard.getCheckType(), "checkType", packBean);
}
if (!StringUtils.isEmpty(mesQcCheckStandard.getCheckItem())) {
DdlPreparedPack.getStringLikerPack(mesQcCheckStandard.getCheckItem(), "checkItem", packBean);
}
return packBean;
}
}

@ -6,6 +6,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitRecord;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -41,6 +42,7 @@ public class SuitClientModel {
/**
*
*/
@XStreamOmitField
private BsSuitRecord bsSuitRecord;
/**
@ -87,7 +89,7 @@ public class SuitClientModel {
*
*/
@XStreamCDATA
private String suitResultMessage;
private Object suitResultMessage;
public SuitClientModel() {
}

@ -29,8 +29,11 @@ public class SuitParamModel {
private String pathKey;
/* 标签内容 */
private String vaule;
/* 标签类型 Default:PARAM_VALUE_TYPE.STRING */
private Integer type; // BlockSoftSwitchEnumUtil.PARAM_VALUE_TYPE
/**
*
* type Date,BigDecimal
*/
private String type;
/* 标签属性 */
private Map<String,String> attr;
@ -38,4 +41,20 @@ public class SuitParamModel {
private SuitParamModel parent;
/* 标签子集 */
private List<SuitParamModel> childList;
@Override
public String toString() {
return "SuitParamModel{" +
"tagName='" + tagName + '\'' +
", classPath='" + classPath + '\'' +
", methodName='" + methodName + '\'' +
", id='" + id + '\'' +
", name='" + name + '\'' +
", pathKey='" + pathKey + '\'' +
", vaule='" + vaule + '\'' +
", type=" + type +
", attr=" + attr +
", childList=" + childList +
'}';
}
}

@ -1,9 +1,11 @@
package cn.estsh.i3plus.pojo.model.softswitch;
import cn.estsh.i3plus.pojo.base.annotation.XStreamCDATA;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitRecord;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -41,43 +43,43 @@ public class SuitServerModel {
/**
*
*/
@XStreamImplicit
// @XStreamImplicit
private String suitMessage;
/**
*
*/
@XStreamImplicit
// @XStreamImplicit
private String suitCaseStatusCode = ResourceEnumUtil.MESSAGE.SUCCESS.getCode();
/**
*
*/
@XStreamImplicit
// @XStreamImplicit
private boolean suitSuccess = true;
/**
*
*/
@XStreamImplicit
@XStreamOmitField
private BsSuitRecord bsSuitRecord;
/**
*
*/
@XStreamImplicit
@XStreamOmitField
private BsSuitCaseModel bsSuitCaseModel;
/**
*
*/
@XStreamImplicit
// @XStreamImplicit
private Integer requestSource;
/**
*
*/
@XStreamImplicit
// @XStreamImplicit
private Integer suitMethodId;
public int getSuitMethodIdVal(){
@ -87,6 +89,6 @@ public class SuitServerModel {
return suitMethodId.intValue();
}
@XStreamImplicit
// @XStreamImplicit
private String analyzeMessage;
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.softswitch.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.BlockSoftSwitchEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@ -103,11 +104,26 @@ public class BsSuitCase extends BaseBean {
return isNeedCertification.intValue();
}
@Column(name = "IS_PUSH_MQ")
@ApiParam(value = "是否推送MQ")
private Integer isPushMQ;
@Column(name = "SSL_KEY_ID")
@ApiParam(value = "证书id")
@JsonSerialize(using = ToStringSerializer.class)
private Long sslKeyId;
@Column(name = "SUIT_DATA_TYPE")
@ApiParam(value = "适配报文类型")
private Integer suitDataType;
public Integer getSuitDataType(){
if(suitDataType == null){
suitDataType = BlockSoftSwitchEnumUtil.SUIT_DATA_TYPE.XML.getValue();
}
return suitDataType;
}
@Column(name = "REGULAR_SUIT_NUM")
@ApiParam(value = "定时适配次数")
private Integer regularSuitNum;

@ -13,6 +13,8 @@ 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 :
@ -82,5 +84,9 @@ public class BsSuitDataDetail extends BaseBean {
@ApiParam(value = "处理时间")
private String processTime;
@Transient
@ApiParam(value = "适配请求文件列表")
private List<BsSuitFile> bsSuitFileList;
}

@ -34,14 +34,23 @@ public class BsSuitFile extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class)
private Long suitCaseId;
@Column(name = "SUIT_RECORD_ID")
@ApiParam(value = "适配记录id")
@JsonSerialize(using = ToStringSerializer.class)
private Long suitRecordId;
@Column(name = "SUIT_CASE_NAME_RDD")
@ApiParam(value = "适配套件名称")
private String suitCaseName;
private String suitCaseNameRdd;
@Column(name = "SUIT_CASE_CODE")
@ApiParam(value = "适配套件代码")
private String suitCaseCode;
@Column(name = "CASE_TYPE_ID")
@ApiParam(value = "套件类型id(枚举)")
private Integer caseTypeId;
@Column(name = "FOLDER_PATH")
@ApiParam(value = "文件夹路径")
private String folderPath;

@ -11,6 +11,7 @@ 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;
@ -35,9 +36,9 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "适配套件名称")
private String suitCaseNameRdd;
@Column(name = "SUIT_CASE_CODE_RDD")
@Column(name = "SUIT_CASE_CODE")
@ApiParam(value = "适配套件代码")
private String suitCaseCodeRdd;
private String suitCaseCode;
@Column(name = "SUIT_CASE_ID")
@ApiParam(value = "适配器套件id")
@ -95,6 +96,7 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "适配结果")
private Integer suitResult;
@Lob
@Column(name = "SUIT_MESSAGE")
@ApiParam(value = "适配信息")
private String suitMessage;
@ -119,5 +121,9 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "适配请求记录")
private BsSuitRequestRecord bsSuitRequestRecord;
@Transient
@ApiParam(value = "适配请求文件列表")
private List<BsSuitFile> bsSuitFileList;
}

@ -333,7 +333,7 @@ public class SoftSwitchHqlPack {
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitTypeId(),"suitTypeId",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseCodeRdd(),"suitCaseCodeRdd",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitRecord.getSuitCaseCode(),"suitCaseCode",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitCaseId(),"suitCaseId",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getCaseTypeId(),"caseTypeId",ddlPackBean);
DdlPreparedPack.timeBuilder(bsSuitRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
@ -362,7 +362,6 @@ public class SoftSwitchHqlPack {
return ddlPackBean;
}
/**
*
* @param bsSuitFile
@ -371,7 +370,7 @@ public class SoftSwitchHqlPack {
public static DdlPackBean packHqlBsSuitCaseFile(BsSuitFile bsSuitFile){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseName(),"suitCaseName",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitFile.getSuitCaseCode(),"suitCaseCode",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitFile.getSuitCaseId(), "suitCaseId", ddlPackBean);
DdlPreparedPack.getStringLikerPack(bsSuitFile.getFileName(), "fileName", ddlPackBean);
@ -381,4 +380,48 @@ public class SoftSwitchHqlPack {
return ddlPackBean;
}
public static DdlPackBean packHqlSuitRecordBySuitCaseCodeAndProcessState(String suitCaseCode, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getStringEqualPack(suitCaseCode,"suitCaseCode",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
public static DdlPackBean packHqlSuitDataDetailBySuitCaseCodeAndProcessState(String suitCaseCode, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getStringEqualPack(suitCaseCode,"suitCaseCodeRdd",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
public static DdlPackBean packHqlSuitRecordBySuitRecordIdAndProcessState(Long[] suitRecordIds, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getInPackArray(suitRecordIds,"id",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
public static DdlPackBean packHqlSuitDataDetailBySuitRecordIdAndProcessState(Long[] suitRecordIds, Integer processState){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
DdlPreparedPack.getInPackArray(suitRecordIds,"suitRecordId",ddlPackBean);
DdlPreparedPack.getNumEqualPack(processState,"processState",ddlPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"getDateTime"},ddlPackBean);
return ddlPackBean;
}
}

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -75,6 +77,7 @@ public class WmsASNMasterDetails extends BaseBean {
*/
@Column(name = "ITEM_STATUS")
@ApiParam(value = "状态", example = "1")
@AnnoOutputColumn(refClass = WmsEnumUtil.ORDER_DETAILS_STATUS.class, refForeignKey = "value", value = "description")
public Integer itemStatus;
@Column(name = "PACKAGE")

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -77,7 +79,7 @@ public class WmsPOMasterDetails extends BaseBean {
@Column(name = "RC_QTY", columnDefinition = "decimal(18,8)")
@ColumnDefault("0")
@ApiParam(value = "收货数量", example = "0")
private Double rcQty;
private Double rcQty = 0d;
//private Double getRcQty(){ return this.rcQty == null ? new Double(0) : this.rcQty; }
@ -112,6 +114,7 @@ public class WmsPOMasterDetails extends BaseBean {
*/
@Column(name = "ITEM_STATUS")
@ApiParam("状态")
@AnnoOutputColumn(refClass = WmsEnumUtil.ORDER_DETAILS_STATUS.class, refForeignKey = "value", value = "description")
private Integer itemStatus;
@Column(name = "SNP", columnDefinition = "decimal(18,8)")

@ -15,7 +15,7 @@ import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
* @Description :线
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-11-06 11:50
@ -38,7 +38,7 @@ public class WmsPartRouting extends BaseBean {
@Column(name = "ROUTING_CODE")
@ApiParam(value = "线路编号")
private String routingCode;
public WmsPartRouting(){}

@ -15,7 +15,7 @@ import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
* @Description :线
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-11-06 11:50
@ -82,7 +82,7 @@ public class WmsRoutingRule extends BaseBean {
@Column(name = "ROUTING_CODE")
@ApiParam(value = "线路代码")
private String routingCode;
public WmsRoutingRule(){}
}

@ -163,6 +163,10 @@ public class WmsStockSn extends BaseBean {
@AnnoOutputColumn(refClass = WmsEnumUtil.WMS_STOCK_TYPE.class, refForeignKey = "value", value = "description")
private Integer snType = 10;
@Column(name = "QUALITY_DATE")
@ApiParam("保质期日期")
private String qualityDate;
@ApiParam(value = "仓库名称")
@Transient
public String whNameRdd;

@ -116,4 +116,39 @@ public class WmsInterfaceDataMapper extends BaseBean {
@Column(name = "LAST_SYNC_TIME")
public String lastSyncTime;
/**
*
*/
@Column(name = "SOFT_ADAPATOR_CODE")
public String softAdaptorCode;
/**
*
*/
@Column(name = "SCRIPT_NO")
public String ScriptNo;
/**
*
*/
@Column(name = "USE_SCRIPT_PULL")
public int useScriptPull;
/**
*
*/
@Column(name = "USE_SCRIPT_PUSH")
public int useScriptPush;
/**
*
*/
@Column(name = "USE_SCRIPT_MARK")
public int useScriptMark;
/**
*
*/
@Column(name = "USE_SCRIPT_FILTER")
public int useScriptFilter;
}

@ -16,7 +16,7 @@ import java.time.LocalTime;
**/
@Data
@Api("供应商收货看板")
public class WmsPoAsnRecvModel extends BaseBean implements Comparable<WmsPoAsnRecvModel>{
public class WmsPoAsnRecvModel extends BaseBean implements Comparable<WmsPoAsnRecvModel> {
@ApiParam("订单号")
private String orderNo;
@ -33,9 +33,9 @@ public class WmsPoAsnRecvModel extends BaseBean implements Comparable<WmsPoAsnRe
@ApiParam("计划收货时间")
private String planTime;
@ApiParam("总数量")
private Double qty;
private Double transQty;
@ApiParam("已收货数量")
private Double recQty;
private Double resQty;
@ApiParam("最早收货时间")
private String earliestReceTime;
@ApiParam("最晚收货时间")
@ -47,36 +47,31 @@ public class WmsPoAsnRecvModel extends BaseBean implements Comparable<WmsPoAsnRe
@ApiParam("收货状态")
private String receiveStatus;
public WmsPoAsnRecvModel(String orderNo,String dock,String vendorNo,String prodCfgTypeCode, String prodCfgTypeName,String planDate,String planTime,Double qty,Double recQty){
public WmsPoAsnRecvModel(String orderNo, String partNo, String vendorName, String dock, String prodCfgTypeName,
String planTime, Double transQty, Double resQty) {
this.orderNo = orderNo;
this.partNo = partNo;
this.vendorName = vendorName;
this.dock = dock;
this.planDate = planDate;
this.planTime = planTime;
this.qty = qty;
this.recQty = recQty;
this.prodCfgTypeCode = prodCfgTypeCode;
this.prodCfgTypeName = prodCfgTypeName;
this.vendorNo = vendorNo;
}
public WmsPoAsnRecvModel(String orderNo,String dock,String planDate,String planTime){
this.orderNo = orderNo;
this.dock = dock;
this.planDate = planDate;
this.planTime = planTime;
this.transQty = transQty;
this.resQty = resQty;
}
public WmsPoAsnRecvModel() {
}
public WmsPoAsnRecvModel(){}
@Override
public int compareTo(WmsPoAsnRecvModel o) {
return getLocalTime(this.getPlanTime()).isAfter(getLocalTime(o.getPlanTime()))? 1 : -1;
return getLocalTime(this.getPlanTime()).isAfter(getLocalTime(o.getPlanTime())) ? 1 : -1;
}
public static LocalTime getLocalTime(String planTime){
public static LocalTime getLocalTime(String planTime) {
LocalTime time = null;
try {
time = LocalTime.parse(planTime);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
return time;

@ -21,7 +21,6 @@ public interface WmsStockSnRepository extends BaseRepository<WmsStockSn, Long> {
*/
WmsStockSn findFirstBySn(String sn);
/**
* Rock.Yu at 2019-06-22 11:05
*

@ -1964,6 +1964,7 @@ public class WmsHqlPack {
DdlPreparedPack.getStringEqualPack(wmsStockSn.getPartNo(), "partNo", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getSnStatus(), "snStatus", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getQcStatus(), "qcStatus", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getVendorNo(),"vendorNo", result);
DdlPreparedPack.getStringNotNullPack("locateNo", result);
result.setWhereAppend(result.getWhereAppend() + " and locateNo != ''");
@ -2375,7 +2376,7 @@ public class WmsHqlPack {
/**
*
*
* @param wmsStockQuan
* @param wmsStockQuan
* @return
*/
public static DdlPackBean packWmsRouting(WmsRouting wmsRouting) {

Loading…
Cancel
Save