1
wankeda
2026-03-12 ababb6ad4189ec943009c0245db6f43396bb36ab
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -314,7 +314,7 @@
                }
                if (warehouse.WarehouseCode.Contains("CP"))
                {
                    Dt_Production production1 = new Dt_Production();
                    OutboundOrderAddDTO orderAddDTO1 = new OutboundOrderAddDTO();
                    orderAddDTO1.OrderNo = orderAddDTO.No;
@@ -336,6 +336,16 @@
                    inboundOrder.CreateDate = DateTime.Now;
                    inboundOrder.CreateType = CreateType.UpperSystemPush.ObjToInt();
                    _unitOfWorkManage.BeginTran();
                    Dt_NewOutboundOrder dt_NewOutboundOrder = BaseDal.Db.Queryable<Dt_NewOutboundOrder>().Where(x => x.OrderNo == inboundOrder.OrderNo).Includes(x => x.Details).First();
                    if(dt_NewOutboundOrder != null)
                    {
                        if (dt_NewOutboundOrder.OrderStatus > 0)
                        {
                            return WebResponseContent.Instance.Error($"该出库单在进行中,无法更新该出库单");
                        }
                        Db.DeleteNav(dt_NewOutboundOrder).Include(x => x.Details).ExecuteCommand();
                    }
                    bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand();
                    foreach (var item in orderAddDTO1.Details)
@@ -688,7 +698,7 @@
            }
        }
        /// <summary>
        /// 生成出库任务
        /// 生成‘任务
        /// </summary>
        /// <param name="orderDetailId"></param>
        /// <param name="stockSelectViews"></param>
@@ -1151,7 +1161,15 @@
                BaseDal.AddData(tasks);
                _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
                _unitOfWorkManage.CommitTran();
                PushTasksToWCS(tasks);
                if (tasks.FirstOrDefault().PalletCode.Contains("BC"))
                {
                    PushTasksToWCS(tasks);
                }
                else
                {
                    PushTasksWCS(tasks);
                }
                content.OK();
            }
            catch (Exception ex)