diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs index 55124b26..a5256f69 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs @@ -1507,6 +1507,7 @@ namespace YLErp.Modules.SwapModule td.OptDate = OptDate; swapEventService.AddSwapEventDate(valueDate, tradeId, (int)SwapEventTypeEnum.删除, string.Empty, 0, false); DbContext.SaveChanges(); + new TradeDocumentDataService(this).InnerDeleteConfirmBook(tradeId); trans.Commit(); return; } diff --git a/YLErpDAL/Modules/TradeModule/TradeDocumentDataService.cs b/YLErpDAL/Modules/TradeModule/TradeDocumentDataService.cs index d01619d9..de26a3d8 100644 --- a/YLErpDAL/Modules/TradeModule/TradeDocumentDataService.cs +++ b/YLErpDAL/Modules/TradeModule/TradeDocumentDataService.cs @@ -36,7 +36,7 @@ namespace YLErp.Modules.TradeModule return InnerDeleteConfirmBook(tradeId, contractType); } - private int InnerDeleteConfirmBook(int tradeId, params string[] contractTypes) + public int InnerDeleteConfirmBook(int tradeId, params string[] contractTypes) { var doc = from contractRelation in DbContext.trade_contract_r where contractRelation.TradeId == tradeId && contractRelation.IsValid