1、拼音码模糊检索,2、结论词检索忽略建议

msfy
lsm 9 months ago
parent a3b9d14117
commit 6ab4cbed66
  1. 14
      PEIS/Model/Enrollment/EnrollmentPatientModel.cs
  2. 2
      PEIS/Model/Exam/PartModel.cs
  3. 2
      PEIS/Model/Exam/TotalModel.cs
  4. 2
      PEIS/Model/ReportModel.cs
  5. 2
      PEIS/View/Enrollment/EnrollmentOrgForm.cs
  6. 4
      PEIS/View/Enrollment/EnrollmentPersonForm.cs
  7. 3
      PEIS/View/Setting/ConclusionForm.cs

@ -78,6 +78,7 @@ namespace PEIS.Model.Enrollment
c.DeptName AS GroupName, c.DeptName AS GroupName,
a.SignTime, a.SignTime,
a.Tel1, a.Tel1,
a.SpellCode,
CASE WHEN a.SignTime IS NULL CASE WHEN a.SignTime IS NULL
THEN NULL THEN NULL
ELSE '' ELSE ''
@ -213,7 +214,8 @@ namespace PEIS.Model.Enrollment
WHEN SignTime IS NOT NULL THEN '2' WHEN SignTime IS NOT NULL THEN '2'
WHEN SignTime IS NULL THEN '1' WHEN SignTime IS NULL THEN '1'
END AS Signer, END AS Signer,
FinishTime FinishTime,
SpellCode
FROM FROM
Enrollment_Patient Enrollment_Patient
WHERE WHERE
@ -243,11 +245,12 @@ namespace PEIS.Model.Enrollment
WHEN SignTime IS NOT NULL THEN '2' WHEN SignTime IS NOT NULL THEN '2'
WHEN SignTime IS NULL THEN '1' WHEN SignTime IS NULL THEN '1'
END AS Signer, END AS Signer,
FinishTime FinishTime,
SpellCode
FROM FROM
Enrollment_Patient Enrollment_Patient
WHERE WHERE
( Name like '%{name}%' or id like '%{name}%') ( Name like '%{name}%' or id like '%{name}%' or SpellCode like '{name}%')
AND OEID IS NULL AND OEID IS NULL
AND PID IS NOT NULL AND PID IS NOT NULL
AND WeChatStatus IN ( 0, 1 ) AND WeChatStatus IN ( 0, 1 )
@ -288,11 +291,12 @@ namespace PEIS.Model.Enrollment
CreateTime, CreateTime,
SignTime, SignTime,
OEID, OEID,
OrgName OrgName,
SpellCode
FROM FROM
Enrollment_Patient Enrollment_Patient
WHERE 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 PID IS NOT NULL
AND WeChatStatus IN ( 0, 1 ) AND WeChatStatus IN ( 0, 1 )
ORDER BY ORDER BY

@ -84,7 +84,7 @@ namespace PEIS.Model
if (!string.IsNullOrWhiteSpace(team)) if (!string.IsNullOrWhiteSpace(team))
sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'"; sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'";
if (!string.IsNullOrWhiteSpace(info)) 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<EnrollmentPatient>(sql).OrderByDescending(o => o.SignTime).ToList(); var data = DAOHelp.GetDataBySQL<EnrollmentPatient>(sql).OrderByDescending(o => o.SignTime).ToList();
return data; return data;

@ -63,7 +63,7 @@ namespace PEIS.Model
if (!string.IsNullOrWhiteSpace(team)) if (!string.IsNullOrWhiteSpace(team))
sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'"; sql += long.TryParse(team, out _) ? $@" AND OEID ={team}" : $@"AND OrgName LIKE '%{team}%'";
if (!string.IsNullOrWhiteSpace(info)) 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<EnrollmentPatient>(sql).Distinct().OrderByDescending(o => o.SignTime).ToList(); return DAOHelp.GetDataBySQL<EnrollmentPatient>(sql).Distinct().OrderByDescending(o => o.SignTime).ToList();
} }

@ -103,7 +103,7 @@ namespace PEIS.Model
CASE WHEN Printer IS NOT NULL AND LastPrinter IS NOT NULL THEN LastPrinter CASE WHEN Printer IS NOT NULL AND LastPrinter IS NOT NULL THEN LastPrinter
ELSE Printer ELSE Printer
END AS 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");
} }
} }

@ -821,7 +821,7 @@ namespace PEIS.View.Enrollment
private void PatientSearch_TextChanged(object sender, EventArgs e) // 团体成员检索 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(); DgvEnrollment.ExpandAllGroups();
} }

@ -770,7 +770,7 @@ namespace PEIS.View.Enrollment
items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : ""); items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : "");
Invoke(new Action(() => _lstRegItems = items)); Invoke(new Action(() => _lstRegItems = items));
Invoke(new Action(() => { DgcRegItem.DataSource = null; DgcRegItem2.DataSource = null; })); 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(() => Invoke(new Action(() =>
{ {
var list = new List<EnrollmentPatient>(); var list = new List<EnrollmentPatient>();
@ -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) 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(() => OnGetRegInfo(_chooseRegItem.ID)));
Invoke(new Action(() => OnGetExamFeeItem(_chooseRegItem.ID, "0"))); Invoke(new Action(() => OnGetExamFeeItem(_chooseRegItem.ID, "0")));
Invoke(new Action(() => OnGetCheckCost(_chooseRegItem.ID))); Invoke(new Action(() => OnGetCheckCost(_chooseRegItem.ID)));

@ -54,8 +54,7 @@ namespace PEIS.View.Setting
DgcConclusion.SetDataSource(string.IsNullOrEmpty(search) DgcConclusion.SetDataSource(string.IsNullOrEmpty(search)
? _lstConclusion ? _lstConclusion
: _lstConclusion.Where(a => : _lstConclusion.Where(a =>
(a.ConclusionName != null && a.ConclusionName.Contains(search)) || (a.ConclusionName != null && a.ConclusionName.Contains(search))).ToList());
(a.Suggestion != null && a.Suggestion.Contains(search))).ToList());
} }
/// <summary> /// <summary>

Loading…
Cancel
Save