Files
jinko.yikatong/Src/Dlhis.Basic/Dishes/Controller/DishesMenusController.cs
liguoyang b23c674c6e Squashed commit of the following:
commit ee0ee9b167
Merge: e78ab0b cd4888d
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Mar 19 12:07:22 2024 +0800

    Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

commit e78ab0baea
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Mar 19 12:06:13 2024 +0800

    fix 增加权限控制

commit 793a3325f2
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Mar 19 10:24:41 2024 +0800

    Squashed commit of the following:

    commit d4ab7d407a141b80024f85eeaab0062bea016051
    Author: liguoyang <Ligy.97@foxmail.com>
    Date:   Tue Mar 19 10:23:30 2024 +0800

        merge error

    commit 6204fa4ed15e0be303f7eb62307476725b8e7e36
    Merge: 7290f0b aaeacf4
    Author: liguoyang <Ligy.97@foxmail.com>
    Date:   Tue Mar 19 10:19:41 2024 +0800

        Merge branch 'feat-PlacePermission' of https://git.dlhis.com/liguoyang/jinko.yikatong into feat-PlacePermission

    commit 7290f0bd822c0e2bd957908fd58f6e99f22ad46b
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 15:05:28 2024 +0800

        fix 获取用户权限设备 优化

    commit 41b94fa3a9596a38cda1b4bf4f345ce13fe5677a
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 13:13:23 2024 +0800

        fix  第一

    commit aaeacf4ffa778eb6a6104e2349357644d038151b
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 15:05:28 2024 +0800

        fix 获取用户权限设备 优化

    commit 9e6099c52d0318cba35e7c082cb4d3085b46b0fa
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 14:00:53 2024 +0800

        fix 营业点配置权限

    commit b4565e34f48da0e5ef1d3dffa59d0ccf0d950920
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 13:13:23 2024 +0800

        fix  第一

commit 153f0ecd2a
Author: cheche <717840555@qq.com>
Date:   Tue Mar 19 09:58:31 2024 +0800

    fix 返回支付方式中文描述

commit e548c780b8
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 16:59:45 2024 +0800

    fix 优化送餐

commit fa376f7671
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 16:11:45 2024 +0800

    fix 参数结构调整

commit 1b58ca69bf
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:57:18 2024 +0800

    fix 餐次数据补充

commit e8a98c614c
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:11:56 2024 +0800

    add 补充实体变更

commit 4651adedc3
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:11:38 2024 +0800

    fix 优化查询,增加详情接口

commit ad48e37273
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:09:16 2024 +0800

    fix 枚举code过滤

commit abf2e2ed29
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:44:15 2024 +0800

    fix 获取订餐最晚时间

commit 00869111df
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:21:19 2024 +0800

    fix 检验权限修改

commit 7b83014119
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 13:42:35 2024 +0800

    fix 优化菜品保存和分页

commit fefc785b66
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:17:19 2024 +0800

    fix  修改营业点返回体

commit 3b7874a2a0
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 12:14:06 2024 +0800

    fix currentUser

commit c825531fda
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 11:03:43 2024 +0800

    fix 提交可编译版本

commit 8f430bccd3
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:48:38 2024 +0800

    fix GetDishesMenusBookingResponse修改字段

commit 69c60dc459
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:59:52 2024 +0800

    fix 增加日期返回

commit fadee3861a
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:01:31 2024 +0800

    fix GetDishesMenusBookingSetting返回体修改

commit 058b989ead
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 10:54:28 2024 +0800

    fix 获取营业点下面餐次

commit a82e7ff798
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:28:56 2024 +0800

    fix 命名空间调整

commit 9acdab4e01
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:27:46 2024 +0800

    fix 更新控制器名称

commit 3005443392
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:01:03 2024 +0800

    feat 菜品/菜单配置

commit a59404711c
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Mar 17 21:26:16 2024 +0800

    feat 获取服务时间

commit ba0fe3e67f
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Mar 17 20:58:11 2024 +0800

    fix 处理next空数组

commit 97fb157c9f
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 20:49:44 2024 +0800

    fix 营业点权限调整

commit 70420b9668
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 18:54:15 2024 +0800

    fix 修改IBusinessPlacePermissionsService

commit 6f2383c663
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 18:47:33 2024 +0800

    fix  api

