89 lines
3.4 KiB
C#
89 lines
3.4 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|