yun-zuoyi
于学杰 6 years ago
commit 6087fe0c2c

@ -885,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;
} }
@ -907,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;
} }

@ -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;
} }

@ -102,7 +102,6 @@ public class LacCommandStackStepTask extends BaseBean {
@Column(name="IS_CRUX") @Column(name="IS_CRUX")
@ApiParam(value ="是否关键") @ApiParam(value ="是否关键")
private Integer isCrux; private Integer isCrux;
@Transient @Transient
@ApiParam(value ="适配任务") @ApiParam(value ="适配任务")
private LacSuitTask lacSuitTask; private LacSuitTask lacSuitTask;

@ -73,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;
@ -120,6 +124,10 @@ public class LacSuitTask extends BaseBean {
private LacSuitCase lacSuitCase; private LacSuitCase lacSuitCase;
@Transient @Transient
@ApiParam(value ="任务实例id")
private Long taskInstanceId;
@Transient
@ApiParam(value ="适配参数") @ApiParam(value ="适配参数")
private List<LacSuitTaskParam> lacSuitTaskParamList; private List<LacSuitTaskParam> lacSuitTaskParamList;

@ -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 = "动作类型")

@ -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 = "动作类型")

@ -1,8 +1,11 @@
package cn.estsh.i3plus.pojo.model.lac; package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord; import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackTemplate; import cn.estsh.i3plus.pojo.lac.bean.LacSuitTask;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -22,12 +25,6 @@ public class LacCommandStackModel {
private Long recordId; private Long recordId;
/** /**
*
*/
@Deprecated
private LacCommandStackTemplate commandStackTemplate;
/**
* *
*/ */
private LacCommandStackRecord commandStackRecord; private LacCommandStackRecord commandStackRecord;
@ -47,13 +44,50 @@ public class LacCommandStackModel {
* key : * key :
* value * value
*/ */
private Map<Long, Object> orginMessage = new ConcurrentHashMap<>(); private Map<Long, Object> orginMessageMap = new ConcurrentHashMap<>();
/** /**
* *
* key : * key :
* value * value
*/ */
private Map<Long, String> transMessage = new ConcurrentHashMap<>(); 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);
}
} }

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.model.lac; package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data; import lombok.Data;
@ -34,4 +35,10 @@ public class LacSuitResponse {
*/ */
private Object result; private Object result;
public LacSuitResponse(){
this.success = true;
this.code = ResourceEnumUtil.MESSAGE.SUCCESS.getCode();
this.message = ResourceEnumUtil.MESSAGE.SUCCESS.getDescription();
}
} }

Loading…
Cancel
Save