diff --git a/sql/lis8.0/ruoyi_lis8.0_sqlserver.sql b/sql/lis8.0/ruoyi_lis8.0_sqlserver.sql index 2bbfda7..ba15be1 100644 --- a/sql/lis8.0/ruoyi_lis8.0_sqlserver.sql +++ b/sql/lis8.0/ruoyi_lis8.0_sqlserver.sql @@ -1358,7 +1358,7 @@ if not exists(select 1 from dbo.sys_config where config_id = '3' ) if not exists(select 1 from dbo.sys_config where config_id = '4' ) begin INSERT INTO dbo.sys_config (config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark) - VALUES (4, 'è´¦å�·è‡ªåŠ©-验è¯�ç �开关', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', '2025-05-13 11:40:21.12', '', NULL, '是å�¦å¼€å�¯éªŒè¯�ç �功能(trueå¼€å�¯ï¼Œfalse关闭)') + VALUES (4, 'è´¦å�·è‡ªåŠ©-验è¯�ç �开关', 'sys.account.captchaEnabled', 'false', 'Y', 'admin', '2025-05-13 11:40:21.12', '', NULL, '是å�¦å¼€å�¯éªŒè¯�ç �功能(trueå¼€å�¯ï¼Œfalse关闭)') end diff --git a/sql/lis8.0/web_fs_printReport.sql b/sql/lis8.0/web_fs_printReport.sql new file mode 100644 index 0000000..3020882 --- /dev/null +++ b/sql/lis8.0/web_fs_printReport.sql @@ -0,0 +1,70 @@ + + +CREATE VIEW [dbo].[web_fs_printReport] +AS + +select isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg,a.jyrq, + +--a.yq, +z.yqmc as yq, +a.ybh ,a.brxm, +--a.brdh, +e.bz1 brdh, +a.ch, +--a.jymd +e.jymd as jymd +,a.zd,isnull(e.sqsj,a.sqsj) as sqsj,isnull(e.cysj,a.cyrq) as cyrq,isnull(e.jssj,a.sqsj) as lastdt,a.confirmdt,a.confirmer,a.sqh, +(CONVERT(varchar(12), a.jyrq, 112)+'_'+rtrim(a.yq)+'_'+a.ybh) as bgdh,y.xmdh,y.csjg,y.refs,y.dw,y.result_flag,z.yqmc,z.yqdl, +(select c.xmmc from xm_info c where c.yq=a.yq and c.xmdh=y.xmdh) as xmmc, +(CONVERT(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl, +(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname, +(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname, +(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname, +isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname, +isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname, +b.dyxh, +(case y.result_flag when 'Q' then '+' when 'L' THEN '¡ý' WHEN 'H' then '¡ü' else '' end) flag, +a.yhdh AS lastuser, +(select dzqm from com_usr c where a.confirmer=c.yhdh) confirmerpic, +(select dzqm from com_usr c where a.yhdh=c.yhdh) as lastpic,a.bz AS bz +from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_result y,lab_instr z ,xm_info b +where y.yq=b.yq and y.xmdh=b.xmdh and a.jyrq=y.jyrq +and a.yq=y.yq and y.ybh=a.ybh and a.brxm is not null and a.yq=z.yq +and a.brly='3' +and a.jyrq >getdate()-360 +union all + + +select isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg,a.jyrq, + +--a.yq, +z.yqmc as yq, +a.ybh ,a.brxm, +--a.brdh, +a.brdh brdh, +a.ch, +--a.jymd +e.jymd as jymd +,a.zd,isnull(e.sqsj,a.sqsj) as sqsj,isnull(e.cysj,a.cyrq) as cyrq,isnull(e.jssj,a.sqsj) as lastdt,a.confirmdt,a.confirmer,a.sqh, +(CONVERT(varchar(12), a.jyrq, 112)+'_'+rtrim(a.yq)+'_'+a.ybh) as bgdh,y.xmdh,y.csjg,y.refs,y.dw,y.result_flag,z.yqmc,z.yqdl, +(select c.xmmc from xm_info c where c.yq=a.yq and c.xmdh=y.xmdh) as xmmc, +(CONVERT(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl, +(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname, +(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname, +(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname, +isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname, +isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname, +b.dyxh, +(case y.result_flag when 'Q' then '+' when 'L' THEN '¡ý' WHEN 'H' then '¡ü' else '' end) flag, +a.yhdh AS lastuser, +(select dzqm from com_usr c where a.confirmer=c.yhdh) confirmerpic, +(select dzqm from com_usr c where a.yhdh=c.yhdh) as lastpic,a.bz AS bz +from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_result y,lab_instr z ,xm_info b +where y.yq=b.yq and y.xmdh=b.xmdh and a.jyrq=y.jyrq +and a.yq=y.yq and y.ybh=a.ybh and a.brxm is not null and a.yq=z.yq +and a.brly='1' +and a.jyrq >getdate()-360 + +GO + + diff --git a/sql/lis8.0/web_getReportsList.sql b/sql/lis8.0/web_getReportsList.sql new file mode 100644 index 0000000..bb2870b --- /dev/null +++ b/sql/lis8.0/web_getReportsList.sql @@ -0,0 +1,77 @@ + +/****** Object: View [dbo].[web_getReportsList] Script Date: 11/14/2025 17:09:18 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + + + + +CREATE VIEW [dbo].[web_getReportsList] +AS + +--select isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm, +----a.brdh, +--(case when a.brly = '1' then a.brdh else isnull(e.bz1,a.brdh) end ) brdh, +--a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz, +--(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl, +--(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname, +--(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname, +--(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname, +--isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname, +--isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname, +--z.yqmc,z.yqdl from lab_pat a left join lab_reqmain e on a.sqh=e.sqh,lab_instr z +--where a.brxm<>'' and a.yq=z.yq and --a.jymd<>'' +-- jgbz ='2' + + + select c.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm, +a.brdh,c.cysj,c.zxsj,c.bbsjsj,c.jssj,a.confirmdt as confirmtime, + +a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz, +(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl, +(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname, +(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname, +(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname, +isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname, +isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname, +z.yqmc,z.yqdl,dysj from lab_pat a ,lab_instr z ,lab_reqmain c +where a.brxm<>'' and a.yq=z.yq and --a.jymd<>'' + jgbz ='2' + and a.brly='1' and c.sqh = a.sqh + union all + select e.sqsj, isnull((select bz from com_dict where zdlb='HOS' AND zddh=a.yljg),a.yljg) yljg, a.jyrq, CONVERT(varchar(100), a.jyrq, 23) as jyrqname,a.yq,a.ybh,a.yblx,a.brxm, +--a.brdh, +isnull(e.bz1,e.brdh) brdh,e.cysj,e.zxsj,e.bbsjsj,e.jssj,a.confirmdt as confirmtime, +a.ch,a.jymd,a.zd,a.sqh,a.ksdh,isnull(a.jzbz,'0') as jzbz,isnull(a.alarmflag,'0') as alarmflag,isnull(a.dybz,'0') as dybz, +(convert(varchar(10),a.nl)+(select b.zdmc from com_dict b where zdlb='AU' and a.nldw=b.zddh)) as nl, +(select b.zdmc from com_dict b where zdlb='DP' and a.ksdh=b.zddh) as ksname, +(select b.zdmc from com_dict b where zdlb='PT' and a.brly=b.zddh) as brlyname, +(CASE WHEN a.brxb = '1' THEN 'ÄÐ' WHEN a.brxb = '2' THEN 'Å®' ELSE 'ÆäËû' END) as brxbname, +isnull((select b.zdmc from com_dict b where zdlb='BT' and a.yblx=b.zddh),a.yblx) as yblxname, +isnull((select b.zdmc from com_dict b where zdlb='SRD' and a.sjys=b.zddh),a.sjys) as sjysname, +z.yqmc,z.yqdl,a.dysj dysj from lab_pat a join lab_reqmain e on a.sqh=e.sqh,lab_instr z +where a.brxm<>'' and a.yq=z.yq and --a.jymd<>'' + jgbz ='2' + and a.brly<>'1' + + + + + + + + + + + + + + + + +GO + + diff --git a/sql/lis8.0/web_getresultmed.sql b/sql/lis8.0/web_getresultmed.sql new file mode 100644 index 0000000..e4e8d22 --- /dev/null +++ b/sql/lis8.0/web_getresultmed.sql @@ -0,0 +1,40 @@ + + +CREATE view [dbo].[web_getresultmed] +as + select (CONVERT(varchar(12), a.jyrq, 112)+'_'+rtrim(c.yq)+'_'+a.ybh) as bgdh, + --(case when a.brly = '1' then a.brdh else isnull(g.bz1,a.brdh) end ) brdh , + a.brdh as brdh, + c.xmmc, + e.ywmc, + d.*, + (select textresult from lab_result where yq=d.yq and ybh=d.ybh and jyrq=d.jyrq and xmdh=d.xmdh) textresult1 + from lab_Pat a --left join lab_result b on a.yq=b.yq and a.ybh=b.ybh and a.jyrq=b.jyrq and b.xmdh=d.xmdh + join lab_resultmed d on a.yq=d.yq and a.ybh=d.ybh and a.jyrq=d.jyrq + join xm_info c on d.yq=c.yq and d.xmdh=c.xmdh + join lab_reqmain g on g.sqh=a.sqh + join xm_med e on d.ywdh=e.ywdh + join lab_instr on a.yq=lab_instr.yq and yqdl='ϸ¾úÒÇ' + where a.jgbz='2' --and a.ybh like '%2017001%' + and a.brly='1' + union all + + select (CONVERT(varchar(12), a.jyrq, 112)+'_'+rtrim(c.yq)+'_'+a.ybh) as bgdh, +-- (case when a.brly = '1' then a.brdh else isnull(g.bz1,a.brdh) end ) brdh , +g.bz1 as brdh, + c.xmmc, + e.ywmc, + d.*, + (select textresult from lab_result where yq=d.yq and ybh=d.ybh and jyrq=d.jyrq and xmdh=d.xmdh) textresult1 + from lab_Pat a --left join lab_result b on a.yq=b.yq and a.ybh=b.ybh and a.jyrq=b.jyrq and b.xmdh=d.xmdh + join lab_resultmed d on a.yq=d.yq and a.ybh=d.ybh and a.jyrq=d.jyrq + join xm_info c on d.yq=c.yq and d.xmdh=c.xmdh + join lab_reqmain g on g.sqh=a.sqh + join xm_med e on d.ywdh=e.ywdh + join lab_instr on a.yq=lab_instr.yq and yqdl='ϸ¾úÒÇ' + where a.jgbz='2' --and a.ybh like '%2017001%' + and a.brly<>'1' + +GO + + diff --git a/sql/lis8.0/web_result.sql b/sql/lis8.0/web_result.sql new file mode 100644 index 0000000..1815867 --- /dev/null +++ b/sql/lis8.0/web_result.sql @@ -0,0 +1,33 @@ + +CREATE view [dbo].[web_result] + as +select a.[wyh] + ,a.[jyrq] + ,a.[yq] + ,a.[ybh] + ,a.[xmdh] + ,a.[csjg] + ,a.[od] + ,a.[cutoff] + --,a.[jgbz] + ,a.[bz1] + ,a.[bz2] + ,a.[yhdh] + ,a.[textresult] + ,a.[instrid] + ,a.[operdt] + ,a.[operna] + ,a.[refs] + ,a.[flag] + ,a.[dw] + ,a.[result_flag] jgbz + ,a.[alarm_flag] + ,a.[redo_flag] + ,a.[sqxmdh], + b.xmmc, + b.dyxh + from lab_result a join xm_info b on a.yq=b.yq and a.xmdh=b.xmdh + +GO + +