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

模板补充静态代码表

上级 bb34974a
...@@ -15,19 +15,19 @@ package ${pub.getPKGCodeName()}.util.dict; ...@@ -15,19 +15,19 @@ package ${pub.getPKGCodeName()}.util.dict;
import lombok.Getter; import lombok.Getter;
public class CodeListBase { public class StaticDict {
<#if sys.getAllPSCodeLists()??> <#if sys.getAllPSCodeLists()??>
<#list sys.getAllPSCodeLists() as codeList> <#list sys.getAllPSCodeLists() as codeList>
<#if codeList.getCodeListType()=='STATIC'> <#if codeList.getCodeListType()=='STATIC'>
<#assign codeListName=codeList.codeName> <#assign codeListName=codeList.codeName>
@Getter @Getter
public enum ${codeListName}CodeList { public enum ${codeListName} {
<#if codeList.getAllPSCodeItems()??> <#if codeList.getAllPSCodeItems()??>
<#list codeList.getAllPSCodeItems() as codeItem> <#list codeList.getAllPSCodeItems() as codeItem>
<#assign codeItemValue=codeItem.getValue()> <#assign codeItemValue=codeItem.getValue()>
<#assign codeItemText=codeItem.getText()> <#assign codeItemText=codeItem.getText()>
${codeListName}_${codeItemValue}("${codeItemValue}","${codeItemText}")<#if codeItem_has_next>,<#else>;</#if> VALUE_${codeItemValue}("${codeItemValue}","${codeItemText}")<#if codeItem_has_next>,<#else>;</#if>
</#list> </#list>
</#if> </#if>
...@@ -37,7 +37,7 @@ public class CodeListBase { ...@@ -37,7 +37,7 @@ public class CodeListBase {
private String textSeparator="<#if codeList.getTextSeparator()??>${codeList.getTextSeparator()}</#if>"; private String textSeparator="<#if codeList.getTextSeparator()??>${codeList.getTextSeparator()}</#if>";
private String emptyText="<#if codeList.getEmptyText()?? && codeList.getEmptyText()!='未定义'>${codeList.getEmptyText()}</#if>"; private String emptyText="<#if codeList.getEmptyText()?? && codeList.getEmptyText()!='未定义'>${codeList.getEmptyText()}</#if>";
${codeListName}CodeList(String value , String text) { ${codeListName}(String value , String text) {
this.value=value; this.value=value;
this.text = text; this.text = text;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册