|
|
|
@ -129,6 +129,27 @@ namespace Shentun.Peis.PeisReports |
|
|
|
var sumquery = query; |
|
|
|
|
|
|
|
|
|
|
|
var isIgnoreOtherConditions = false; |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.PatientRegisterNo)) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.a.PatientRegisterNo == input.PatientRegisterNo); |
|
|
|
isIgnoreOtherConditions = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.PatientNo)) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.ab.PatientNo == input.PatientNo); |
|
|
|
isIgnoreOtherConditions = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (isIgnoreOtherConditions) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.a.CompleteFlag != PatientRegisterCompleteFlag.PreRegistration); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
if (input.CustomerOrgs.Any()) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -216,16 +237,6 @@ namespace Shentun.Peis.PeisReports |
|
|
|
sumquery = sumquery.Where(m => m.a.PatientName != null && m.a.PatientName.Contains(input.PatientName)); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.PatientRegisterNo)) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.a.PatientRegisterNo == input.PatientRegisterNo); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.PatientNo)) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.ab.PatientNo == input.PatientNo); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.phone)) |
|
|
|
{ |
|
|
|
sumquery = sumquery.Where(m => m.ab.MobileTelephone == input.phone || m.ab.Telephone == input.phone); |
|
|
|
@ -277,7 +288,7 @@ namespace Shentun.Peis.PeisReports |
|
|
|
sumquery = sumquery.Where(m => m.ab.IdNo == input.IdNo); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var sumqueryGroup = sumquery.ToList().GroupBy(g => g.a.Id); |
|
|
|
|