Merge branch 'dev' into test

yun-zuoyi
Wynne 4 years ago
commit 7de40e37f5

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -530,21 +530,20 @@ public class ScreenEnumUtil {
} }
} }
public enum MODEL_FIELD_DATASOURCE { public enum MODEL_FIELD_SOURCE {
FROM_TEXT(10, "TEXT", "文本"), FORM_TEXT(10, "TEXT", "文本"),
FROM_NUMBER(20, "NUMBER", "数字"), FORM_NUMBER(20, "NUMBER", "数字"),
FROM_PASSWORD(30, "PASSWORD", "密码"), FORM_PASSWORD(30, "PASSWORD", "密码"),
FROM_DATETIME(40, "DATETIME", "时间"), FORM_DATETIME(40, "DATETIME", "时间"),
FROM_PICK_UP(50, "PICK_UP", "拾取"), FORM_PICK_UP(50, "PICK_UP", "拾取"),
FROM_ENUM(60, "ENUM", "枚举"), FORM_ENUM(60, "ENUM", "枚举"),
FROM_DICTIONARY(70, "DICTIONARY", "字典"), FORM_DICTIONARY(70, "DICTIONARY", "字典");
FROM_API(80, "API", "API调用");
private Integer value; private Integer value;
private String code; private String code;
private String description; private String description;
MODEL_FIELD_DATASOURCE(Integer value, String code, String description) { MODEL_FIELD_SOURCE(Integer value, String code, String description) {
this.value = value; this.value = value;
this.code = code; this.code = code;
this.description = description; this.description = description;
@ -1036,4 +1035,68 @@ public class ScreenEnumUtil {
return tmp; return tmp;
} }
} }
/**
* redis
*/
public enum ENUM_SOFT_TYPE {
COMMON(10, "CommonEnumUtil", "通用枚举"),
IMPP(20, "ImppEnumUtil", "平台枚举"),
WMS(30, "WmsEnumUtil", "WMS枚举"),
SWEB(40, "SwebEnumUtil", "Sweb枚举"),
MES(50, "MesEnumUtil", "Mes枚举"),
MES_PCN(60, "MesPcnEnumUtil", "MesPcn枚举"),
ANDON(70, "AndonEnumUtil", "Andon枚举"),
APS(80, "ApsEnumUtil", "Aps枚举"),
BLOCK_FORM(90, "BlockFormEnumUtil", "动态表单枚举"),
BLOCK_REPORT(100, "BlockReportEnumUtil", "动态报表枚举"),
BLOCK_SOFT_SWITCH(110, "BlockSoftSwitchEnumUtil", "软适配枚举"),
LAC(120, "LacEnumUtil", "Lac枚举"),
MDM(130, "MdmEnumUtil", "主数据中心枚举"),
PTL(140, "PtlEnumUtil", "Ptl枚举"),
PTL_PCN(150, "PtlPcnEnumUtil", "PtlPcn枚举"),
SCREEN(160, "ScreenEnumUtil", "通用界面枚举");
private Integer value;
private String code;
private String description;
ENUM_SOFT_TYPE(Integer value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public Integer getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static ENUM_SOFT_TYPE valueOfEnum(Integer value) {
ENUM_SOFT_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(value)) {
tmp = values()[i];
}
}
return tmp;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
} }

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -0,0 +1,75 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.po;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
/**
*
*
* @author Rock.Yu
* @since 2019-03-18 14:22
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "SCRIPT_PERSISTENCE", uniqueConstraints = {
@UniqueConstraint(columnNames = {"ORGANIZE_CODE", "SCRIPT_NO"})
})
@Api("系统动态脚本")
public class EngineScriptPersistence extends BaseBean {
private static final long serialVersionUID = 7893111140559759490L;
// 脚本调用的唯一编号例如WMS_PDA_0001
@Column(name = "SCRIPT_NO", length = 50)
private String scriptNo;
// 脚本的中文名称
@Column(name = "SCRIPT_NAME", length = 50)
private String scriptName;
// 10=组件脚本20=表单脚本30=报表脚本40=JOB脚本50=其他脚本
@Column(name = "SCRIPT_TYPE")
private Integer scriptType;
// 脚本编写的语言
// 10=Groovy, 20=Jython, 30=JavaScript, 40=Scala, 50=JRuby
@Column(name = "LANGUAGE_TYPE")
private Integer languageType;
// 脚本的具体内容
@Lob
@Column(name = "SCRIPT_CONTENT", columnDefinition = "TEXT")
private String scriptContent;
// 脚本的描述,包含脚本的用法,参数说明等
@Column(name = "SCRIPT_REMARK", length = 2000)
private String scriptRemark;
// 编译后的脚本内容,通过预编译加快脚本的运行速度
@Transient
private Object compiledScript;
// 构造方法,便于批量创建数据
public EngineScriptPersistence(Long id, String scriptNo, String scriptName, Integer scriptType, Integer languageType,
String scriptContent, String scriptRemark) {
this.id = id;
this.scriptNo = scriptNo;
this.scriptName = scriptName;
this.scriptType = scriptType;
this.languageType = languageType;
this.scriptContent = scriptContent;
this.scriptRemark = scriptRemark;
}
}

@ -30,11 +30,24 @@ public class MethodRegistryParam implements Serializable {
private List<ParamDescription> parameterList; private List<ParamDescription> parameterList;
@ApiParam("方法的版本") @ApiParam("方法的版本")
private String version; private String version;
@ApiParam("方法影响了那些表") @ApiParam("方法描述")
private String[] affectTableClassName; private String description;
@ApiParam("方法的处理逻辑")
private String[] systemProcess;
@ApiParam("方法参数的验证逻辑")
private String[] validation;
// @ApiParam("方法影响了那些表")
// private String[] affectTableClassName;
// @ApiParam("方法的处理逻辑")
// private String[] systemProcess;
// @ApiParam("方法参数的验证逻辑")
// private String[] validation;
// @ApiParam("创建时间")
// private String createdDatetime;
// @ApiParam("更新时间")
// private String updatedDatetime;
// @ApiParam("更新日志")
// private String[] changeLog;
// @ApiParam("markdown 文件的路径")
// private String markdownFilePath;
@ApiParam("markdown 的文字内容")
private String markdownContent;
} }

@ -22,6 +22,8 @@ public class RegistryParam implements Serializable {
private String appname; private String appname;
@ApiParam("执行器的地址") @ApiParam("执行器的地址")
private String address; private String address;
@ApiParam(value = "注册类型 1:自动 2:手动", defaultValue = "1")
private Integer registryType;
@ApiParam("执行器注册的方法信息") @ApiParam("执行器注册的方法信息")
private List<MethodRegistryParam> methodRegistryParamList; private List<MethodRegistryParam> methodRegistryParamList;

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

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

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

@ -0,0 +1,23 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description : 使model
* @Reference :
* @Author : Castle
* @CreateDate : 2021/7/30 9:36
* @Modify:
**/
@ApiModel("查询方法组")
@Data
public class MethodGroupListModel {
@ApiModelProperty("方法组名字")
private String methodGroupName;
@ApiModelProperty("方法组分类")
private String classify;
}

