后道触摸屏满箱提交

This commit is contained in:
2025-05-22 19:37:07 +08:00
parent 3f7b111949
commit 2f368ff35c
9 changed files with 662 additions and 145 deletions

View File

@@ -159,6 +159,49 @@ namespace ZR.Admin.WebApi.Controllers
}
/// <summary>
/// 扫描外箱标签,添加想标签记录
/// </summary>
/// <returns></returns>
[HttpPost("ScanPackageLabel")]
[AllowAnonymous]
public IActionResult ScanPackageLabel([FromBody] QcBackEndLabelScanDto parm)
{
try
{
var modal = parm.Adapt<QcBackEndLabelScanDto>().ToCreate(HttpContext);
var response = _QcBackEndService.ScanPackageLabel(modal);
return SUCCESS(response);
}
catch (Exception ex)
{
return SUCCESS("请刷新页面,错误代码:" + ex.Message);
}
}
/// <summary>
/// 判断是否要扫描箱标签
/// </summary>
/// <returns></returns>
[HttpGet("CheckPackageIsFullAndNeedScanPackageLabel")]
[AllowAnonymous]
public IActionResult CheckPackageIsFullAndNeedScanPackageLabel(string workorder)
{
try
{
var response = _QcBackEndService.CheckPackageIsFullAndNeedScanPackageLabel(workorder);
return SUCCESS(response);
}
catch (Exception ex)
{
return SUCCESS("检查是否要扫描箱标签功能异常:" + ex.Message);
}
}
/// <summary>
/// 结束工单,并生成质量报表
/// </summary>

View File

@@ -0,0 +1,109 @@
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
{
/// <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);
}
}
}