feat(领料): 添加原材料领料功能接口
实现原材料领料功能,包括: 1. 在IMmRecordInboundService接口添加TakeMaterial方法 2. 新增TakeMaterialRequestDto请求参数类 3. 在MmRecordInboundController添加领料API接口 4. 实现领料业务逻辑,包括工单校验和出库单生成
This commit is contained in:
@@ -50,7 +50,7 @@ namespace DOAN.Admin.WebApi.Controllers.BZFM
|
||||
public IActionResult GetMmRecordInbound(int Id)
|
||||
{
|
||||
var response = _MmRecordInboundService.GetInfo(Id);
|
||||
|
||||
|
||||
var info = response.Adapt<MmRecordInboundDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
@@ -93,13 +93,41 @@ namespace DOAN.Admin.WebApi.Controllers.BZFM
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mmrecordinbound:delete")]
|
||||
[Log(Title = "入库记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmRecordInbound([FromRoute]string ids)
|
||||
public IActionResult DeleteMmRecordInbound([FromRoute] string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_MmRecordInboundService.Delete(idArr));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 领料接口(临时)
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("TakeMaterial")]
|
||||
[ActionPermissionFilter(Permission = "mmrecordinbound:takematerial")]
|
||||
[Log(Title = "10线领料", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult TakeMaterial([FromBody] TakeMaterialRequestDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
string response = _MmRecordInboundService.TakeMaterial(parm);
|
||||
if (response == "ok")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "ok"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return ToResponse(new ApiResult(500, response));
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user