提交代码
This commit is contained in:
88
WCS.WebApi/Controllers/StockTakingController.cs
Normal file
88
WCS.WebApi/Controllers/StockTakingController.cs
Normal file
@ -0,0 +1,88 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel;
|
||||
using WCS.Model.ApiModel.MatInventoryDetail;
|
||||
using WCS.Model.ApiModel.Stocktaking;
|
||||
using WCS.Model.ApiModel.User;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 权限/用户界面的接口
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class StockTakingController : ControllerBase
|
||||
{
|
||||
public IStockTakingService _stockTakingService { get; set; }
|
||||
|
||||
public IGenerateService _generateService { get; set; }
|
||||
|
||||
public StockTakingController(IStockTakingService stockTakingService, IGenerateService generateService)
|
||||
{
|
||||
_stockTakingService = stockTakingService;
|
||||
_generateService = generateService;
|
||||
}
|
||||
|
||||
[Route("SysStockTakingOrder")]
|
||||
[HttpPost(Name = "SysStockTakingOrder")]
|
||||
public async Task<ResponseBase> SysStockTakingOrder(SysStockTakingOrderRequest request)
|
||||
{
|
||||
//判断盘点单号是否已输入
|
||||
if (string.IsNullOrEmpty(request.StocktakingOrderNumber))
|
||||
request.StocktakingOrderNumber = await _generateService.generateStockTakingNumber();
|
||||
return await _stockTakingService.SysStockTakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("getStockTakingOrders")]
|
||||
[HttpPost(Name = "getStockTakingOrders")]
|
||||
public async Task<ResponseBase> getStockTakingOrders(GetStockTakingOrdersRequest request)
|
||||
{
|
||||
return await _stockTakingService.getStockTakingOrders(request);
|
||||
}
|
||||
|
||||
[Route("getStockTakingOrderMatDetail")]
|
||||
[HttpPost(Name = "getStockTakingOrderMatDetail")]
|
||||
public async Task<ResponseBase> getStockTakingOrderMatDetail(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.getStockTakingOrderMatDetail(request);
|
||||
}
|
||||
|
||||
[Route("startStockTakingOrder")]
|
||||
[HttpPost(Name = "startStockTakingOrder")]
|
||||
public async Task<ResponseBase> startStockTakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.startStockTakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("endStockTakingOrder")]
|
||||
[HttpPost(Name = "endStockTakingOrder")]
|
||||
public async Task<ResponseBase> endStockTakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.endStockTakingOrder(request);
|
||||
}
|
||||
|
||||
|
||||
[Route("queryMatInfoInStocktakingOrder")]
|
||||
[HttpPost(Name = "queryMatInfoInStocktakingOrder")]
|
||||
public async Task<ResponseBase> queryMatInfoInStocktakingOrder(QueryMatInfoInStocktakingOrderRequest request)
|
||||
{
|
||||
return await _stockTakingService.queryMatInfoInStocktakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("comfirmStocktakingOrder")]
|
||||
[HttpPost(Name = "comfirmStocktakingOrder")]
|
||||
public async Task<ResponseBase> comfirmStocktakingOrder(ComfirmStocktakingOrderRequest request)
|
||||
{
|
||||
return await _stockTakingService.comfirmStocktakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("commitStocktakingOrder")]
|
||||
[HttpPost(Name = "commitStocktakingOrder")]
|
||||
public async Task<ResponseBase> commitStocktakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.commitStockTakingOrder(request);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user