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

处理逻辑上下文

上级 5ded54fd
...@@ -61,7 +61,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}" ...@@ -61,7 +61,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()> <#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>
<#assign srcFieldName=nodeParam.getSrcFieldName()> <#assign srcFieldName=nodeParam.getSrcFieldName()>
<#if srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true)??> <#if srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true)??>
<#assign srcFieldName=srfcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName(),'l_u2lC')> <#assign srcFieldName=srfcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName(),'l_u2lC')>
</#if> </#if>
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}",${logicName+srcPSDELogicParam.getCodeName()?lower_case}.get("${srcFieldName?lower_case}"));<#comment>源逻辑参数选择了实体</#comment> ${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}",${logicName+srcPSDELogicParam.getCodeName()?lower_case}.get("${srcFieldName?lower_case}"));<#comment>源逻辑参数选择了实体</#comment>
<#else> <#else>
...@@ -171,56 +171,36 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}" ...@@ -171,56 +171,36 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
</#list> </#list>
</#if> </#if>
<#--<#comment>获取String.format拼接的sql</#comment>-->
<#--<#function getCallSQL deLogicNode>-->
<#--<#assign sql=srfjavasqlcode('${deLogicNode.getParam("PARAM4","")}')>-->
<#--<#comment>sql中的?替换为%s ,如:select * from table where id=? ; select * from table where id = '%s' </#comment>-->
<#--<#assign sql=sql?replace('%','%%')?replace('?','%s')>-->
<#--<#assign strSQL="String.format(\""+sql+"\",">-->
<#--<#list deLogicNode.getPSDELogicNodeParams() as nodeParam>-->
<#--<#assign sqlParam="">-->
<#--<#if nodeParam.getSrcValueType()=='SRCDLPARAM'><#comment>源逻辑参数</#comment>-->
<#--<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>-->
<#--<#assign srcFieldName=nodeParam.getSrcFieldName()>-->
<#--<#if srcPSDELogicParam.getParamPSDataEntity?? && srcPSDELogicParam.getParamPSDataEntity()??><#comment>源逻辑参数选择了实体</#comment>-->
<#--<#assign sqlParam=logicName+srcPSDELogicParam.getCodeName()?lower_case+".get(\""+srcFieldName?lower_case+"\")">-->
<#--</#if>-->
<#--<#elseif nodeParam.getSrcValueType()=='SRCVALUE'><#comment>直接值</#comment>-->
<#--<#assign sqlParam=nodeParam.getSrcValue()>-->
<#--<#else>-->
<#--<#assign sqlParam="null"><#comment>暂未支持其余准备参数设置</#comment>-->
<#--</#if>-->
<#--<#if nodeParam.getSrcValueType()=='SRCVALUE'>-->
<#--<#assign strSQL=strSQL+"\""+sqlParam+"\"">-->
<#--<#else>-->
<#--<#assign strSQL=strSQL+sqlParam>-->
<#--</#if>-->
<#--<#if nodeParam_has_next>-->
<#--<#assign strSQL=strSQL+",">-->
<#--</#if>-->
<#--</#list>-->
<#--<#assign strSQL=strSQL+")">-->
<#--<#return strSQL>-->
<#--</#function>-->
<#macro getCallSQL2 deLogicNode > <#macro getCallSQL2 deLogicNode >
Map param =new HashMap(); Map param =new HashMap();
<#comment>准备参数列表</#comment> <#comment>准备参数列表</#comment>
<#list deLogicNode.getPSDELogicNodeParams() as nodeParam> <#list deLogicNode.getPSDELogicNodeParams() as nodeParam>
<#assign sqlParam=""> <#assign sqlParam="null">
<#if nodeParam.getSrcValueType()=='SRCDLPARAM'><#comment>源逻辑参数</#comment> <#if nodeParam.getSrcValueType()=='SRCDLPARAM'><#comment>源逻辑参数</#comment>
<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()> <#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>
<#assign srcFieldName=nodeParam.getSrcFieldName()> <#assign srcFieldName=nodeParam.getSrcFieldName()>
<#if srcPSDELogicParam.getParamPSDataEntity?? && srcPSDELogicParam.getParamPSDataEntity()??><#comment>源逻辑参数选择了实体</#comment> <#assign srfLogicParamEntity=logicName+srcPSDELogicParam.getCodeName()?lower_case>
<#assign srcRefDEFieldCodeName=srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName).codeName> <#assign curLogicEntity=logicName+"default">
<#assign sqlParam=logicName+srcPSDELogicParam.getCodeName()?lower_case+".get"+srcRefDEFieldCodeName?cap_first+"()"> <#if srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true)??>
<#else> <#assign srcFieldName=srfcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName(),'l_u2lC')>
//暂不支持非实体的逻辑参数赋值!
</#if> </#if>
<#elseif nodeParam.getSrcValueType()=='SRCVALUE'><#comment>直接值</#comment> <#assign sqlParam=srfLogicParamEntity+".get("+srcFieldName?lower_case+")">
<#elseif nodeParam.getSrcValueType()=="WEBCONTEXT"><#comment>网页请求上下文</#comment>
<#assign sqlParam=curLogicEntity+".get("+srcFieldName?lower_case+")">
<#elseif nodeParam.getSrcValueType()=="APPDATA"><#comment>当前应用数据</#comment>
<#elseif nodeParam.getSrcValueType()=="APPLICATION"><#comment>系统全局对象</#comment>
<#elseif nodeParam.getSrcValueType()=="SESSION"><#comment>用户全局对象</#comment>
<#assign sqlParam="curuser.getSessionParams().get("+srcFieldName?lower_case+")">
<#elseif nodeParam.getSrcValueType()=="DATACONTEXT"><#comment>数据上下文</#comment>
<#assign sqlParam=curLogicEntity+".get("+srcFieldName?lower_case+")">
<#elseif nodeParam.getSrcValueType()=="ENVPARAM"><#comment>当前环境参数</#comment>
<#elseif nodeParam.getSrcValueType()=="VIEWPARAM"><#comment>当前视图参数</#comment>
<#elseif nodeParam.getSrcValueType()=="NONE"><#comment>无值</#comment>
<#elseif nodeParam.getSrcValueType()=="NULLVALUE"><#comment>空值</#comment>
<#elseif nodeParam.getSrcValueType()=="SRCVALUE"><#comment>直接值</#comment>
<#assign sqlParam="\""+nodeParam.getSrcValue()+"\""> <#assign sqlParam="\""+nodeParam.getSrcValue()+"\"">
<#else> <#else>
<#assign sqlParam="null"><#comment>暂未支持其余准备参数设置</#comment> <#comment>暂未支持其余准备参数设置</#comment>
</#if> </#if>
param.put("param${nodeParam_index}",${sqlParam}); param.put("param${nodeParam_index}",${sqlParam});
</#list> </#list>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册