diff --git a/Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementRecordController.cs b/Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementsRecordController.cs
similarity index 86%
rename from Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementRecordController.cs
rename to Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementsRecordController.cs
index 5e0a8418..a56b1519 100644
--- a/Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementRecordController.cs
+++ b/Src/Dlhis.Canteen/MealSupplementRecord/Controller/MealSupplementsRecordController.cs
@@ -13,11 +13,11 @@ namespace Dlhis.Canteen.MealSupplementRecord.Controller;
[Authorize]
[Route("api/[controller]")]
[ApiController]
-public class MealSupplementRecordController
+public class MealSupplementsRecordController
{
private readonly IMealSupplementRecordService _mealSupplementRecordService;
- public MealSupplementRecordController(IMealSupplementRecordService mealSupplementRecordService)
+ public MealSupplementsRecordController(IMealSupplementRecordService mealSupplementRecordService)
{
_mealSupplementRecordService = mealSupplementRecordService;
}
diff --git a/Src/Dlhis.Canteen/MealSupplementRecord/Request/MealSupplementRecordRequest.cs b/Src/Dlhis.Canteen/MealSupplementRecord/Request/MealSupplementRecordRequest.cs
index 93d14930..a23341ab 100644
--- a/Src/Dlhis.Canteen/MealSupplementRecord/Request/MealSupplementRecordRequest.cs
+++ b/Src/Dlhis.Canteen/MealSupplementRecord/Request/MealSupplementRecordRequest.cs
@@ -1,8 +1,12 @@
-using Kurisu.Core.DataAccess.Dto;
+using Kurisu.Core.CustomClass;
+using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.Canteen.MealSupplementRecord.Request;
public class MealSupplementRecordRequest : PageDto
{
-
+ ///
+ /// 餐补日期范围
+ ///
+ public DateTimePeriod DateTimePeriod { get; set; }
}
diff --git a/Src/Dlhis.Canteen/MealSupplementRecord/Services/Implements/MealSupplementRecordService.cs b/Src/Dlhis.Canteen/MealSupplementRecord/Services/Implements/MealSupplementRecordService.cs
index 2d1630ee..69d28cd3 100644
--- a/Src/Dlhis.Canteen/MealSupplementRecord/Services/Implements/MealSupplementRecordService.cs
+++ b/Src/Dlhis.Canteen/MealSupplementRecord/Services/Implements/MealSupplementRecordService.cs
@@ -1,6 +1,5 @@
using Dlhis.Canteen.MealSupplementRecord.Request;
using Dlhis.Canteen.MealSupplementRecord.Response;
-using Dlhis.Canteen.MealSupplementRecord.Services;
using Dlhis.Entity.Basic.Entity;
using Dlhis.Entity.Canteen.Entities;
using Kurisu.AspNetCore.Utils.Extensions;
@@ -25,6 +24,8 @@ public class MealSupplementRecordService : IMealSupplementRecordService
var page = await _dbContext.Queryable()
.LeftJoin((x, ga) => x.Code == ga.Code)
.WhereIF(request.Search.IsPresent(), (x, ga) => x.Code == request.Search || ga.Name.Contains(request.Search))
+ .WhereIF(request.DateTimePeriod?.Start.HasValue == true && request.DateTimePeriod?.End.HasValue == true,
+ x => x.Date >= request.DateTimePeriod.Start && x.Date <= request.DateTimePeriod.End)
.Select((x, ga) => new MealSupplementRecordResponse
{
Amount = x.Amount,