2024-05-10 14:57:47 +08:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using ZR.Admin.WebApi.Extensions;
|
|
|
|
|
|
using ZR.Admin.WebApi.Filters;
|
2024-06-07 11:04:26 +08:00
|
|
|
|
using ZR.Model.MES.wms;
|
2024-05-10 14:57:47 +08:00
|
|
|
|
using ZR.Model.MES.wms.Dto;
|
|
|
|
|
|
using ZR.Service.mes.wms.IService;
|
|
|
|
|
|
|
|
|
|
|
|
//创建时间:2024-04-18
|
|
|
|
|
|
namespace ZR.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 拼箱/拆箱待打标签记录表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Verify]
|
|
|
|
|
|
[Route("/mes/wm/WmPackageLcl")]
|
|
|
|
|
|
public class WmPackageLclController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 拼箱/拆箱待打标签记录表接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly IWmPackageLclService _WmPackageLclService;
|
|
|
|
|
|
|
|
|
|
|
|
public WmPackageLclController(IWmPackageLclService WmPackageLclService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_WmPackageLclService = WmPackageLclService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询拼箱/拆箱待打标签记录表列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpackagelcl:list")]
|
|
|
|
|
|
public IActionResult QueryWmPackageLcl([FromQuery] WmPackageLclQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPackageLclService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询拼箱/拆箱待打标签记录表详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpackagelcl:query")]
|
|
|
|
|
|
public IActionResult GetWmPackageLcl(string Id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPackageLclService.GetInfo(Id);
|
|
|
|
|
|
|
|
|
|
|
|
var info = response.Adapt<WmPackageLcl>();
|
|
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加拼箱/拆箱待打标签记录表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpackagelcl:add")]
|
|
|
|
|
|
[Log(Title = "拼箱/拆箱待打标签记录表", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddWmPackageLcl([FromBody] WmPackageLclDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPackageLcl>().ToCreate(HttpContext);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPackageLclService.AddWmPackageLcl(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新拼箱/拆箱待打标签记录表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpackagelcl:edit")]
|
|
|
|
|
|
[Log(Title = "拼箱/拆箱待打标签记录表", BusinessType = BusinessType.UPDATE)]
|
|
|
|
|
|
public IActionResult UpdateWmPackageLcl([FromBody] WmPackageLclDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPackageLcl>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _WmPackageLclService.UpdateWmPackageLcl(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除拼箱/拆箱待打标签记录表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("{ids}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpackagelcl:delete")]
|
|
|
|
|
|
[Log(Title = "拼箱/拆箱待打标签记录表", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteWmPackageLcl(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
// int[] idsArr = Tools.SpitIntArrary(ids);
|
|
|
|
|
|
string[] idsArr = ids.Split(',');
|
|
|
|
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败,Id 不能为空")); }
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPackageLclService.Delete(idsArr);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|