新框架PDA后端(祈禧6月初版本)
南骏 池
2025-11-25 770f02888443c1be46549f164abfd3be78a3dbd3
Controllers/Warehouse/TransferOutController.cs
@@ -1,8 +1,10 @@
using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Warehouse;
using NewPdaSqlServer.util;
using System.Dynamic;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace NewPdaSqlServer.Controllers.Warehouse;
@@ -11,9 +13,11 @@
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class TransferOutController : ControllerBase
public class TransferOutController : BaseController
{
    private readonly TransferOutManager _manager = new();
    private readonly MesPrintMangeer _mCf = new();
    #region 基础CRUD
@@ -106,12 +110,12 @@
    /// <response code="200">成功获取调拨出库单号列表</response>
    /// <response code="400">获取失败</response>
    [HttpPost("GetTransferOutNoList")]
    public ResponseResult GetTransferOutNoList()
    public ResponseResult GetTransferOutNoList(WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList = _manager.GetTransferOutNoList();
            resultInfos.tbBillList = _manager.GetTransferOutNoList(query,RequestInfo);
            return new ResponseResult
            {
                status = 0,
@@ -152,7 +156,7 @@
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList =
                _manager.GetTransferOutDetailListByBillNo(query);
                _manager.GetTransferOutDetailListByBillNo(query,RequestInfo);
            return new ResponseResult
            {
                status = 0,
@@ -165,6 +169,30 @@
            return ResponseResult.ResponseError(ex);
        }
    }
    [HttpPost("GetTransferInDetailListByBillNo")]
    public ResponseResult GetTransferInDetailListByBillNo(
    [FromBody] WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            resultInfos.tbBillList =
                _manager.GetTransferInDetailListByBillNo(query);
            return new ResponseResult
            {
                status = 0,
                message = "OK",
                data = resultInfos
            };
        }
        catch (Exception ex)
        {
            return ResponseResult.ResponseError(ex);
        }
    }
    /// <summary>
    ///     扫描条码进行调拨出库处理
@@ -197,9 +225,16 @@
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var (form, items) = _manager.ScanMoveBarcode(query);
            resultInfos.form = form;
            resultInfos.items = items;
            resultInfos.tbBillList = _manager.ScanMoveBarcode(query);
            if (resultInfos.tbBillList.result == "2")
            {
                return new ResponseResult
                {
                    status = Convert.ToInt32(resultInfos.tbBillList.result),
                    message = resultInfos.tbBillList.strMsg,
                    data = resultInfos
                };
            }
            return new ResponseResult
            {
                status = 0,
@@ -236,14 +271,16 @@
    /// </remarks>
    /// <response code="200">分割成功</response>
    /// <response code="400">分割失败,返回具体错误信息</response>
    [HttpPost("SplitBarcode")]
    public ResponseResult SplitBarcode([FromBody] WarehouseQuery query)
    [HttpPost("ScanCodeCF")]
    public ResponseResult ScanCodeCF(WarehouseQuery query)
    {
        try
        {
            dynamic resultInfos = new ExpandoObject();
            var message = _manager.SplitBarcode(query);
            resultInfos.tbBillList = message;
            resultInfos.tbBillList = new ExpandoObject();
            resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
            var scanResult = _manager.ScanCodeCF(query);
            resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
            return new ResponseResult
            {
                status = 0,