diff --git a/Plugins/YLErp.Plugins.ZheShang/App_Docs/结算单/非DMA结算单.xlsx b/Plugins/YLErp.Plugins.ZheShang/App_Docs/结算单/非DMA结算单.xlsx index f5e2a2fc..2cf6a553 100644 Binary files a/Plugins/YLErp.Plugins.ZheShang/App_Docs/结算单/非DMA结算单.xlsx and b/Plugins/YLErp.Plugins.ZheShang/App_Docs/结算单/非DMA结算单.xlsx differ diff --git a/Plugins/YLErp.Plugins.ZheShang/DocumentGenerator/TradeSettleBillGenerator.cs b/Plugins/YLErp.Plugins.ZheShang/DocumentGenerator/TradeSettleBillGenerator.cs index 06d52fa3..0536d73d 100644 --- a/Plugins/YLErp.Plugins.ZheShang/DocumentGenerator/TradeSettleBillGenerator.cs +++ b/Plugins/YLErp.Plugins.ZheShang/DocumentGenerator/TradeSettleBillGenerator.cs @@ -65,13 +65,13 @@ namespace YLErp.Plugins.ShanXi.DocumentGenerator payDate = QdpCalendarHelper.GetNonHoliday(flowEventGroup.EventDate.AddDays(sr)); } row.PayDate = payDate.Value.ToString("yyyy-MM-dd"); - row.ClosePrice = ((flowEventGroup.TradingAmountAvg) * 100).OtcFormat(OtcFormatFlag.umprice); + row.ClosePrice = ((flowEventGroup.TradingAmountAvg) * 100).ToString("0.00000000"); decimal interestRate = unwindFlowEvents.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)).Sum(s => s.InterestRate); row.InterestRate = interestRate.ToString("0.00%"); var PosiNotionalValue = flowEventGroup.Quantity * flowEventGroup.ContractSize* posi.PosiGrossPrice; row.Quantity= flowEventGroup.Quantity.ToString("0.00"); row.PosiNotionalValue = PosiNotionalValue.ToString("0.00"); - row.PosiNetPrice = (posi.PosiGrossPrice * 100).OtcFormat(OtcFormatFlag.umprice); + row.PosiNetPrice = (posi.PosiGrossPrice * 100).ToString("0.00000000"); //var tradingFee = (flowEventGroup.TradingAmountFeeAvg- posi.PosiNetPrice- flowEventGroup.TradingAmountAvg+ posi.PosiGrossPrice)* PosiNotionalValue* ratio; var tradingFee = flowEventGroup.TradingFee + flowEventGroup.TradingFeePending; row.Fee = (-tradingFee).ToString("0.00"); diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index 7e731add..d14a007d 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -877,7 +877,7 @@ namespace YLErp.Modules.SwapModule floatEvent.TradingAmountNetFeeAvg = unwindNetFee; floatEvent.TradingAmountNetAvg = unwindNet; floatEvent.TradingFeePending = position.PosiTradingFeePending * unwindData.ClosePercent; - floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, 2, MidpointRounding.AwayFromZero); + floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, 4, MidpointRounding.AwayFromZero); floatEvent.TradingFee = closeFee; floatEvent.MarkClosePnl = (unwindPrice - position.PosiGrossPrice) * unwindQty * floatRatio * longRatio; floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + ((floatEvent.TradingFeePending+ closeFee) * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero); diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs index 90eddc20..733ce93b 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeAutoService.cs @@ -698,6 +698,7 @@ namespace YLErp.Modules.SwapModule } flowMergeClone.TradingAmount = Math.Abs(amount); flowMergeClone.TradingFeePending = flowMergeClone.TradingFeePending * qtyAbs / flowMergeClone.TradingQty;//剩余后付费用 + flowMergeClone.TradingFeePending = Math.Round(flowMergeClone.TradingFeePending, 4, MidpointRounding.AwayFromZero); flowMergeClone.TradingQty = qtyAbs; if (qty > 0)//交易有剩余新开仓 { @@ -1333,6 +1334,7 @@ namespace YLErp.Modules.SwapModule var newQtyAbs = Math.Abs(newQty); flowMerge.SwapTradeNo = td.TradeNumber; var unwindFee= newQty>0? flowMerge.TradingFeePending: flowMerge.TradingFeePending* floatPosition.PosiQuantity / flowMerge.TradingQty; + unwindFee = Math.Round(unwindFee, 4, MidpointRounding.AwayFromZero); // 全平 new SwapDealService(UserInfo).AuotoSwapUnwind(td.id, flowMerge.TradingAmountAvg,