提交 5c2cedac 编写于 作者: tony001's avatar tony001

调整数据服务预定义类型为索引实体逻辑

上级 664b2832
......@@ -66,15 +66,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
</#macro>
<#-- 本地供数satrt -->
<#macro local_supply singleAppMethod>
<#macro local_supply item singleAppMethod>
<#if singleAppMethod.getPredefinedType?? && singleAppMethod.getPredefinedType()??>
<#-- 预定义类型为索引实体 -->
<#-- 预定义类型为索引实体start -->
<#if singleAppMethod.getPredefinedType() == "INDEXDE">
<#if singleAppMethod.getPSAppCodeList?? && singleAppMethod.getPSAppCodeList()??>
<#assign appCodeList = singleAppMethod.getPSAppCodeList() />
let codelistModel:any = {tag:'${appCodeList.codeName}',codelistType:'${appCodeList.getCodeListType()}'};
let codelistModel:any = {tag:'${appCodeList.codeName}',codelistType:'${appCodeList.getCodeListType()}'};
let res:any = await this.getCodeList(codelistModel.tag,codelistModel.codelistType,context,data);
if(res && res.length > 0){
res.forEach((ele:any) => {
// 仿真返回数据集
ele.${item.getKeyPSAppDEField().getCodeName()?lower_case} = ele.value;
ele.${item.getMajorPSAppDEField().getCodeName()?lower_case} = ele.text
});
}
return {status:200,data:res};
</#if>
</#if>
<#-- 预定义类型为索引实体end -->
</#if>
</#macro>
<#-- 本地供数end -->
......@@ -621,7 +631,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??>
<@service_block item=item singleAppMethod=singleAppMethod />
<#else>
<@local_supply singleAppMethod=singleAppMethod />
<@local_supply item=item singleAppMethod=singleAppMethod />
</#if>
<#-- 无实体行为,有接口走接口,无接口走本地供数 end -->
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册