From 28df443a9d848e5f9c72e3475a7217463c0f9852 Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Thu, 16 Jun 2022 18:35:21 +0800 Subject: [PATCH] 1 --- .../ProcurementAuditViewModel.cs | 65 ++----------------- 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs b/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs index a1fc3734..c2aa0c9c 100644 --- a/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs +++ b/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs @@ -246,67 +246,6 @@ namespace BBWY.Client.ViewModels } } - //private void AuditByPurchaseOrder(EventWaitHandle ewh) - //{ - // try - // { - // foreach (var purchaseOrder in AuditPurchaseOrderList) - // { - // #region 匹配账单 - // var relationPayBill = AuditPayBillList.FirstOrDefault(b => b.MerchantOrderNo == purchaseOrder.PurchaseOrderId); - // if (relationPayBill == null) - // { - // //未通过商户订单号找到采购单,则通过账单金额和日期匹配 - // relationPayBill = AuditPayBillList.FirstOrDefault(b => purchaseOrder.PayAmount == b.ExpenditureAmount && - // purchaseOrder.PayTime != null && b.PayTime != null && - // Math.Abs((b.PayTime.Value - purchaseOrder.PayTime.Value).TotalSeconds) <= 60); - // } - // if (relationPayBill == null) - // { - // purchaseOrder.ErrorMessage = "未匹配支付账单"; - // continue; - // } - // purchaseOrder.RelationPayBillNo = relationPayBill.PayBillNo; - // #endregion - - // #region 匹配销售单 - // var relationShopOrder = AuditShopOrderList.FirstOrDefault(o => (!string.IsNullOrEmpty(o.VenderRemark) && o.VenderRemark.Contains(purchaseOrder.PurchaseOrderId)) || - // (o.Phone == purchaseOrder.Phone && - // o.ContactName == purchaseOrder.ContactName && - // o.PayTime != null && purchaseOrder.PayTime != null && - // (purchaseOrder.PayTime.Value - o.PayTime.Value).TotalDays <= 2)); - // if (relationShopOrder == null) - // { - // purchaseOrder.ErrorMessage = "未匹配销售订单"; - // continue; - // } - // purchaseOrder.RelationShopOrderId = relationShopOrder.OrderId; - // #endregion - // } - - // var relationShopOrderIds = AuditPurchaseOrderList.Where(p => !string.IsNullOrEmpty(p.RelationShopOrderId)).Select(p => p.RelationShopOrderId).ToList(); - // var belongResponse = shopService.GetOrderBelongShop(relationShopOrderIds); - // if (!belongResponse.Success || belongResponse.Data.Count() == 0) - // return; - // foreach (var purchaseOrder in AuditPurchaseOrderList) - // { - // if (string.IsNullOrEmpty(purchaseOrder.RelationShopOrderId)) - // continue; - // var belongShop = belongResponse.Data.FirstOrDefault(x => x.OrderIdList.Contains(purchaseOrder.RelationShopOrderId)); - // if (belongShop != null) - // purchaseOrder.BelongShop = belongShop.ShopName; - // } - // } - // catch (Exception ex) - // { - // App.Current.Dispatcher.Invoke(() => MessageBox.Show(ex.Message, "采购单匹配")); - // } - // finally - // { - // ewh.Set(); - // } - //} - private void ClearAudit() { SelectAuditFile = null; @@ -420,9 +359,13 @@ namespace BBWY.Client.ViewModels Remark = array[11] }; payBill.MerchantOrderNo = payBill.SourceMerchantOrderNo; + if (payBill.SourceMerchantOrderNo.StartsWith("T50060NP")) payBill.MerchantOrderNo = payBill.SourceMerchantOrderNo.Substring(8); + if(payBill.SourceMerchantOrderNo.StartsWith("T200P")) + payBill.MerchantOrderNo = payBill.SourceMerchantOrderNo.Substring(5); + AuditPayBillList.Add(payBill); } }