sql更新
This commit is contained in:
parent
ed2c621be5
commit
49aed37b1e
@ -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' )
|
if not exists(select 1 from dbo.sys_config where config_id = '4' )
|
||||||
begin
|
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)
|
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
|
end
|
||||||
|
|
||||||
|
|||||||
70
sql/lis8.0/web_fs_printReport.sql
Normal file
70
sql/lis8.0/web_fs_printReport.sql
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
77
sql/lis8.0/web_getReportsList.sql
Normal file
77
sql/lis8.0/web_getReportsList.sql
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
40
sql/lis8.0/web_getresultmed.sql
Normal file
40
sql/lis8.0/web_getresultmed.sql
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
33
sql/lis8.0/web_result.sql
Normal file
33
sql/lis8.0/web_result.sql
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user