2024-04-18 10:57:53 +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-04-18 10:57:53 +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]
|
2024-04-18 11:34:49 +08:00
|
|
|
|
[Route("/mes/wm/WmGoodsChangeLog")]
|
2024-04-18 10:57:53 +08:00
|
|
|
|
public class WmGoodsChangeLogController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 仓库操作日志接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly IWmGoodsChangeLogService _WmGoodsChangeLogService;
|
|
|
|
|
|
|
|
|
|
|
|
public WmGoodsChangeLogController(IWmGoodsChangeLogService WmGoodsChangeLogService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_WmGoodsChangeLogService = WmGoodsChangeLogService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询仓库操作日志列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmgoodschangelog:list")]
|
|
|
|
|
|
public IActionResult QueryWmGoodsChangeLog([FromQuery] WmGoodsChangeLogQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmGoodsChangeLogService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询仓库操作日志详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmgoodschangelog:query")]
|
|
|
|
|
|
public IActionResult GetWmGoodsChangeLog(int Id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmGoodsChangeLogService.GetInfo(Id);
|
2024-06-07 11:04:26 +08:00
|
|
|
|
|
2024-04-18 10:57:53 +08:00
|
|
|
|
var info = response.Adapt<WmGoodsChangeLog>();
|
|
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加仓库操作日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmgoodschangelog:add")]
|
|
|
|
|
|
[Log(Title = "仓库操作日志", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddWmGoodsChangeLog([FromBody] WmGoodsChangeLogDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmGoodsChangeLog>().ToCreate(HttpContext);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmGoodsChangeLogService.AddWmGoodsChangeLog(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新仓库操作日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmgoodschangelog:edit")]
|
|
|
|
|
|
[Log(Title = "仓库操作日志", BusinessType = BusinessType.UPDATE)]
|
|
|
|
|
|
public IActionResult UpdateWmGoodsChangeLog([FromBody] WmGoodsChangeLogDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmGoodsChangeLog>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _WmGoodsChangeLogService.UpdateWmGoodsChangeLog(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除仓库操作日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("{ids}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmgoodschangelog:delete")]
|
|
|
|
|
|
[Log(Title = "仓库操作日志", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteWmGoodsChangeLog(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|
|
|
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmGoodsChangeLogService.Delete(idsArr);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|