feat 餐补余额导入

This commit is contained in:
2024-05-22 16:39:08 +08:00
parent af6ef69091
commit 5383410b77
5 changed files with 112 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace Dlhis.Canteen.MealSupplementRecord.Request;
public class MealSupplementInitImportRequest
{
[Required(ErrorMessage = "工号不能为空")]
public string Code { get; set; }
/// <summary>
/// 余额
/// </summary>
[Range(1, int.MaxValue, ErrorMessage = "余额有误")]
public decimal Balance { get; set; }
}

View File

@@ -9,8 +9,11 @@ public class MealSupplementRecordMyRequest : IValidatableObject
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
if (SearchDateTimePeriod.End.HasValue)
{
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
}
yield break;
}
}
}