Commit c2bc853e by zhouhaibao

feat(sop): 添加枚举值名称字段支持

- 在 SopConditionReqDTO 中新增 enumValueName 字段
- 在 SopConditionRequest 中新增 enumValueName 字段
- 在 SopStrategyCondition 模型中新增 enumValueName 属性和数据库映射
- 更新 ORM 映射文件添加 enumValueName 结果映射
- 修改触发器描述逻辑将动作确认类型判断从 1 改为 -1
- 更新条件值获取逻辑在类型为 4 时使用 enumValueName 替代 enumValue
1 parent 16803847
......@@ -39,6 +39,9 @@ public class SopConditionReqDTO implements Serializable {
@ApiModelProperty(notes = "值来源:1-固定值 0-变量引用")
private Integer valueSource;
@ApiModelProperty(value = "枚举值(值类型为4时使用,多个值用逗号分隔)")
private String enumValueName;
@ApiModelProperty(value = "引用的变量编码")
private String variableRefCode;
}
\ No newline at end of file
package cn.com.glsx.dj.strategy.model.sop;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.*;
......@@ -132,4 +133,8 @@ public class SopStrategyCondition implements Serializable {
*/
@Column(name = "updated_date")
private Date updatedDate;
@ApiModelProperty(value = "枚举值(值类型为4时使用,多个值用逗号分隔)")
@Column(name = "enum_value_name")
private String enumValueName;
}
\ No newline at end of file
......@@ -170,7 +170,7 @@ public class SopStrategySnapshotCacheService {
triggerInfo.put("triggerTime", triggerTime);
triggerInfo.put("triggerTimeDesc", buildTriggerTimeDesc(strategy));
triggerInfo.put("actionConfirmType", strategy.getActionConfirmType());
triggerInfo.put("actionConfirmDesc", strategy.getActionConfirmType() == 1 ? "自动执行" : "需驻店人员确认");
triggerInfo.put("actionConfirmDesc", strategy.getActionConfirmType() == -1 ? "自动执行" : "需驻店人员确认");
List<Map<String, Object>> step2ConditionGroupsSnapshot = new ArrayList<>();
for (SopStrategyConditionGroup group : step2ConditionGroups) {
......@@ -534,7 +534,7 @@ public class SopStrategySnapshotCacheService {
value = condition.getDateValue();
break;
case 4:
value = condition.getEnumValue();
value = condition.getEnumValueName();
break;
default:
value = "";
......
......@@ -15,6 +15,7 @@
<result column="value_source" property="valueSource"/>
<result column="variable_ref_code" property="variableRefCode"/>
<result column="text_value" property="textValue"/>
<result column="enum_value_name" property="enumValueName"/>
<result column="number_value" property="numberValue"/>
<result column="date_value" property="dateValue"/>
<result column="enum_value" property="enumValue"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!