|
|
@@ -5,17 +5,41 @@
|
|
|
<mapper namespace="com.jzg.console.mapper.ReportSearchConfigurationMapper">
|
|
|
<select id="getSearchConfigurationList"
|
|
|
resultType="com.jzg.commons.entity.report.dto.ReportSearchConfigurationDto">
|
|
|
- select
|
|
|
- *
|
|
|
- from
|
|
|
- report_search_configuration
|
|
|
- <where>
|
|
|
- <if test="routerPath !=null and routerPath !=''">
|
|
|
- AND router_path_key =#{ routerPath }
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- order by id
|
|
|
+ SELECT
|
|
|
+ b.search_key AS searchKey,
|
|
|
+ b.search_name AS searchName,
|
|
|
+ b.select_type AS selectType,
|
|
|
+ b.show_type AS showType,
|
|
|
+ b.search_sql AS searchSql,
|
|
|
+ b.id AS id,
|
|
|
+ a.show_flag AS showFlag,
|
|
|
+ CASE
|
|
|
+ WHEN (
|
|
|
+ SELECT COUNT(0)
|
|
|
+ FROM report_page_set_search_param
|
|
|
+ WHERE report_configuration_id = a.report_configuration_id
|
|
|
+ AND router_path_key = #{ routerPath }
|
|
|
+ ) > 0 THEN true
|
|
|
+ ELSE false
|
|
|
+ END AS defaultFlag,
|
|
|
+ CASE
|
|
|
+ WHEN (
|
|
|
+ SELECT COUNT(0)
|
|
|
+ FROM report_page_select_disable
|
|
|
+ WHERE report_configuration_id = a.report_configuration_id
|
|
|
+ AND router_path_key = #{ routerPath }
|
|
|
+ ) > 0 THEN true
|
|
|
+ ELSE false
|
|
|
+ END AS selectFlag
|
|
|
+ FROM
|
|
|
+ report_page_set_search_param a
|
|
|
+ LEFT JOIN report_search_configuration b ON a.report_configuration_id = b.id
|
|
|
+ WHERE
|
|
|
+ a.router_path_key = 'common'
|
|
|
+ ORDER BY
|
|
|
+ a.sort
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectDictListByCode" resultType="com.jzg.commons.entity.report.dto.ReportDictDto">
|
|
|
SELECT
|
|
|
p.VALUE AS value,
|
|
|
@@ -112,4 +136,24 @@
|
|
|
WHERE
|
|
|
level = 3;
|
|
|
</select>
|
|
|
+ <select id="getSearchDefaultList"
|
|
|
+ resultType="com.jzg.commons.entity.report.dto.ReportSearchConfigurationDto">
|
|
|
+ SELECT
|
|
|
+ b.search_key AS searchKey,
|
|
|
+ b.search_name AS searchName,
|
|
|
+ b.select_type AS selectType,
|
|
|
+ b.show_type AS showType,
|
|
|
+ b.search_sql AS searchSql,
|
|
|
+ b.id AS id,
|
|
|
+ a.show_flag AS showFlag,
|
|
|
+ true as defaultFlag,
|
|
|
+ true as selectFlag
|
|
|
+ FROM
|
|
|
+ report_page_set_search_param a
|
|
|
+ LEFT JOIN report_search_configuration b ON a.report_configuration_id = b.id
|
|
|
+ WHERE
|
|
|
+ a.router_path_key = #{ routerKey }
|
|
|
+ ORDER BY
|
|
|
+ a.sort
|
|
|
+ </select>
|
|
|
</mapper>
|