|
@@ -179,28 +179,23 @@ namespace OASystem.Infrastructure.Repositories.Resource
|
|
|
/// </summary>
|
|
|
/// <param name="diId"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<Result> EntryAndExitTips(int diId)
|
|
|
+ public async Task<EntryAndExitTipsView[]> EntryAndExitTips(int diId)
|
|
|
{
|
|
|
- if (diId < 1) return new Result() { Code = -1, Msg = "请输入有效的DiId参数!" };
|
|
|
+ if (diId < 1) return Array.Empty<EntryAndExitTipsView>();
|
|
|
|
|
|
- Air_TicketBlackCode _TicketBlackCode = await _sqlSugar.Queryable<Air_TicketBlackCode>().FirstAsync(a => a.IsDel == 0 && a.DiId == diId);
|
|
|
+ var airFees = await _sqlSugar.Queryable<Air_TicketBlackCode>().Where(a => a.IsDel == 0 && a.DiId == diId).ToListAsync();
|
|
|
|
|
|
- if (_TicketBlackCode != null)
|
|
|
+ if (airFees.Any())
|
|
|
{
|
|
|
- return new Result()
|
|
|
+ return airFees.OrderByDescending(x => x.ECPrice + x.BCPrice).Select(x => new EntryAndExitTipsView
|
|
|
{
|
|
|
- Code = 0,
|
|
|
- Msg = "操作成功!",
|
|
|
- Data = new
|
|
|
- {
|
|
|
- jjcCurrentRate = _TicketBlackCode.ECPrice,
|
|
|
- gwcCurrentRate = _TicketBlackCode.BCPrice,
|
|
|
- Remark = $"经济舱全价:{_TicketBlackCode.ECPrice.ToString("#0.00")} 元/人 公务舱全价:{_TicketBlackCode.BCPrice.ToString("#0.00")} 元/人"
|
|
|
- }
|
|
|
- };
|
|
|
+ jjcCurrentRate = x.ECPrice,
|
|
|
+ gwcCurrentRate = x.BCPrice,
|
|
|
+ remark = $"经济舱全价:{x.ECPrice.ToString("#0.00")} 元/人 公务舱全价:{x.BCPrice.ToString("#0.00")} 元/人"
|
|
|
+ }).ToArray();
|
|
|
}
|
|
|
|
|
|
- return new Result() { Code = -1,Msg="操作失败" };
|
|
|
+ return Array.Empty<EntryAndExitTipsView>();
|
|
|
}
|
|
|
|
|
|
public Result DescBlackToVisa(int diid)
|