From 75bab70cfa19fe7f1702dacc0cdf3858248c23b0 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Tue, 2 Jul 2024 10:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/INVOICE_SERVICE.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index cb3f4b0f..5ba52af4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -2010,6 +2010,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ newmain.InjectFrom(main); newmain.SetId(Guid.NewGuid()); newmain.BillNum = billNum; + if (main.BillNum.Substring(0, 1) == "C") + { + newmain.InvGroupNum = billNum; + } newmain.CreationTime = DateTime.Now; newmain.State = SettleBillState.已退回; newmain.ExtraProperties.TryAdd("ParentBillNum", main.BillNum); @@ -2019,7 +2023,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ var list = details; foreach (var item in list) { - item.InvbillNum = billNum; + item.BillNum = billNum; } await _dbcontext.BulkInsertAsync(new List() { newmain }).ConfigureAwait(false); await _dbcontext.BulkUpdateAsync(list).ConfigureAwait(false); @@ -2061,6 +2065,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ await RejectionAsync(pubfirst, publist.ToList()).ConfigureAwait(false); break; } + var invList=dbcontext.Set().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); + var invgourp=dbcontext.Set().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); + var detial=dbcontext.Set().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); + var notsettle=dbcontext.Set().Where(p => p.InvBillNum == p_dto.InvbillNum).ToList(); + dbcontext.BulkDeleteAsync(invList).Wait(); + dbcontext.BulkDeleteAsync(invgourp).Wait(); + dbcontext.BulkDeleteAsync(detial).Wait(); + dbcontext.BulkDeleteAsync(notsettle).Wait(); + + + + } return new JsonResult(new { Code = 200, Message = "退回成功" }); ;