From 339bf479966f97a36ad4246ff08fe5bb3ac0f7c2 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Fri, 19 Apr 2024 11:25:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerReports/CustomerReportAppService.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs b/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs index cd9a378..7fc4c5d 100644 --- a/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs +++ b/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs @@ -873,7 +873,8 @@ namespace Shentun.Peis.CustomerReports if (input.CustomerOrgs.Any()) { - query = query.Where(m => input.CustomerOrgs.Where(m => m.CustomerOrgRegisterId != null && m.CustomerOrgRegisterId != Guid.Empty).Select(s => s.CustomerOrgRegisterId).Contains(m.a.Id)); + var customerOrgRegisterIds = input.CustomerOrgs.Where(mm => mm.CustomerOrgRegisterId != null && mm.CustomerOrgRegisterId != GuidFlag.PersonCustomerOrgRegisterId).Select(s => s.CustomerOrgRegisterId.Value).ToList(); + query = query.Where(m => customerOrgRegisterIds.Contains(m.a.Id)); } var entlist = new GetUnitPhysicalExaminationReportStandardDto @@ -924,7 +925,8 @@ namespace Shentun.Peis.CustomerReports if (input.CustomerOrgs.Any()) { - query = query.Where(m => input.CustomerOrgs.Where(m => m.CustomerOrgRegisterId != null && m.CustomerOrgRegisterId != Guid.Empty).Select(s => s.CustomerOrgRegisterId).Contains(m.a.Id)); + var customerOrgRegisterIds = input.CustomerOrgs.Where(mm => mm.CustomerOrgRegisterId != null && mm.CustomerOrgRegisterId != GuidFlag.PersonCustomerOrgRegisterId).Select(s => s.CustomerOrgRegisterId.Value).ToList(); + query = query.Where(m => customerOrgRegisterIds.Contains(m.a.Id)); } var entlist = new GetUnitPhysicalExaminationReportReduceDto @@ -2061,7 +2063,7 @@ namespace Shentun.Peis.CustomerReports var CustomerOrgIds = await _customerOrgManager.GetCustomerOrgChildrenId(item.CustomerOrgId.Value); sumquery = sumquery.Where(m => CustomerOrgIds.Contains(m.a.CustomerOrgId)); } - if ( !string.IsNullOrEmpty(item.StartDate) && !string.IsNullOrEmpty(item.EndDate)) + if (!string.IsNullOrEmpty(item.StartDate) && !string.IsNullOrEmpty(item.EndDate)) { if (item.DateType == '1') { @@ -2175,7 +2177,7 @@ namespace Shentun.Peis.CustomerReports var CustomerOrgIds = await _customerOrgManager.GetCustomerOrgChildrenId(item.CustomerOrgId.Value); sumquery = sumquery.Where(m => CustomerOrgIds.Contains(m.a.CustomerOrgId)); } - if ( !string.IsNullOrEmpty(item.StartDate) && !string.IsNullOrEmpty(item.EndDate)) + if (!string.IsNullOrEmpty(item.StartDate) && !string.IsNullOrEmpty(item.EndDate)) { if (item.DateType == '1') {