diff --git a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeUnwindReportGenerator.cs b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeUnwindReportGenerator.cs
index 9e7a740f..3bba7d5d 100644
--- a/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeUnwindReportGenerator.cs
+++ b/Plugins/YLErp.Plugins.GuoLian/DocumentGenerator/TradeUnwindReportGenerator.cs
@@ -6,7 +6,7 @@ using YLErp.Plugins.TradeDocGenerator.Abstracts;
namespace YLErp.Plugins.GuoLian.DocumentGenerator
{
///
- /// 国联证券了结报告生成器
+ /// 鍥借仈璇佸埜浜嗙粨鎶ュ憡鐢熸垚鍣
///
internal class TradeUnwindReportGenerator : BaseUnwindReportGenerator, ITradeUnwindReportGenerator
{
@@ -17,7 +17,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
}
///
- /// 准备Word模板数据
+ /// 鍑嗗Word妯℃澘鏁版嵁
///
protected override void PrepareViewData(Dictionary dic)
{
@@ -37,72 +37,72 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
var settlementprice = (trade.IsUsePremiumRate != null && trade.IsUsePremiumRate.Value ? tradeCashs.UnwindPricePercentRate.OtcFormatPercent() : tradeCashs.UnwindPrice.OtcFormatMoney());
var row = new JObject();
OtcTradeBase trades = tradelist.Find(O => O.id == tradeCashs.TradeId);
- row["交易编号"] = trades.TradeNumber;
+ row["浜ゆ槗缂栧彿"] = trades.TradeNumber;
switch (item.BuySell)
{
- case "买入":
- if (trade.OpponentRole == null || trade.OpponentRole == "乙方")
+ case "涔板叆":
+ if (trade.OpponentRole == null || trade.OpponentRole == "涔欐柟")
{
- row["买方"] = $"甲方";
+ row["涔版柟"] = $"鐢叉柟";
}
else
{
- row["买方"] = $"乙方";
+ row["涔版柟"] = $"涔欐柟";
}
break;
- case "卖出":
- if (trade.OpponentRole == null || trade.OpponentRole == "乙方")
+ case "鍗栧嚭":
+ if (trade.OpponentRole == null || trade.OpponentRole == "涔欐柟")
{
- row["买方"] = $"乙方";
+ row["涔版柟"] = $"涔欐柟";
}
else
{
- row["买方"] = $"甲方";
+ row["涔版柟"] = $"鐢叉柟";
}
break;
default:
break;
}
- row["交易日期"] = $"{trades.TradeDate:yyyy/MM/dd}";
- row["开始日期"] = $"{trades.StartDate:yyyy/MM/dd}-{trades.ExerciseDate:yyyy/MM/dd}";
- row["名义本金"] = $"{trades.OriginalStockEqvNotional.OtcFormatMoney()}";
- row["标的代码"] = $"{trades.UnderlyingCode}";
- row["期权类型"] = $"{trades.TradeType}";
- row["期初价格"] = $"{trades.TradePrice.OtcFormatMoney()}";
- row["结算日期"] = $"{tradeCashs.ValueDate:yyyy/MM/dd}";
- row["结算价格"] = $"{tradeCashs.FinalPrice.OtcFormatMoney()}";
- row["结算模块"] = $"{(tradeCashs.UnwindPercentRate * trades.OriginalNotional * underlying.CountRatio).OtcFormatMoney()}";
- row["结算单价"] = $"{settlementprice}";
+ row["浜ゆ槗鏃ユ湡"] = $"{trades.TradeDate:yyyy/MM/dd}";
+ row["寮濮嬫棩鏈"] = $"{trades.StartDate:yyyy/MM/dd}-{trades.ExerciseDate:yyyy/MM/dd}";
+ row["鍚嶄箟鏈噾"] = $"{trades.OriginalStockEqvNotional.OtcFormatMoney()}";
+ row["鏍囩殑浠g爜"] = $"{trades.UnderlyingCode}";
+ row["鏈熸潈绫诲瀷"] = $"{trades.TradeType}";
+ row["鏈熷垵浠锋牸"] = $"{trades.TradePrice.OtcFormatMoney()}";
+ row["缁撶畻鏃ユ湡"] = $"{tradeCashs.ValueDate:yyyy/MM/dd}";
+ row["缁撶畻浠锋牸"] = $"{tradeCashs.FinalPrice.OtcFormatMoney()}";
+ row["缁撶畻妯″潡"] = $"{(tradeCashs.UnwindPercentRate * trades.OriginalNotional * underlying.CountRatio).OtcFormatMoney()}";
+ row["缁撶畻鍗曚环"] = $"{settlementprice}";
var Amountqrs = -tradeCashs.Amount;
- var Amountqrs2 = -(tradeCashs.Amount + (trades.TradePrice ?? 0) * (tradeCashs.UnwindPercentRate ?? 0) * ((trades.BuySell == "卖出") ? 1 : -1));
+ var Amountqrs2 = -(tradeCashs.Amount + (trades.TradePrice ?? 0) * (tradeCashs.UnwindPercentRate ?? 0) * ((trades.BuySell == "鍗栧嚭") ? 1 : -1));
- row["结算期权费"] = $"{Amountqrs.OtcFormatMoney()}";
- row["结算金额"] = $"{Amountqrs2.OtcFormatMoney()}";
+ row["缁撶畻鏈熸潈璐"] = $"{Amountqrs.OtcFormatMoney()}";
+ row["缁撶畻閲戦"] = $"{Amountqrs2.OtcFormatMoney()}";
table1.Add(row);
valuetimelist.Add(tradeCashs.ValueDate);
}
}
- dic["合同编号"] = Context.GenerateContractNo(out _);
+ dic["鍚堝悓缂栧彿"] = Context.GenerateContractNo(out _);
dic["table1"] = table1;
- dic["合同日期"] = $"{DateTime.Now.ToString("yyyy/MM/dd")}";//ValueDate
- dic["了结日期1"] = $"{valuetimelist.Min():yyyy/MM/dd}";
- dic["了结日期2"] = $"{valuetimelist.Max():yyyy/MM/dd}";
+ dic["鍚堝悓鏃ユ湡"] = $"{DateTime.Now.ToString("yyyy/MM/dd")}";//ValueDate
+ dic["浜嗙粨鏃ユ湡1"] = $"{valuetimelist.Min():yyyy/MM/dd}";
+ dic["浜嗙粨鏃ユ湡2"] = $"{valuetimelist.Max():yyyy/MM/dd}";
- #region 甲乙方信息判断
+ #region 鐢蹭箼鏂逛俊鎭垽鏂
- var owner_Info = Context.GetOwner_info("默认");
- dic["客户名称"] = client != null ? client.Name : "";
- dic["公司名称"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
- if (trade.OpponentRole == null || trade.OpponentRole == "乙方")
+ var owner_Info = Context.GetOwner_info("榛樿");
+ dic["瀹㈡埛鍚嶇О"] = client != null ? client.Name : "";
+ dic["鍏徃鍚嶇О"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
+ if (trade.OpponentRole == null || trade.OpponentRole == "涔欐柟")
{
- dic["甲方"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
- dic["乙方"] = client != null ? client.Name : "";
+ dic["鐢叉柟"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
+ dic["涔欐柟"] = client != null ? client.Name : "";
}
else
{
- dic["甲方"] = client != null ? client.Name : "";
- dic["乙方"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
+ dic["鐢叉柟"] = client != null ? client.Name : "";
+ dic["涔欐柟"] = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
}
#endregion
@@ -120,7 +120,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
var client = Context.GetClient();
var trade = Context.Trade;
var tradelist = Context.Trades.Union(Context.SubTrades).ToList();
- var owner_Info = Context.GetOwner_info("默认") ?? new Owner_info();
+ var owner_Info = Context.GetOwner_info("榛樿") ?? new Owner_info();
var dts = tradelist.Max(m => m.TradeDate);
var dte = tradelist.Min(m => m.TradeDate);
var date = "";
@@ -133,7 +133,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
date = dts?.ToString("yyyyMMdd") + "-" + dte?.ToString("yyyyMMdd");
}
var FullName = owner_Info != null ? owner_Info.FullName != null ? owner_Info.FullName : "" : "";
- var rule = $"{FullName}{trade.TradeType}结算确认书{date}";
+ var rule = $"{FullName}{trade.TradeType}缁撶畻纭涔date}";
Context.GetcontractIndex(rule, out var contractIndex2);
return $"{rule}-{contractIndex2}.{DocType.ToLower()}";
}