新增库存出入库单据及下拉选项相关接口
本次提交为物料库存管理模块增加了出入库单据的创建接口(入库单、出库单),并补充了物料及出入库类型下拉选项接口。新增了相关DTO数据结构,服务接口与实现,完善了库存变更的业务流程,所有操作均支持事务控制,提升了数据一致性和系统健壮性。
This commit is contained in:
@@ -98,5 +98,86 @@ namespace DOAN.Admin.WebApi.Controllers.BZFM
|
||||
return ToResponse(_MmInventoryService.Delete(idArr));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取物料清单下拉数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("GetMaterialOption")]
|
||||
public IActionResult GetMaterialOption()
|
||||
{
|
||||
var response = _MmInventoryService.GetMaterialOption();
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取出/入库操作类型下拉数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("GetTransactionOption")]
|
||||
public IActionResult GetTransactionOption()
|
||||
{
|
||||
var response = _MmInventoryService.GetTransactionOption();
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建入库单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("CreateInboundReceipt")]
|
||||
[AllowAnonymous]
|
||||
[Log(Title = "入库单", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult CreateInboundReceipt([FromBody] InboundReceiptDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
string response = _MmInventoryService.CreateInboundReceipt(parm);
|
||||
if(response == "ok")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "ok"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return ToResponse(new ApiResult(500, response));
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建出库单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("CreateOutboundReceipt")]
|
||||
[AllowAnonymous]
|
||||
[Log(Title = "出库单", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult CreateOutboundReceipt([FromBody] OutboundReceiptDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
string response = _MmInventoryService.CreateOutboundReceipt(parm);
|
||||
if (response == "ok")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "ok"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return ToResponse(new ApiResult(500, response));
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user