提交代码
This commit is contained in:
@ -88,7 +88,7 @@ namespace WebApi.Controllers
|
||||
[HttpPost(Name = "queryByMatSn")]
|
||||
public async Task<ResponseBase> queryByMatSn(QueryByMatSnRequest request)
|
||||
{
|
||||
return _instoreService.queryByMatSn(request);
|
||||
return await _instoreService.queryByMatSn(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -24,9 +24,12 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
public IMatBaseInfoService _matBaseInfoService { get; set; }
|
||||
|
||||
public MatBaseInfoController(IMatBaseInfoService matBaseInfoService)
|
||||
public IGenerateService _generateMatInfoService { get; set; }
|
||||
|
||||
public MatBaseInfoController(IMatBaseInfoService matBaseInfoService, IGenerateService generateMatInfoService)
|
||||
{
|
||||
_matBaseInfoService = matBaseInfoService;
|
||||
_generateMatInfoService = generateMatInfoService;
|
||||
}
|
||||
|
||||
[Route("getMatBaseInfo")]
|
||||
@ -100,5 +103,12 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
return await _matBaseInfoService.getMatCodeList(request);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("generateMatInfo")]
|
||||
public async Task<ResponseCommon<List<MatInfo>>> generateMatInfo(GenerateMatInfoRequest request)
|
||||
{
|
||||
return await _generateMatInfoService.generateMatInfo(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ using System.Text;
|
||||
using WCS.BLL;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.Model;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
@ -61,7 +62,12 @@ namespace WCS.WebApi.Controllers
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//Logs.Write(e.Message);
|
||||
|
||||
//return new ResponseCommon()
|
||||
//{
|
||||
// Code = 300,
|
||||
// Message = $"操作失败:{e.Message}"
|
||||
//};
|
||||
}
|
||||
|
||||
finally
|
||||
|
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