|
|
@ -184,9 +184,20 @@ public class SysSceneExceptionRuleServiceImpl implements SysSceneExceptionRuleSe |
|
|
if (StringUtils.isBlank(data.getForceType())) { |
|
|
if (StringUtils.isBlank(data.getForceType())) { |
|
|
throw new RuntimeException("是否强制不能为空"); |
|
|
throw new RuntimeException("是否强制不能为空"); |
|
|
} |
|
|
} |
|
|
|
|
|
boolean isRootCondition = StringUtils.isBlank(data.getParentConditionNo()); |
|
|
|
|
|
if (isRootCondition) { |
|
|
|
|
|
data.setTriggerEvent(""); |
|
|
|
|
|
} else { |
|
|
if (StringUtils.isBlank(data.getTriggerEvent())) { |
|
|
if (StringUtils.isBlank(data.getTriggerEvent())) { |
|
|
throw new RuntimeException("触发异常事件不能为空"); |
|
|
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())) { |
|
|
throw new RuntimeException("父条件不能等于当前条件"); |
|
|
throw new RuntimeException("父条件不能等于当前条件"); |
|
|
|