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

dhzzyy
lsm 11 months ago
parent a9987b8f02
commit 7af5202633
  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. 4
      PEIS/View/Enrollment/EnrollmentOrgForm.cs
  6. 8
      PEIS/View/Enrollment/EnrollmentPersonForm.cs
  7. 3
      PEIS/View/Setting/ConclusionForm.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 ''
@ -211,7 +212,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
@ -241,11 +243,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 )
@ -286,11 +289,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

@ -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<EnrollmentPatient>(sql).OrderByDescending(o => o.SignTime).ToList();
return data;

@ -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<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
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");
}
}

@ -684,7 +684,7 @@ namespace PEIS.View.Enrollment
try
{
var items = new List<EnrollmentFeeItem>();
_lstEnrollmentFeeItem.Where(w => w.OrderNo != null && !w.IsHide && !(w.DeptName.Contains("金域"))).GroupBy(g => g.DeptCode).ForEach(dept =>
_lstEnrollmentFeeItem.Where(w => w.OrderNo != null && !w.IsHide ).GroupBy(g => g.DeptCode).ForEach(dept =>
{
var item = new EnrollmentFeeItem()
{
@ -820,7 +820,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();
}

@ -771,15 +771,15 @@ namespace PEIS.View.Enrollment
public event EventHandler<Args<dynamic>> GetRegItems;
public void ShowRegItems(List<EnrollmentPatient> items, int code)
{
if (code == 0) {
if (code == 0) {
items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : "");
Invoke(new Action(() => _lstRegItems = items));
Invoke(new Action(() => DgcRegItem.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); }));
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)));
@ -796,7 +796,7 @@ namespace PEIS.View.Enrollment
{
Invoke(new Action(() => _lstRegItems2 = items));
Invoke(new Action(() => DgcRegItem2.DataSource = null));
Invoke(new Action(() => { DgcRegItem2.DataSource = _lstRegItems2.Where(a => a?.Name.Contains(NameSearch2.Text) == true || a?.ID.ToString().Contains(NameSearch2.Text) == true); }));
Invoke(new Action(() => { DgcRegItem2.DataSource = _lstRegItems2.Where(a => a?.Name.Contains(NameSearch2.Text) == true || a?.ID.ToString().Contains(NameSearch2.Text) == true || a?.SpellCode?.Contains(NameSearch2.Text) == true); }));
if (_lstRegItems2.Where(a => a?.Name.Contains(NameSearch2.Text) == true || a?.ID.ToString().Contains(NameSearch2.Text) == true).Count() == 0) DgcCopyItem.DataSource = _lstCopyFeeItem = null;
}

@ -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());
}
/// <summary>

Loading…
Cancel
Save