using Microsoft.AspNetCore.Mvc; using ZR.Model.Dto; using ZR.Model.Business; using ZR.Service.Business.IBusinessService; using ZR.Admin.WebApi.Extensions; using ZR.Admin.WebApi.Filters; //创建时间:2025-05-22 namespace ZR.Admin.WebApi.Controllers { /// /// 后道标签打印记录 /// [Verify] [Route("/mes/qc/BackEnd/QcBackendRecordLabelPrint")] public class QcBackendRecordLabelPrintController : BaseController { /// /// 后道标签打印记录接口 /// private readonly IQcBackendRecordLabelPrintService _QcBackendRecordLabelPrintService; public QcBackendRecordLabelPrintController(IQcBackendRecordLabelPrintService QcBackendRecordLabelPrintService) { _QcBackendRecordLabelPrintService = QcBackendRecordLabelPrintService; } /// /// 查询后道标签打印记录列表 /// /// /// [HttpGet("list")] [ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:list")] public IActionResult QueryQcBackendRecordLabelPrint([FromQuery] QcBackendRecordLabelPrintQueryDto parm) { var response = _QcBackendRecordLabelPrintService.GetList(parm); return SUCCESS(response); } /// /// 查询后道标签打印记录详情 /// /// /// [HttpGet("{Id}")] [ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:query")] public IActionResult GetQcBackendRecordLabelPrint(string Id) { var response = _QcBackendRecordLabelPrintService.GetInfo(Id); var info = response.Adapt(); return SUCCESS(info); } /// /// 添加后道标签打印记录 /// /// [HttpPost] [ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:add")] [Log(Title = "后道标签打印记录", BusinessType = BusinessType.INSERT)] public IActionResult AddQcBackendRecordLabelPrint([FromBody] QcBackendRecordLabelPrintDto parm) { var modal = parm.Adapt().ToCreate(HttpContext); var response = _QcBackendRecordLabelPrintService.AddQcBackendRecordLabelPrint(modal); return SUCCESS(response); } /// /// 更新后道标签打印记录 /// /// [HttpPut] [ActionPermissionFilter(Permission = "business:qcbackendrecordlabelprint:edit")] [Log(Title = "后道标签打印记录", BusinessType = BusinessType.UPDATE)] public IActionResult UpdateQcBackendRecordLabelPrint([FromBody] QcBackendRecordLabelPrintDto parm) { var modal = parm.Adapt().ToUpdate(HttpContext); var response = _QcBackendRecordLabelPrintService.UpdateQcBackendRecordLabelPrint(modal); return ToResponse(response); } /// /// 删除后道标签打印记录 /// /// [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); } } }