|
|
@ -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<Tmain>() { newmain }).ConfigureAwait(false); |
|
|
|
await _dbcontext.BulkUpdateAsync(list).ConfigureAwait(false); |
|
|
@ -2061,6 +2065,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
await RejectionAsync<PUB_CAN_SA, PUB_CAN_SA_DETAIL>(pubfirst, publist.ToList()).ConfigureAwait(false); |
|
|
|
break; |
|
|
|
} |
|
|
|
var invList=dbcontext.Set<INVOICE_GRP>().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); |
|
|
|
var invgourp=dbcontext.Set<INVOICE_MAP_GROUP>().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); |
|
|
|
var detial=dbcontext.Set<INVOICE_WAIT_DETAIL>().Where(p => p.InvbillNum == p_dto.InvbillNum).ToList(); |
|
|
|
var notsettle=dbcontext.Set<INVOICE_NOT_SETTLE>().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 = "退回成功" }); ; |
|
|
|