提交 725b8ee6 编写于 作者: zhouweidong's avatar zhouweidong

补充值规则异常信息

上级 4ba5435e
...@@ -122,30 +122,30 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D ...@@ -122,30 +122,30 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#comment>获取group规则信息</#comment> <#comment>获取group规则信息</#comment>
<#function getGroupMessage group> <#function getGroupMessage group>
<#assign strRuleCond="("> <#assign ruleMessage="(">
<#if group.getPSDEFVRConditions()??> <#if group.getPSDEFVRConditions()??>
<#assign condOp=group.getCondOp()?replace("AND","并且")?replace("OR","或者")> <#assign op=group.getCondOp()?replace("AND","并且")?replace("OR","或者")>
<#list group.getPSDEFVRConditions() as childRule> <#list group.getPSDEFVRConditions() as childRule>
<#assign childRuleType=childRule.getCondType()> <#assign childRuleType=childRule.getCondType()>
<#if childRuleType=='GROUP'> <#if childRuleType=='GROUP'>
<#assign strRuleCond=strRuleCond+getGroupCond(childRule)> <#assign ruleMessage=ruleMessage+getGroupMessage(childRule)>
<#else> <#else>
<#assign strRuleCond=strRuleCond+getFieldCond(childRule)> <#assign ruleMessage=ruleMessage+getFieldMessage(childRule)>
</#if> </#if>
<#if childRule_has_next> <#if childRule_has_next>
<#assign strRuleCond=strRuleCond+condOp> <#assign ruleMessage=ruleMessage+op>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#assign strRuleCond=strRuleCond+")"> <#assign ruleMessage=ruleMessage+")">
<#return strRuleCond/> <#return ruleMessage/>
</#function> </#function>
<#comment>获取field规则信息</#comment> <#comment>获取field规则信息</#comment>
<#function getFieldMessage fieldRule> <#function getFieldMessage fieldRule>
<#assign fieldCond=""> <#assign fieldMessage="">
<#if fieldRule.getRuleInfo?? && fieldRule.getRuleInfo()??> <#if fieldRule.getRuleInfo?? && fieldRule.getRuleInfo()??>
<#assign fieldCond=fieldRule.getRuleInfo()> <#assign fieldMessage=fieldRule.getRuleInfo()>
</#if> </#if>
<#return fieldCond/> <#return fieldMessage/>
</#function> </#function>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册