Files
shanghaigangxiangtuzhuangMES/ZR.Admin.WebApi/Controllers/mes/qc/backend/QcBackendRecordLabelPrintController.cs

109 lines
3.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.AspNetCore.Mvc;
using ZR.Admin.WebApi.Extensions;
using ZR.Admin.WebApi.Filters;
using ZR.Model.Business;
using ZR.Model.Dto;
using ZR.Service.Business.IBusinessService;
//创建时间2025-05-22
namespace ZR.Admin.WebApi.Controllers
{
/// <summary>
/// 后道标签打印记录
/// </summary>
//[Verify]
[Route("/mes/qc/BackEnd/QcBackendRecordLabelPrint")]
public class QcBackendRecordLabelPrintController : BaseController
{
/// <summary>
/// 后道标签打印记录接口
/// </summary>
private readonly IQcBackendRecordLabelPrintService _QcBackendRecordLabelPrintService;
public QcBackendRecordLabelPrintController(IQcBackendRecordLabelPrintService QcBackendRecordLabelPrintService)
{
_QcBackendRecordLabelPrintService = QcBackendRecordLabelPrintService;
}
/// <summary>
/// 查询后道标签打印记录列表
/// </summary>
/// <param name="parm"></param>
/// <returns></returns>
[HttpGet("list")]
[ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:list")]
public IActionResult QueryQcBackendRecordLabelPrint([FromQuery] QcBackendRecordLabelPrintQueryDto parm)
{
var response = _QcBackendRecordLabelPrintService.GetList(parm);
return SUCCESS(response);
}
/// <summary>
/// 查询后道标签打印记录详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
[HttpGet("{Id}")]
[ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:query")]
public IActionResult GetQcBackendRecordLabelPrint(string Id)
{
var response = _QcBackendRecordLabelPrintService.GetInfo(Id);
var info = response.Adapt<QcBackendRecordLabelPrint>();
return SUCCESS(info);
}
/// <summary>
/// 添加后道标签打印记录
/// </summary>
/// <returns></returns>
[HttpPost]
[ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:add")]
[Log(Title = "后道标签打印记录", BusinessType = BusinessType.INSERT)]
public IActionResult AddQcBackendRecordLabelPrint([FromBody] QcBackendRecordLabelPrintDto parm)
{
var modal = parm.Adapt<QcBackendRecordLabelPrint>().ToCreate(HttpContext);
var response = _QcBackendRecordLabelPrintService.AddQcBackendRecordLabelPrint(modal);
return SUCCESS(response);
}
/// <summary>
/// 更新后道标签打印记录
/// </summary>
/// <returns></returns>
[HttpPut]
[ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:edit")]
[Log(Title = "后道标签打印记录", BusinessType = BusinessType.UPDATE)]
public IActionResult UpdateQcBackendRecordLabelPrint([FromBody] QcBackendRecordLabelPrintDto parm)
{
var modal = parm.Adapt<QcBackendRecordLabelPrint>().ToUpdate(HttpContext);
var response = _QcBackendRecordLabelPrintService.UpdateQcBackendRecordLabelPrint(modal);
return ToResponse(response);
}
/// <summary>
/// 删除后道标签打印记录
/// </summary>
/// <returns></returns>
[HttpDelete("{ids}")]
[ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:delete")]
[Log(Title = "后道标签打印记录", BusinessType = BusinessType.DELETE)]
public IActionResult DeleteQcBackendRecordLabelPrint(string ids)
{
int[] idsArr = Tools.SpitIntArrary(ids);
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
var response = _QcBackendRecordLabelPrintService.Delete(idsArr);
return ToResponse(response);
}
}
}