From 6ab4cbed665cc5d40493f224ca31037259b958bb Mon Sep 17 00:00:00 2001 From: lsm Date: Tue, 20 Aug 2024 11:23:27 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=8B=BC=E9=9F=B3=E7=A0=81=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E6=A3=80=E7=B4=A2=EF=BC=8C2=E3=80=81=E7=BB=93?= =?UTF-8?q?=E8=AE=BA=E8=AF=8D=E6=A3=80=E7=B4=A2=E5=BF=BD=E7=95=A5=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/Model/Enrollment/EnrollmentPatientModel.cs | 14 +++++++++----- PEIS/Model/Exam/PartModel.cs | 2 +- PEIS/Model/Exam/TotalModel.cs | 2 +- PEIS/Model/ReportModel.cs | 2 +- PEIS/View/Enrollment/EnrollmentOrgForm.cs | 2 +- PEIS/View/Enrollment/EnrollmentPersonForm.cs | 4 ++-- PEIS/View/Setting/ConclusionForm.cs | 3 +-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs index d577a95..7b3ccd8 100644 --- a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs @@ -78,6 +78,7 @@ namespace PEIS.Model.Enrollment c.DeptName AS GroupName, a.SignTime, a.Tel1, + a.SpellCode, CASE WHEN a.SignTime IS NULL THEN NULL ELSE '已发送' @@ -213,7 +214,8 @@ namespace PEIS.Model.Enrollment WHEN SignTime IS NOT NULL THEN '2' WHEN SignTime IS NULL THEN '1' END AS Signer, - FinishTime + FinishTime, + SpellCode FROM Enrollment_Patient WHERE @@ -243,11 +245,12 @@ namespace PEIS.Model.Enrollment WHEN SignTime IS NOT NULL THEN '2' WHEN SignTime IS NULL THEN '1' END AS Signer, - FinishTime + FinishTime, + SpellCode FROM Enrollment_Patient WHERE - ( Name like '%{name}%' or id like '%{name}%') + ( Name like '%{name}%' or id like '%{name}%' or SpellCode like '{name}%') AND OEID IS NULL AND PID IS NOT NULL AND WeChatStatus IN ( 0, 1 ) @@ -288,11 +291,12 @@ namespace PEIS.Model.Enrollment CreateTime, SignTime, OEID, - OrgName + OrgName, + SpellCode FROM Enrollment_Patient WHERE - ( Name like '%{name}%' or id like '%{name}%') + ( Name like '%{name}%' or id like '%{name}%' or SpellCode like '{name}%') AND PID IS NOT NULL AND WeChatStatus IN ( 0, 1 ) ORDER BY diff --git a/PEIS/Model/Exam/PartModel.cs b/PEIS/Model/Exam/PartModel.cs index f306378..e009315 100644 --- a/PEIS/Model/Exam/PartModel.cs +++ b/PEIS/Model/Exam/PartModel.cs @@ -84,7 +84,7 @@ namespace PEIS.Model if (!string.IsNullOrWhiteSpace(team)) sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'"; if (!string.IsNullOrWhiteSpace(info)) - sql += long.TryParse(info, out _) ? $@" AND EID ={info}" : $@"AND Name LIKE '%{info}%'"; + sql += long.TryParse(info, out _) ? $@" AND EID ={info}" : $@"AND ( Name LIKE '%{info}%' or SpellCode like '{info}%' )"; var data = DAOHelp.GetDataBySQL(sql).OrderByDescending(o => o.SignTime).ToList(); return data; diff --git a/PEIS/Model/Exam/TotalModel.cs b/PEIS/Model/Exam/TotalModel.cs index ecff8db..51ffed9 100644 --- a/PEIS/Model/Exam/TotalModel.cs +++ b/PEIS/Model/Exam/TotalModel.cs @@ -63,7 +63,7 @@ namespace PEIS.Model if (!string.IsNullOrWhiteSpace(team)) sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'"; if (!string.IsNullOrWhiteSpace(info)) - sql += long.TryParse(info, out _) ? $@" AND EID ={info}" : $@"AND Name LIKE '%{info}%'"; + sql += long.TryParse(info, out _) ? $@" AND EID ={info}" : $@"AND ( Name LIKE '%{info}%' or SpellCode like '{info}%' )"; return DAOHelp.GetDataBySQL(sql).Distinct().OrderByDescending(o => o.SignTime).ToList(); } diff --git a/PEIS/Model/ReportModel.cs b/PEIS/Model/ReportModel.cs index 6163a89..f736dd4 100644 --- a/PEIS/Model/ReportModel.cs +++ b/PEIS/Model/ReportModel.cs @@ -103,7 +103,7 @@ namespace PEIS.Model CASE WHEN Printer IS NOT NULL AND LastPrinter IS NOT NULL THEN LastPrinter ELSE Printer END AS Printer - FROM Enrollment_Patient a WHERE (name like '%{name}%' or ID like '%{name}%') AND FinishTime is not null"); + FROM Enrollment_Patient a WHERE (name like '%{name}%' or ID like '%{name}%' or SpellCode like '{name}%') AND FinishTime is not null"); } } diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs index 511637b..d7f77bd 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs @@ -821,7 +821,7 @@ namespace PEIS.View.Enrollment private void PatientSearch_TextChanged(object sender, EventArgs e) // 团体成员检索 { - DgcEnrollment.DataSource = _lstEnrollmentPatient.Where(a => a?.Name.Contains(PatientSearch.Text) == true || a?.ID.ToString().Contains(PatientSearch.Text) == true); + DgcEnrollment.DataSource = _lstEnrollmentPatient.Where(a => a?.Name.Contains(PatientSearch.Text) == true || a?.ID.ToString().Contains(PatientSearch.Text) == true || a?.SpellCode?.Contains(PatientSearch.Text) == true); DgvEnrollment.ExpandAllGroups(); } diff --git a/PEIS/View/Enrollment/EnrollmentPersonForm.cs b/PEIS/View/Enrollment/EnrollmentPersonForm.cs index a86fa90..d81b178 100644 --- a/PEIS/View/Enrollment/EnrollmentPersonForm.cs +++ b/PEIS/View/Enrollment/EnrollmentPersonForm.cs @@ -770,7 +770,7 @@ namespace PEIS.View.Enrollment items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : ""); Invoke(new Action(() => _lstRegItems = items)); Invoke(new Action(() => { DgcRegItem.DataSource = null; DgcRegItem2.DataSource = null; })); - Invoke(new Action(() => { DgcRegItem.DataSource = _lstRegItems.Where(a => a?.Name.Contains(NameSearch.Text) == true || a?.ID.ToString().Contains(NameSearch.Text) == true); })); + Invoke(new Action(() => { DgcRegItem.DataSource = _lstRegItems.Where(a => a?.Name.Contains(NameSearch.Text) == true || a?.ID.ToString().Contains(NameSearch.Text) == true || a?.SpellCode?.Contains(NameSearch.Text) == true); })); Invoke(new Action(() => { var list = new List(); @@ -779,7 +779,7 @@ namespace PEIS.View.Enrollment if (_lstRegItems.Where(a => a?.Name.Contains(NameSearch.Text) == true || a?.ID.ToString().Contains(NameSearch.Text) == true).Count() != 0) { - Invoke(new Action(() => _chooseRegItem = _lstRegItems.Where(a => a?.Name.Contains(NameSearch.Text) == true || a?.ID.ToString().Contains(NameSearch.Text) == true).ToList()[0])); + Invoke(new Action(() => _chooseRegItem = _lstRegItems.Where(a => a?.Name.Contains(NameSearch.Text) == true || a?.ID.ToString().Contains(NameSearch.Text) == true || a?.SpellCode?.Contains(NameSearch.Text) == true).ToList()[0])); Invoke(new Action(() => OnGetRegInfo(_chooseRegItem.ID))); Invoke(new Action(() => OnGetExamFeeItem(_chooseRegItem.ID, "0"))); Invoke(new Action(() => OnGetCheckCost(_chooseRegItem.ID))); diff --git a/PEIS/View/Setting/ConclusionForm.cs b/PEIS/View/Setting/ConclusionForm.cs index 777ad71..59568ef 100644 --- a/PEIS/View/Setting/ConclusionForm.cs +++ b/PEIS/View/Setting/ConclusionForm.cs @@ -54,8 +54,7 @@ namespace PEIS.View.Setting DgcConclusion.SetDataSource(string.IsNullOrEmpty(search) ? _lstConclusion : _lstConclusion.Where(a => - (a.ConclusionName != null && a.ConclusionName.Contains(search)) || - (a.Suggestion != null && a.Suggestion.Contains(search))).ToList()); + (a.ConclusionName != null && a.ConclusionName.Contains(search))).ToList()); } ///