647556386
4 天以前 696edbff3c8812e4b820f624d66a02ae6ddb1a06
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs
@@ -114,13 +114,17 @@
                    {
                        if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
                        {
                            if(outboundOrder.OrderStatus != OutOrderStatusEnum.出库完成.ObjToInt())
                            if(outboundOrder.OrderStatus == OutOrderStatusEnum.出库完成.ObjToInt())
                            {
                                outboundOrder.ReturnToMESStatus = 1;
                            }
                            else if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库中.ObjToInt())
                            {
                                outboundOrder.ReturnToMESStatus = 3;
                            }
                            else
                            {
                                outboundOrder.ReturnToMESStatus = 1;
                                outboundOrder.ReturnToMESStatus = 0;
                            }
                            
                        }
@@ -135,7 +139,7 @@
                        _outboundOrderRepository.UpdateData(outboundOrder);
                        return webResponse = WebResponseContent.Instance.OK($"该单据没有需要回传明细,失败数据回传{returnRecords.Count()}条,回传成功{returnRecords.Count(x=>x.ReturnStatus == 1)}条,回传失败{returnRecords.Count(x => x.ReturnStatus == 2)}条");
                        return webResponse = WebResponseContent.Instance.OK($"该单据没有需要回传明细,回传{returnRecords.Count()}条,回传成功{returnRecords.Count(x=>x.ReturnStatus == 1)}条,回传失败{returnRecords.Count(x => x.ReturnStatus == 2)}条");
                    }
@@ -169,7 +173,18 @@
                    {
                        if(returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
                        {
                            outboundOrder.ReturnToMESStatus = 1;
                            if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库完成.ObjToInt())
                            {
                                outboundOrder.ReturnToMESStatus = 1;
                            }
                            else if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库中.ObjToInt())
                            {
                                outboundOrder.ReturnToMESStatus = 3;
                            }
                            else
                            {
                                outboundOrder.ReturnToMESStatus = 0;
                            }
                        }
                        else if(returnRecords.Count(x => x.ReturnStatus == 2)>0)
                        {
@@ -182,7 +197,7 @@
                        _outboundOrderRepository.UpdateData(outboundOrder);
                        
                        
                        return webResponse = WebResponseContent.Instance.OK($"该单据没有需要回传明细,失败数据回传{returnRecords.Count()}条,回传成功{returnRecords.Count(x => x.ReturnStatus == 1)}条,回传失败{returnRecords.Count(x => x.ReturnStatus == 2)}条");
                        return webResponse = WebResponseContent.Instance.OK($"该单据没有需要回传明细,回传{returnRecords.Count()}条,回传成功{returnRecords.Count(x => x.ReturnStatus == 1)}条,回传失败{returnRecords.Count(x => x.ReturnStatus == 2)}条");
                    }
                    string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl");
@@ -252,7 +267,7 @@
                mesReturnRecord.ReturnType = outboundOrder.Details.Count == outboundOrderDetails.Count ? 1 : 2;
                if (outboundOrder.Details.Count == outboundOrderDetails.Count && outboundOrderDetails.All(x => x.ReturnToMESStatus == 1 || x.ReturnToMESStatus == 2))
                if (outboundOrder.OrderStatus == OutOrderStatusEnum.出库完成.ObjToInt() && outboundOrderDetails.All(x => x.ReturnToMESStatus == 1 || x.ReturnToMESStatus == 2))
                {
                    outboundOrder.ReturnToMESStatus = isSuccess ? 1 : 2;
                }