();
+ foreach (var obsDate in observationDates)
+ {
+ var settleDate = obsDate.AddDays(settlementRules);
+ settleDate = calendar.Adjust(new Date(settleDate), bdc).DateTime;
+
+ results.Add(new ObservationSettleDateResult
+ {
+ ObservationDate = obsDate,
+ SettleDate = settleDate
+ });
+ }
+
+ return results.ToArray();
+ }
+ }
+
+ public class ObservationSettleDateResult
+ {
+ public DateTime ObservationDate { get; set; }
+ public DateTime SettleDate { get; set; }
}
}
diff --git a/YLErpWeb/Controllers/SwapTrade2Controller.cs b/YLErpWeb/Controllers/SwapTrade2Controller.cs
index 03bac4c3..6b174297 100644
--- a/YLErpWeb/Controllers/SwapTrade2Controller.cs
+++ b/YLErpWeb/Controllers/SwapTrade2Controller.cs
@@ -153,6 +153,17 @@ namespace YLErp.Web.Controllers
return JsonSuccess("");
}
///
+ /// 校验收益结算操作(不检查收盘限制)
+ ///
+ ///
+ ///
+ public JsonResult CheckEodTradeForIncome(string enid)
+ {
+ var intid = DecryptInt(enid);
+ new SwapDealService(CurUser).CheckEodTradeForIncome(intid);
+ return JsonSuccess("");
+ }
+ ///
/// 收益互换 平仓
///
///
diff --git a/YLErpWeb/Controllers/tradeController.cs b/YLErpWeb/Controllers/tradeController.cs
index 05a793d4..990c31ee 100644
--- a/YLErpWeb/Controllers/tradeController.cs
+++ b/YLErpWeb/Controllers/tradeController.cs
@@ -1,4 +1,4 @@
-using iTextSharp.text;
+using iTextSharp.text;
using iTextSharp.text.pdf;
using NPOI.POIFS.Crypt;
using Qdp.Pricing.Base.Enums;
@@ -3456,6 +3456,14 @@ namespace YLErp.Web.Controllers
return JsonSuccess("", QdpObservationHelper.GetDatesWithFixedTerm(req.startDate, req.endDate, req.termStr, bdc, req.alignEnd, req.calcMode));
}
+ [HttpPost]
+ public JsonResult GetSwapObservationDateList(GetSwapObservationDateRequest req)
+ {
+ var bdc = (BusinessDayConvention)Enum.Parse(typeof(BusinessDayConvention), req.holidayAdjustment);
+ var results = QdpObservationHelper.GetObservationAndSettleDates(req.startDate, req.endDate, req.termStr, req.calendar, req.settlementRules, bdc, req.alignEnd, req.calcMode);
+ return JsonSuccess("", results);
+ }
+
public ActionResult StructureList(string structure, string CalcId, bool onlyshow = false)
{
var ret = new DZStructureService(CurUser).getStructureList(structure);
diff --git a/YLErpWeb/Models/GetSwapObservationDateRequest.cs b/YLErpWeb/Models/GetSwapObservationDateRequest.cs
new file mode 100644
index 00000000..643879b9
--- /dev/null
+++ b/YLErpWeb/Models/GetSwapObservationDateRequest.cs
@@ -0,0 +1,28 @@
+namespace YLErp.Web.Models
+{
+ public class GetSwapObservationDateRequest
+ {
+ public DateTime startDate { get; set; }
+
+ public DateTime endDate { get; set; }
+
+ public string termStr { get; set; }
+
+ public string holidayAdjustment { get; set; }
+
+ public bool alignEnd { get; set; }
+
+ public string calcMode { get; set; }
+
+ public string calendar { get; set; }
+
+ public int settlementRules { get; set; }
+ }
+
+ public class SwapObservationDateResult
+ {
+ public DateTime ObservationDate { get; set; }
+
+ public DateTime SettleDate { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
index 1e4ee463..00b0d748 100644
--- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
+++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
@@ -1,4 +1,4 @@
-@using YLErp.Web.Models.JsModels;
+@using YLErp.Web.Models.JsModels;
@model trade
@{
ViewBag.Title = "交易信息 | 编辑";
@@ -294,7 +294,7 @@
|
-
+
|
@@ -363,7 +363,7 @@
|
-
+
|
|
-
+
|
@@ -512,7 +512,22 @@
-
+
+ 交易日历
+
+
+
+ 结算规则
+
+
节假日调整
|