heshaofeng
2025-12-01 5f0b86328b2678a326166e84b461e9ede3dc4715
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -51,6 +51,7 @@
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
using WIDESEA_Model.Models.Check;
using WIDESEA_Model.Models.Outbound;
namespace WIDESEA_TaskInfoService
@@ -66,6 +67,7 @@
        private readonly IInboundOrderService _inboundOrderService;
        private readonly IInboundOrderDetailService _inboundOrderDetailService;
        private readonly IRepository<Dt_ReCheckOrder> _reCheckOrderRepository;
        private readonly IRepository<Dt_OutboundBatch> _OutboundBatchRepository;
        private readonly IOutboundOrderService _outboundOrderService;
        private readonly IOutboundOrderDetailService _outboundOrderDetailService;
@@ -95,7 +97,7 @@
        public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList();
        public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService, IAllocateService allocateService, IRepository<Dt_OutboundBatch> outboundBatchRepository) : base(BaseDal)
        public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService, IAllocateService allocateService, IRepository<Dt_OutboundBatch> outboundBatchRepository,IRepository<Dt_ReCheckOrder> reCheckOrderRepository) : base(BaseDal)
        {
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
@@ -114,6 +116,7 @@
            _outStockLockInfoService = outStockLockInfoService;
            _allocateService = allocateService;
            _OutboundBatchRepository = outboundBatchRepository;
            _reCheckOrderRepository = reCheckOrderRepository;
        }
@@ -282,7 +285,7 @@
                            {
                                ReqCode = Guid.NewGuid().ToString(),
                                ReqTime = DateTime.Now.ToString(),
                                BusinessType = "2",
                                BusinessType = "3",
                                FactoryArea = inboundOrder.FactoryArea,
                                OperationType = 1,
                                Operator = inboundOrder.Operator,
@@ -325,12 +328,12 @@
                    }
                    else if (inboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) //重检入库
                    {
                        //不需要回传。占一个位置。
                    }
                    else if (inboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) //智仓调智仓
                    {
                        _logger.LogInformation($"InboundTaskCompleted å›žå†™MES  : {inboundOrder.InboundOrderNo }  ,ordertype: {InOrderTypeEnum.InternalAllocat.ObjToInt()} "  );
                        // BusinessTypeEnum.智仓调智仓
                    }
@@ -629,7 +632,7 @@
                        {
                            ReqCode = Guid.NewGuid().ToString(),
                            ReqTime = DateTime.Now.ToString(),
                            BusinessType = "3",
                            BusinessType = "2",
                            FactoryArea = outboundOrder.FactoryArea,
                            OperationType = 1,
                            Operator = outboundOrder.Operator,
@@ -663,8 +666,8 @@
                                    Barcode = lockInfo.CurrentBarcode,
                                    SupplyCode = lockInfo.SupplyCode,
                                    BatchNo = lockInfo.BatchNo,
                                    Unit = lockInfo.Unit,
                                    Qty = lockInfo.PickedQty // æ¡ç çº§åˆ«çš„æ•°é‡ä»ç”¨é”å®šè®°å½•
                                    Unit = lockInfo.BarcodeUnit,
                                    Qty = lockInfo.BarcodeQty // æ¡ç çº§åˆ«çš„æ•°é‡ä»ç”¨é”å®šè®°å½•
                                }).ToList()
                            };
@@ -720,8 +723,8 @@
                                materialCode = detail.MaterielCode,
                                lineNo = detail.lineNo, // æ³¨æ„ï¼šè¿™é‡Œå¯èƒ½éœ€è¦è°ƒæ•´å­—段名
                                warehouseCode = detail.WarehouseCode,
                                qty = detail.OverOutQuantity, // ä½¿ç”¨è®¢å•明细的已出库数量
                                currentDeliveryQty = detail.OverOutQuantity,
                                qty = detail.BarcodeQty,
                                currentDeliveryQty = detail.BarcodeQty,
                                unit = detail.Unit,
                                barcodes = detailLocks.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel
                                {