From 2803d58198239b071be4aef1241fc0a54bcb83e8 Mon Sep 17 00:00:00 2001 From: lsm Date: Fri, 1 Nov 2024 16:38:19 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=A3=80=E9=AA=8C=E7=A7=91=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=97=B6=E6=A0=B8=E5=AF=B9=E9=A1=B9=E7=9B=AE=E6=80=BB?= =?UTF-8?q?=E6=95=B0=EF=BC=8C2=E3=80=81=E7=A1=AE=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=BB=98=E8=AE=A4=E6=88=90"=E6=98=AF"=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/Utils/Global.cs | 2 +- PEIS/View/Exam/PartForm.cs | 42 ++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/PEIS/Utils/Global.cs b/PEIS/Utils/Global.cs index 8ebe260..c882b69 100644 --- a/PEIS/Utils/Global.cs +++ b/PEIS/Utils/Global.cs @@ -89,7 +89,7 @@ namespace PEIS.Utils switch (kind) { case "warn": - dr = MessageBox.Show(content, "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); + dr = MessageBox.Show(content, "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); break; case "err": diff --git a/PEIS/View/Exam/PartForm.cs b/PEIS/View/Exam/PartForm.cs index 7c2a734..b3b7756 100644 --- a/PEIS/View/Exam/PartForm.cs +++ b/PEIS/View/Exam/PartForm.cs @@ -1180,17 +1180,41 @@ namespace PEIS.View.Exam // 检验科判断项目是否完全出结果 if(_examPart.DeptCode == "3001") { - //var resultFeeItem = DAOHelp.GetDataBySQL($@"SELECT FeeItemName FROM Exam_Result WHERE PID = {_examPart.ID} AND DeptName LIKE '%医学检验科%' GROUP BY FeeItemName"); - //var examFeeItem = DAOHelp.GetDataBySQL($@"SELECT FeeItemName FROM Enrollment_FeeItem WHERE EID = {_patient.ID} and DeptCode = '3001'"); - - //if(resultFeeItem.Count != examFeeItem.Count) - //{ - // Msg("info", "请核对检验项目是否齐全后重试!"); - // return; - //} + var feeItem = new List(); + + var examFeeItem = DAOHelp.GetDataBySQL($@"SELECT FeeItemName FROM Enrollment_FeeItem WHERE EID = {_patient.ID} and DeptCode = '3001'"); + + var resultFeeItem = DAOHelp.GetDataBySQL($@"SELECT FeeItemName FROM Exam_Result WHERE PID = {_examPart.ID} GROUP BY FeeItemName"); + foreach (var item in resultFeeItem) + { + if (item.FeeItemName.Contains(",")) + { + var one = item.FeeItemName.Split(','); + foreach (var o in one) + { + feeItem.Add(new EnrollmentFeeItem() { FeeItemName = o} ); + } + }else if (item.FeeItemName.Contains(",")) + { + var two = item.FeeItemName.Split(','); + foreach (var t in two) + { + feeItem.Add(new EnrollmentFeeItem() { FeeItemName = t }); + } + } + else + { + feeItem.Add(new EnrollmentFeeItem() { FeeItemName = item.FeeItemName }); + } + } + + if (feeItem.Count != examFeeItem.Count) + { + Msg("info", "请核对检验项目是否齐全后重试!"); + return; + } } - Review?.Invoke(this, new Args { ID = _examPart.ID,