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

属性值规则(规则组)

上级 8a8754cc
...@@ -91,16 +91,20 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D ...@@ -91,16 +91,20 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#comment>获取单项条件表达式</#comment> <#comment>获取单项条件表达式</#comment>
<#function getFieldCond fieldRule> <#function getFieldCond fieldRule>
<#assign childRuleType=fieldRule.getCondType()>
<#assign fieldCond="(" > <#assign fieldCond="(" >
<#assign condBody=""> <#assign condBody="1==1">
<#assign targetFieldName=fieldRule.getDEFName()><#comment>目标属性名称</#comment> <#comment>常规规则</#comment>
<#assign targetDEField=((de.getPSDEField(targetFieldName,true))!'')><#comment>目标属性</#comment> <#if childRuleType=='SIMPLE'>
<#assign targetDBValueOP=fieldRule.getCondOp()><#comment>表达式</#comment> <#assign targetFieldName=fieldRule.getDEFName()><#comment>目标属性名称</#comment>
<#assign targetValue=((fieldRule.getParamValue())!'')><#comment>值项</#comment> <#assign targetDEField=((de.getPSDEField(targetFieldName,true))!'')><#comment>目标属性</#comment>
<#if targetDEField!=''> <#assign targetDBValueOP=fieldRule.getCondOp()><#comment>表达式</#comment>
<#assign targetFieldName=srfcaseformat(targetDEField.codeName,'l_u2lC')> <#assign targetValue=((fieldRule.getParamValue())!'')><#comment>值项</#comment>
<#if targetDEField!=''>
<#assign targetFieldName=srfcaseformat(targetDEField.codeName,'l_u2lC')>
</#if>
<#assign condBody="T(${pub.getPKGCodeName()}.util.helper.RuleUtils).test(#dto.get(\""+targetFieldName+"\"),\""+targetDBValueOP+"\","+"\""+targetValue+"\")">
</#if> </#if>
<#assign condBody="T(${pub.getPKGCodeName()}.util.helper.RuleUtils).test(#dto.get(\""+targetFieldName+"\"),\""+targetDBValueOP+"\","+"\""+targetValue+"\")">
<#assign fieldCond=fieldCond+condBody > <#assign fieldCond=fieldCond+condBody >
<#assign fieldCond=fieldCond+")" > <#assign fieldCond=fieldCond+")" >
<#return fieldCond/> <#return fieldCond/>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册