2024-08-05 10:19:26 +08:00
|
|
|
|
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-30
|
|
|
|
|
|
namespace ZR.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 后道检验工单表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
// [Verify]
|
|
|
|
|
|
[Route("/mes/wm/WmPolishInspectionWorkorder")]
|
|
|
|
|
|
public class WmPolishInspectionWorkorderController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 后道检验工单表接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly IWmPolishInspectionWorkorderService _WmPolishInspectionWorkorderService;
|
|
|
|
|
|
|
|
|
|
|
|
public WmPolishInspectionWorkorderController(IWmPolishInspectionWorkorderService WmPolishInspectionWorkorderService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_WmPolishInspectionWorkorderService = WmPolishInspectionWorkorderService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询后道检验工单表列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:list")]
|
|
|
|
|
|
public IActionResult QueryWmPolishInspectionWorkorder([FromQuery] WmPolishInspectionWorkorderQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPolishInspectionWorkorderService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询后道检验工单表详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:query")]
|
|
|
|
|
|
public IActionResult GetWmPolishInspectionWorkorder(string Id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPolishInspectionWorkorderService.GetInfo(Id);
|
2025-07-28 15:40:59 +08:00
|
|
|
|
|
2024-08-05 10:19:26 +08:00
|
|
|
|
var info = response.Adapt<WmPolishInspectionWorkorder>();
|
|
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加后道检验工单表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:add")]
|
|
|
|
|
|
[Log(Title = "后道检验工单表", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddWmPolishInspectionWorkorder([FromBody] WmPolishInspectionWorkorderDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPolishInspectionWorkorder>().ToCreate(HttpContext);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPolishInspectionWorkorderService.AddWmPolishInspectionWorkorder(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新后道检验工单表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:edit")]
|
|
|
|
|
|
[Log(Title = "后道检验工单表", BusinessType = BusinessType.UPDATE)]
|
|
|
|
|
|
public IActionResult UpdateWmPolishInspectionWorkorder([FromBody] WmPolishInspectionWorkorderDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPolishInspectionWorkorder>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _WmPolishInspectionWorkorderService.UpdateWmPolishInspectionWorkorder(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除后道检验工单表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("{ids}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:delete")]
|
|
|
|
|
|
[Log(Title = "后道检验工单表", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteWmPolishInspectionWorkorder(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|
|
|
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPolishInspectionWorkorderService.Delete(idsArr);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|