提交 cda88ecd 编写于 作者: sq3536's avatar sq3536

处理逻辑

上级 059694dc
......@@ -50,24 +50,24 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#list deLogicNode.getPSDELogicNodeParams() as nodeParam>
<#assign targetLogicParam=nodeParam.getDstPSDELogicParam()>
<#assign targetLogicFieldName=nodeParam.getDstFieldName()>
<#if targetLogicParam.getParamPSDataEntity().getPSDEField(targetLogicFieldName)??>
<#assign targetDEField=((targetLogicParam.getParamPSDataEntity().getPSDEField(targetLogicFieldName))!'')>
</#if>
<#if nodeParam.getSrcValueType()=='SRCVALUE'><#comment>直接值</#comment>
<#if srfjavatype(targetDEField.stdDataType)=='Integer'>
${logicName+targetLogicParam.getCodeName()?lower_case}.set${targetDEField.codeName?cap_first}(${nodeParam.getSrcValue()});
<#elseif srfjavatype(targetDEField.stdDataType)=='String'>
${logicName+targetLogicParam.getCodeName()?lower_case}.set${targetDEField.codeName?cap_first}("${nodeParam.getSrcValue()}");
<#if targetDEField??&&srfjavatype(targetDEField.stdDataType)=='Integer'>
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}",${nodeParam.getSrcValue()});
<#else>
//暂不支持该数据类型的直接值
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}","${nodeParam.getSrcValue()}");
</#if>
<#elseif nodeParam.getSrcValueType()=='SRCDLPARAM' ><#comment>源逻辑参数</#comment>
<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>
<#assign srcFieldName=nodeParam.getSrcFieldName()>
<#assign srcDEField=((srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName))!'') >
<#if srcDEField!='' && targetDEField!=''>
${logicName+targetLogicParam.getCodeName()?lower_case}.set${targetDEField.codeName?cap_first}(${logicName+srcPSDELogicParam.getCodeName()?lower_case}.get${srcDEField.codeName?cap_first}());<#comment>源逻辑参数选择了实体</#comment>
<#else>
//暂不支持逻辑参数无实体模式 属性[${srcFieldName?upper_case}]
</#if>
<#--<#assign srcDEField=((srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName))!'') >-->
<#--<#if srcDEField!='' && targetDEField!=''>-->
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}",${logicName+srcPSDELogicParam.getCodeName()?lower_case}.get("${srcFieldName?lower_case}"));<#comment>源逻辑参数选择了实体</#comment>
<#--<#else>-->
<#--//暂不支持逻辑参数无实体模式 属性[${srcFieldName?upper_case}]-->
<#--</#if>-->
<#else>
//暂未支持其余准备参数设置
</#if>
......@@ -77,9 +77,9 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign operateAction=deLogicNode.getDstPSDEAction()><#comment>操作行为</#comment>
<#assign operateParam=deLogicNode.getDstPSDELogicParam()><#comment>操作参数</#comment>
<#assign logicParamEntity=logicName+operateParam.codeName?lower_case>
<#if deLogicNode.getDstPSDEAction()=='Get'>
<#if deLogicNode.getDstPSDEAction()?lower_case=='get'>
<#if operateEntity.getKeyPSDEField()??>
<#assign operateEntityKeyField=operateEntity.getKeyPSDEField()?lower_case?cap_first>
<#assign operateEntityKeyField=srfcaseformat(operateEntity.getKeyPSDEField(),'l_u2lC')?cap_first>
${pub.getPKGCodeName()}.util.helper.CachedBeanCopier.copy(${operateEntity.codeName?lower_case}service.get(${logicParamEntity}.get${operateEntityKeyField}()),${logicParamEntity});
<#else>
//操作实体没有主键属性,未能正常发布出get行为
......@@ -104,13 +104,13 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#if (deLogicNode.getParam("PARAM7",1)==0)><#comment>重置原数据</#comment>
${pub.getPKGCodeName()}.core.${targetEntity.getPSSystemModule().codeName?lower_case}.domain.${targetEntity.codeName} targetEntity =new ${pub.getPKGCodeName()}.core.${targetEntity.getPSSystemModule().codeName?lower_case}.domain.${targetEntity.codeName}();
for (Map.Entry entry : entity.entrySet()) {
targetEntity.setFieldValue(String.valueOf(entry.getKey()),entry.getValue());
targetEntity.set(String.valueOf(entry.getKey()),entry.getValue());
}
org.springframework.cglib.beans.BeanCopier copier= org.springframework.cglib.beans.BeanCopier.create(targetEntity.getClass(),${targetLogicParamCodeName}.getClass(), false);
copier.copy(targetEntity,${targetLogicParamCodeName},null);
<#else><#comment>不重置原数据</#comment>
for (Map.Entry entry : entity.entrySet()) {
${targetLogicParamCodeName}.setFieldValue(String.valueOf(entry.getKey()),entry.getValue());
${targetLogicParamCodeName}.set(String.valueOf(entry.getKey()),entry.getValue());
}
</#if>
<#else>
......
......@@ -75,6 +75,8 @@ public class EntityBase implements Serializable {
Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(this.getClass().getName());
if(keys.containsKey(field))
return getMap().get(keys.get(field));
else if(keys.containsKey(field.replace("_","")))
return getMap().get(keys.get(field.replace("_","")));
else
return this.extensionparams.get(field);
}
......@@ -91,6 +93,8 @@ public class EntityBase implements Serializable {
Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(this.getClass().getName());
if(keys.containsKey(field))
getMap().put(keys.get(field),value);
else if(keys.containsKey(field.replace("_","")))
getMap().put(keys.get(field.replace("_","")),value);
else
this.extensionparams.put(field,value);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册