Files
wcs/WCS.WebApi/Controllers/PDAStocktakingController.cs
hehaibing-1996 ceebffcc8a 1.导入当前库存的逻辑修改
2.增加盘点接口
2025-01-24 08:19:10 +08:00

70 lines
1.9 KiB
C#

using Microsoft.AspNetCore.Mvc;
using WCS.BLL.DbModels;
using WCS.BLL.Services.IService;
using WCS.DAL.Db;
using WCS.DAL.DbModels;
using WCS.Model;
using WCS.Model.ApiModel;
using WCS.Model.ApiModel.PDAMatBind;
using WCS.Model.ApiModel.Stocktaking;
using WCS.Model.ApiModel.User;
using WCS.Model.WebSocketModel;
namespace WCS.WebApi.Controllers
{
/// <summary>
/// PDA库存盘点
/// </summary>
[ApiController]
[Route("[controller]")]
public class PDAStocktakingController : ControllerBase
{
public IWarningService _warningService { get; set; }
public PDAStocktakingController(IWarningService warningService)
{
_warningService = warningService;
}
[Route("stockTakingById")]
[HttpPost(Name = "stockTakingById")]
public async Task<ResponseCommon> stockTakingById(StockTakingByIdRequest request)
{
try
{
#region
//判断参数 //数量可以为空 数量为空盘点确认 这边删除对应数据即可
if (request.MatDetailCurrentInfoId == 0)
{
return new ResponseCommon()
{
Code = 201,
Message = $"操作失败:参数传入错误(Id为0)!",
Data = null,
};
}
#endregion
return new ResponseCommon()
{
Code = 200,
Message = "success",
Data = null,
};
}
catch (Exception ex)
{
return new ResponseCommon()
{
Code = 201,
Message = ex.Message,
Data = null,
};
}
}
}
}