fix 增加post请求方式
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
using Dlhis.Basic.BusinessPlace.Request;
|
||||
using Dlhis.Basic.BusinessPlace.Response;
|
||||
using Dlhis.Basic.BusinessPlace.Services;
|
||||
using Dlhis.Basic.BusinessShift.Response;
|
||||
using Dlhis.Basic.BusinessShift.Services;
|
||||
using Dlhis.Common.Api;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -20,14 +18,12 @@ public class BusinessPlacesController : ControllerBase
|
||||
{
|
||||
private readonly IBusinessPlaceService _businessPlaceService;
|
||||
private readonly IBusinessPlaceShiftService _businessPlaceShiftService;
|
||||
private readonly IEnumSettingApi _enumSettingApi;
|
||||
|
||||
public BusinessPlacesController(IBusinessPlaceService businessPlaceService,
|
||||
IBusinessPlaceShiftService businessPlaceShiftService, IEnumSettingApi enumSettingApi)
|
||||
IBusinessPlaceShiftService businessPlaceShiftService)
|
||||
{
|
||||
_businessPlaceService = businessPlaceService;
|
||||
_businessPlaceShiftService = businessPlaceShiftService;
|
||||
_enumSettingApi = enumSettingApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,7 +34,6 @@ public class BusinessPlacesController : ControllerBase
|
||||
[HttpGet("page")]
|
||||
public async Task<Pagination<BusinessPlaceResponse>> GetPageAsync([FromQuery] BusinessPlacePageRequest request)
|
||||
{
|
||||
//var enums = await _enumSettingApi.GetEnums();
|
||||
return await _businessPlaceService.GetPageAsync(request);
|
||||
}
|
||||
|
||||
@@ -66,11 +61,22 @@ public class BusinessPlacesController : ControllerBase
|
||||
/// <summary>
|
||||
/// 根据手工号获取餐别
|
||||
/// </summary>
|
||||
/// <param name="placeCustomCode"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("shifts")]
|
||||
public async Task<BusinessPlaceWithShiftResponse> GetShiftsByPlaceCustomCodeHttpPostAsync(BusinessPlaceGetShiftsRequest request)
|
||||
{
|
||||
return await _businessPlaceShiftService.GetShiftsByPlaceCustomCodeAsync(request.CustomCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据手工号获取餐别
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("shifts")]
|
||||
public async Task<BusinessPlaceWithShiftResponse> GetShiftsByPlaceCustomCodeAsync(string placeCustomCode)
|
||||
public async Task<BusinessPlaceWithShiftResponse> GetShiftsByPlaceCustomCodeHttpGetAsync([FromQuery] BusinessPlaceGetShiftsRequest request)
|
||||
{
|
||||
return await _businessPlaceShiftService.GetShiftsByPlaceCustomCodeAsync(placeCustomCode);
|
||||
return await _businessPlaceShiftService.GetShiftsByPlaceCustomCodeAsync(request.CustomCode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Basic.BusinessPlace.Request;
|
||||
|
||||
public class BusinessPlaceGetShiftsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 营业点手工号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "营业点手工号不能为空")]
|
||||
public string CustomCode { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user