feat 电子餐券申请/使用记录查询
This commit is contained in:
@@ -162,4 +162,26 @@ public class BalancesController : ControllerBase
|
||||
{
|
||||
return await _balanceService.GetSupplementTrendsAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子餐券申请记录查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("oaemealvoucher")]
|
||||
public async Task<Pagination<OaEMealVoucherResponse>> GetOaEMealVoucherAsync([FromQuery] OaEMealVoucherRequest request)
|
||||
{
|
||||
return await _balanceService.GetOaEMealVoucherAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子餐券使用记录查询
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("oaemealvoucherdetail")]
|
||||
public async Task<Pagination<OaEMealVoucherDetailResponse>> GetOaEMealVoucherDetailAsync([FromQuery] OaEMealVoucherDetailRequest request)
|
||||
{
|
||||
return await _balanceService.GetOaEMealVoucherDetailAsync(request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Canteen.Order.Request
|
||||
{
|
||||
public class OaEMealVoucherDetailRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 餐券id
|
||||
/// </summary>
|
||||
public long OaEMealVoucherId { get; set; }
|
||||
}
|
||||
}
|
||||
14
Src/Dlhis.Canteen/Order/Request/OaEMealVoucherRequest.cs
Normal file
14
Src/Dlhis.Canteen/Order/Request/OaEMealVoucherRequest.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Canteen.Order.Request
|
||||
{
|
||||
public class OaEMealVoucherRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户学工号
|
||||
/// </summary>
|
||||
public string UserCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Canteen.Order.Response
|
||||
{
|
||||
public class OaEMealVoucherDetailResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public long VoucherId { get; set; }
|
||||
|
||||
public int Sequence { get; set; }
|
||||
|
||||
public string DinnerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 身份证
|
||||
/// </summary>
|
||||
public string IdNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用餐人
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐开始
|
||||
/// </summary>
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐结束
|
||||
/// </summary>
|
||||
public DateTime End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐天数
|
||||
/// </summary>
|
||||
public int Days { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
/// </summary>
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二维码
|
||||
/// </summary>
|
||||
public string QrCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 信息
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
100
Src/Dlhis.Canteen/Order/Response/OaEMealVoucherResponse.cs
Normal file
100
Src/Dlhis.Canteen/Order/Response/OaEMealVoucherResponse.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Canteen.Order.Response
|
||||
{
|
||||
public class OaEMealVoucherResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请人工号
|
||||
/// </summary>
|
||||
public string UserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请人名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基地代码
|
||||
/// </summary>
|
||||
public string TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基地名称
|
||||
/// </summary>
|
||||
public string TenantName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心
|
||||
/// </summary>
|
||||
public string CostId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心名称
|
||||
/// </summary>
|
||||
public string CostName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来宾公司
|
||||
/// </summary>
|
||||
public string Company { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系人
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来宾人数
|
||||
/// </summary>
|
||||
public int Num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐食堂
|
||||
/// </summary>
|
||||
public string Canteen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐事由
|
||||
/// </summary>
|
||||
public string Reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐次
|
||||
/// </summary>
|
||||
public string CanteenShift { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// oa流程id
|
||||
/// </summary>
|
||||
public string OaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门号
|
||||
/// </summary>
|
||||
public string DepartmentNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
public string DepartmentName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 申请日期
|
||||
/// </summary>
|
||||
public DateTime LogDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -30,4 +30,8 @@ public interface IBalanceService : IScopeDependency
|
||||
Task<List<ConsumptionTrendResponse>> GetConsumptionTrendsAsync(ConsumptionTrendRequest request);
|
||||
|
||||
Task<List<ConsumptionTrendResponse>> GetSupplementTrendsAsync(ConsumptionTrendRequest request);
|
||||
|
||||
Task<Pagination<OaEMealVoucherResponse>> GetOaEMealVoucherAsync([FromQuery] OaEMealVoucherRequest request);
|
||||
|
||||
Task<Pagination<OaEMealVoucherDetailResponse>> GetOaEMealVoucherDetailAsync([FromQuery] OaEMealVoucherDetailRequest request);
|
||||
}
|
||||
|
||||
@@ -642,6 +642,25 @@ public class BalanceService : IBalanceService
|
||||
return new List<ConsumptionTrendResponse>();
|
||||
}
|
||||
|
||||
public async Task<Pagination<OaEMealVoucherResponse>> GetOaEMealVoucherAsync(OaEMealVoucherRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<OaEMealVoucherEntity>()
|
||||
.Where(x => x.UserCode == request.UserCode)
|
||||
.Select<OaEMealVoucherResponse>()
|
||||
.ToPageListAsync(request);
|
||||
return page;
|
||||
}
|
||||
|
||||
public async Task<Pagination<OaEMealVoucherDetailResponse>> GetOaEMealVoucherDetailAsync(OaEMealVoucherDetailRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<OaEMealVoucherDetailEntity>()
|
||||
.Where(x => x.VoucherId == request.OaEMealVoucherId)
|
||||
.Select<OaEMealVoucherDetailResponse>()
|
||||
.ToPageListAsync(request);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前年所有月
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user