dengjunjie
2025-01-10 e92ae6610410a25826093330bbf42296e746c51d
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -215,16 +215,13 @@
                Dt_InboundOrder? inboundOrder = _inboundRepository.InboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x => x.Details).First();
                List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>();
                List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>();
                if (stockInfo.StockStatus == StockStatusEmun.入库确认.ObjToInt())
                {
                    //推送入库完成给Erp
                    if (inboundOrder == null)
                    {
                        return WebResponseContent.Instance.Error($"对应入库单不存在");
                    }
                    List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>();
                    foreach (var item in stockInfo.Details)
                    {
                        Dt_InboundOrderDetail? inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.RowNo == item.InboundOrderRowNo);
@@ -261,10 +258,7 @@
                    {
                        inboundOrder.OrderStatus = InOrderStatusEnum.入库完成.ObjToInt();
                    }
                    if (!_inboundOrderService.FeedbackInboundOrder(stockInfo, inboundOrder, detailModels).Status)//todo ä¿®æ”¹å¤„理
                    {
                        return WebResponseContent.Instance.Error($"入库同步Erp失败");
                    }
                }
                if ((stockInfo.StockStatus == StockStatusEmun.入库确认.ObjToInt() || stockInfo.StockStatus == StockStatusEmun.手动组盘入库确认.ObjToInt()) && warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
@@ -304,6 +298,10 @@
                    _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
                }
                _unitOfWorkManage.CommitTran();
                if (stockInfo.StockStatus == StockStatusEmun.入库确认.ObjToInt())
                {
                    _inboundOrderService.FeedbackInboundOrder(stockInfo, inboundOrder, detailModels);
                }
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)