mes设备

yun-zuoyi
王杰 6 years ago
parent 44f2b1e826
commit 0d0178545c

@ -11,6 +11,116 @@ import com.fasterxml.jackson.annotation.JsonFormat;
**/
public class MesEnumUtil {
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_NOTIFY_CFG_TYPE {
TASK_NOTIFY(10, "任务型通知");
private int value;
private String description;
MES_EQU_TASK_NOTIFY_CFG_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;
}
}
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_NOTIFY_CFG_PATTERN {
EMAIL(10, "邮件"),
USERPHONE(10, "手机号");
private int value;
private String description;
MES_EQU_TASK_NOTIFY_CFG_PATTERN(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_NOTIFY_OBJECT_CFG_TYPE {
CHECK_NOTIFY_OBJECT(10, "点检通知对象"),
MAINTAIN_NOTIFY_OBJECT(20, "保养通知对象"),
REPAIR_NOTIFY_OBJECT(30, "维修通知对象");
private int value;
private String description;
MES_EQU_NOTIFY_OBJECT_CFG_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;
}
}
/**
* mes

@ -0,0 +1,48 @@
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_NOTIFY_OBJECT_CFG")
@Api("设备通知对象配置")
public class MesEquNotifyObjectCfg extends BaseBean {
@Column(name="NOTIFY_OBJECT_CODE")
@ApiParam("对象代码")
private String notifyObjectCode;
@Column(name="NOTIFY_OBJECT_NAME")
@ApiParam("对象名称")
private String notifyObjectName;
@Column(name="NOTIFY_OBJECT_VALUE")
@ApiParam("对象值")
private String notifyObjectValue;
@Column(name="NOTIFY_OBJECT_TYPE")
@ApiParam("对象类型")
private Integer notifyObjectType;
}

@ -0,0 +1,51 @@
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_NOTIFY_CFG")
@Api("设备作业通知配置")
public class MesEquTaskNotifyCfg extends BaseBean {
@Column(name="TASK_TYPE")
@ApiParam("作业类型")
private Integer taskType;
@Column(name="NOTIFY_TYPE")
@ApiParam("通知类型")
private Integer notifyType;
@Column(name="NOTIFY_CONDITION")
@ApiParam("通知条件(小时)")
private Integer notifyCondition;
@Column(name="NOTIFY_OBJECT_CODE")
@ApiParam("通知对象")
private String notifyObjectCode;
@Column(name="NOTIFY_PATTERN")
@ApiParam("通知方式")
private Integer notifyPattern;
}

@ -0,0 +1,92 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class MesEquTaskNotifyModel implements Serializable {
@ApiParam("作业任务编号")
private String taskNo;
@ApiParam("作业类型")
private Integer taskType;
@ApiParam("作业状态")
private Integer taskStatus;
@ApiParam(value="生产线")
private String workCenterCode;
@ApiParam("计划日期")
private String planTime;
@ApiParam("任务来源")
private Integer taskSource;
@ApiParam("通知标识")
private Integer notifyFlag;
@ApiParam("关联任务")
private String relateTask;
@ApiParam("通知类型")
private Integer notifyType;
@ApiParam("通知条件(小时)")
private Integer notifyCondition;
@ApiParam("通知对象")
private String notifyObjectCode;
@ApiParam("通知方式")
private Integer notifyPattern;
@ApiParam("对象值")
private String notifyObjectValue;
@ApiParam("组织代码")
public String organizeCode;
@ApiParam("作业类型")
private String taskTypeName;
@ApiParam("作业状态")
private String taskStatusName;
@ApiParam("任务来源")
private String taskSourceName;
@ApiParam("通知标识")
private String notifyFlagName;
@ApiParam("通知类型")
private Integer notifyTypeName;
@ApiParam("通知方式")
private Integer notifyPatternName;
public MesEquTaskNotifyModel() {
}
public MesEquTaskNotifyModel(String taskNo, Integer taskType, Integer taskStatus, String workCenterCode, String planTime, Integer taskSource, Integer notifyFlag, String relateTask, Integer notifyType, Integer notifyCondition, String notifyObjectCode, Integer notifyPattern, String notifyObjectValue, String organizeCode) {
this.taskNo = taskNo;
this.taskType = taskType;
this.taskStatus = taskStatus;
this.workCenterCode = workCenterCode;
this.planTime = planTime;
this.taskSource = taskSource;
this.notifyFlag = notifyFlag;
this.relateTask = relateTask;
this.notifyType = notifyType;
this.notifyCondition = notifyCondition;
this.notifyObjectCode = notifyObjectCode;
this.notifyPattern = notifyPattern;
this.notifyObjectValue = notifyObjectValue;
this.organizeCode = organizeCode;
}
}

@ -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.MesEquNotifyObjectCfg;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-09-18-17:13
* @Modify:
**/
@Repository
public interface MesEquNotifyObjectCfgRepository extends BaseRepository<MesEquNotifyObjectCfg, 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.MesEquTaskNotifyCfg;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-09-18-17:13
* @Modify:
**/
@Repository
public interface MesEquTaskNotifyCfgRepository extends BaseRepository<MesEquTaskNotifyCfg, Long> {
}

@ -1400,6 +1400,7 @@ public class MesHqlPack {
}
/**
<<<<<<< Updated upstream
* MES
* @param mesDefect
* @param organizeCode
@ -1439,6 +1440,54 @@ public class MesHqlPack {
return packBean;
}
/**
* @param mesEquNotifyObjectCfg
* @param organizeCode
* @return
*/
public static DdlPackBean getMesEquNotifyObjectCfg(MesEquNotifyObjectCfg mesEquNotifyObjectCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEquNotifyObjectCfg, organizeCode);
if (!StringUtils.isEmpty(mesEquNotifyObjectCfg.getNotifyObjectCode())) {
DdlPreparedPack.getStringLikerPack(mesEquNotifyObjectCfg.getNotifyObjectCode(), "notifyObjectCode", packBean);
}
if (!StringUtils.isEmpty(mesEquNotifyObjectCfg.getNotifyObjectName())) {
DdlPreparedPack.getStringLikerPack(mesEquNotifyObjectCfg.getNotifyObjectName(), "notifyObjectName", packBean);
}
if (!StringUtils.isEmpty(mesEquNotifyObjectCfg.getNotifyObjectValue())) {
DdlPreparedPack.getStringLikerPack(mesEquNotifyObjectCfg.getNotifyObjectValue(), "notifyObjectValue", packBean);
}
if (!StringUtils.isEmpty(mesEquNotifyObjectCfg.getNotifyObjectType())) {
DdlPreparedPack.getNumEqualPack(mesEquNotifyObjectCfg.getNotifyObjectType(), "notifyObjectType", packBean);
}
return packBean;
}
/**
* @param mesEquTaskNotifyCfg
* @param organizeCode
* @return
*/
public static DdlPackBean getMesEquTaskNotifyCfg(MesEquTaskNotifyCfg mesEquTaskNotifyCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEquTaskNotifyCfg, organizeCode);
if (!StringUtils.isEmpty(mesEquTaskNotifyCfg.getNotifyObjectCode())) {
DdlPreparedPack.getStringLikerPack(mesEquTaskNotifyCfg.getNotifyObjectCode(), "notifyObjectCode", packBean);
}
if (!StringUtils.isEmpty(mesEquTaskNotifyCfg.getTaskType())) {
DdlPreparedPack.getNumEqualPack(mesEquTaskNotifyCfg.getTaskType(), "taskType", packBean);
}
if (!StringUtils.isEmpty(mesEquTaskNotifyCfg.getNotifyType())) {
DdlPreparedPack.getNumEqualPack(mesEquTaskNotifyCfg.getNotifyType(), "notifyType", packBean);
}
if (!StringUtils.isEmpty(mesEquTaskNotifyCfg.getNotifyCondition())) {
DdlPreparedPack.getNumEqualPack(mesEquTaskNotifyCfg.getNotifyCondition(), "notifyCondition", packBean);
}
if (!StringUtils.isEmpty(mesEquTaskNotifyCfg.getNotifyPattern())) {
DdlPreparedPack.getNumEqualPack(mesEquTaskNotifyCfg.getNotifyPattern(), "notifyPattern", packBean);
}
return packBean;
}
/**
* MES
* @param mesTypeCfg

Loading…
Cancel
Save