diff --git a/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs b/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs index e2c1547f..c98f9a69 100644 --- a/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs +++ b/src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs @@ -1116,8 +1116,8 @@ namespace Shentun.Peis.CustomerReports var sumCount = queryGroup.Count(); - resultListDto.MaleCount = queryGroup.Count(c => c.Key.SexId == 'M'); - resultListDto.FemaleCount = queryGroup.Count(c => c.Key.SexId == 'F'); + resultListDto.RegisterMaleCount = queryGroup.Count(c => c.Key.SexId == 'M'); + resultListDto.RegisterFemaleCount = queryGroup.Count(c => c.Key.SexId == 'F'); List patientRegisterList = new List(); @@ -1234,8 +1234,8 @@ namespace Shentun.Peis.CustomerReports resultListDto.StartDate = DataHelper.ConversionDateShortToString(input.CustomerOrgs.Where(m => !string.IsNullOrWhiteSpace(m.StartDate)).Select(s => Convert.ToDateTime(s.StartDate)).Min()); resultListDto.EndDate = DataHelper.ConversionDateShortToString(input.CustomerOrgs.Where(m => !string.IsNullOrWhiteSpace(m.EndDate)).Select(s => Convert.ToDateTime(s.EndDate)).Max()); - //resultListDto.MaleCount = patientRegisters.Count(c => c.SexId == 'M'); - //resultListDto.FemaleCount = patientRegisters.Count(c => c.SexId == 'F'); + resultListDto.MaleCount = patientRegisterList.Distinct().Count(c => c.SexId == 'M'); + resultListDto.FemaleCount = patientRegisterList.Distinct().Count(c => c.SexId == 'F'); resultListDto.Details = entListDto; return resultListDto;