commit 99e1c8f125
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 18:03:09 2024 +0800

    fix 实体变更

commit d327e9e3aa
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 16:06:17 2024 +0800

    fix 临时修改送餐代码

commit 4825648e41
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 15:13:53 2024 +0800

    fix 按基地分配获取值错误

commit 8ed8addbf3
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 15:10:55 2024 +0800

    fix 表增加ITenantid

commit cd4888d900
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Mar 19 12:06:13 2024 +0800

    fix 增加权限控制

commit 1cd9b2467e
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Mar 19 10:24:41 2024 +0800

    Squashed commit of the following:

    commit d4ab7d407a141b80024f85eeaab0062bea016051
    Author: liguoyang <Ligy.97@foxmail.com>
    Date:   Tue Mar 19 10:23:30 2024 +0800

        merge error

    commit 6204fa4ed15e0be303f7eb62307476725b8e7e36
    Merge: 7290f0b aaeacf4
    Author: liguoyang <Ligy.97@foxmail.com>
    Date:   Tue Mar 19 10:19:41 2024 +0800

        Merge branch 'feat-PlacePermission' of https://git.dlhis.com/liguoyang/jinko.yikatong into feat-PlacePermission

    commit 7290f0bd822c0e2bd957908fd58f6e99f22ad46b
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 15:05:28 2024 +0800

        fix 获取用户权限设备 优化

    commit 41b94fa3a9596a38cda1b4bf4f345ce13fe5677a
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 13:13:23 2024 +0800

        fix  第一

    commit aaeacf4ffa778eb6a6104e2349357644d038151b
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 15:05:28 2024 +0800

        fix 获取用户权限设备 优化

    commit 9e6099c52d0318cba35e7c082cb4d3085b46b0fa
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 14:00:53 2024 +0800

        fix 营业点配置权限

    commit b4565e34f48da0e5ef1d3dffa59d0ccf0d950920
    Author: cheche <717840555@qq.com>
    Date:   Tue Mar 12 13:13:23 2024 +0800

        fix  第一

commit ed25ab626a
Author: cheche <717840555@qq.com>
Date:   Tue Mar 19 09:58:31 2024 +0800

    fix 返回支付方式中文描述

commit c4b48131d2
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 16:59:45 2024 +0800

    fix 优化送餐

commit 8f26e7e84b
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 16:11:45 2024 +0800

    fix 参数结构调整

commit 8307d1d941
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:57:18 2024 +0800

    fix 餐次数据补充

commit 068a5b9507
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:11:56 2024 +0800

    add 补充实体变更

commit 805f0f83d1
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:11:38 2024 +0800

    fix 优化查询,增加详情接口

commit 9ef57fba55
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 15:09:16 2024 +0800

    fix 枚举code过滤

commit 0124fa4bc9
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:44:15 2024 +0800

    fix 获取订餐最晚时间

commit fd4a925b4a
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:21:19 2024 +0800

    fix 检验权限修改

commit e6dee2d504
Merge: 2cbf894 b3b9962
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:18:15 2024 +0800

    fix 解决dishersservice冲突

commit 2cbf894ea8
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 14:17:19 2024 +0800

    fix  修改营业点返回体

commit b3b99623e3
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 13:42:35 2024 +0800

    fix 优化菜品保存和分页

commit fcc1f134ed
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 12:14:06 2024 +0800

    fix currentUser

commit 253caf26c1
Merge: c743d2d 63ded81
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:48:41 2024 +0800

    Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

commit c743d2d1c5
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:48:38 2024 +0800

    fix GetDishesMenusBookingResponse修改字段

commit 63ded819c5
Merge: 5fe4104 3b46ac2
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 11:03:45 2024 +0800

    Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

commit 5fe4104ff6
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 11:03:43 2024 +0800

    fix 提交可编译版本

commit 3b46ac25a7
Merge: 11a3a0a a2eca2c
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:01:33 2024 +0800

    Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

commit 11a3a0aded
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 11:01:31 2024 +0800

    fix GetDishesMenusBookingSetting返回体修改

commit a2eca2cdeb
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:59:52 2024 +0800

    fix 增加日期返回

commit 0bed0bc97b
Author: cheche <717840555@qq.com>
Date:   Mon Mar 18 10:54:28 2024 +0800

    fix 获取营业点下面餐次