@ -1,12 +1,11 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Description : * @Description :
@ -17,13 +16,19 @@ import java.util.Map;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("添加方法组") @ApiModel("添加方法组")
public class MethodGroupModel { public class MethodGroupModel {
@ApiParam("方法组的名称") @ApiModelProperty("方法组的名称")
private String methodGroupName; private String methodGroupName;
@ApiParam("方法组的描述")
@ApiModelProperty("方法组的描述")
private String description; private String description;
@ApiParam("方法组层级列表")
@ApiModelProperty("方法组层级列表")
private List<MethodLevelModel> methodLevel; private List<MethodLevelModel> methodLevel;
@ApiModelProperty("方法组分类")
private String classify;
} }

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -16,13 +16,15 @@ import java.util.List;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("添加方法组层级") @ApiModel("添加方法组层级")
public class MethodLevelModel { public class MethodLevelModel {
@ApiParam("方法Id") @ApiModelProperty("方法Id")
private Long methodId; private Long methodId;
@ApiParam("方法层级") @ApiModelProperty("方法名称")
private String methodName;
@ApiModelProperty("方法层级")
private String level; private String level;
@ApiParam("参数列表") @ApiModelProperty("参数列表")
List<MethodLevelParamModel> paramModels; List<MethodLevelParamModel> paramModels;
} }

