fix 营业点明细查询支持多选
This commit is contained in:
@@ -20,10 +20,14 @@ public class BalanceRecordPageDetailRequest : PageDto, IValidatableObject
|
||||
/// <summary>
|
||||
/// 餐次 ShiftEnumType
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(ShiftEnumType))]
|
||||
public ShiftEnumType? ShiftType { get; set; }
|
||||
public List<ShiftEnumType?> ShiftTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次 ShiftEnumType
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(ShiftEnumType))]
|
||||
public ShiftEnumType? ShiftType { get; set; }
|
||||
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (SearchDateTimePeriod?.End != null)
|
||||
@@ -31,6 +35,13 @@ public class BalanceRecordPageDetailRequest : PageDto, IValidatableObject
|
||||
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
|
||||
}
|
||||
|
||||
if (ShiftType.HasValue)
|
||||
{
|
||||
ShiftTypes ??= new List<ShiftEnumType?>();
|
||||
ShiftTypes.Add(ShiftType);
|
||||
ShiftTypes = ShiftTypes.Distinct().ToList();
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user