feat(wms): 添加PDA毛坯入库功能及标签解析
- 在ResultionPackageCodeDto中添加BlankNumber字段用于存储毛坯号 - 新增IWmBlankInventoryService接口方法PDABlankWarehousing和ResolutionPackage - 实现毛坯标签解析逻辑ResolutionPackagecode4 - 添加BlankInventoryWarehousingDto用于毛坯入库数据传输 - 在WmBlankInventoryController中新增PDA入库和标签解析API - 实现WmBlankInventoryService中PDA入库核心逻辑
This commit is contained in:
@@ -148,6 +148,53 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PDA毛坯入库
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("PDABlankWarehousing")]
|
||||
[AllowAnonymous]
|
||||
[Log(Title = "PDA毛坯入库", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult PDABlankWarehousing([FromBody] BlankInventoryWarehousingDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
var modal = parm.Adapt<BlankInventoryWarehousingDto>().ToCreate(HttpContext);
|
||||
|
||||
int successNum = _WmBlankInventoryService.PDABlankWarehousing(modal);
|
||||
|
||||
return ToResponse(new ApiResult(200, "入库成功,已入库:" + successNum + "条毛坯记录!", "入库成功"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, ex.Message, "入库失败"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PDA毛坯标签解析
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("PDABlankResolutionPackage")]
|
||||
[AllowAnonymous]
|
||||
[Log(Title = "PDA毛坯入库", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult PDABlankResolutionPackage(string code)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(code)) {
|
||||
return ToResponse(new ApiResult(500, "传入标签为空", "传入标签为空"));
|
||||
}
|
||||
var response = _WmBlankInventoryService.ResolutionPackage(code);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, ex.Message, "入库失败"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user