抛光管理,完成抛光仓库入库,盘点,生成日志 条件查询功能
This commit is contained in:
107
ZR.Admin.WebApi/Controllers/mes/wms/WmPolishRecordController.cs
Normal file
107
ZR.Admin.WebApi/Controllers/mes/wms/WmPolishRecordController.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
//创建时间:2024-07-25
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 工艺路线-抛光 库存变动表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("/mes/wm/WmPolishRecord")]
|
||||
public class WmPolishRecordController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 工艺路线-抛光 库存变动表接口
|
||||
/// </summary>
|
||||
private readonly IWmPolishRecordService _WmPolishRecordService;
|
||||
|
||||
public WmPolishRecordController(IWmPolishRecordService WmPolishRecordService)
|
||||
{
|
||||
_WmPolishRecordService = WmPolishRecordService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询工艺路线-抛光 库存变动表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishrecord:list")]
|
||||
public IActionResult QueryWmPolishRecord([FromQuery] WmPolishRecordQueryDto parm)
|
||||
{
|
||||
var response = _WmPolishRecordService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询工艺路线-抛光 库存变动表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishrecord:query")]
|
||||
public IActionResult GetWmPolishRecord(string Id)
|
||||
{
|
||||
var response = _WmPolishRecordService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmPolishRecord>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加工艺路线-抛光 库存变动表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishrecord:add")]
|
||||
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmPolishRecord([FromBody] WmPolishRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishRecord>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmPolishRecordService.AddWmPolishRecord(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新工艺路线-抛光 库存变动表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishrecord:edit")]
|
||||
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmPolishRecord([FromBody] WmPolishRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishRecord>().ToUpdate(HttpContext);
|
||||
var response = _WmPolishRecordService.UpdateWmPolishRecord(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除工艺路线-抛光 库存变动表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishrecord:delete")]
|
||||
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmPolishRecord(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0)
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"删除失败Id 不能为空"));
|
||||
}
|
||||
|
||||
var response = _WmPolishRecordService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user