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

通过外键值文本填充外键值

上级 4745e293
......@@ -2830,7 +2830,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if ((MinorPSDER.getPSPickupTextDEField().getRelatedPSDEField())!'')!=''>
<#comment>通过外键值文本填充外键值</#comment>
<#assign foreignkeyId = MajorKeyFieldCodeName>
<#assign foreignkeyField = MinorPSDER.getPSPickupTextDEField().getRelatedPSDEField()>
<#assign foreignkeyField = MinorPSDER.getPSPickupTextDEField()>
<#assign foreignkeyName = srfcaseformat(foreignkeyField.getCodeName(),'l_u2lC')?cap_first>
<#assign importTag=foreignkeyField.getCodeName()>
<#if ((foreignkeyField.getImportTag())!'')!=''>
......@@ -2838,7 +2838,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if>
if(ObjectUtils.isEmpty(entity.get${foreignkeyId}()) && !ObjectUtils.isEmpty(entity.get${foreignkeyName}())){
QueryWrapper<${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntityCodeName}> ${MinorPSDER.codeName?lower_case}Wrapper = new QueryWrapper<>();
${MinorPSDER.codeName?lower_case}Wrapper.eq("${foreignkeyField.name?lower_case}",entity.get${foreignkeyName}());
${MinorPSDER.codeName?lower_case}Wrapper.eq("${MinorPSDER.getPSPickupTextDEField().getRelatedPSDEField().name?lower_case}",entity.get${foreignkeyName}());
${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntityCodeName} ${MinorPSDER.codeName?lower_case}Entity = ${MajorEntityService}.getOne(${MinorPSDER.codeName?lower_case}Wrapper,false);
if(${MinorPSDER.codeName?lower_case}Entity == null){
Integer lineNum = i + 1;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册