fix 餐补查询代码调整
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Canteen.Dishes.Request
|
||||
{
|
||||
public class OaEMealVoucherDetailRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 餐券id
|
||||
/// </summary>
|
||||
public long? OaEMealVoucherId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Canteen.Dishes.Request
|
||||
{
|
||||
public class OaEMealVoucherRequest : PageDto
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
namespace Dlhis.Canteen.Order.Response;
|
||||
|
||||
namespace Dlhis.Canteen.Order.Response
|
||||
namespace Dlhis.Canteen.Order.Response;
|
||||
|
||||
public class BalanceRecordByUserResponse
|
||||
{
|
||||
public class BalanceRecordByUserResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
public string No { get; set; }
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
@@ -49,93 +49,13 @@ namespace Dlhis.Canteen.Order.Response
|
||||
/// </summary>
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费时间
|
||||
/// </summary>
|
||||
public DateTime CostDateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
public Guid? BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐别
|
||||
/// </summary>
|
||||
public Guid? BusinessShiftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次
|
||||
/// </summary>
|
||||
public ShiftEnumType? ShiftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次CN
|
||||
/// </summary>
|
||||
public string ShiftTypeCN => ShiftType.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// 所属成本日期
|
||||
/// </summary>
|
||||
public DateTime CostDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费机器唯一信息
|
||||
/// </summary>
|
||||
public string DeviceUniqueNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐补月份
|
||||
/// </summary>
|
||||
public string SubsidiesFromMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ip
|
||||
/// </summary>
|
||||
public string IP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心
|
||||
/// </summary>
|
||||
public string CostId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费者所在基地
|
||||
/// </summary>
|
||||
public string OriginTenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本计算是否允许跨基地范围
|
||||
/// </summary>
|
||||
public bool IsCostCrossTenant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据状态
|
||||
/// </summary>
|
||||
public BalanceRecordStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据状态CN
|
||||
/// </summary>
|
||||
public string StatusCN => Status.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// 消费时间
|
||||
/// </summary>
|
||||
public DateTime CostDateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐饮应用类型
|
||||
/// </summary>
|
||||
public CanteenApplicaitonTypeEnumType ApplicationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐饮应用类型CN
|
||||
/// </summary>
|
||||
public string ApplicationTypeCN => ApplicationType.GetDescription();
|
||||
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Dlhis.Common.ApiLog.Services
|
||||
}
|
||||
|
||||
public async Task<Pagination<ApiLogResponse>> GetLogsAsync(ApiLogRequest request)
|
||||
{
|
||||
{
|
||||
var logs = await _dbContext.ChangeDb("log").Queryable<ApiLogEntity>()
|
||||
.WhereIF(request.Search.IsPresent(), x => x.Message.Contains(request.Search))
|
||||
.WhereIF(request.Level.HasValue, x => x.Level == request.Level)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
using Dlhis.Common.Request;
|
||||
using Dlhis.Common.Response;
|
||||
using Dlhis.Common.Services;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Dlhis.Common.MealSupplementRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// 餐补控制器
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class MealSupplementRecordController
|
||||
{
|
||||
private readonly IMealSupplementRecordService _mealSupplementRecordService;
|
||||
|
||||
public MealSupplementRecordController(IMealSupplementRecordService mealSupplementRecordService)
|
||||
{
|
||||
_mealSupplementRecordService = mealSupplementRecordService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 餐补分页
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("mealSupplementRecordPage")]
|
||||
public async Task<Pagination<MealSupplementRecordResponse>> MealSupplementRecordPageAsync([FromQuery]MealSupplementRecordRequest request)
|
||||
{
|
||||
return await _mealSupplementRecordService.MealSupplementRecordPageAsync(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Common.Request
|
||||
{
|
||||
public class MealSupplementRecordRequest : PageDto
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using SqlSugar.DbConvert;
|
||||
using SqlSugar;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
|
||||
namespace Dlhis.Common.Response
|
||||
{
|
||||
public class MealSupplementRecordResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一号
|
||||
/// </summary>
|
||||
public string UniqueId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工号
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐补状态
|
||||
/// </summary>
|
||||
public MealSupplementStatusEnumtype Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐补状态CN
|
||||
/// </summary>
|
||||
public string StatusCN => Status.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// 考勤日期
|
||||
/// </summary>
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地
|
||||
/// </summary>
|
||||
public string Workplace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 厂区
|
||||
/// </summary>
|
||||
public string Factory { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐补
|
||||
/// </summary>
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果
|
||||
/// </summary>
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态同步
|
||||
/// </summary>
|
||||
public bool Sync { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Dlhis.Common.Request;
|
||||
using Dlhis.Common.Response;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Common.Services
|
||||
{
|
||||
public interface IMealSupplementRecordService : IScopeDependency
|
||||
{
|
||||
Task<Pagination<MealSupplementRecordResponse>> MealSupplementRecordPageAsync(MealSupplementRecordRequest request);
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Dlhis.Common.Request;
|
||||
using Dlhis.Common.Response;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
|
||||
namespace Dlhis.Common.Services.Implements
|
||||
{
|
||||
public class MealSupplementRecordService : IMealSupplementRecordService
|
||||
{
|
||||
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public MealSupplementRecordService(IDbContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
public async Task<Pagination<MealSupplementRecordResponse>> MealSupplementRecordPageAsync(MealSupplementRecordRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<MealSupplementRecordEntity>()
|
||||
.WhereIF(request.Search.IsPresent(), x => x.Code.Contains(request.Search))
|
||||
.Select<MealSupplementRecordResponse>()
|
||||
.ToPageListAsync(request);
|
||||
|
||||
return page;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user