wangxinhui
2 天以前 1440114cfae626c192ef59775e9d7829db634c1c
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs
@@ -172,17 +172,18 @@
                newTask.TaskId = taskId;
                Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
                //上传ERP
                //WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
                WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
                _proInStatisticsService.SaveStatic(bagInfoModel);
                //if (!responseContent.Status)
                //{
                //    mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
                //    mesProInOrder.Remark = responseContent.Message;
                //}
                //else
                //{
                if (!responseContent.Status)
                {
                    //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
                    //mesProInOrder.Remark = responseContent.Message;
                    throw new Exception(responseContent.Message);
                }
                else
                {
                    mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
                //}
                }
                Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand();
                _unitOfWorkManage.CommitTran();
                //推送任务
@@ -281,18 +282,19 @@
            };
            
            _unitOfWorkManage.BeginTran();
            Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
            ////上传ERP
            //WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
            //if (!responseContent.Status)
            //{
            //    mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
            //    mesProInOrder.Remark = responseContent.Message;
            //}
            //else
            //{
            //上传ERP
            WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
            if (!responseContent.Status)
            {
                //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
                //mesProInOrder.Remark = responseContent.Message;
                return WebResponseContent.Instance.Error($"{responseContent.Message}");
            }
            else
            {
                mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
            //}
            }
            Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
            Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand();
            _unitOfWorkManage.CommitTran();
            return WebResponseContent.Instance.OK("接收成功");