@ -1,12 +1,10 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.util.Map;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -16,12 +14,12 @@ import java.util.Map;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("添加方法组层级参数") @ApiModel("添加方法组层级参数")
public class MethodLevelParamModel { public class MethodLevelParamModel {
@ApiParam("根据出参生成入参key = 层级 + methodId + 出参Name") @ApiModelProperty("根据出参生成入参key = 层级 + methodId + 出参Name")
private String paramKey; private String paramKey;
@ApiParam("对应本方法的入参名称") @ApiModelProperty("对应本方法的入参名称")
private String paramValue; private String methodParamName;
@ApiParam("入参类型,用于校验数据类型") @ApiModelProperty("入参类型,用于校验数据类型")
private String type; private String type;
} }

@ -0,0 +1,24 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/7/29 10:14
* @Modify:
**/
@Data
@ApiModel("分页查询方法列表")
public class MethodListModel {
@ApiModelProperty(name = "执行器名")
private String appName;
@ApiModelProperty(name = "方法的版本号")
private String version;
}

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -16,16 +16,16 @@ import java.util.List;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("注册/心跳") @ApiModel("注册/心跳")
public class RegistryMessageInfo { public class RegistryMessageInfo {
@ApiParam("appName,根据appName分执行器组") @ApiModelProperty("appName,根据appName分执行器组")
private String appName; private String appName;
@ApiParam("执行器地址") @ApiModelProperty("执行器地址")
private String address; private String address;
@ApiParam("方法列表") @ApiModelProperty("方法列表")
private List<RegistryMethodInfo> methodRegistryParamList; private List<RegistryMethodInfo> methodRegistryParamList;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -16,16 +17,16 @@ import java.util.List;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("注册方法信息") @ApiModel("注册方法信息")
public class RegistryMethodInfo { public class RegistryMethodInfo {
@ApiParam("方法名") @ApiModelProperty("方法名")
private String methodName; private String methodName;
@ApiParam("调用方法时的key") @ApiModelProperty("调用方法时的key")
private String methodHandlerKey; private String methodHandlerKey;
@ApiParam("参数列表") @ApiModelProperty("参数列表")
private List<RegistryMethodParamInfo> methodParamList; private List<RegistryMethodParamInfo> methodParamList;
/*-----------------------------------文档------------------------------------------------*/ /*-----------------------------------文档------------------------------------------------*/

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model; package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -14,16 +14,16 @@ import lombok.Data;
**/ **/
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@Api("方法注册参数") @ApiModel("方法注册参数")
public class RegistryMethodParamInfo { public class RegistryMethodParamInfo {
@ApiParam("参数名") @ApiModelProperty("参数名")
private String name; private String name;
@ApiParam("参数类型入参1出参0") @ApiModelProperty("参数类型入参1出参0")
private Integer type; private Integer type;
@ApiParam("数据类型,基本数据类型") @ApiModelProperty("数据类型,基本数据类型")
private String typeName; private String typeName;

@ -0,0 +1,27 @@
package cn.estsh.i3plus.pojo.bsp.server.bean.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/7/5 14:02
* @Modify:
**/
@Data
@ApiModel("路由参数")
public class RouteParam {
@ApiModelProperty(value = "执行方法Id")
private Long methodId;
@ApiModelProperty(value = "路由的权重配置")
private Map<String,Integer> weightConfig;
@ApiModelProperty(value = "执行器地址列表")
private List<String> addressList;
}

@ -40,7 +40,7 @@ public class ExecutorGroupRegistryInfo extends BaseBean implements Serializable
@Column(name = "TYPE",columnDefinition = "int default 0") @Column(name = "TYPE",columnDefinition = "int default 0")
@ApiModelProperty("自动注册 0手动注册 1") @ApiModelProperty("自动注册 0手动注册 1")
private String type; private Integer type;
@Column @Column
@ApiModelProperty("执行器组路由策略,默认随机") @ApiModelProperty("执行器组路由策略,默认随机")

@ -40,4 +40,8 @@ public class ExecutorRegistryInfo extends BaseBean implements Serializable {
@Column(name = "UPDATE_TIME") @Column(name = "UPDATE_TIME")
@ApiModelProperty("最近一次心跳时间") @ApiModelProperty("最近一次心跳时间")
private Date updateTime; private Date updateTime;
@Column(name = "WEIGHT")
@ApiModelProperty("执行器权重")
private Integer weight;
} }

@ -50,6 +50,10 @@ public class ExecutorRegistryMethodInfo extends BaseBean implements Serializable
@ApiModelProperty("所属执行器的appName") @ApiModelProperty("所属执行器的appName")
private String appName; private String appName;
@Column(name = "description")
@ApiModelProperty("方法描述")
private String description;
@Transient @Transient
@ApiModelProperty("方法参数列表") @ApiModelProperty("方法参数列表")
private List<ExecutorRegistryParamInfo> paramInfos; private List<ExecutorRegistryParamInfo> paramInfos;

@ -38,5 +38,9 @@ public class MethodGroupInfo extends BaseBean implements Serializable {
@ApiModelProperty("方法组描述") @ApiModelProperty("方法组描述")
private String description; private String description;
@Column(name = "CLASSIFY")
@ApiModelProperty("方法组分类(唯一)")
private String classify;
} }

@ -43,6 +43,10 @@ public class MethodLevelInfo extends BaseBean implements Serializable {
@ApiModelProperty("当前层级的方法ID") @ApiModelProperty("当前层级的方法ID")
private Long methodId; private Long methodId;
@Column(name = "METHOD_NAME")
@ApiModelProperty("方法名称")
private String methodName;
@Transient @Transient
@ApiModelProperty("方法的参数关系列表") @ApiModelProperty("方法的参数关系列表")
private List<MethodLevelParamInfo> paramInfoList; private List<MethodLevelParamInfo> paramInfoList;

@ -3,6 +3,7 @@ package cn.estsh.i3plus.pojo.bsp.server.bean.po;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.*; import lombok.*;
import javax.persistence.Column; import javax.persistence.Column;
@ -47,6 +48,12 @@ public class MethodLevelParamInfo extends BaseBean implements Serializable {
@Column(name = "METHOD_ID") @Column(name = "METHOD_ID")
@ApiModelProperty("对应的当前层级的方法Id") @ApiModelProperty("对应的当前层级的方法Id")
private Long methodId; private Long methodId;
/**
* ,todo 2021/8/1
*/
@Column(name = "METHOD_NAME")
@ApiModelProperty("对应的当前层级的方法的名字")
private String methodName;
@Column(name = "METHOD_GROUP_ID") @Column(name = "METHOD_GROUP_ID")
@ApiModelProperty("对应方法组的Id") @ApiModelProperty("对应方法组的Id")
@ -54,13 +61,20 @@ public class MethodLevelParamInfo extends BaseBean implements Serializable {
/** /**
* *
*/ */
@Column(name = "require") @Column(name = "REQUIRE_TYPE",columnDefinition = "int")
@ApiModelProperty("原有方法的入参是否必须,做调用前验证") @ApiModelProperty("原有方法的入参是否必须,做调用前验证")
private Integer require; private Integer requireType;
/** /**
* *
*/ */
@Column(name = "type") @Column(name = "TYPE")
@ApiModelProperty("参数类型验证") @ApiModelProperty("参数类型验证")
private String type; private String type;
/**
*
*/
@Column(name = "LEVEL")
@ApiModelProperty("层级的入参")
private String level;
} }

@ -0,0 +1,14 @@
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;
/**
* @Description :
* @Reference :
* @Author : Castle
* @CreateDate : 2021/7/22 13:51
* @Modify:
**/
public interface ScriptRepository extends BaseRepository<EngineScriptPersistence,Long> {
}

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -71,6 +71,10 @@ public class ScrModelField extends BaseBean implements Serializable {
@ApiModelProperty("是否支持排序") @ApiModelProperty("是否支持排序")
private Integer isAllowSort; private Integer isAllowSort;
@Column(name = "IS_ALLOW_MODIFY")
@ApiModelProperty("是否支持修改")
private Integer isAllowModify;
@Column(name = "IS_REQUIRED") @Column(name = "IS_REQUIRED")
@ApiModelProperty("是否必填") @ApiModelProperty("是否必填")
private Integer isRequired; private Integer isRequired;
@ -87,15 +91,16 @@ public class ScrModelField extends BaseBean implements Serializable {
@ApiModelProperty("是否是虚拟的") @ApiModelProperty("是否是虚拟的")
private Integer isVirtual; private Integer isVirtual;
@Column(name = "MODEL_FIELD_DATASOURCE") @Column(name = "MODEL_FIELD_SOURCE")
@ApiModelProperty("字段数据来源") @ApiModelProperty("字段数据来源")
private Integer modelFieldDatasource; private Integer modelFieldSource;
@Column(name = "MODEL_FIELD_DATASOURCE_PROPS") @Column(name = "MODEL_FIELD_SOURCE_PROPS")
@ApiModelProperty("model字段来源属性") @ApiModelProperty("model字段来源属性")
private String modelFieldDatasourceProps; private String modelFieldSourceProps;
@Transient @Transient
@ApiModelProperty(value="模型字段值")
private Object fieldValue; private Object fieldValue;
} }

@ -6,8 +6,8 @@ import cn.estsh.i3plus.pojo.screen.bean.ScrModelField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -61,15 +61,18 @@ public class ScrRequestModel implements Serializable {
@ApiModelProperty("类名") @ApiModelProperty("类名")
private String className; private String className;
@ApiModelProperty("方法") @ApiModelProperty("方法ID")
private String methodName; private Long methodGroupId;
@ApiModelProperty("上传文件") @ApiModelProperty("上传文件")
private MultipartFile file; private transient File file;
@ApiModelProperty("模型字段") @ApiModelProperty("模型字段")
private List<ScrModelField> modelFields; private List<ScrModelField> modelFields;
@ApiModelProperty("模型字段代码")
private Map<String, Object> modelFieldMap;
@ApiModelProperty("父代码") @ApiModelProperty("父代码")
private String parentCode; private String parentCode;
@ -79,8 +82,8 @@ public class ScrRequestModel implements Serializable {
@ApiModelProperty("where条件补充") @ApiModelProperty("where条件补充")
private String whereAppender; private String whereAppender;
@ApiModelProperty("调用接口参数") @ApiModelProperty("字段转换")
private Map<String,Object> param; private Map<String, String> fieldConverter;
} }

@ -1,13 +1,11 @@
package cn.estsh.i3plus.pojo.screen.model; package cn.estsh.i3plus.pojo.screen.model;
import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.screen.bean.ScrModelField; import cn.estsh.i3plus.pojo.screen.bean.ScrModelField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -15,7 +15,7 @@
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0-TEST-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<modules> <modules>
<module>modules/i3plus-pojo-base</module> <module>modules/i3plus-pojo-base</module>

Loading…
Cancel
Save