yun-zuoyi
wynne1005 5 years ago
parent cb8a090aea
commit 6a36ad7601

@ -3091,7 +3091,7 @@ public class MesPcnEnumUtil {
}
/**
* mes_
* mes_
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EQUIPMENT_TOOLING_TOOLING_TYPE {
@ -3234,4 +3234,106 @@ public class MesPcnEnumUtil {
return tmp;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FSM_EVENT {
TRIGGER(10, "trigger", "触发"),
ENTRY(20, "entry", "进入状态"),
EXIT(30, "exit", "离开状态");
private int value;
private String code;
private String description;
private FSM_EVENT(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return this.value;
}
public String getCode() {
return this.code;
}
public String getDescription() {
return this.description;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FSM_STATE_TYPE {
BEGIN(10, "begin", "开始状态点"),
END(20, "end", "结束状态点");
private int value;
private String code;
private String description;
private FSM_STATE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return this.value;
}
public String getCode() {
return this.code;
}
public String getDescription() {
return this.description;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TRIGGER_TYPE {
INNER_TRIGGER(10, "内部触发"),
OUTER_TRIGGER(20, "外部触发");
private int value;
private String description;
TRIGGER_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum STATION_REQUEST_BEAN_CMD {
JUMP_STATUS(10, "跳过状态点"),
FORCE_DO_SPEC_STATUS(20, "强制执行制定的状态点");
private int value;
private String description;
STATION_REQUEST_BEAN_CMD(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
}
}

@ -5,20 +5,25 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>i3plus-pojo-mes</artifactId>
<packaging>jar</packaging>
<version>1.0-${profileActive}-SNAPSHOT</version>
<!-- <version>1.0-${profileActive}-SNAPSHOT</version>-->
<version>1.0-DEV-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>

@ -10,8 +10,8 @@ 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.io.Serializable;
/**
@ -57,19 +57,31 @@ public class MesStateMachineStatus extends BaseBean implements Serializable {
@ApiParam("触发条件")
private String triggerWhere;
@Column(name = "ACTION_AMG_ID")
@Column(name = "TRIGGER_AMG_ID")
@ApiParam("触发调用")
private Integer actionAmgId;
private Long triggerAmgId;
@Column(name = "IN_AMG_ID")
@ApiParam("进入调用")
private Integer inAmgId;
private Long inAmgId;
@Column(name = "OUT_AMG_ID")
@ApiParam("离开调用")
private Integer outAmgId;
private Long outAmgId;
@Column(name = "STATUS_TYPE", columnDefinition = "tinyint default 0")
@ApiParam("状态类型 10=初始化状态")
private Integer statusType;
@Transient
@ApiParam("状态点是否完成")
private boolean isComplete;
@Transient
@ApiParam("状态点是否完成")
private boolean isJump;
@Transient
@ApiParam("前端显示颜色")
private String color;
}

@ -23,18 +23,18 @@ import java.io.Serializable;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_ACTION_MODULE_GROUP")
@Table(name = "MES_STEP_GROUP")
@Api("工步集")
public class MesActionModuleGroup extends BaseBean implements Serializable {
public class MesStepGroup extends BaseBean implements Serializable {
private static final long serialVersionUID = 1876053661752102998L;
@Column(name = "AMG_ID")
@ApiParam("组件集编号")
private Long amgId;
@Column(name = "AM_CODE")
@Column(name = "STEP_CODE")
@ApiParam("组件集代码")
private String amCode;
private String stepCode;
@Column(name = "SEQ")
@ApiParam("执行顺序")

@ -0,0 +1,27 @@
package cn.estsh.i3plus.pojo.mes.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Wynne.Lu
* @date 2020/3/30 22:18
* @desc
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FsmStatusModel {
private String from;
private String to;
private String event;
private Object context;
private String status;
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesRouteStatus;
import cn.estsh.i3plus.pojo.mes.bean.MesStateMachineStatus;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -62,11 +63,17 @@ public class StationRequestBean implements Serializable {
@ApiParam("按钮编号")
private String buttonCode;
@ApiParam("状态代码")
private String statusCode;
@ApiParam("工步代码")
private String stepCode;
@ApiParam("强制执行工步代码")
private String forceSpecStepCode;
@ApiParam("强制执行状态点代码")
private String forceSpecStatusCode;
/**
* doScan-doModule-,initModule-
*/
@ -104,10 +111,10 @@ public class StationRequestBean implements Serializable {
private Map<String, Object> dataMap;
@ApiParam("流程状态集合")
private List<MesRouteStatus> routeStatusList;
private List<MesStateMachineStatus> fsmStates;
@ApiParam("当前流程状态")
private MesRouteStatus curRouteStatus;
private MesStateMachineStatus curFsmState;
@Override
public String toString() {

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import lombok.Data;
/**
* @author Wynne.Lu
* @date 2020/3/31 18:41
* @desc
*/
@Data
public class StationRequestCmdBean {
private StationRequestBean requestBean;
private MesPcnEnumUtil.STATION_REQUEST_BEAN_CMD cmd;
}

@ -66,11 +66,13 @@ public class StepModel implements Serializable {
*/
@ApiParam("工步是否跳过")
private boolean isJump;
/**
*
*/
@ApiParam("参数代码")
private String paramCode;
/**
*
*/

@ -18,26 +18,52 @@ public class StepResult<T> {
private String msg;
public static StepResult getSuccessComplete() {
return new StepResult(true,"");
}
private StationRequestBean stationRequestBean;
public static StepResult getNonComplete() {
return new StepResult(false,"");
return new StepResult(false, "");
}
public static StepResult getSuccessComplete(String msg) {
return new StepResult(true, msg);
public static StepResult getNonComplete(StationRequestBean requestBean) {
return new StepResult(false, "");
}
public static <T> StepResult getNonCompleteData(T data, String msg) {
return new StepResult(false, data, msg);
}
public static <T> StepResult getNonCompleteReqBean(StationRequestBean reqBean) {
return new StepResult(false, reqBean);
}
public static <T> StepResult getNonCompleteData(T data) {
return new StepResult(false, data, "");
}
public static StepResult getNonComplete(String msg) {
return new StepResult(false, msg);
}
public static StepResult getSuccessComplete(String msg) {
return new StepResult(true, msg);
}
public static StepResult getSuccessComplete() {
return new StepResult(true, "");
}
public static <T> StepResult getSuccessCompleteReqBean(StationRequestBean reqBean) {
return new StepResult(true, reqBean);
}
public static <T> StepResult<T> getSuccessData(T data, String msg) {
return new StepResult<>(true, data, msg);
}
public static <T> StepResult<T> getSuccessData(T data) {
return new StepResult<>(true, data, "");
}
public static <T> StepResult<T> getSuccessData(Collection<T> data, String msg) {
return new StepResult<T>(true, data, msg);
}
@ -54,6 +80,12 @@ public class StepResult<T> {
this.msg = msg;
}
public StepResult(boolean isCompleted, StationRequestBean stationRequestBean) {
this.isCompleted = isCompleted;
this.stationRequestBean = stationRequestBean;
}
public StepResult(boolean isCompleted, T data, String msg) {
this.isCompleted = isCompleted;
this.data = data;
@ -66,4 +98,11 @@ public class StepResult<T> {
this.msg = msg;
}
public StepResult(boolean isCompleted, T data, Collection<T> dataCollection, String msg, StationRequestBean stationRequestBean) {
this.isCompleted = isCompleted;
this.data = data;
this.dataCollection = dataCollection;
this.msg = msg;
this.stationRequestBean = stationRequestBean;
}
}

@ -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.MesStateMachineStatus;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate:2019\10\9
* @Modify:
**/
public interface MesStateMachineStatusRepository extends BaseRepository<MesStateMachineStatus, Long> {
}

@ -15,7 +15,7 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo</artifactId>
<packaging>pom</packaging>
<version>1.0-${profileActive}-SNAPSHOT</version>
<version>1.0-DEV-SNAPSHOT</version>
<modules>
<module>modules/i3plus-pojo-base</module>
<module>modules/i3plus-pojo-platform</module>

Loading…
Cancel
Save