wangxinhui
2025-02-18 55371a66a36cd00c717f223eda8321ccb16a997d
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -203,7 +203,15 @@
                (List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetails);
                if (result.Item1 != null && result.Item1.Count > 0)
                {
                    tasks = GetTasks(result.Item1, TaskTypeEnum.Outbound);
                    Dt_OutboundOrder outboundOrder =_outboundService.OutboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId);
                    TaskTypeEnum typeEnum = outboundOrder.OrderType switch
                    {
                        (int)OutOrderTypeEnum.Issue => TaskTypeEnum.Outbound,
                        (int)OutOrderTypeEnum.Allocate=> TaskTypeEnum.OutAllocate,
                        (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality,
                        _ =>new TaskTypeEnum()
                    };
                    tasks = GetTasks(result.Item1, typeEnum);
                    result.Item2.ForEach(x =>
                    {
                        x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
@@ -360,7 +368,7 @@
                #endregion
                #region ä¸ŠæŠ¥ERP
                if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库完成.ObjToInt())
                if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库完成.ObjToInt() && outboundOrder.OrderType==OutOrderTypeEnum.Issue.ObjToInt())
                {
                    //List<ERPPickModel> eRPPickModels = new List<ERPPickModel>();
                    //outStockLockInfos.ForEach(x =>
@@ -427,6 +435,10 @@
                BaseDal.AddData(tasks);
                if (stockInfos != null && stockInfos.Count > 0 && outboundOrderDetails != null && outboundOrderDetails.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
                {
                    stockInfos.ForEach(x =>
                    {
                        x.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                    });
                    WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
                    if (!content.Status)
@@ -461,7 +473,7 @@
        /// </summary>
        /// <param name="keys">出库单明细主键</param>
        /// <returns></returns>
        public WebResponseContent GenerateOutboundTask(int[] keys)
        public WebResponseContent GenerateOutboundTasks(int[] keys)
        {
            try
            {
@@ -515,7 +527,7 @@
            {
                List<int> keys = _outboundService.OutboundOrderDetailService.Repository.QueryData(x => x.Id, x => x.OrderId == outboundId);
                return GenerateOutboundTask(keys.ToArray());
                return GenerateOutboundTasks(keys.ToArray());
            }
            catch (Exception ex)
            {