huangxiaoqiang
2025-11-17 b07472f884708a6bfdf63d999004bbf0bb5f00a8
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs
@@ -23,6 +23,7 @@
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.WMS;
using WIDESEA_IOrderRepository;
using WIDESEA_IOrderServices;
using WIDESEA_Model.Models;
using WIDESEA_Model.Models.Order;
using WIDESEA_OrderRepository;
@@ -35,6 +36,7 @@
{
    private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
    private readonly IDt_InboundOrderRepository _inboundOrderRepository;
    private readonly IDt_InboundOrderService _inboundOrderService;
    private readonly IUnitOfWorkManage _unitOfWorkManage;
    private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
    private readonly IDt_TaskService _taskService;
@@ -52,7 +54,8 @@
                                ILocationInfoRepository locationRepository,
                                IDt_TaskRepository taskRepository,
                                IDt_OrderOutDetailsRepository outDetailsRepository,
                                IDt_Task_HtyRepository task_HtyRepository) : base(BaseDal)
                                IDt_Task_HtyRepository task_HtyRepository,
                                IDt_InboundOrderService inboundOrderService) : base(BaseDal)
    {
        _locationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
        _inboundOrderRepository = inboundOrderRepository;
@@ -63,6 +66,7 @@
        _taskRepository = taskRepository;
        _outDetailsRepository = outDetailsRepository;
        _task_HtyRepository = task_HtyRepository;
        _inboundOrderService = inboundOrderService;
    }
    #region æ–¹æ³•重写
    /// <summary>
@@ -579,4 +583,29 @@
        }
    }
    #endregion
    #region æ‰“印库存单个物料二维码
    public async Task<WebResponseContent> PrintOrder(object[] key)
    {
        WebResponseContent content = new WebResponseContent();
        try
        {
            List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>();
            foreach (var item in key)
            {
                var order = _inboundOrderRepository.QueryFirst(x => x.OrderNo == item.ToString());
                if (order != null)
                {
                    inboundOrders.Add(order);
                }
            }
            return _inboundOrderService.PrintInbound(inboundOrders); ;
        }
        catch (Exception ex)
        {
            return content.Error("未知错误,请联系管理员");
        }
    }
    #endregion
}