From 39fd30a814f0061f34866eb26fe71d0993c28bb8 Mon Sep 17 00:00:00 2001 From: lsm Date: Fri, 19 Jul 2024 15:42:01 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=AD=A5=E9=AA=A4=E6=9D=A1SQL?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/App.config | 4 ++-- PEIS/View/UControl/StepViewer.cs | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/PEIS/App.config b/PEIS/App.config index 8441306..9ec8423 100644 --- a/PEIS/App.config +++ b/PEIS/App.config @@ -17,11 +17,11 @@ - + - + diff --git a/PEIS/View/UControl/StepViewer.cs b/PEIS/View/UControl/StepViewer.cs index c733604..46f64c4 100644 --- a/PEIS/View/UControl/StepViewer.cs +++ b/PEIS/View/UControl/StepViewer.cs @@ -278,14 +278,13 @@ WHERE A.EID = {Eid} AND c.VerifyTime IS NULL AND B.IsHide=0 AND A.GiveUpTime IS return list; } var reports = DAOHelp.GetDataBySQL($@" - SELECT STUFF(( + SELECT STUFF(( SELECT DISTINCT ',' + req_reason FROM lis.rmcloudlis7.dbo.vw_checked_labresult A - WHERE pat_no = '11201' AND pat_typecode = 4 - FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 1, '') AS Title,Class='检验' - union - SELECT Title,Class='检查' FROM Report WHERE EID=11201 - "); + WHERE pat_no = '{eid}' AND pat_typecode = 4 + FOR XML PATH ( '' )),1,2,'') as Title,Class='检验' + UNION + SELECT Title,Class='检查' FROM Report WHERE EID={eid}"); var lisItem = reports.FirstOrDefault(p => p.Class == "检验")?.Title; if (!string.IsNullOrEmpty(lisItem))