处理模板问题
This commit is contained in:
parent
64e94c8d1c
commit
ca169f07cd
@ -195,6 +195,9 @@ public class DynamicConfigTableServiceImpl extends AbstractService implements ID
|
|||||||
if (StringUtils.equals(FieldTypeEnum.RADIO.getValue(), dynamicConfigFormDTO.getFieldType())
|
if (StringUtils.equals(FieldTypeEnum.RADIO.getValue(), dynamicConfigFormDTO.getFieldType())
|
||||||
|| StringUtils.equals(FieldTypeEnum.CHECKBOX.getValue(), dynamicConfigFormDTO.getFieldType())
|
|| StringUtils.equals(FieldTypeEnum.CHECKBOX.getValue(), dynamicConfigFormDTO.getFieldType())
|
||||||
|| StringUtils.equals(FieldTypeEnum.SELECT.getValue(), dynamicConfigFormDTO.getFieldType())) {
|
|| StringUtils.equals(FieldTypeEnum.SELECT.getValue(), dynamicConfigFormDTO.getFieldType())) {
|
||||||
|
if (StringUtils.equals(FieldTypeEnum.CHECKBOX.getValue(), dynamicConfigFormDTO.getFieldType())) {
|
||||||
|
templateMap.put("isCheckboxExist", "exist");
|
||||||
|
}
|
||||||
field.put("dictionaryIndex", ++dictionaryIndex);
|
field.put("dictionaryIndex", ++dictionaryIndex);
|
||||||
} else if (StringUtils.equals(FieldTypeEnum.INNER_JOIN.getValue(), dynamicConfigFormDTO.getFieldType())
|
} else if (StringUtils.equals(FieldTypeEnum.INNER_JOIN.getValue(), dynamicConfigFormDTO.getFieldType())
|
||||||
|| StringUtils.equals(FieldTypeEnum.LEFT_JOIN.getValue(), dynamicConfigFormDTO.getFieldType())
|
|| StringUtils.equals(FieldTypeEnum.LEFT_JOIN.getValue(), dynamicConfigFormDTO.getFieldType())
|
||||||
|
@ -147,7 +147,10 @@
|
|||||||
<if test="isCheckboxExist != null and isCheckboxExist == 'exist'">
|
<if test="isCheckboxExist != null and isCheckboxExist == 'exist'">
|
||||||
GROUP BY
|
GROUP BY
|
||||||
t1.${uuidField}
|
t1.${uuidField}
|
||||||
<foreach collection="listShowFieldList" item="item" open="," separator="," close="">
|
<foreach collection="listShowFieldList" item="item" index="index" open="," separator="," close="">
|
||||||
|
<if test="item.fieldType == 'radio' or item.fieldType == 'select'">
|
||||||
|
dt${index + 1}.dictionary_name,
|
||||||
|
</if>
|
||||||
t1.${item.fieldName}
|
t1.${item.fieldName}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="listJoinTableField != null and listJoinTableField.size > 0">
|
<if test="listJoinTableField != null and listJoinTableField.size > 0">
|
||||||
|
@ -122,8 +122,11 @@
|
|||||||
<#if field.listShow == 1>
|
<#if field.listShow == 1>
|
||||||
t1.${field.underLineFieldName},
|
t1.${field.underLineFieldName},
|
||||||
<#-- 字典 start -->
|
<#-- 字典 start -->
|
||||||
<#if field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
|
<#if field.fieldType == "radio" || field.fieldType == "select">
|
||||||
dt${field.dictionaryIndex}.dictionary_name ${field.underLineFieldName}_dictionary_name,
|
dt${field.dictionaryIndex}.dictionary_name ${field.underLineFieldName}_dictionary_name,
|
||||||
|
</#if>
|
||||||
|
<#if field.fieldType == "checkbox">
|
||||||
|
GROUP_CONCAT(DISTINCT dt${field.dictionaryIndex}.dictionary_name) ${field.underLineFieldName}_dictionary_name,
|
||||||
</#if>
|
</#if>
|
||||||
<#-- 字典 end -->
|
<#-- 字典 end -->
|
||||||
</#if>
|
</#if>
|
||||||
@ -142,7 +145,14 @@
|
|||||||
${tablePrefix}${underLineTableName} t1
|
${tablePrefix}${underLineTableName} t1
|
||||||
<#list fieldList! as field>
|
<#list fieldList! as field>
|
||||||
<#if field.listShow == 1>
|
<#if field.listShow == 1>
|
||||||
<#if field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
|
<#if field.fieldType == "radio" || field.fieldType == "select">
|
||||||
|
LEFT JOIN
|
||||||
|
data_dictionary dt${field.dictionaryIndex}
|
||||||
|
ON
|
||||||
|
dt${field.dictionaryIndex}.dictionary_id = t1.${field.underLineFieldName}
|
||||||
|
AND
|
||||||
|
dt${field.dictionaryIndex}.is_delete = 0
|
||||||
|
<#if field.fieldType == "checkbox">
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
data_dictionary dt${field.dictionaryIndex}
|
data_dictionary dt${field.dictionaryIndex}
|
||||||
ON
|
ON
|
||||||
@ -193,6 +203,27 @@
|
|||||||
${r"#{"}${firstLowerTableName}${r"Ids[${index}]}"}
|
${r"#{"}${firstLowerTableName}${r"Ids[${index}]}"}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<#if isCheckboxExist == 'exist'>
|
||||||
|
GROUP BY
|
||||||
|
<#list fieldList! as field>
|
||||||
|
<#if field.listShow == 1>
|
||||||
|
t1.${field.underLineFieldName},
|
||||||
|
<#if field.fieldType == "radio" || field.fieldType == "select">
|
||||||
|
dt${field.dictionaryIndex}.dictionary_name,
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- 联表 start -->
|
||||||
|
<#if field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
|
||||||
|
<#list field.listJoinTableField! as joinTableField>
|
||||||
|
<#if joinTableField.listShow == 1>
|
||||||
|
jt${field.joinTableIndex}.${joinTableField.underLineFieldName},
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
<#-- 联表 end -->
|
||||||
|
</#list>
|
||||||
|
t1.${underLineTableName}_id
|
||||||
|
</#if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- ${tableExplain}统计 -->
|
<!-- ${tableExplain}统计 -->
|
||||||
|
@ -108,9 +108,9 @@
|
|||||||
}
|
}
|
||||||
return downloadFile;
|
return downloadFile;
|
||||||
<#elseif field.fieldType == "date">
|
<#elseif field.fieldType == "date">
|
||||||
return common.formatDate('yyyy-MM-dd', new Date(rowData));
|
return rowData;
|
||||||
<#elseif field.fieldType == "datetime">
|
<#elseif field.fieldType == "datetime">
|
||||||
return common.formatDate('yyyy-MM-dd hh:mm:ss', new Date(rowData));
|
return rowData;
|
||||||
<#elseif field.fieldType == "selectUser">
|
<#elseif field.fieldType == "selectUser">
|
||||||
var selectArray = rowData.split(',');
|
var selectArray = rowData.split(',');
|
||||||
var value = '';
|
var value = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user