|
|
@@ -6,7 +6,7 @@
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
tcr.report_id,tcr.parent_uuid
|
|
|
- , tcr.report_name, tcr.user_ids, tcr.fty_ids, tcr.sql_script, tcr.flg_page, tcr.describe, tcr.report_status, tcr.remarks, tcr.display_no,
|
|
|
+ , tcr.report_name, tcr.user_ids, tcr.fty_ids, tcr.sql_script, tcr.describe, tcr.report_status, tcr.remarks, tcr.display_no,
|
|
|
tcr.flg_valid, tcr.fty_id, tcr.op_create_time, tcr.op_create_user_id, tcr.op_update_time, tcr.op_update_user_id, tcr.op_app_code,
|
|
|
tcr.op_timestamp, tcr.op_db_user,report_type
|
|
|
</sql>
|
|
|
@@ -18,7 +18,6 @@
|
|
|
<result column="report_Type" property="reportType"/>
|
|
|
<result column="parent_uuid" property="parentUuid" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="report_type_name" property="reportTypeName"/>
|
|
|
- <result column="flg_page" property="flgPage"/>
|
|
|
<result column="user_ids" property="userIds" typeHandler="com.dk.common.infrastructure.handler.IntListTypeHandler"/>
|
|
|
<result column="fty_ids" property="ftyIds" typeHandler="com.dk.common.infrastructure.handler.IntListTypeHandler"/>
|
|
|
<result column="user_names" property="userNames"/>
|
|
|
@@ -86,6 +85,9 @@
|
|
|
<result column="remarks" property="remarks"/>
|
|
|
<result column="pivot_data" property="pivotData" typeHandler="JsonTypeHandler"/>
|
|
|
<result column="flg_pivot" property="flgPivot"/>
|
|
|
+ <result column="flg_page" property="flgPage"/>
|
|
|
+ <result column="flg_proc" property="flgProc"/>
|
|
|
+ <result column="flg_dynamic_col" property="flgDynamicCol"/>
|
|
|
<result column="display_no" property="displayNo"/>
|
|
|
<result column="flg_valid" property="flgValid"/>
|
|
|
<result column="fty_id" property="ftyId"/>
|
|
|
@@ -245,7 +247,6 @@
|
|
|
<select id="selectByReport" resultMap="BaseResultMap">
|
|
|
select tcr.report_id,
|
|
|
tcr.report_name,
|
|
|
- tcr.flg_page,
|
|
|
tcr.user_ids,
|
|
|
tcr.fty_ids,
|
|
|
(select string_agg(u.user_name,' | ') from core.t_user u where u.user_id = any(tcr.user_ids)) as "user_names",
|
|
|
@@ -299,6 +300,9 @@
|
|
|
</if>
|
|
|
tcrs.pivot_data as "sql_pivot_data",
|
|
|
tcrs.flg_pivot as "sql_flg_pivot",
|
|
|
+ tcrs.flg_page as "sql_flg_page",
|
|
|
+ tcrs.flg_proc as "sql_flg_proc",
|
|
|
+ tcrs.flg_dynamic_col as "sql_flg_dynamic_col",
|
|
|
tcrs.change_script_others as "sql_change_script_others",
|
|
|
tcrs.change_script as "sql_change_script",
|
|
|
tcrs.change_tab_name as "sql_change_tab_name",
|
|
|
@@ -315,7 +319,7 @@
|
|
|
on tcr.report_id = tcrc.report_id
|
|
|
and tcr.fty_id = tcrc.fty_id
|
|
|
and tcrc.flg_valid
|
|
|
- left join sys.t_data_kind tdk
|
|
|
+ left join sys.t_value_kind tdk
|
|
|
on tcrc.kind = tdk.kind_code
|
|
|
left join rpt.t_custom_report_sql tcrs
|
|
|
on tcr.report_id = tcrs.report_id
|
|
|
@@ -346,7 +350,6 @@
|
|
|
report_type,
|
|
|
parent_uuid,
|
|
|
user_ids,
|
|
|
- flg_page,
|
|
|
report_status,
|
|
|
describe,
|
|
|
remarks,
|
|
|
@@ -363,7 +366,6 @@
|
|
|
#{reportType},
|
|
|
#{parentUuid} ::uuid,
|
|
|
#{userIds ,typeHandler=IntListTypeHandler},
|
|
|
- #{flgPage},
|
|
|
#{reportStatus},
|
|
|
#{describe},
|
|
|
#{remarks},
|
|
|
@@ -392,9 +394,6 @@
|
|
|
<if test="reportType != null">
|
|
|
report_type = #{reportType},
|
|
|
</if>
|
|
|
- <if test="flgPage != null">
|
|
|
- flg_page = #{flgPage},
|
|
|
- </if>
|
|
|
<if test="reportStatus != null">
|
|
|
report_status = #{reportStatus},
|
|
|
</if>
|
|
|
@@ -567,7 +566,6 @@
|
|
|
report_id,
|
|
|
report_name,
|
|
|
sql_script,
|
|
|
- flg_page,
|
|
|
report_status,
|
|
|
report_type,
|
|
|
parent_uuid,
|
|
|
@@ -584,7 +582,6 @@
|
|
|
#{reportId} ::uuid,
|
|
|
#{reportName},
|
|
|
#{sqlScript},
|
|
|
- #{flgPage},
|
|
|
#{reportStatus},
|
|
|
#{reportType},
|
|
|
#{parentUuid} ::uuid,
|
|
|
@@ -598,7 +595,6 @@
|
|
|
on conflict (report_id,fty_id) do update set
|
|
|
report_name = excluded."report_name",
|
|
|
sql_script = excluded."sql_script",
|
|
|
- flg_page = excluded."flg_page",
|
|
|
report_status = excluded."report_status",
|
|
|
report_type = excluded."report_type",
|
|
|
parent_uuid = excluded."parent_uuid",
|
|
|
@@ -690,7 +686,6 @@
|
|
|
report_id,
|
|
|
report_name,
|
|
|
sql_script,
|
|
|
- flg_page,
|
|
|
report_status,
|
|
|
describe,
|
|
|
remarks,
|
|
|
@@ -710,7 +705,6 @@
|
|
|
#{item.reportId}::uuid,
|
|
|
#{item.reportName},
|
|
|
#{item.sqlScript},
|
|
|
- #{item.flgPage},
|
|
|
#{item.reportStatus},
|
|
|
#{item.describe},
|
|
|
#{item.remarks},
|
|
|
@@ -746,7 +740,7 @@
|
|
|
|
|
|
<!-- SQL-->
|
|
|
<select id="selectReportSql" resultMap="SqlResultMap">
|
|
|
- select t.sql_id, t.report_id, t.name, t.label, t.sql_script, t.remarks, t.display_no, t.flg_valid, t.fty_id, t.op_create_time, t.op_create_user_id, t.op_update_time, t.op_update_user_id, t.op_app_code, t.op_timestamp, t.op_db_user, t.change_script, t.change_tab_name, t.change_script_others, t.sub_totals, t.sub_total_data_keys, t.pivot_data, t.flg_pivot
|
|
|
+ select t.sql_id, t.report_id, t.name, t.label,t.flg_page,t.flg_proc,t.flg_dynamic_col, t.sql_script, t.remarks, t.display_no, t.flg_valid, t.fty_id, t.op_create_time, t.op_create_user_id, t.op_update_time, t.op_update_user_id, t.op_app_code, t.op_timestamp, t.op_db_user, t.change_script, t.change_tab_name, t.change_script_others, t.sub_totals, t.sub_total_data_keys, t.pivot_data, t.flg_pivot
|
|
|
from rpt.t_custom_report_sql t
|
|
|
inner join rpt.t_custom_report tr on tr.report_id = t.report_id
|
|
|
where t.fty_id = 1 and t.flg_valid
|