Browse Source

2026-07-14

异常规则配置
master
fengyuan_yang 3 weeks ago
parent
commit
d3a26302c9
  1. 15
      src/main/java/com/gaotao/modules/sys/service/impl/SysSceneExceptionRuleServiceImpl.java

15
src/main/java/com/gaotao/modules/sys/service/impl/SysSceneExceptionRuleServiceImpl.java

@ -184,8 +184,19 @@ public class SysSceneExceptionRuleServiceImpl implements SysSceneExceptionRuleSe
if (StringUtils.isBlank(data.getForceType())) { if (StringUtils.isBlank(data.getForceType())) {
throw new RuntimeException("是否强制不能为空"); throw new RuntimeException("是否强制不能为空");
} }
if (StringUtils.isBlank(data.getTriggerEvent())) {
throw new RuntimeException("触发异常事件不能为空");
boolean isRootCondition = StringUtils.isBlank(data.getParentConditionNo());
if (isRootCondition) {
data.setTriggerEvent("");
} else {
if (StringUtils.isBlank(data.getTriggerEvent())) {
throw new RuntimeException("触发异常事件不能为空");
}
if (!StringUtils.equalsAny(data.getTriggerEvent(), "异常代码", "异常单")) {
throw new RuntimeException("触发异常事件值无效");
}
if (StringUtils.equals(data.getTriggerEvent(), "异常代码")) {
data.setForceType("提示");
}
} }
if (StringUtils.isNotBlank(data.getParentConditionNo())) { if (StringUtils.isNotBlank(data.getParentConditionNo())) {
if (StringUtils.equals(data.getParentConditionNo(), data.getConditionNo())) { if (StringUtils.equals(data.getParentConditionNo(), data.getConditionNo())) {

Loading…
Cancel
Save