feat 订单聚合接口
This commit is contained in:
@@ -6,6 +6,7 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
|
|||||||
using Kurisu.Core.DataAccess.Dto;
|
using Kurisu.Core.DataAccess.Dto;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Org.BouncyCastle.Asn1.Ocsp;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Dishes.Controllers;
|
namespace Dlhis.Canteen.Dishes.Controllers;
|
||||||
|
|
||||||
@@ -68,9 +69,20 @@ public class OrdersController : ControllerBase
|
|||||||
[Transactional]
|
[Transactional]
|
||||||
public async Task Booking(BookingMealRequest request)
|
public async Task Booking(BookingMealRequest request)
|
||||||
{
|
{
|
||||||
await _orderService.Booking(request);
|
await _orderService.BookingAsync(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取详情
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="no"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpGet("details")]
|
||||||
|
//public async Task<List<OrderDetailResponse>> GetDetailsAsync(string no)
|
||||||
|
//{
|
||||||
|
// return await _orderService.GetDetailsAsync(no);
|
||||||
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 充值
|
/// 充值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -80,4 +92,14 @@ public class OrdersController : ControllerBase
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单聚合数据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("aggregation")]
|
||||||
|
public async Task<Pagination<OrderAggregationResponse>> GetOrdersAggregationAsync([FromQuery] PageDto page)
|
||||||
|
{
|
||||||
|
return await _orderService.GetOrdersAggregationAsync(page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Kurisu.Core.CustomClass;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Kurisu.Core.DataAccess.Dto;
|
using Kurisu.Core.DataAccess.Dto;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Dishes.Request
|
namespace Dlhis.Canteen.Order.Request
|
||||||
{
|
{
|
||||||
public class BalanceRecordUserPageRequest : PageDto, IValidatableObject
|
public class BalanceRecordUserPageRequest : PageDto, IValidatableObject
|
||||||
{
|
{
|
||||||
@@ -13,11 +13,17 @@ namespace Dlhis.Canteen.Dishes.Request
|
|||||||
[EnumDataType(typeof(DateTimeSearchEnumType))]
|
[EnumDataType(typeof(DateTimeSearchEnumType))]
|
||||||
public DateTimeSearchEnumType? SearchDateTimeDimension { get; set; }
|
public DateTimeSearchEnumType? SearchDateTimeDimension { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消费应用类型
|
||||||
|
/// </summary>
|
||||||
|
public CanteenApplicaitonTypeEnumType? ApplicationType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 日期范围查询
|
/// 日期范围查询
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
@@ -43,8 +49,8 @@ namespace Dlhis.Canteen.Dishes.Request
|
|||||||
}
|
}
|
||||||
else if (SearchDateTimeDimension == DateTimeSearchEnumType.Season)
|
else if (SearchDateTimeDimension == DateTimeSearchEnumType.Season)
|
||||||
{
|
{
|
||||||
SearchDateTimePeriod.Start = now.AddMonths(0 - ((now.Month - 1) % 3));
|
SearchDateTimePeriod.Start = now.AddMonths(0 - (now.Month - 1) % 3);
|
||||||
SearchDateTimePeriod.End = now.AddMonths(3 - ((now.Month - 1) % 3)).AddMonths(1).AddDays(-1);
|
SearchDateTimePeriod.End = now.AddMonths(3 - (now.Month - 1) % 3).AddMonths(1).AddDays(-1);
|
||||||
}
|
}
|
||||||
else if (SearchDateTimeDimension == DateTimeSearchEnumType.HalfOfYear)
|
else if (SearchDateTimeDimension == DateTimeSearchEnumType.HalfOfYear)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
using Dlhis.Entity.Canteen.Enums;
|
|
||||||
using SqlSugar.DbConvert;
|
|
||||||
using SqlSugar;
|
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Request
|
|
||||||
{
|
|
||||||
public class SaveDetailRequest
|
|
||||||
{
|
|
||||||
public long? Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 订单号
|
|
||||||
/// </summary>
|
|
||||||
public string ThirdNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 营业日
|
|
||||||
/// </summary>
|
|
||||||
public DateOnly BusinessDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 餐次
|
|
||||||
/// </summary>
|
|
||||||
public ShiftEnumType ShiftType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 菜品编码
|
|
||||||
/// </summary>
|
|
||||||
public Guid DishesCode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 菜品名称
|
|
||||||
/// </summary>
|
|
||||||
public Guid DishesName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 单价
|
|
||||||
/// </summary>
|
|
||||||
public decimal Price { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 单位
|
|
||||||
/// </summary>
|
|
||||||
public string Unit { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 数量
|
|
||||||
/// </summary>
|
|
||||||
public int Num { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 金额
|
|
||||||
/// </summary>
|
|
||||||
public decimal Amount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 订单明细状态
|
|
||||||
/// </summary>
|
|
||||||
public OrderDetailsStatusEnumType OrderStatus { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,4 +49,15 @@ public class BalanceRecordUserResponse
|
|||||||
/// 记录产生日期
|
/// 记录产生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CostDateTime { get; set; }
|
public DateTime CostDateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消费应用类型
|
||||||
|
/// </summary>
|
||||||
|
public CanteenApplicaitonTypeEnumType ApplicationType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消费应用类型
|
||||||
|
/// </summary>
|
||||||
|
public string ApplicationTypeDesc => ApplicationType.GetDescription();
|
||||||
}
|
}
|
||||||
|
|||||||
34
Src/Dlhis.Canteen/Order/Response/DishesDto.cs
Normal file
34
Src/Dlhis.Canteen/Order/Response/DishesDto.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
public class DishesDto
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
public string No { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜品编码
|
||||||
|
/// </summary>
|
||||||
|
public string DishesCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜品名称
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 购买单价
|
||||||
|
/// </summary>
|
||||||
|
public decimal Price { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 购买数量
|
||||||
|
/// </summary>
|
||||||
|
public int Number { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图片
|
||||||
|
/// </summary>
|
||||||
|
public string ImageUrl { get; set; }
|
||||||
|
}
|
||||||
51
Src/Dlhis.Canteen/Order/Response/OrderAggregationResponse.cs
Normal file
51
Src/Dlhis.Canteen/Order/Response/OrderAggregationResponse.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
|
||||||
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
public class OrderAggregationResponse
|
||||||
|
{
|
||||||
|
public string No { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 营业点
|
||||||
|
/// </summary>
|
||||||
|
public string BusinessPlaceName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 购买菜品
|
||||||
|
/// </summary>
|
||||||
|
public List<DishesDto> Dishes { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 金额
|
||||||
|
/// </summary>
|
||||||
|
public decimal Amount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Dishes.IsPresent())
|
||||||
|
{
|
||||||
|
return Dishes.Sum(x => x.Number * x.Price);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 共计数量
|
||||||
|
/// </summary>
|
||||||
|
public int Count
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Dishes.IsPresent())
|
||||||
|
{
|
||||||
|
return Dishes.Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
34
Src/Dlhis.Canteen/Order/Response/OrderDetailResponse.cs
Normal file
34
Src/Dlhis.Canteen/Order/Response/OrderDetailResponse.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
//namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
//public class OrderDetailResponse
|
||||||
|
//{
|
||||||
|
// /// <summary>
|
||||||
|
// /// 菜品编码
|
||||||
|
// /// </summary>
|
||||||
|
// public string DishesCode { get; set; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 菜品名称
|
||||||
|
// /// </summary>
|
||||||
|
// public string Name { get; set; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 单价
|
||||||
|
// /// </summary>
|
||||||
|
// public decimal Price { get; set; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 数量
|
||||||
|
// /// </summary>
|
||||||
|
// public int Number { get; set; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 单位
|
||||||
|
// /// </summary>
|
||||||
|
// public string Unit { get; set; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// 图片
|
||||||
|
// /// </summary>
|
||||||
|
// public string ImageUrl { get; set; }
|
||||||
|
//}
|
||||||
@@ -9,6 +9,7 @@ public interface IOrderService : IScopeDependency
|
|||||||
{
|
{
|
||||||
Task<Pagination<OrderResponse>> GetPageAsync(OrderPageRequest request);
|
Task<Pagination<OrderResponse>> GetPageAsync(OrderPageRequest request);
|
||||||
|
|
||||||
|
|
||||||
Task<OrderResultResponse> AddAsync(OrderAddRequest request);
|
Task<OrderResultResponse> AddAsync(OrderAddRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23,5 +24,15 @@ public interface IOrderService : IScopeDependency
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task Booking(BookingMealRequest request);
|
Task BookingAsync(BookingMealRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取订单详情
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="no"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//Task<List<OrderDetailResponse>> GetDetailsAsync(string no);
|
||||||
|
|
||||||
|
Task<Pagination<OrderAggregationResponse>> GetOrdersAggregationAsync(PageDto page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -521,13 +521,14 @@ public class BalanceService : IBalanceService
|
|||||||
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
||||||
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||||
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||||
.LeftJoin<BusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((record, ga, department, bplace, bshiftR) => bplace.Code == bshiftR.PlaceCode)
|
||||||
.LeftJoin<BasicTypeEntity>((record, ga, department, bplace, bshift, type) => record.BusinessShiftCode.ToString() == type.Code)
|
.LeftJoin<BusinessShiftEntity>((record, ga, department, bplace, bshiftR, shift) => shift.Code == bshiftR.ShiftCode)
|
||||||
.WhereIF(request.SearchDateTimePeriod?.Start.HasValue == true, record => record.CostDate >= request.SearchDateTimePeriod.Start)
|
.WhereIF(request.SearchDateTimePeriod?.Start.HasValue == true, record => record.CostDate >= request.SearchDateTimePeriod.Start)
|
||||||
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, record => record.CostDate <= request.SearchDateTimePeriod.End)
|
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, record => record.CostDate <= request.SearchDateTimePeriod.End)
|
||||||
|
.WhereIF(request.ApplicationType.HasValue, record => record.ApplicationType == request.ApplicationType)
|
||||||
.Where((record, ga) => ga.IdentityUserId == userId)
|
.Where((record, ga) => ga.IdentityUserId == userId)
|
||||||
.OrderBy(record => record.CreateTime, OrderByType.Desc)
|
.OrderBy(record => record.CreateTime, OrderByType.Desc)
|
||||||
.Select((record, ga, department, bplace, bshift, type) => new BalanceRecordUserResponse
|
.Select((record, ga, department, bplace, bshiftR, shift) => new BalanceRecordUserResponse
|
||||||
{
|
{
|
||||||
Id = record.Id,
|
Id = record.Id,
|
||||||
Amount = record.Amount,
|
Amount = record.Amount,
|
||||||
@@ -536,8 +537,9 @@ public class BalanceService : IBalanceService
|
|||||||
Source = record.Source,
|
Source = record.Source,
|
||||||
No = record.No,
|
No = record.No,
|
||||||
BusinessPlaceName = bplace.Name,
|
BusinessPlaceName = bplace.Name,
|
||||||
BusinessShiftName = type.Display,
|
BusinessShiftName = shift.Name,
|
||||||
CostDateTime = record.CostDateTime
|
CostDateTime = record.CostDateTime,
|
||||||
|
ApplicationType = record.ApplicationType,
|
||||||
})
|
})
|
||||||
.ToPageListAsync(request);
|
.ToPageListAsync(request);
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ using SqlSugar;
|
|||||||
using Dlhis.Canteen.Order.Response;
|
using Dlhis.Canteen.Order.Response;
|
||||||
using Dlhis.Canteen.Dishes;
|
using Dlhis.Canteen.Dishes;
|
||||||
using Dlhis.Canteen.Order.Request;
|
using Dlhis.Canteen.Order.Request;
|
||||||
|
using System.Numerics;
|
||||||
|
using MySqlX.XDevAPI.Relational;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Services.Implements;
|
namespace Dlhis.Canteen.Order.Services.Implements;
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@ public class OrderService : IOrderService
|
|||||||
uniqueNos.Contains(deviceUniqueNo).ThrowIfFalse("无消费权限");
|
uniqueNos.Contains(deviceUniqueNo).ThrowIfFalse("无消费权限");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Booking(BookingMealRequest request)
|
public async Task BookingAsync(BookingMealRequest request)
|
||||||
{
|
{
|
||||||
var gainfo = await CheckExistsMyBookingsAsync(request.BookingDate, request.ShiftType);
|
var gainfo = await CheckExistsMyBookingsAsync(request.BookingDate, request.ShiftType);
|
||||||
|
|
||||||
@@ -177,7 +179,6 @@ public class OrderService : IOrderService
|
|||||||
OrderNo = order.No,
|
OrderNo = order.No,
|
||||||
DishesCode = request.DishesCode,
|
DishesCode = request.DishesCode,
|
||||||
Price = menuDetail.Price,
|
Price = menuDetail.Price,
|
||||||
Status = OrderDetailsStatusEnumType.I,
|
|
||||||
//Unit
|
//Unit
|
||||||
Number = 1,
|
Number = 1,
|
||||||
});
|
});
|
||||||
@@ -186,6 +187,24 @@ public class OrderService : IOrderService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public async Task<List<OrderDetailResponse>> GetDetailsAsync(string no)
|
||||||
|
//{
|
||||||
|
// return await _dbContext.Queryable<CanteenOrderDetailEntity>()
|
||||||
|
// .LeftJoin<DishesEntity>((x, d) => x.DishesCode == d.CustomCode)
|
||||||
|
// .Where(x => x.OrderNo == no)
|
||||||
|
// .Select((x, d) => new OrderDetailResponse
|
||||||
|
// {
|
||||||
|
// DishesCode = x.DishesCode,
|
||||||
|
// Price = x.Price,
|
||||||
|
// Name = d.Name,
|
||||||
|
// Number = x.Number,
|
||||||
|
// Unit = x.Unit,
|
||||||
|
// ImageUrl = d.ImageUrl,
|
||||||
|
// })
|
||||||
|
// .ToListAsync();
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
public async Task<OrderResultResponse> DeviceConsume(OrderAddRequest request)
|
public async Task<OrderResultResponse> DeviceConsume(OrderAddRequest request)
|
||||||
{
|
{
|
||||||
return await AddAsync(request);
|
return await AddAsync(request);
|
||||||
@@ -443,6 +462,53 @@ public class OrderService : IOrderService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<Pagination<OrderAggregationResponse>> GetOrdersAggregationAsync(PageDto page)
|
||||||
|
{
|
||||||
|
var subjectId = _currentUser.GetIntSubjectId();
|
||||||
|
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.IdentityUserId == subjectId).FirstAsync();
|
||||||
|
var jinkoCode = _currentUser.GetUserClaim("jinko-code") ?? string.Empty;
|
||||||
|
if (jinkoCode.IsPresent())
|
||||||
|
{
|
||||||
|
gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == jinkoCode).FirstAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
var pageResult = await _dbContext.Queryable<CanteenOrderEntity>().Where(x => x.UserNo == gainfo.No)
|
||||||
|
.LeftJoin<BusinessPlaceEntity>((x, bplace) => x.BusinessPlaceCode == bplace.Code)
|
||||||
|
.Where(x => x.ApplicationType == CanteenApplicaitonTypeEnumType.Booking)
|
||||||
|
.Select((x, bplace) => new OrderAggregationResponse
|
||||||
|
{
|
||||||
|
No = x.No,
|
||||||
|
BusinessPlaceName = bplace.Name,
|
||||||
|
})
|
||||||
|
.ToPageListAsync(page);
|
||||||
|
|
||||||
|
//.LeftJoin<CanteenOrderDetailEntity>((x, bplace, detail) => x.No == detail.OrderNo)
|
||||||
|
|
||||||
|
var nos = pageResult.Data.Select(x => x.No).ToList();
|
||||||
|
var dtos = await _dbContext.Queryable<CanteenOrderDetailEntity>()
|
||||||
|
.LeftJoin<DishesEntity>((x, d) => x.DishesCode == d.CustomCode)
|
||||||
|
.Where(x => nos.Contains(x.OrderNo))
|
||||||
|
.Select((x, d) => new DishesDto
|
||||||
|
{
|
||||||
|
No = x.OrderNo,
|
||||||
|
DishesCode = x.DishesCode,
|
||||||
|
Name = d.Name,
|
||||||
|
ImageUrl = d.ImageUrl,
|
||||||
|
Number = x.Number,
|
||||||
|
Price = x.Price
|
||||||
|
})
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
pageResult.Data.ForEach(item =>
|
||||||
|
{
|
||||||
|
item.Dishes = dtos.Where(x => x.No == item.No).ToList();
|
||||||
|
});
|
||||||
|
|
||||||
|
return pageResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//******************************************************* help methods ************************************************************/
|
//******************************************************* help methods ************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"SlaveConnectionString": [],
|
"SlaveConnectionString": [],
|
||||||
"Timeout": 30,
|
"Timeout": 30,
|
||||||
"SlowSqlTime": 1,
|
"SlowSqlTime": 1,
|
||||||
"EnableSqlLog": false
|
"EnableSqlLog": true
|
||||||
},
|
},
|
||||||
"SwaggerOptions": {
|
"SwaggerOptions": {
|
||||||
"Enable": true,
|
"Enable": true,
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ using SqlSugar;
|
|||||||
|
|
||||||
namespace Dlhis.Entity.Basic.Entity;
|
namespace Dlhis.Entity.Basic.Entity;
|
||||||
|
|
||||||
[SugarTable(TableName = "BusinessPlaceShiftRelationship", TableDescription = "营业点餐次关系")]
|
[SugarTable(TableName = "BusinessPlaceShiftRelationship", TableDescription = "营业点餐别关系")]
|
||||||
public class BusinessPlaceShiftRelationshipEntity : SugarBaseEntity, ITenantId
|
public class BusinessPlaceShiftRelationshipEntity : SugarBaseEntity, ITenantId
|
||||||
{
|
{
|
||||||
[SugarColumn(ColumnDescription = "营业点code")]
|
[SugarColumn(ColumnDescription = "营业点code")]
|
||||||
public Guid PlaceCode { get; set; }
|
public Guid PlaceCode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[SugarColumn(ColumnDescription = "餐次code")]
|
[SugarColumn(ColumnDescription = "餐别code")]
|
||||||
public Guid ShiftCode { get; set; }
|
public Guid ShiftCode { get; set; }
|
||||||
|
|
||||||
public string TenantId { get; set; }
|
public string TenantId { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user