Commit 658e7131 by zhouhaibao

fix(sop): 修复SOP条件中值来源的逻辑判断

- 修正了SopConditionDTO中valueSource字段的文档描述,将固定值和变量引用的标识颠倒
- 更新了SopConditionEngine中的条件判断逻辑,将valueSource == 1改为valueSource == 0来判断变量引用
- 修复了SopConditionReqDTO中valueSource字段的文档注释
- 修正了SopStrategyCondition模型中valueSource字段的注释说明
- 更新了SopStrategySnapshotCacheService中的变量引用判断条件,确保逻辑一致性
1 parent 0cf8f2ce
......@@ -25,7 +25,7 @@ public class SopConditionDTO implements Serializable {
@ApiModelProperty(notes = "操作符类型")
private Integer operator;
@ApiModelProperty(notes = "值来源:0-固定值 1-变量引用")
@ApiModelProperty(notes = "值来源:1-固定值 0-变量引用")
private Integer valueSource;
@ApiModelProperty(notes = "文本值")
......
......@@ -36,7 +36,7 @@ public class SopConditionReqDTO implements Serializable {
@ApiModelProperty(value = "枚举值(值类型为4时使用,多个值用逗号分隔)")
private String enumValue;
@ApiModelProperty(value = "值来源:0-固定值 1-变量引用")
@ApiModelProperty(notes = "值来源:1-固定值 0-变量引用")
private Integer valueSource;
@ApiModelProperty(value = "引用的变量编码")
......
......@@ -92,7 +92,7 @@ public class SopStrategyCondition implements Serializable {
private String enumValue;
/**
* 值来源:0-固定值 1-变量引用
* 值来源:1-固定值 0-变量引用
*/
@Column(name = "value_source")
private Integer valueSource;
......
......@@ -86,7 +86,7 @@ public class SopConditionEngine {
}
private Object getConditionValue(SopStrategyCondition condition, Integer valueSource, Integer valueType, Map<String, Object> contextVariables) {
if (valueSource != null && valueSource == 1) {
if (valueSource != null && valueSource == 0) {
String variableRefCode = condition.getVariableRefCode();
if (StrUtil.isNotBlank(variableRefCode)) {
Object refValue = contextVariables.get(variableRefCode);
......
......@@ -519,7 +519,7 @@ public class SopStrategySnapshotCacheService {
}
String operatorDesc = getOperatorDesc(condition.getOperator());
String value = "";
if (valueSource != null && valueSource == 1) {
if (valueSource != null && valueSource == 0) {
value = getDateVariableName(condition.getVariableRefCode());
}else {
if (condition.getValueType() != null) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!