diff --git a/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs b/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs index c08999bd..114fc406 100644 --- a/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs +++ b/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs @@ -474,9 +474,10 @@ namespace Shentun.Peis.SumSummaryReports .ThenInclude(x => x.SumSummaryContents) .Where(m => m.PatientId == patientRegisterEntity.PatientId && m.SumSummaryHeaders.Count > 0 + && m.MedicalTimes < patientRegisterEntity.MedicalTimes && m.CompleteFlag != PatientRegisterCompleteFlag.PreRegistration) .OrderByDescending(m => m.MedicalTimes).ThenByDescending(m => m.MedicalStartDate) - .ToList().Skip(1).Take(historySummaryYearsLimitInt); + .ToList().Take(historySummaryYearsLimitInt); if (entlist.Any()) {