yun-zuoyi
王杰 5 years ago
parent 1afa60623c
commit c39c9b6f70

@ -11,6 +11,31 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class PtlEnumUtil { public class PtlEnumUtil {
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_METHOD_TYPE {
INTERFACE(10, "界面方法"),
MONITOR(20, "监听方法");
private int value;
private String description;
PTL_METHOD_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) @JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -3,8 +3,6 @@ package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import static cn.estsh.i3plus.pojo.base.enumutil.PtlPcnEnumUtil.MONITOR_PROCESS_MESSAGE_TYPE.*;
/** /**
* @author Wynne.Lu * @author Wynne.Lu
* @date 2020/2/12 17:41 * @date 2020/2/12 17:41
@ -732,164 +730,6 @@ public class PtlPcnEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MONITOR_PROCESS_MESSAGE_TYPE {
CONNECT_CONTROL_CMD(10, "CONNECT_CONTROL_CMD", "connectControlService", "连接控制器"),
DISCONNECT_CONTROL_CMD(20, "DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
EXCEPTION_DISCONNECT_CONTROL_CMD(25, "EXCEPTION_DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "lightOnService", "亮灯命令"),
LIGHT_OFF_CMD(40, "LIGHT_OFF_CMD", "lightOffService", "灭灯命令"),
CONTROL_SIGNAL_CMD(50, "CONTROL_SIGNAL_CMD", "controlSignalService", "控制器反馈信号"),
INTERFACE_SIGNAL_CMD(60, "INTERFACE_SIGNAL_CMD", "", "发送给界面actor通过websocket返回"),
REFRESH_CONTROL_CMD(70, "REFRESH_CONTROL_CMD", "refreshControlService", "刷新");
private int value;
private String code;
private String callClass;
private String description;
MONITOR_PROCESS_MESSAGE_TYPE(int value, String code, String callClass, String description) {
this.value = value;
this.code = code;
this.callClass = callClass;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getCallClass() {
return callClass;
}
public String getDescription() {
return description;
}
public static MONITOR_PROCESS_MESSAGE_TYPE getTypeByValue(String code) {
if (StringUtils.isEmpty(code)) {
return null;
}
for (MONITOR_PROCESS_MESSAGE_TYPE enums : values()) {
if (enums.getCode().equals(code)) {
return enums;
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum INTERFACE_SIGNAL_MESSAGE_TYPE {
CONNECT_CONTROL_CMD(10, "CONNECT_CONTROL_CMD", "connectControlService", "连接控制器"),
DISCONNECT_CONTROL_CMD(20, "DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
REFRESH_CONTROL_CMD(30, "REFRESH_CONTROL_CMD", "refreshControlService", "刷新"),
SCAN_CONTROL_CMD(40, "SCAN_CONTROL_CMD", "scanControlService", "扫描"),
INIT_MODULE_CONTROL_CMD(50, "INIT_MODULE_CONTROL_CMD", "initModuleControlService", "初始化页面");
// UNLOCK_CONTROL_CMD(50, "UNLOCK_CONTROL_CMD", "unlockControlService", "解锁"),
// LABEL_SELF_CHECK_CONTROL_CMD(60, "labelSelfCheck", "labelSelfCheckControlService", "标签自检"),
// LIGHT_DETAIL_CONTROL_CMD(70, "LABEL_SELF_CHECK_CONTROL_CMD", "lightDetailControlService", "亮灯明细");
private int value;
private String code;
private String callClass;
private String description;
INTERFACE_SIGNAL_MESSAGE_TYPE(int value, String code, String callClass, String description) {
this.value = value;
this.code = code;
this.callClass = callClass;
this.description = description;
}
public int getValue() {
return value;
}
public String getCallClass() {
return callClass;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static INTERFACE_SIGNAL_MESSAGE_TYPE getTypeByValue(String code) {
if (StringUtils.isEmpty(code)) {
return null;
}
for (INTERFACE_SIGNAL_MESSAGE_TYPE enums : INTERFACE_SIGNAL_MESSAGE_TYPE.values()) {
if (enums.getCode().equals(code)) {
return enums;
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum GEN_TASK_MESSAGE_TYPE {
GEN_TASK_CMD(10, "GEN_TASK_CMD", "", "生成任务");
private int value;
private String code;
private String callClass;
private String description;
GEN_TASK_MESSAGE_TYPE(int value, String code, String callClass, String description) {
this.value = value;
this.code = code;
this.callClass = callClass;
this.description = description;
}
public int getValue() {
return value;
}
public String getCallClass() {
return callClass;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static INTERFACE_SIGNAL_MESSAGE_TYPE getTypeByValue(String code) {
if (StringUtils.isEmpty(code)) {
return null;
}
for (INTERFACE_SIGNAL_MESSAGE_TYPE enums : INTERFACE_SIGNAL_MESSAGE_TYPE.values()) {
if (enums.getCode().equals(code)) {
return enums;
}
}
return null;
}
}
/**
* websocket * websocket
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -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;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -47,7 +48,11 @@ public class PtlAreaActorAction extends BaseBean implements Serializable {
@ApiParam("特定条件") @ApiParam("特定条件")
private String otherWhere; private String otherWhere;
@Column(name = "AMG_ID") @Column(name = "METHOD_CODE")
@ApiParam("组件集编号") @ApiParam("方法代码")
private Long amgId; private String methodCode;
@Transient
@ApiParam("实现类")
private String callClass;
} }

@ -0,0 +1,49 @@
package cn.estsh.i3plus.pojo.ptl.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 java.io.Serializable;
/**
* @author Wynne.Lu
* @date 2020/2/14 11:18
* @desc
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_METHOD")
@EqualsAndHashCode(callSuper = true)
@Api("方法清单")
public class PtlMethod extends BaseBean implements Serializable {
private static final long serialVersionUID = 1208980343927922927L;
@Column(name = "METHOD_CODE")
@ApiParam("方法代码")
private String methodCode;
@Column(name = "METHOD_NAME")
@ApiParam("方法描述")
private String methodName;
@Column(name = "CALL_CLASS")
@ApiParam("实现类")
private String callClass;
@Column(name = "METHOD_TYPE")
@ApiParam("方法类型")
private Integer methodType;
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.ptl.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.ptl.bean.PtlAreaActorAction;
/**
* @author Wynne.Lu
* @date 2020/2/12 17:41
* @desc
*/
public interface PtlAreaActorActionRepository extends BaseRepository<PtlAreaActorAction, Long> {
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.ptl.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.ptl.bean.PtlMethod;
/**
* @author Wynne.Lu
* @date 2020/2/12 17:41
* @desc
*/
public interface PtlMethodRepository extends BaseRepository<PtlMethod, Long> {
}
Loading…
Cancel
Save