commit c1d84ae1c6
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:28:56 2024 +0800

    fix 命名空间调整

commit e2cc31003f
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:27:46 2024 +0800

    fix 更新控制器名称

commit ab406adecf
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Mar 18 10:01:03 2024 +0800

    feat 菜品/菜单配置

commit 6ba2d7d6a2
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Mar 17 21:26:16 2024 +0800

    feat 获取服务时间

commit 6872518b65
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Mar 17 20:58:11 2024 +0800

    fix 处理next空数组

commit 423d90bf3d
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 20:49:44 2024 +0800

    fix 营业点权限调整

commit 220ff2d963
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 18:54:15 2024 +0800

    fix 修改IBusinessPlacePermissionsService

commit 72f93a59a6
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 18:47:33 2024 +0800

    fix  api

commit 149660ca0f
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 18:03:09 2024 +0800

    fix 实体变更

commit 9a84143315
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 16:06:17 2024 +0800

    fix 临时修改送餐代码

commit 328ef5f42c
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 15:13:53 2024 +0800

    fix 按基地分配获取值错误

commit ea4a15c44b
Merge: a3112eb 255f4b4
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Mar 15 15:13:37 2024 +0800

    Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development

commit 255f4b4a13
Author: cheche <717840555@qq.com>
Date:   Fri Mar 15 15:10:55 2024 +0800

    fix 表增加ITenantid
2024-03-19 12:09:50 +08:00

112 lines
3.3 KiB
C#

using Dlhis.Basic.Dishes.Dto;
using Dlhis.Basic.Dishes.Request;
using Dlhis.Basic.Dishes.Response;
using Dlhis.Basic.Dishes.Services;
using Dlhis.Entity.Canteen.Enums;
using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Basic.Dishes.Controller;
/// <summary>
/// 菜单菜品控制器
/// </summary>
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class DishesMenusController : ControllerBase
{
private readonly IDishesMenuService _dishesMenuService;
private readonly IDishesService _dishesService;
public DishesMenusController(IDishesMenuService dishesMenuService, IDishesService dishesService)
{
_dishesMenuService = dishesMenuService;
_dishesService = dishesService;
}
/// <summary>
/// 菜单分页
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("page")]
public async Task<Pagination<DishesMenuPageResponse>> GetDishesMenuPageAsync([FromQuery] DisheMenuPageRequest request)
{
return await _dishesMenuService.GetDishesMenuPageAsync(request);
}
/// <summary>
/// 菜单保存/更改
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost("save")]
[Transactional]
public async Task SaveDishesMenuAsync(DishesMenuSaveRequest request)
{
await _dishesMenuService.SaveDishesMenuAsync(request);
}
/// <summary>
/// 菜单明细
/// </summary>
/// <param name="date"></param>
/// <param name="businessPlaceCode"></param>
/// <param name="shiftType"></param>
/// <param name="dishesCode"></param>
/// <returns></returns>
[HttpGet("detail")]
public async Task<DishesMenuDetailDto> GetBookingDishesDetailAsync(DateTime date, Guid businessPlaceCode, ShiftEnumType shiftType, string dishesCode)
{
return await _dishesMenuService.GetBookingDishesDetailAsync(date, businessPlaceCode, shiftType, dishesCode);
}
/// <summary>
/// 菜品分页
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("dishes/page")]
public async Task<Pagination<DishesResponse>> GetDishesAsync([FromQuery] DishesPageRequest request)
{
return await _dishesService.GetDishesPageAsync(request);
}
/// <summary>
/// 菜品保存/更改
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost("dishes/save")]
public async Task SaveDishesAsync(DishesSaveRequest request)
{
await _dishesService.SaveDishesAsync(request);
}
/// <summary>
/// 根据id获取菜品详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("dishes/detail/{id}")]
public async Task<DishesDetailResponse> GetDishesDetailByIdAsync(long id)
{
return await _dishesService.GetDishesDetailByIdAsync(id);
}
/// <summary>
/// 获取预定送餐配置
/// </summary>
/// <returns></returns>
[HttpGet("setting")]
public async Task<GetDishesMenusBookingResponse> GetDishesMenusBookingSetting([FromQuery] GetDishesMenusBookingRequest request)
{
return await _dishesService.GetDishesMenusBookingSetting(request);
}
}