From bf480091b95b430f7cba765a022db4c611488311 Mon Sep 17 00:00:00 2001 From: "weilin.zhu" Date: Sat, 15 Jul 2023 11:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=88=9B=E5=BB=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=A7=86=E5=9B=BE=EF=BC=88workflow=5Ffield?= =?UTF-8?q?=5Ftable=5Fview=EF=BC=89=E8=AF=AD=E5=8F=A5=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-mysql.sql | 14 +++++--------- view-oracle.sql | 11 +++-------- view-sql-server.sql | 11 +++-------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/view-mysql.sql b/view-mysql.sql index c55b822..4b35c65 100644 --- a/view-mysql.sql +++ b/view-mysql.sql @@ -84,10 +84,10 @@ INSERT INTO cus_workflow_base_field_assist(id, fieldname, indexdesc, tablename, VALUES (-989, 'workflowid', '工作流id:workflowid', 'workflow_requestbase', 999, 'main table', '单行文本', '1'); -- 创建试图 create -or replace view workflow_field_table_view as + or replace view workflow_field_table_view as select wb.id, wb.fieldname, - concat(ht.indexdesc, ':', wb.fieldname) indexdesc, + concat(ht.indexdesc, ':', wb.fieldname,'(',wb.id,')') indexdesc, ( case when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid) @@ -103,16 +103,12 @@ select wb.id, when wb.detailtable is null then 'main table' else wb.detailtable end ) showtablename, - (case - when wb.fieldhtmltype = '1' then '单行文本框' - when wb.FIELDHTMLTYPE = '2' then '多行文本框' - when wb.FIELDHTMLTYPE = '3' then '流览框' - when wb.FIELDHTMLTYPE = '4' then 'check框' - when wb.FIELDHTMLTYPE = '5' then '选择框' - else '附件上传' end) fieldhtmltype, + + wf.TYPENAME as fieldhtmltype, wb.FIELDHTMLTYPE fieldtype from workflow_billfield wb left join htmllabelindex ht on wb.fieldlabel = ht.id + left join workflow_fieldtype wf on wf.ID = wb.fieldhtmltype union all select * from cus_workflow_base_field_assist; diff --git a/view-oracle.sql b/view-oracle.sql index 7fc61df..5098625 100644 --- a/view-oracle.sql +++ b/view-oracle.sql @@ -91,7 +91,7 @@ VALUES (-989, 'workflowid', '工作流id:workflowid', 'workflow_requestbase', create or replace view workflow_field_table_view as select wb.id, wb.fieldname, - (ht.indexdesc || ':' || wb.fieldname) indexdesc, + (ht.indexdesc || ':' || wb.fieldname || '(' || CAST(wb.id as VARCHAR2(10)) || ')') indexdesc, ( case when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid) @@ -107,16 +107,11 @@ select wb.id, when wb.detailtable is null then 'main table' else wb.detailtable end ) showtablename, - (case - when wb.fieldhtmltype = '1' then '单行文本框' - when wb.FIELDHTMLTYPE = '2' then '多行文本框' - when wb.FIELDHTMLTYPE = '3' then '流览框' - when wb.FIELDHTMLTYPE = '4' then 'check框' - when wb.FIELDHTMLTYPE = '5' then '选择框' - else '附件上传' end) fieldhtmltype, + wf.TYPENAME as fieldhtmltype, wb.FIELDHTMLTYPE fieldtype from workflow_billfield wb left join htmllabelindex ht on wb.fieldlabel = ht.id + left join workflow_fieldtype wf on wf.ID = wb.fieldhtmltype union all select * from cus_workflow_base_field_assist / diff --git a/view-sql-server.sql b/view-sql-server.sql index c589dfa..f441ca0 100644 --- a/view-sql-server.sql +++ b/view-sql-server.sql @@ -95,7 +95,7 @@ drop view workflow_field_table_view create view workflow_field_table_view as select wb.id, wb.fieldname, - (ht.indexdesc + ':' + wb.fieldname) indexdesc, + (ht.indexdesc + ':' + wb.fieldname + '(' + CONVERT(varchar(10),wb.id) + ')') indexdesc, ( case when wb.detailtable is null then (select distinct tablename from workflow_bill where id = wb.billid) @@ -111,16 +111,11 @@ select wb.id, when wb.detailtable is null then 'main table' else wb.detailtable end ) showtablename, - (case - when wb.fieldhtmltype = '1' then '单行文本框' - when wb.FIELDHTMLTYPE = '2' then '多行文本框' - when wb.FIELDHTMLTYPE = '3' then '流览框' - when wb.FIELDHTMLTYPE = '4' then 'check框' - when wb.FIELDHTMLTYPE = '5' then '选择框' - else '附件上传' end) fieldhtmltype, + wf.TYPENAME as fieldhtmltype, wb.FIELDHTMLTYPE fieldtype from workflow_billfield wb left join htmllabelindex ht on wb.fieldlabel = ht.id + left join workflow_fieldtype wf on wf.ID = wb.fieldhtmltype union all select * from cus_workflow_base_field_assist go