diff --git a/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs b/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs index 1bfd5c0d..5c9f6b6f 100644 --- a/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs +++ b/YLErpDAL/Modules/DataProviderModule/EodPriceQueryService.cs @@ -20,7 +20,16 @@ namespace YLErp.Modules.DataProviderModule || db.eod_stock_price.Any(n => n.ValueDate == valueDate) || db.china_bond_valuation.Any(n => n.valuation_date == valueDate && n.dirty_price_close > 0); } - + /// + /// 校验FR007价格 + /// + /// + /// + public static bool CheckFR007Price(DateTime valueDate) + { + using var db = DbContextFactory.GetYLDbContext(); + return db.eod_commodity_future_price.Any(n => n.ValueDate == valueDate && n.UnderlyingCode == "FR007"); + } /// /// 检查是否存在收盘价 /// @@ -123,7 +132,7 @@ namespace YLErp.Modules.DataProviderModule valueDate = valueDate.Date; using var db = DbContextFactory.GetYLDbContext(); - var data = db.eod_commodity_future_price.Where(x => x.ValueDate <= valueDate && x.UnderlyingCode == underlyingCode).OrderByDescending(o => o.ValueDate).FirstOrDefault(); + var data = db.eod_commodity_future_price.Where(x => x.ValueDate == valueDate && x.UnderlyingCode == underlyingCode).OrderByDescending(o => o.ValueDate).FirstOrDefault(); if (data != null) { diff --git a/YLErpDAL/Modules/EodModule/SettlementModule/EodCheckSettlePrice.cs b/YLErpDAL/Modules/EodModule/SettlementModule/EodCheckSettlePrice.cs index 7c970b49..e071bb88 100644 --- a/YLErpDAL/Modules/EodModule/SettlementModule/EodCheckSettlePrice.cs +++ b/YLErpDAL/Modules/EodModule/SettlementModule/EodCheckSettlePrice.cs @@ -32,7 +32,10 @@ namespace YLErp.Modules.EodModule.SettlementModule var clienIds = _context.Request.ClientIds; IQueryable allQuery = null; - + if (!EodPriceQueryService.CheckFR007Price(_context.SettleDate)) + { + _context.RaiseError(Step, $"{_context.SettleDate:yyyy年MM月dd日}FR007价格未入库"); + } //判断当日结算价是否已经入库 if (!EodPriceQueryService.CheckDbExists(_context.SettleDate)) { diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index 159ceb0e..f0a178e4 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -4097,10 +4097,6 @@ namespace YLErp.Modules.RiskModule throw new ServiceException("未找到客户信息"); } var dealDate = DateTime.Parse(clientRiskCheckReq.dealDate); - if (client.EvaluateExpireDate< dealDate) - { - throw new ServiceException("适当性评估已经过期,只有在适当性有效期内才可以新开仓"); - } using var bondDb = new BondOmsDBContext(); var (clientPositions, clientOrderPositions) = GetClientPositionsAndOrders(bondDb, clientRiskCheckReq.orderId); var position = clientPositions @@ -4113,6 +4109,14 @@ namespace YLErp.Modules.RiskModule var ums = GetUnderlyings(umCodes); var checkPoisiList = BuildCheckQuotaMoitorModels(clientPositions, ums, dealDate); + var underlyingPositions = checkPoisiList.Where(x => x.UnderlyingCode == clientRiskCheckReq.securityId).ToList(); + var radio = clientRiskCheckReq.side == 0 ? 1 : -1; + var qty = underlyingPositions.Sum(s => s.Qty * (s.Side == 0 ? 1 : -1)); + var posiRadio = qty > 0 ? 1 : -1; + if (radio!= posiRadio&& client.EvaluateExpireDate < dealDate) + { + throw new ServiceException("适当性评估已经过期,只有在适当性有效期内才可以新开仓"); + } foreach (var settingItem in precheckQuotaSettingList) { var clientRiskCheckItem = CreateClientRiskCheckItem(settingItem); diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index f0d9010b..6355bf19 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -434,7 +434,7 @@ namespace YLErp.Modules.SwapModule position.FloatRate = Convert.ToDecimal(floatRate); positionClone.FloatRate = position.FloatRate; } - else if (needPrice) + else { throw new Exception($"获取不到{position.FloatRateUnderlyingCode}在{rateDate:yyyy年MM月dd日}的价格"); } @@ -641,7 +641,7 @@ namespace YLErp.Modules.SwapModule floatRate = floatRate1; } } - else if (needPrice && QdpCalendarHelper.IsHoliday(fr007RateDate)) + else { throw new Exception($"获取不到{position.FloatRateUnderlyingCode}在{fr007RateDate:yyyy年MM月dd日}的价格"); } @@ -714,7 +714,7 @@ namespace YLErp.Modules.SwapModule floatRate = floatRate1; } } - else if (needPrice && QdpCalendarHelper.IsHoliday(fr007RateDate)) + else { throw new Exception($"获取不到{position.FloatRateUnderlyingCode}在{fr007RateDate:yyyy年MM月dd日}的价格"); } diff --git a/YLErpWeb/App_Data/Config/clientEditConfig.js b/YLErpWeb/App_Data/Config/clientEditConfig.js index 09cc9843..cdc0f5d2 100644 --- a/YLErpWeb/App_Data/Config/clientEditConfig.js +++ b/YLErpWeb/App_Data/Config/clientEditConfig.js @@ -33,22 +33,11 @@ const editConfig = title: "适当性管理", className: "", fields: [ - { name: "ProperClientClass", label: "适当性类型", type: "select", appendBlank: true, dictionaryKey: "适当性客户分类" }, - { name: "AppropriatenessDegree", label: "适当性评级", type: "select", dictionaryKey: "适当性评级" }, - { name: "EvaluateDate", label: "评估日期", type: "date" }, - { name: "IsAssessmentResultChange", label: "评估结果变动", type: "select" }, + { name: "EvaluateDate", label: "准入或回访日期", type: "date" }, { type: "new-col" }, - { name: "IsEvaluate", label: "是否评估", required: true, type: "select" }, - { name: "RiskServiceDegree", label: "可接受风险服务", required: true, type: "select" }, - { name: "EvaluateOfValidity", label: "评估有效期", type: "select" }, - { name: "ChangeReasonAndEvaluationResults", label: "变动原因及历史", type: "text" }, - - { type: "new-col" }, - - { name: "AppropriatenessAssessor", label: "适当性评估人", type: "select", appendBlank: true }, - { name: "DisbeliefRecord", label: "失信行为记录", type: "text" }, + { name: "EvaluateOfValidity", label: "适当性有效期", type: "select" }, ] }, { diff --git a/YLErpWeb/wwwroot/Scripts/app/client/clientListV2.js b/YLErpWeb/wwwroot/Scripts/app/client/clientListV2.js index a298928f..1d24f1f9 100644 --- a/YLErpWeb/wwwroot/Scripts/app/client/clientListV2.js +++ b/YLErpWeb/wwwroot/Scripts/app/client/clientListV2.js @@ -195,7 +195,7 @@ function FormatColData(colData) { a.optionHide = true; a.frozen = true; break; - case 'ClientName': + case 'Name': a.optionHide = true; a.frozen = true; a.formatter = clientNameFormat; @@ -312,15 +312,6 @@ function gridComplete() { } function clientNameFormat(c, o, r) { var html = r.Name; - if (r.IsTradeCredit && r.IsCreditOn) { - html += ""; - } - if (!r.HasDocuments) { - html += ""; - } - if (r.IsExistContactExpired) { - html += ""; - } if (r.AssessmentExpired) { html += ''; }