Controllers/Warehouse/MesXsckController.cs
@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Warehouse;
using NewPdaSqlServer.util;
@@ -12,9 +13,11 @@
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class MesXsckController : ControllerBase
public class MesXsckController : BaseController
{
    private readonly MesXsckManager _manager = new();
    private readonly MesPrintMangeer _mCf = new();
    /***进入模版管理可以修改模版***/
@@ -196,14 +199,21 @@
    /// <response code="200">拆分成功</response>
    /// <response code="400">拆分失败,返回具体错误信息</response>
    [HttpPost("SplitBarcode")]
    public ResponseResult SplitBarcode([FromBody] WarehouseQuery query)
    public ResponseResult SplitBarcode(WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var (success, pendingList) = _manager.SplitBarcode(query);
            resultInfos.success = success;
            resultInfos.pendingList = pendingList;
            resultInfos.tbBillList = new ExpandoObject();
            resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
            var scanResult = _manager.SplitBarcode(query);
            resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
            //dynamic resultInfos = new ExpandoObject();
            //var (success, pendingList) = _manager.SplitBarcode(query);
            //resultInfos.success = success;
            //resultInfos.pendingList = pendingList;
            return new ResponseResult
            {
                status = 0,
@@ -217,7 +227,7 @@
        }
    }
    #region 生产补料
    #region 销售出库
    /// <summary>
    ///     获取生产补料单号列表
@@ -231,7 +241,7 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = _manager.GetFHTZBillNo(query);
            resultInfos.tbBillList = _manager.GetFHTZBillNo(query, RequestInfo);
            return new ResponseResult
            {
                status = 0,
@@ -266,7 +276,7 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = _manager.GetMesItemFHTZetailByBillNo(query);
            resultInfos.tbBillList = _manager.GetMesItemFHTZetailByBillNo(query, RequestInfo);
            return new ResponseResult
            {
                status = 0,
@@ -328,134 +338,4 @@
    #endregion
    #region 生产超领
    /// <summary>
    ///     获取生产超领单号列表
    /// </summary>
    /// <returns>超领单号列表</returns>
    /// <response code="200">成功获取超领单号列表</response>
    /// <response code="400">获取失败</response>
    [HttpPost("GetSccList")]
    public ResponseResult GetSccList(WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = _manager.GetSccList(query);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    ///     获取生产超领单明细
    /// </summary>
    /// <param name="query">查询参数,必须包含billNo</param>
    /// <returns>超领单明细列表</returns>
    /// <remarks>
    ///     请求示例:
    ///     POST /api/MesItemBl/GetMesItemBlDetailBySccBillNo
    ///     {
    ///     "billNo": "SC202401010001"
    ///     }
    /// </remarks>
    /// <response code="200">成功获取超领单明细</response>
    /// <response code="400">获取失败,返回具体错误信息</response>
    [HttpPost("GetMesItemBlDetailBySccBillNo")]
    public ResponseResult GetMesItemBlDetailBySccBillNo(
        [FromBody] WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList =
                _manager.GetMesItemBlDetailBySccBillNo(query);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    ///     生产超领扫描条码1
    /// </summary>
    /// <param name="query">查询参数</param>
    /// <returns>扫描结果和待处理列表</returns>
    /// <remarks>
    ///     请求示例:
    ///     POST /api/MesItemBl/ScanBarcodeForOverPicking
    ///     {
    ///     "billNo": "WO202401010001",
    ///     "barcode": "1234567890",
    ///     "userName": "admin",
    ///     "blNo": "SC202401010001"
    ///     }
    /// </remarks>
    /// <response code="200">扫描成功</response>
    /// <response code="400">扫描失败,返回具体错误信息</response>
    [HttpPost("ScanBarcodeForOverPicking")]
    public ResponseResult ScanBarcodeForOverPicking(
        [FromBody] WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var (success, pendingList) =
                _manager.ScanBarcodeForOverPicking(query);
            resultInfos.success = success;
            resultInfos.pendingList = pendingList;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("PrintBarcodeForOverPicking")]
    public ResponseResult PrintForOverPicking(WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var (success, pendingList) =
                _manager.PrintBarcodeForOverPicking(query);
            resultInfos.success = success;
            resultInfos.pendingList = pendingList;
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    #endregion
}