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

切面逻辑优化

上级 04337514
......@@ -19,9 +19,9 @@ TARGET=PSDELOGIC
<tns:metaData express="" name="${paramObj}" type="entity"/>
<#elseif logicParam.getParamPSDataEntity?? && logicParam.getParamPSDataEntity()??>
<#assign ParamPSDataEntity=logicParam.getParamPSDataEntity()>
<tns:metaData express="new ${pub.getPKGCodeName()}.core.${ParamPSDataEntity.getPSSystemModule().codeName?lower_case}.domain.${ParamPSDataEntity.codeName}()" name="${(logicName+logicParam.codeName)?lower_case}" type="ref"/>
<tns:metaData express="new ${pub.getPKGCodeName()}.core.${ParamPSDataEntity.getPSSystemModule().codeName?lower_case}.domain.${ParamPSDataEntity.codeName}()" name="${(logicName+logicParam.codeName)?lower_case}" type="refentity"/>
<#else>
<tns:metaData express="new HashMap()" name="${(logicName+logicParam.codeName)?lower_case}" type="ref"/>
<tns:metaData express="new HashMap()" name="${(logicName+logicParam.codeName)?lower_case}" type="refentity"/>
</#if>
</#list>
</#if>
......
......@@ -79,7 +79,6 @@ public class DELogicAspect {
@Value("${r'$'}{ibiz.systemid:${sys.getCodeName()}}")
private String systemId;
/**
* 执行实体行为附加逻辑、实体行为调用处理逻辑
*
......@@ -250,6 +249,9 @@ public class DELogicAspect {
Expression oldExp = parser.parseExpression(express_value);
value = oldExp.getValue(oldContext);
}
if("entity".equalsIgnoreCase(type.getValue()) || "refentity".equalsIgnoreCase(type.getValue())){
kieSession.insert(entity);
}
kieSession.setGlobal(name.getValue(), value);
}
}
......@@ -385,8 +387,8 @@ public class DELogicAspect {
* @return
*/
private File getRemoteModel(String module, String entity, String action, String actionLogic) {
String logicName = String.format("PSDEACTION.json.%s.bpmn", actionLogic);
return new File(dynamicPath + File.separator + systemId + File.separator + "PSMODULES" + File.separator + module + File.separator + "PSDATAENTITIES" + File.separator + entity + File.separator + "PSDEACTIONS" + File.separator + action + File.separator + logicName);
String logicName = String.format("psdeaction.json.%s.bpmn", actionLogic);
return new File(dynamicPath + File.separator + (systemId + File.separator + "psmodules" + File.separator + module + File.separator + "psdataentities" + File.separator + entity + File.separator + "psdeactions" + File.separator + action + File.separator + logicName).toLowerCase());
}
/**
......@@ -399,7 +401,7 @@ public class DELogicAspect {
*/
private File getSubBpmn(String module, String entity, String logicName, LogicMode logicMode) {
if (LogicMode.REMOTE.equals(logicMode)) {
return new File(dynamicPath + File.separator + systemId + File.separator + "PSMODULES" + File.separator + module + File.separator + "PSDATAENTITIES" + File.separator + entity + File.separator + "PSDELOGICS" + File.separator + logicName + File.separator + "PSDELOGIC.json.bpmn");
return new File(dynamicPath + File.separator + (systemId + File.separator + "psmodules" + File.separator + module + File.separator + "psdataentities" + File.separator + entity + File.separator + "psdelogics" + File.separator + logicName + File.separator + "psdelogic.json.bpmn").toLowerCase());
} else {
String filePath = String.format("/rules/%s%sRuleFlow.bpmn", entity, logicName);
return ObjectUtils.isEmpty(this.getClass().getResource(filePath)) ? null : new File(this.getClass().getResource(filePath).getPath());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册