yun-zuoyi
link 3 years ago
commit a4edb8a731

@ -0,0 +1,203 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/18 16:10
* @Modify:
**/
public class BspEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PARAM_TYPE {
METHOD_PARAM_TYPE(10, "method", "方法参数"),
SCRIPT_PARAM_TYPE(20, "script", "脚本参数");
private Integer value;
private String code;
private String description;
PARAM_TYPE(Integer value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public static PARAM_TYPE getByValue(String value) {
for (PARAM_TYPE actionType : values()) {
if (actionType.getValue().equals(value)) {
return actionType;
}
}
return null;
}
public Integer getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
}
/**
* GroovyPythonJavaScriptScalaRuby
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRIPT_LANGUAGE {
GROOVY(10, "Groovy"),
PYTHON(20, "Python"),
JAVA_SCRIPT(30, "JavaScript"),
SCALA(40, "Scala"),
RUBY(50, "Ruby");
private int value;
private String description;
SCRIPT_LANGUAGE(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;
}
}
/**
* GroovyPythonJavaScriptScalaRuby
*
* language_type
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRIPT_TYPE {
GROOVY(10, "groovyScript"),
PYTHON(20, "pythonScript"),
JAVA_SCRIPT(30, "javaScript"),
SCALA(40, "scalaScript"),
RUBY(50, "rubyScript");
private int value;
private String beanName;
SCRIPT_TYPE(int value, String beanName) {
this.value = value;
this.beanName = beanName;
}
public int getValue() {
return value;
}
public String getBeanName() {
return beanName;
}
public static String valueOfBeanName(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].beanName;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum METHOD_GROUP_TYPE {
BSP(10, "BSP"),
WMS(20, "WMS"),
MES(30, "MES"),
APS(40, "APS"),
MES_PCN(50, "MES_PCN");
private int value;
private String description;
METHOD_GROUP_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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum METHOD_OR_SCRIPT {
METHOD(10, "METHOD"),
SCRIPT(20, "SCRIPT");
private int value;
private String description;
METHOD_OR_SCRIPT(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;
}
}
}

@ -90,8 +90,11 @@ public class CommonEnumUtil {
/**
*
*/
DEV(9999, 0000, 0, 120000000L, "Development", "系统调试");
DEV(9999, 0000, 0, 120000000L, "Development", "系统调试"),
/**
*
*/
LEO(50, 8234, 0, 106000000L, "impp-leo", "智能调度系统");
/**
* ID

@ -13,6 +13,22 @@
<artifactId>i3plus-pojo-bsp</artifactId>
<dependencies>
<!-- Groovy 脚本引擎相关组件 -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>

@ -1,11 +0,0 @@
package cn.estsh.i3plus.pojo.bsp.common;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/7/22 15:38
* @Modify:
**/
public class GroovyCommonUtil {
}

@ -1,98 +0,0 @@
package cn.estsh.i3plus.pojo.bsp.common;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/6/17 13:40
* @Modify:
**/
public class GsonTool {
private static Gson gson = null;
static {
gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
}
/**
* Object json
*
* @param src
* @return String
*/
public static String toJson(Object src) {
return gson.toJson(src);
}
/**
* json clsObject
*
* @param json
* @param classOfT
* @return
*/
public static <T> T fromJson(String json, Class<T> classOfT) {
return gson.fromJson(json, classOfT);
}
/**
* json rawClass<classOfT> Object
*
* @param json
* @param classOfT
* @param argClassOfT
* @return
*/
public static <T> T fromJson(String json, Class<T> classOfT, Class argClassOfT) {
Type type = new ParameterizedType4ReturnT(classOfT, new Class[]{argClassOfT});
return gson.fromJson(json, type);
}
public static class ParameterizedType4ReturnT implements ParameterizedType {
private final Class raw;
private final Type[] args;
public ParameterizedType4ReturnT(Class raw, Type[] args) {
this.raw = raw;
this.args = args != null ? args : new Type[0];
}
@Override
public Type[] getActualTypeArguments() {
return args;
}
@Override
public Type getRawType() {
return raw;
}
@Override
public Type getOwnerType() {
return null;
}
}
/**
* json clslist
*
* @param json
* @param classOfT
* @return
*/
public static <T> List<T> fromJsonList(String json, Class<T> classOfT) {
return gson.fromJson(
json,
new TypeToken<List<T>>() {
}.getType()
);
}
}

@ -1,149 +0,0 @@
//package cn.estsh.i3plus.pojo.bsp.common;
//
//import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import javax.net.ssl.*;
//import java.io.BufferedReader;
//import java.io.DataOutputStream;
//import java.io.InputStreamReader;
//import java.net.HttpURLConnection;
//import java.net.URL;
//import java.security.cert.CertificateException;
//import java.security.cert.X509Certificate;
//
///**
// * @Description :
// * @Reference :
// * @Author : Castle
// * @CreateDate : 2021/6/17 13:37
// * @Modify:
// **/
//public class HttpUtils {
// private static Logger logger = LoggerFactory.getLogger(HttpUtils.class);
//
// // trust-https start
// private static void trustAllHosts(HttpsURLConnection connection) {
// try {
// SSLContext sc = SSLContext.getInstance("TLS");
// sc.init(null, trustAllCerts, new java.security.SecureRandom());
// SSLSocketFactory newFactory = sc.getSocketFactory();
//
// connection.setSSLSocketFactory(newFactory);
// } catch (Exception e) {
// logger.error(e.getMessage(), e);
// }
// connection.setHostnameVerifier(new HostnameVerifier() {
// @Override
// public boolean verify(String hostname, SSLSession session) {
// return true;
// }
// });
// }
//
// private static final TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
// @Override
// public X509Certificate[] getAcceptedIssuers() {
// return new X509Certificate[]{};
// }
//
// @Override
// public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// }
//
// @Override
// public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// }
// }};
// // trust-https end
//
//
// /**
// * post
// *
// * @param url
// * @param timeout
// * @param requestObj
// * @return
// */
// public static ResultBean postBody(String url, int timeout, Object requestObj) {
// HttpURLConnection connection = null;
// BufferedReader bufferedReader = null;
// try {
// // connection
// URL realUrl = new URL(url);
// connection = (HttpURLConnection) realUrl.openConnection();
//
// // trust-https
// boolean useHttps = url.startsWith("https");
// if (useHttps) {
// HttpsURLConnection https = (HttpsURLConnection) connection;
// trustAllHosts(https);
// }
//
// // connection setting
// connection.setRequestMethod("POST");
// connection.setDoOutput(true);
// connection.setDoInput(true);
// connection.setUseCaches(false);
// connection.setReadTimeout(timeout * 1000);
// connection.setConnectTimeout(3 * 1000);
// connection.setRequestProperty("connection", "Keep-Alive");
// connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
// connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");
//
// // do connection
// connection.connect();
//
// // write requestBody
// if (requestObj != null) {
// String requestBody = GsonTool.toJson(requestObj);
//
// DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
// dataOutputStream.write(requestBody.getBytes("UTF-8"));
// dataOutputStream.flush();
// dataOutputStream.close();
// }
//
// // valid StatusCode
// int statusCode = connection.getResponseCode();
// if (statusCode != 200) {
// return ResultBean.fail("rpc remoting fail, StatusCode(" + statusCode + ") invalid. for url : " + url);
//// return new BaseResultBean().errorMsg("rpc remoting fail, StatusCode(" + statusCode + ") invalid. for url : " + url);
//// return new ReturnT<String>(ReturnT.FAIL_CODE, "rpc remoting fail, StatusCode(" + statusCode + ") invalid. for url : " + url);
// }
//
// // result
// bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
// StringBuilder result = new StringBuilder();
// String line;
// while ((line = bufferedReader.readLine()) != null) {
// result.append(line);
// }
// String resultJson = result.toString();
// // parse returnT
// try {
// return GsonTool.fromJson(resultJson, BaseResultBean.class);
// } catch (Exception e) {
// logger.error("rpc remoting (url=" + url + ") response content invalid(" + resultJson + ").", e);
// return ResultBean.fail("rpc remoting fail, StatusCode(" + statusCode + ") invalid. for url : " + url);
// }
// } catch (Exception e) {
// logger.error(e.getMessage(), e);
// return ResultBean.fail("rpc remoting fail, error message(" + e.getMessage() + ") invalid. for url : " + url);
// } finally {
// try {
// if (bufferedReader != null) {
// bufferedReader.close();
// }
// if (connection != null) {
// connection.disconnect();
// }
// } catch (Exception e2) {
// logger.error(e2.getMessage(), e2);
// }
// }
// }
//
//}

@ -1,56 +0,0 @@
//package cn.estsh.i3plus.pojo.bsp.common;
//
//import java.io.Serializable;
//
///**
// * @author Castle
// */
//public class ReturnT<T> implements Serializable {
// public static final long serialVersionUID = 42L;
//
// public static final int SUCCESS_CODE = 200;
// public static final int FAIL_CODE = 500;
//
// public static final ReturnT<String> SUCCESS = new ReturnT<String>(null);
// public static final ReturnT<String> FAIL = new ReturnT<String>(FAIL_CODE, null);
//
// private int code;
// private String msg;
// private T content;
//
// public ReturnT(){}
// public ReturnT(int code, String msg) {
// this.code = code;
// this.msg = msg;
// }
//
// public ReturnT(T content) {
// this.code = SUCCESS_CODE;
// this.content = content;
// }
//
// public int getCode() {
// return code;
// }
// public void setCode(int code) {
// this.code = code;
// }
// public String getMsg() {
// return msg;
// }
// public void setMsg(String msg) {
// this.msg = msg;
// }
// public T getContent() {
// return content;
// }
// public void setContent(T content) {
// this.content = content;
// }
//
// @Override
// public String toString() {
// return "ReturnT [code=" + code + ", msg=" + msg + ", content=" + content + "]";
// }
//
//}

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@ -16,9 +17,13 @@ import java.util.List;
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("添加方法组")
public class MethodGroupModel {
@ApiModelProperty("方法组id")
private Long id;
@ApiModelProperty("方法组的名称")
private String methodGroupName;
@ -29,6 +34,9 @@ public class MethodGroupModel {
private List<MethodLevelModel> methodLevel;
@ApiModelProperty("方法组分类")
private String classify;
private Integer classification;
@ApiModelProperty("链接关系")
private String connections;
}

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@ -16,6 +17,7 @@ import java.util.List;
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("添加方法组层级")
public class MethodLevelModel {

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Description :
@ -14,6 +15,7 @@ import lombok.Data;
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("添加方法组层级参数")
public class MethodLevelParamModel {
@ApiModelProperty("根据出参生成入参key = 层级 + methodId + 出参Name")

@ -27,4 +27,12 @@ public class RequestModel {
private Map<String, Object> jsonParamMap;
@ApiModelProperty("日志id")
private Long logId;
@ApiModelProperty("方法类型-脚本-方法")
private Integer type;
@ApiModelProperty("脚本类型")
private Integer scriptType;
@ApiModelProperty("脚本内容")
private String scriptContent;
// @ApiModelProperty("脚本执行位置")
// private Integer scriptExecutor;
}

@ -19,7 +19,7 @@ import java.util.Date;
* @Modify:
**/
@Entity
@Table(name = "EXECUTOR_GROUP_REGISTRY_INFO")
@Table(name = "BSP_EXECUTOR_GROUP_REGISTRY_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor

@ -19,7 +19,7 @@ import java.util.Date;
* @Modify:
**/
@Entity
@Table(name = "EXECUTOR_REGISTRY_INFO")
@Table(name = "BSP_EXECUTOR_REGISTRY_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ -48,4 +48,8 @@ public class ExecutorRegistryInfo extends BaseBean implements Serializable {
@Column(name = "HEART_BEAT")
@ApiModelProperty("心跳存活12死掉")
private Integer heartBeat;
@Column(name = "EXECUTOR_TYPE")
@ApiModelProperty("执行器的类型同枚举Method_group_Type")
private Integer executorType;
}

@ -7,6 +7,7 @@ import lombok.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import java.io.Serializable;
@ -18,7 +19,7 @@ import java.io.Serializable;
* @Modify:
**/
@Entity
@Table(name = "EXECUTOR_REGISTRY_METHOD_DOC_INFO")
@Table(name = "BSP_REGISTRY_METHOD_DOC_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ -28,30 +29,44 @@ import java.io.Serializable;
public class ExecutorRegistryMethodDocInfo extends BaseBean implements Serializable {
private static final long serialVersionUID = 2770821289940006535L;
@Column(name = "BEAN_NAME")
@ApiModelProperty("beanName")
private String beanName;
@Column(name = "VERSION")
@ApiModelProperty("方法版本")
private String version;
@Column(name = "AFFECT_TABLE_STR")
@ApiModelProperty("受影响的表名,逗号分割,原来为数组")
private String affectTableClassNameStr;
@Column(name = "SYSTEM_PROCESS_STR")
@ApiModelProperty("系统要执行的逻辑 逗号分割,原来为数组")
private String systemProcessStr;
/**
*
*/
@Column(name = "VALIDATION")
@ApiModelProperty("参数验证 逗号分割,原来为数组")
private String validation;
@Column(name = "METHOD_ID")
@ApiModelProperty("方法ID")
private Long methodId;
//todo 缺少参数信息
@ApiModelProperty(value = "应用名称")
@Column(name = "APP_NAME")
private String appName;
@ApiModelProperty(value = "markdown文本前端渲染")
@Column(name = "MARKDOWN")
private String markdown;
@ApiModelProperty(value = "方法名,方法名和应用名做唯一键")
@Lob
@Column(name = "METHOD_NAME")
private String methodName;
@ApiModelProperty(value = "分类")
@Lob
@Column(name = "CLASSIFICATION")
private String classification;
// @Column(name = "BEAN_NAME")
// @ApiModelProperty("beanName")
// private String beanName;
//
// @Column(name = "VERSION")
// @ApiModelProperty("方法版本")
// private String version;
//
// @Column(name = "AFFECT_TABLE_STR")
// @ApiModelProperty("受影响的表名,逗号分割,原来为数组")
// private String affectTableClassNameStr;
//
// @Column(name = "SYSTEM_PROCESS_STR")
// @ApiModelProperty("系统要执行的逻辑 逗号分割,原来为数组")
// private String systemProcessStr;
// @Column(name = "VALIDATION")
// @ApiModelProperty("参数验证 逗号分割,原来为数组")
// private String validation;
// @Column(name = "METHOD_ID")
// @ApiModelProperty("方法ID")
// private Long methodId;
}

@ -19,7 +19,7 @@ import java.util.List;
* @CreateDate : 2021/6/16 13:39
* @Modify:
**/
@Table(name = "EXECUTOR_REGISTRY_METHOD_INFO")
@Table(name = "BSP_REGISTRY_METHOD_INFO")
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@ -50,6 +50,10 @@ public class ExecutorRegistryMethodInfo extends BaseBean implements Serializable
@ApiModelProperty("所属执行器的appName")
private String appName;
@Column(name = "METHOD_TYPE")
@ApiModelProperty("方法类型,属于那个执行器类型,同枚举类method_group_type")
private Integer methodType;
@Column(name = "description")
@ApiModelProperty("方法描述")
private String description;

@ -18,7 +18,7 @@ import java.io.Serializable;
* @Modify:
**/
@Entity
@Table(name = "EXECUTOR_REGISTRY_PARAM_INFO")
@Table(name = "BSP_REGISTRY_PARAM_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ -42,7 +42,11 @@ public class ExecutorRegistryParamInfo extends BaseBean implements Serializable
private String typeName;
@Column(name = "METHOD_ID")
@ApiModelProperty("所属方法的ID")
@ApiModelProperty("所属方法/脚本的ID")
private Long methodId;
// @Column(name = "PARAM_TYPE")
// @ApiModelProperty("区分方法还是脚本的参数,方法参数10,脚本参数20")
// private Integer paramType;
}

@ -7,6 +7,7 @@ import lombok.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import java.io.Serializable;
@ -18,7 +19,7 @@ import java.io.Serializable;
* @Modify:
**/
@Entity
@Table(name = "METHOD_GROUP_INFO")
@Table(name = "BSP_METHOD_GROUP_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ -32,15 +33,18 @@ public class MethodGroupInfo extends BaseBean implements Serializable {
@Column(name = "NAME")
@ApiModelProperty("方法组名称")
private String name;
private String methodGroupName;
@Column(name = "DESCRIPTION")
@ApiModelProperty("方法组描述")
private String description;
@Column(name = "CLASSIFY")
@ApiModelProperty("方法组分类(唯一)")
private String classify;
@Column(name = "CLASSIFICATION")
@ApiModelProperty("方法组分类,挂载到的wms,mes等,枚举类")
private Integer classification;
@Lob
@Column(name = "CONNECTIONS")
@ApiModelProperty("方法组内的连线关系")
private String connections;
}

@ -20,7 +20,7 @@ import java.util.List;
* @Modify:
**/
@Entity
@Table(name = "METHOD_LEVEL_INFO")
@Table(name = "BSP_METHOD_LEVEL_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor

@ -19,7 +19,7 @@ import java.io.Serializable;
* @Modify:
**/
@Entity
@Table(name = "METHOD_LEVEL_PARAM_INFO")
@Table(name = "BSP_METHOD_LEVEL_PARAM_INFO")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor

@ -18,7 +18,7 @@ import java.io.Serializable;
* @CreateDate : 2021/9/8 17:01
* @Modify:
**/
@Table(name = "METHOD_LOG")
@Table(name = "BSP_METHOD_LOG")
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@ -51,4 +51,8 @@ public class MethodLog extends BaseBean implements Serializable {
@ApiModelProperty("方法所属应用冗余")
@Column(name = "APP_NAME_RDD")
private String appNameRdd;
@ApiModelProperty("区分方法或者脚本,BSP枚举")
@Column(name = "TYPE")
private Integer type;
}

@ -0,0 +1,77 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.po;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/19 11:49
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BSP_SCRIPT_PERSISTENCE", uniqueConstraints = {
@UniqueConstraint(columnNames = {"ORGANIZE_CODE", "SCRIPT_NO"})
})
@Api("系统动态脚本")
public class ScriptPersistence extends BaseBean {
@Column(name = "SCRIPT_NO", length = 50)
@ApiModelProperty(value = "脚本调用的唯一编号例如WMS_PDA_0001")
private String scriptNo;
@ApiModelProperty(value = "脚本的中文名称")
@Column(name = "SCRIPT_NAME", length = 50)
private String scriptName;
@ApiModelProperty(value = "目标执行器")
@Column(name = "TARGET_EXECUTOR")
private Integer targetExecutor;
@ApiModelProperty(value = "脚本编写的语言 10=Groovy, 20=Jython, 30=JavaScript, 40=Scala, 50=JRuby")
@Column(name = "LANGUAGE_TYPE")
private Integer languageType;
@Lob
@Column(name = "SCRIPT_CONTENT", columnDefinition = "TEXT")
@ApiModelProperty(value = "脚本的具体内容")
private String scriptContent;
@ApiModelProperty(value = "脚本的描述,包含脚本的用法,参数说明等")
@Column(name = "SCRIPT_REMARK", length = 2000)
private String scriptRemark;
@ApiModelProperty(value = "编译后的脚本内容,通过预编译加快脚本的运行速度")
@Transient
private Object compiledScript;
//暂时不提供历史版本号功能
// @Column(name = "SCRIPT_VERSION")
// @ApiModelProperty(value = "脚本版本号")
// private String scriptVersion;
//
// @ApiModelProperty(value = "脚本编号列表")
// @Transient
// private List<String> versionList;
@ApiModelProperty(value = "脚本参数列表")
@Transient
private List<ExecutorRegistryParamInfo> paramInfoList;
}

@ -0,0 +1,26 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/24 16:27
* @Modify:
**/
@Data
@ApiModel(value = "methodGroup通用vo")
public class MethodGroupCommonVo {
@ApiModelProperty(value = "方法组的id")
private List<Long> ids;
@ApiModelProperty(value = "方法组启用禁用")
private Integer isValid;
}

@ -15,7 +15,9 @@ import lombok.Data;
@Data
public class MethodGroupVo {
@ApiParam(value = "方法组名称")
private String groupName;
private String methodGroupName;
@ApiParam(value = "是否启用")
private Integer valid;
private Integer isValid;
@ApiParam(value = "方法组分类")
private Integer classification;
}

@ -0,0 +1,19 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/22 19:23
* @Modify:
**/
@Data
@ApiModel("deletedVO")
public class ScriptDeleteVo {
private List<Long> ids;
}

@ -0,0 +1,34 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/22 14:27
* @Modify:
**/
@Data
@ApiModel(value = "脚本测试")
public class ScriptTestVo {
@ApiModelProperty(value = "脚本内容")
private String scriptContent;
@ApiModelProperty(value = "方法名默认为execute")
private String methodName;
@ApiModelProperty(value = "参数列表")
private Map<String,Object> arguments;
@ApiModelProperty(value = "执行器")
private Integer targetExecutor;
@ApiModelProperty(value = "脚本语言")
private Integer languageType;
}

@ -0,0 +1,29 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/19 11:39
* @Modify:
**/
@ApiModel(value = "查询脚本vo")
@Data
public class ScriptVo {
@ApiModelProperty(value = "脚本名称")
private String scriptName;
@ApiModelProperty(value = "脚本状态")
private Integer isValid;
@ApiModelProperty(value = "脚本语言")
private Integer scriptLanguage;
@ApiModelProperty(value = "脚本No,唯一")
private String scriptNo;
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.bsp.server.dao;
import cn.estsh.i3plus.pojo.bsp.client.bean.po.EngineScriptPersistence;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2022/1/18 11:23
* @Modify:
**/
public interface IEngineScriptDao {
/**
*
* @param name
* @return
*/
List<EngineScriptPersistence> findAllVersionByScriptName(String name);
}

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.bsp.server.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.bsp.client.bean.po.EngineScriptPersistence;
import cn.estsh.i3plus.pojo.bsp.server.bean.po.ScriptPersistence;
/**
* @Description :
@ -10,5 +10,5 @@ import cn.estsh.i3plus.pojo.bsp.client.bean.po.EngineScriptPersistence;
* @CreateDate : 2021/7/22 13:51
* @Modify:
**/
public interface ScriptRepository extends BaseRepository<EngineScriptPersistence,Long> {
public interface ScriptRepository extends BaseRepository<ScriptPersistence,Long> {
}

Loading…
Cancel
Save