一次合格品仓库,抛光操作记录,抛光仓库修改
This commit is contained in:
106
ZR.Admin.WebApi/Controllers/mes/wms/WmOneTimeRecordController.cs
Normal file
106
ZR.Admin.WebApi/Controllers/mes/wms/WmOneTimeRecordController.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
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-08-08
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 一次合格品仓库记录表
|
||||
/// </summary>
|
||||
[Route("/mes/wm/WmOneTimeRecord")]
|
||||
public class WmOneTimeRecordController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 一次合格品仓库记录表接口
|
||||
/// </summary>
|
||||
private readonly IWmOneTimeRecordService _WmOneTimeRecordService;
|
||||
|
||||
public WmOneTimeRecordController(IWmOneTimeRecordService WmOneTimeRecordService)
|
||||
{
|
||||
_WmOneTimeRecordService = WmOneTimeRecordService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询一次合格品仓库记录表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmonetimerecord:list")]
|
||||
public IActionResult QueryWmOneTimeRecord([FromQuery] WmOneTimeRecordQueryDto parm)
|
||||
{
|
||||
var response = _WmOneTimeRecordService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询一次合格品仓库记录表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmonetimerecord:query")]
|
||||
public IActionResult GetWmOneTimeRecord(string Id)
|
||||
{
|
||||
var response = _WmOneTimeRecordService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmOneTimeRecord>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一次合格品仓库记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmonetimerecord:add")]
|
||||
[Log(Title = "一次合格品仓库记录表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmOneTimeRecord([FromBody] WmOneTimeRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmOneTimeRecord>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmOneTimeRecordService.AddWmOneTimeRecord(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一次合格品仓库记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmonetimerecord:edit")]
|
||||
[Log(Title = "一次合格品仓库记录表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmOneTimeRecord([FromBody] WmOneTimeRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmOneTimeRecord>().ToUpdate(HttpContext);
|
||||
var response = _WmOneTimeRecordService.UpdateWmOneTimeRecord(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一次合格品仓库记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmonetimerecord:delete")]
|
||||
[Log(Title = "一次合格品仓库记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmOneTimeRecord(string ids)
|
||||
{
|
||||
string[] idsArr = ids.Split(',');
|
||||
if (idsArr.Length <= 0)
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"删除失败Id 不能为空"));
|
||||
}
|
||||
|
||||
var response = _WmOneTimeRecordService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user