资源加载优化

yun-zuoyi
汪云昊 5 years ago
parent d89ed44bcc
commit 20ccf65c5c

@ -223,7 +223,8 @@ public class LacEnumUtil {
public enum PARAM_VALUE_TYPE{
INTEGER(1,"整数"),
STRING(2,"字符串"),
FLOAT(3,"浮点");
FLOAT(3,"浮点"),
ORGIN(99,"原始数据");
private int value;
private String description;
@ -347,15 +348,17 @@ public class LacEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOGICAL_OPERATOR{
OR(10,"或"),
AND(20,"与");
OR(10,"或","||"),
AND(20,"与","&&");
private int value;
private String description;
private String operator;
LOGICAL_OPERATOR(int value, String description) {
LOGICAL_OPERATOR(int value, String description, String operator) {
this.value = value;
this.description = description;
this.operator = operator;
}
public int getValue() {
@ -376,6 +379,16 @@ public class LacEnumUtil {
return tmp;
}
public static String valueOfOperator(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].operator;
}
}
return tmp;
}
}
/**
@ -383,19 +396,21 @@ public class LacEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RELATIONAL_OPERATOR{
GT(10,">"),
LT(20,"<"),
EQ(20,"=="),
NE(20,"!="),
GE(20,">="),
LE(20,"<=");
GT(10,"大于",">"),
LT(20,"小于","<"),
EQ(30,"等于","=="),
NE(40,"不等于","!="),
GE(50,"大于等于",">="),
LE(60,"小于等于","<=");
private int value;
private String description;
private String operator;
RELATIONAL_OPERATOR(int value, String description) {
RELATIONAL_OPERATOR(int value, String description,String operator) {
this.value = value;
this.description = description;
this.operator = operator;
}
public int getValue() {
@ -416,6 +431,16 @@ public class LacEnumUtil {
return tmp;
}
public static RELATIONAL_OPERATOR valueOf(int val) {
RELATIONAL_OPERATOR tmp = EQ;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i];
}
}
return tmp;
}
}
/**

@ -9,6 +9,7 @@ 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;
@ -84,6 +85,9 @@ public class LacCommandStackStep extends BaseBean {
@ApiParam(value ="步骤任务列表")
private List<LacCommandStackStepTask> stepTaskList;
@Transient
@ApiParam(value ="步骤任务检查")
private List<LacTaskCheck> taskCheckList;
public LacCommandStackStep() {
}

@ -85,10 +85,10 @@ public class LacCommandStackStepTask extends BaseBean {
// @Column(name="STEP_NAME_RDD")
// @ApiParam(value ="步骤名称")
// private String stepNameRdd;
//
// @Column(name="STEP_CODE_RDD")
// @ApiParam(value ="步骤代码")
// private String stepCodeRdd;
@Column(name="STEP_CODE_RDD")
@ApiParam(value ="步骤代码")
private String stepCodeRdd;
@Column(name="TASK_ID")
@ApiParam(value ="任务ID")
@ -99,7 +99,7 @@ public class LacCommandStackStepTask extends BaseBean {
@ApiParam(value ="步骤名称")
private String taskNameRdd;
@Column(name="STEP_CODE_RDD")
@Column(name="TASK_CODE_RDD")
@ApiParam(value ="任务代码")
private String taskCodeRdd;

@ -82,6 +82,7 @@ public class LacSuitTaskParam extends BaseBean {
@Column(name="PARAM_VALUE_TYPE")
@ApiParam(value ="参数值类型")
@AnnoOutputColumn(refClass = LacEnumUtil.PARAM_VALUE_TYPE.class)
private Integer paramValueType;
@Column(name="PARAM_DEFAULT_VALUE")

@ -15,6 +15,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -97,4 +98,11 @@ public class LacTaskCheck extends BaseBean {
@ApiParam(value ="目标步骤ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long targetStepId;
@Column(name="TARGET_STEP_NAME_RDD")
@ApiParam(value ="目标步骤名称")
private String targetStepNameRdd;
@Transient
private String value;
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.model.lac;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackRecord;
import cn.estsh.i3plus.pojo.lac.bean.LacCommandStackStepTask;
import lombok.Data;
import org.slf4j.LoggerFactory;
@ -55,9 +56,13 @@ public class LacCommandStackModel {
this.recordId = commandStackRecord.getId();
}
public Object getTaskRequestParam(String taskCode){
public Object getTaskRequestParam(LacCommandStackStepTask stepTask){
for (Task task : this.getRequest().getTaskList()) {
if(task.getCode().equals(taskCode)){
// 步骤代码为空时匹配所有任务参数
if (task.getStepCode() == null && task.getCode().equals(stepTask.getTaskCodeRdd())) {
return task.getParamList();
} else if (task.getStepCode() != null && task.getStepCode().equals(stepTask.getStepCodeRdd())
&& task.getCode().equals(stepTask.getTaskCodeRdd())) {
return task.getParamList();
}
}

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

Loading…
Cancel
Save