diff --git a/Framework/YLErp.Core/ConsGlobal.cs b/Framework/YLErp.Core/ConsGlobal.cs index d86d1f37..dc91f9a4 100644 --- a/Framework/YLErp.Core/ConsGlobal.cs +++ b/Framework/YLErp.Core/ConsGlobal.cs @@ -134,7 +134,7 @@ namespace YLErp case HKStock: return "香港股票"; case HKStockIndex: return "香港股指"; case Fund: return "基金及基金专户"; - case TBonds: return (PS.Config.Company == Configuration.CompanyEnum.山西固收) ? "利率债" : "国债"; + case TBonds: return "利率债"; case GoldFutures: return "黄金期货"; case TBFutures: return "国债期货"; case OtherFutures: return "其他期货"; @@ -231,7 +231,7 @@ namespace YLErp new SelectItem { Text = "香港股票" ,Value = HKStock}, new SelectItem { Text = "香港股指" ,Value = HKStockIndex}, new SelectItem { Text = "基金及基金专户" ,Value = Fund}, - new SelectItem { Text = (PS.Config.Company == Configuration.CompanyEnum.山西固收)?"利率债":"国债" ,Value = TBonds}, + new SelectItem { Text = "利率债" ,Value = TBonds}, new SelectItem { Text = "信用债" ,Value = CreditBonds}, new SelectItem { Text = "其它债券" ,Value = OtherBonds}, new SelectItem { Text = "黄金期货" ,Value = GoldFutures}, diff --git a/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs b/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs index bae6d21c..532da6ca 100644 --- a/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs +++ b/YLErpDAL/BLL/EodSettlement/ClientBalanceUtility.cs @@ -226,7 +226,7 @@ namespace YLErp.BLL.EodSettlement var marginRate = client?.MarginRate ?? 0; data.AvailableAmount = data.AmountFund + (data.PayableMargin * marginRate); } - else if (PS.Config.Is山西固收) + else { data.AvailableAmount = data.AmountFund + data.TotalCredit + data.PayableMargin + data.GuaranteesTotalAmount; data.MinusPayableMarginTotal = data.MinusPayableMargin; @@ -327,24 +327,7 @@ namespace YLErp.BLL.EodSettlement balance.TotalCredit = data.TotalCredit; balance.PayableMargin = data.PayableMargin; balance.GuaranteesTotalAmount = data.GuaranteesTotalAmount; - if (PS.Config.Is国投) - { - balance.AvailableAmount = balance.AmountFund + balance.TotalCredit + balance.PayableMargin; - } - else if (PS.Config.Is伴兴 || PS.Config.Is湘财) - { - balance.AvailableAmount += balance.TotalCredit; - } - else if (PS.Config.Is东吴) - { - // 可用金额 - var marginRate = client?.MarginRate ?? 0; - balance.AvailableAmount = balance.AmountFund + (balance.PayableMargin * marginRate); - } - else if (PS.Config.Is山西固收) - { - balance.AvailableAmount = balance.AmountFund + balance.TotalCredit + balance.PayableMargin + balance.GuaranteesTotalAmount; - } + balance.AvailableAmount = balance.AmountFund + balance.TotalCredit + balance.PayableMargin + balance.GuaranteesTotalAmount; balance.DeltaMargin = data.DeltaMargin; balance.SwapPayableMargin = data.SwapPayableMargin; balance.SwapUnMargin = data.SwapUnPayableMargin; @@ -366,14 +349,7 @@ namespace YLErp.BLL.EodSettlement balance.SellPv = data.SellPv; balance.PrepaymentAmount = data.PrepaymentAmount; balance.DaliyPnl = data.DaliyPnl; - if (PS.Config.Is山西固收) - { - balance.RoundedDaliyPnl = data.RoundedPositionPnl - (lastClientBalanceDaily?.RoundedPositionPnl ?? 0); - } - else - { - balance.RoundedDaliyPnl = (data.TdWinLoss ?? 0) + data.RoundedPositionPnl - (lastClientBalanceDaily?.RoundedPositionPnl ?? 0); - } + balance.RoundedDaliyPnl = data.RoundedPositionPnl - (lastClientBalanceDaily?.RoundedPositionPnl ?? 0); balance.PositionPnl = data.PositionPnl; balance.RoundedPositionPnl = data.RoundedPositionPnl; balance.ClientSellPositionPnl = data.ClientSellPositionPnl; diff --git a/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs b/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs index 9c2679e2..97d9d8ea 100644 --- a/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs +++ b/YLErpDAL/BLL/EodSettlement/RealtimePnlCalc.cs @@ -562,7 +562,6 @@ namespace YLErp.BLL.Eod var multiplier = ConsGlobal.InstrumentType.IsBond(lastPosi.UnderlyingInstrumentType) ? ConsGlobal.bondShowPriceMultiple : 1; var price = lastPosi.PosiGrossPrice * multiplier; var netPrice = lastPosi.PosiNetNoFeePrice * multiplier; - var dma = trades.Any(s=>s.StructureType== "定义文件型债券收益互换"); var um = DataCacheProvider.GetUnderlyingDataSource().GetData(pair.Key.UnderlyingCode); clientPosition = CreateClientPosition(clientPosition, pair.Key.ClientId, pair.Key.UnderlyingCode, netPrice??0, price, posiQty / 10000, comminsions, positionType == PositionTypeFlag.Long ? 0 : 1, lastPosi.ContractSize, pair.Key.PosiDirection); if (pair.Key.PosiDirection==(int)SwapDirectionEnum.支付) @@ -571,15 +570,7 @@ namespace YLErp.BLL.Eod dealSwapFlowIds.AddRange(newSwapFlows.Select(s => s.id)); if (flowMerges.Any()) { - if (client.SwapTradeType != 1) - { - MergeSwapPosition(flowMerges, positionType, clientPosition, posiQty); - } - else - { - swapTradeAutoService.MergeSwapPositionAvg(newSwapFlows, positionGroupItems.ToList(), clientPosition, multiplier, (int)positionType); - } - + MergeSwapPosition(flowMerges, positionType, clientPosition, posiQty); } } clientPosition.update_user = 0; @@ -628,16 +619,7 @@ namespace YLErp.BLL.Eod } var clientPosition = clientPositions.FirstOrDefault(x => x.client_id == swapFlowGroup.Key.ClientId && x.security_id == swapFlowGroup.Key.UnderlyingCode); clientPosition = CreateClientPosition(clientPosition, swapFlowGroup.Key.ClientId ?? 0, swapFlowGroup.Key.UnderlyingCode, flowMergeMax.TradingAmountNetAvg ?? 0, flowMergeMax.TradingAmountAvg, qty / 10000, comminsions, flowMergeMax.BsType == (int)PositionTypeFlag.Long ? 0 : 1, flowMergeMax.ContractSize, (int)SwapDirectionEnum.支付); - if (client.SwapTradeType != 1) - { - clientPosition.position_qty = qty / 10000; - } - else - { - var flowList = swapFlowGroup.OrderBy(o=>o.OptTime).ToList(); - var posiType= flowList.First().BsType; - swapTradeAutoService.MergeSwapPositionAvg(flowList, null, clientPosition, multiplier, posiType); - } + clientPosition.position_qty = qty / 10000; clientPosition.update_user = 0; if (clientPosition.id == 0) { diff --git a/YLErpDAL/BLL_System/UserBLL.cs b/YLErpDAL/BLL_System/UserBLL.cs index 7a0977db..941902c4 100644 --- a/YLErpDAL/BLL_System/UserBLL.cs +++ b/YLErpDAL/BLL_System/UserBLL.cs @@ -329,9 +329,9 @@ namespace BaseOUDAL if (AccountPost == 0) { return string.Empty; } switch (AccountPost) { - case 1:if (PS.Config.Is山西固收) return "对冲交易询价对象"; return "客户经理"; - case 2:if (PS.Config.Is山西固收) return "非对冲交易询价对象"; return "交易员"; - default: if (PS.Config.Is山西固收) return "对冲交易询价对象,非对冲交易询价对象"; return "客户经理,交易员"; + case 1: return "对冲交易询价对象"; + case 2: return "非对冲交易询价对象"; + default: return "对冲交易询价对象,非对冲交易询价对象"; } } diff --git a/YLErpDAL/Model/Configcolumn.cs b/YLErpDAL/Model/Configcolumn.cs index 77804590..16f2adb8 100644 --- a/YLErpDAL/Model/Configcolumn.cs +++ b/YLErpDAL/Model/Configcolumn.cs @@ -155,7 +155,6 @@ namespace YLErp.Model public const string 交易预付金配置 = "tradeMarginTemplateList"; public const string 互换估值 = "SettmentEodSwapPositionList"; - public const string 定义文件互换估值 = "DmaSettmentEodSwapPositionList"; public const string 衡泰对账 = "compare_heitai_data"; } diff --git a/YLErpDAL/Modules/ClientModule/ClientSaveService.cs b/YLErpDAL/Modules/ClientModule/ClientSaveService.cs index 3f50702f..468306f9 100644 --- a/YLErpDAL/Modules/ClientModule/ClientSaveService.cs +++ b/YLErpDAL/Modules/ClientModule/ClientSaveService.cs @@ -696,10 +696,6 @@ namespace YLErp.Modules.ClientModule { throw new ServiceException("客户名称 必须填写"); } - if (string.IsNullOrWhiteSpace(req.SettleFileNumber)&&req.SwapTradeType==1) - { - throw new ServiceException("定义文件编号 必须填写"); - } //if (string.IsNullOrWhiteSpace(req.)) //{ // throw new ServiceException("自定义必须填写"); diff --git a/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs b/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs index 1522fe4c..14815698 100644 --- a/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs +++ b/YLErpDAL/Modules/EodModule/SettlementModule/EodClientBalanceCalc.cs @@ -112,23 +112,7 @@ namespace YLErp.Modules.EodModule.SettlementModule eodRiskList = eodRiskList.Where(t => reqClientIds.Contains(t.ClientId)).ToList(); } //获取所有用户当日Eod_pnl - IEnumerable eodpnlList; - if (PS.Config.Company == CompanyEnum.国投) - { - eodpnlList = DbContext.eod_trade_position_openvol.Where(t => t.ValueDate == balanceDate).ToList(); - } - else if (PS.Config.Company == CompanyEnum.格林大华) - { - eodpnlList = DbContext.eod_trade_position.Where(t => t.ValueDate == balanceDate).ToList(); - } - else if (PS.Config.Is山西固收) - { - eodpnlList = DbContext.eod_trade_position.Where(t => t.ValueDate == balanceDate && t.TradeType != "收益互换").ToList(); - } - else - { - eodpnlList = DbContext.eod_trade_position.Where(t => t.ValueDate == balanceDate).ToList(); - } + IEnumerable eodpnlList = DbContext.eod_trade_position.Where(t => t.ValueDate == balanceDate && t.TradeType != "收益互换").ToList(); if (reqClientIds != null && reqClientIds.Any()) { diff --git a/YLErpDAL/Modules/EodModule/SettlementModule/EodTaskRunner.cs b/YLErpDAL/Modules/EodModule/SettlementModule/EodTaskRunner.cs index a0b59f69..d632c345 100644 --- a/YLErpDAL/Modules/EodModule/SettlementModule/EodTaskRunner.cs +++ b/YLErpDAL/Modules/EodModule/SettlementModule/EodTaskRunner.cs @@ -578,11 +578,8 @@ where {nameof(t.TaskStartTime)}>'{startDateStr}' and {nameof(t.TaskState)}={(int SetTaskStep("检查当日到期交易"); new EodCheckMaturityTrade(_context).Execute();//t } - if (PS.Config.Is山西固收) - { - new EodCheckMonitoredTrade(_context).CalculateMargin(); - new EodCheckMonitoredTrade(_context).ExecuteEodSwap(); - } + new EodCheckMonitoredTrade(_context).CalculateMargin(); + new EodCheckMonitoredTrade(_context).ExecuteEodSwap(); tasks = new Task[4]; if (_request.IsSettleExchangeTrades) diff --git a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs index dd9b0cdf..d27f0f8e 100644 --- a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs +++ b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs @@ -126,12 +126,6 @@ namespace YLErp.Modules.ExchangeTradeModule item.UnderlyingPrice = Underlying.Price.OtcFormat(OtcFormatFlag.marginRate); item.PositionCost = item.PositionCount * Underlying.CountRatio; item.CountRatio = Underlying.CountRatio; - //if (PS.Config.Company == Configuration.CompanyEnum.山西固收) - //{ - // item.Position=Math.Abs(item.Position); - // item.PositionCost = Math.Abs(item.PositionCost); - // item.PositionCount=Math.Abs(item.PositionCount); - //} } return list; diff --git a/YLErpDAL/Modules/MarginModule/MarginRateSwapService.cs b/YLErpDAL/Modules/MarginModule/MarginRateSwapService.cs index faa8700c..98a81cee 100644 --- a/YLErpDAL/Modules/MarginModule/MarginRateSwapService.cs +++ b/YLErpDAL/Modules/MarginModule/MarginRateSwapService.cs @@ -86,15 +86,10 @@ namespace YLErp.Modules.MarginModule InitMarginRebateRate = reader.GetDecimalPercent("期初预付金利率", false) ?? 0, AddToMarginRebateRate= reader.GetDecimalPercent("追加预付金利率", false) ?? 0, LongInitMarginRate = reader.GetDecimalPercent("多头期初预付金率", false), - ShortInitMarginRate = reader.GetDecimalPercent("空头期初预付金率", false), - Type = reader.GetString("类型", true) + ShortInitMarginRate = reader.GetDecimalPercent("空头期初预付金率", false) }; var client = new Client(); - if (marginRate.Type != "普通" && marginRate.Type != "多空组合") - { - throw new ServiceException("类型设置错误,类型必须位[普通]或[定义文件]"); - } - marginRate.Type = marginRate.Type == "普通" ? "品种" : "多空组合"; + marginRate.Type = "品种"; if (!string.IsNullOrWhiteSpace(marginRate.ClientName)) { client = DataCacheProvider.GetClientDataSource().AsQueryable().Where(o => o.Name == marginRate.ClientName).FirstOrDefault(); @@ -114,32 +109,12 @@ namespace YLErp.Modules.MarginModule { throw new ServiceException("无数据"); } - if (PS.Config.Is山西固收) + if (marginrate.InitMarginRate < 0) { - if (marginrate.InitMarginRate < 0) - { - throw new ServiceException("预付金率数据格式错"); - } - } - else - { - if (marginrate.InitMarginRate < 0 || marginrate.ClosePositionLine < 0 || marginrate.WarningLine < 0) - { - throw new ServiceException("预付金率数据格式错"); - } - } - //if (marginrate.Type == "品种" && marginrate.VarietyId == 0) - //{ - // throw new ServiceException("设置品种预付金,品种代码必填"); - //} - - //品种预付金设置验证 - if (marginrate.VarietyId>0) - { - checkMarginRate(marginrate); + throw new ServiceException("预付金率数据格式错"); } var dbMarginRate = new client_marginrate(); - var marginrateType = marginrate.Type == "多空组合" ? "定义文件" : "普通"; + var marginrateType = "普通"; if (marginrate.id != 0) { dbMarginRate = DbContext.client_marginrate.Find(marginrate.id); @@ -148,10 +123,7 @@ namespace YLErp.Modules.MarginModule throw new ServiceException("未找到该记录"); } dbMarginRate.ClientId = marginrate.ClientId; - if (marginrate.Type == "品种") - { - dbMarginRate.VarietyId = marginrate.VarietyId; - } + dbMarginRate.VarietyId = marginrate.VarietyId; dbMarginRate.Type = marginrate.Type; dbMarginRate.InitMarginRate = marginrate.InitMarginRate; dbMarginRate.ClosePositionLine = marginrate.ClosePositionLine; @@ -164,8 +136,7 @@ namespace YLErp.Modules.MarginModule dbMarginRate.OptId = UserId; dbMarginRate.OptName = UserName; dbMarginRate.OptDate = DateTime.Now; - if (DbContext.client_marginrate.Any(o => - (marginrate.Type == "多空组合" || (marginrate.Type == "品种" && o.VarietyId == marginrate.VarietyId)) + if (DbContext.client_marginrate.Any(o =>marginrate.Type == "品种" && o.VarietyId == marginrate.VarietyId && o.ClientId == marginrate.ClientId && o.ValueDate == marginrate.ValueDate && o.id != marginrate.id)) @@ -175,8 +146,7 @@ namespace YLErp.Modules.MarginModule } else { - dbMarginRate = DbContext.client_marginrate.Where(o => - (marginrate.Type == "多空组合" || (marginrate.Type == "品种" && o.VarietyId == marginrate.VarietyId)) + dbMarginRate = DbContext.client_marginrate.Where(o =>marginrate.Type == "品种" && o.VarietyId == marginrate.VarietyId && o.Type == marginrate.Type && o.ClientId == marginrate.ClientId && o.ValueDate == marginrate.ValueDate).FirstOrDefault(); diff --git a/YLErpDAL/Modules/ReportModule/SettlementReportModule/ClientDingShiReport_ShanXi.cs b/YLErpDAL/Modules/ReportModule/SettlementReportModule/ClientDingShiReport_ShanXi.cs index 3728e17b..efbe7d31 100644 --- a/YLErpDAL/Modules/ReportModule/SettlementReportModule/ClientDingShiReport_ShanXi.cs +++ b/YLErpDAL/Modules/ReportModule/SettlementReportModule/ClientDingShiReport_ShanXi.cs @@ -18,10 +18,6 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule /// public List EodSwapPositions { get; set; } /// - /// 定义文件互换估值 - /// - public List DmaEodSwapPositions { get; set; } - /// /// 互换持仓明细 /// public List SwapPositions { get; set; } diff --git a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs index 8bbe2887..50f1be78 100644 --- a/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs +++ b/YLErpDAL/Modules/ReportModule/SettlementReportModule/SettlementReportFotShanXiService.cs @@ -63,11 +63,6 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule var eodReq = new ClientSwapPositionRequest { ClientId = emailData.ClientId, ValueDate = emailData.To, ValueDateFrom = emailData.From,page=1, rows=10000,StructureType= "普通债券类收益互换" }; report.EodSwapPositions = swapEodPositionService.SearchEodPositionList(eodReq).rows.ToList(); } - if (emailData.SendContent.Contains("定义文件互换估值")) - { - var eodReq = new ClientSwapPositionRequest { ClientId = emailData.ClientId, ValueDate = emailData.To, ValueDateFrom = emailData.From, page = 1, rows = 10000, StructureType = "定义文件型债券收益互换" }; - report.DmaEodSwapPositions = swapEodPositionService.SearchEodPositionList(eodReq).rows.ToList(); - } if (emailData.SendContent.Contains("互换持仓明细")) { var eodReq = new ClientSwapPositionRequest { ClientId = emailData.ClientId, ValueDate = emailData.To, ValueDateFrom = emailData.From, page = 1, rows = 10000 }; @@ -240,10 +235,6 @@ namespace YLErp.Modules.ReportModule.SettlementReportModule { modelDict.Add("互换估值", report.EodSwapPositions); } - if (report.DmaEodSwapPositions != null) - { - modelDict.Add("定义文件互换估值", report.DmaEodSwapPositions); - } if (report.SwapPositions != null) { modelDict.Add("互换持仓明细", report.SwapPositions); diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index 65152d31..8fc1eb00 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -3613,38 +3613,34 @@ namespace YLErp.Modules.RiskModule Status = QuotaSettingApprovalStatus.Valid, }); - if (PS.Config.Is山西固收) + //交易-互换价格偏离比例 + _quotaSettings.Add(new QuotaSetting() { - //交易-互换价格偏离比例 - _quotaSettings.Add(new QuotaSetting() - { - QuotaType = QuotaTypeEnum.TRADE, - QuotaRange = 0, - QuotaIndex = "互换价格偏离比例", - QuotaLowerLimit = null, - QuotaUpperLimit = null, - WarningLowerLimit = null, - WarningUpperLimit = null, - Percent = true, - IsValid = true, - Status = QuotaSettingApprovalStatus.Valid, - }); - //交易-DV01 - _quotaSettings.Add(new QuotaSetting() - { - QuotaType = QuotaTypeEnum.TRADE, - QuotaRange = 0, - QuotaIndex = "DV01", - QuotaLowerLimit = null, - QuotaUpperLimit = null, - WarningLowerLimit = null, - WarningUpperLimit = null, - Percent = false, - IsValid = true, - Status = QuotaSettingApprovalStatus.Valid, - }); - } - + QuotaType = QuotaTypeEnum.TRADE, + QuotaRange = 0, + QuotaIndex = "互换价格偏离比例", + QuotaLowerLimit = null, + QuotaUpperLimit = null, + WarningLowerLimit = null, + WarningUpperLimit = null, + Percent = true, + IsValid = true, + Status = QuotaSettingApprovalStatus.Valid, + }); + //交易-DV01 + _quotaSettings.Add(new QuotaSetting() + { + QuotaType = QuotaTypeEnum.TRADE, + QuotaRange = 0, + QuotaIndex = "DV01", + QuotaLowerLimit = null, + QuotaUpperLimit = null, + WarningLowerLimit = null, + WarningUpperLimit = null, + Percent = false, + IsValid = true, + Status = QuotaSettingApprovalStatus.Valid, + }); #endregion #region 客户 @@ -4381,13 +4377,6 @@ namespace YLErp.Modules.RiskModule return true; } var lastTrial = trialService.QueryLastQuotaTrial(tradeId, true); - if (quotaObj.TrialStatus == QuotaTrialStatusEnum.Error && !PS.Config.Is山西固收 - && (lastTrial == null || lastTrial.TrialStatus == QuotaTrialStatusEnum.Error))//上次没算或上次和这次试算结果都不通过,直接拒绝 - { - res.RetCode = TradeOpenRetCode.QuotaTrialError; - res.ErrorMsg = $"试算不通过,不允许确认成交操作"; - return false; - } if (quotaObj.TrialStatus == QuotaTrialStatusEnum.Success) { new TradeRiskCheckLogService(UserInfo).AddLog(quotaObj); @@ -4653,11 +4642,8 @@ namespace YLErp.Modules.RiskModule } string quotaWarningMsg = "", quotaMsg = ""; bool quotaWarningStatus = true, quotaStatus = true; - if (PS.Config.Is山西固收 && tradeObj.StructureType != "定义文件型债券收益互换") - { - var positions = DbContext.swap_position.Where(x => x.SwapTradeId == tradeId && x.PosiQuantity > 0 && x.IsInitial && !x.Invalid).ToList(); - quotaStatus = CheckUnderlyingWhiteList(tradeObj.ClientId, positions, out quotaMsg); - } + var positions = DbContext.swap_position.Where(x => x.SwapTradeId == tradeId && x.PosiQuantity > 0 && x.IsInitial && !x.Invalid).ToList(); + quotaStatus = CheckUnderlyingWhiteList(tradeObj.ClientId, positions, out quotaMsg); if (quotaStatus) { var allList = QueryPrecheckQuotaSetting(false); @@ -4760,14 +4746,7 @@ namespace YLErp.Modules.RiskModule } else { - if (PS.Config.ErpElement.Company == Configuration.CompanyEnum.天风 || PS.Config.Is山西固收) - { - result.TrialStatus = QuotaTrialStatusEnum.Error; - } - else - { - result.TrialStatus = QuotaTrialStatusEnum.Warning; - } + result.TrialStatus = QuotaTrialStatusEnum.Error; } } result.TradeId = tradeObj.id; diff --git a/YLErpDAL/Modules/SwapModule/SwapEventEmailService.cs b/YLErpDAL/Modules/SwapModule/SwapEventEmailService.cs index 0a471402..73cd88ab 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEventEmailService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEventEmailService.cs @@ -65,7 +65,7 @@ namespace YLErp.Modules.SwapModule from se in setemp.DefaultIfEmpty() join em in emailquery on f.id equals em.event_id into emTmp from em in emTmp.DefaultIfEmpty() - where t.ValidState == "Valid" && t.StructureType != "多空组合" && t.StructureType != "定义文件型债券收益互换" + where t.ValidState == "Valid" && t.TradeType == "收益互换" select new SwapEventEmailResponse { event_id = f.id, @@ -158,7 +158,7 @@ namespace YLErp.Modules.SwapModule from se in setemp.DefaultIfEmpty() join em in DbContext.swap_event_email on f.id equals em.event_id into emTmp from em in emTmp.DefaultIfEmpty() - where t.ValidState == "Valid" && t.StructureType != "多空组合" && t.StructureType != "定义文件型债券收益互换" && (em == null || em.send_email == false) + where t.ValidState == "Valid" && t.TradeType=="收益互换" && (em == null || em.send_email == false) && clientIds.Contains(f.ClientId) && f.UnwindDate == valueDate && f.PayDirection > 0 && eventTypes.Contains(f.EventType) && f.DataState == (int)SwapFlowDateStateEnum.完成 select f; diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs index ef01a2d5..3dcdf1ee 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeService.cs @@ -140,22 +140,6 @@ namespace YLErp.Modules.SwapModule var posiPositions = positions.Where(x => x.PosiDirection > 0).ToList(); } /// - /// 校验 定义文件型债券收益互换 持仓标的只能存在一笔 - /// - /// - /// - public void ExistLongShortTrade(trade td) - { - var longshortName = "定义文件型债券收益互换"; - if (td.StructureType == longshortName) - { - if (DbContext.trade.Any(a => a.ClientId == td.ClientId && a.TradeStatus == "确认成交" && a.ValidState != ConsGlobal.InValid && a.StructureType == longshortName && a.UnderlyingCode == td.UnderlyingCode && a.id != td.id)) - { - throw new ServiceException($"{td.ClientName}已经存在标的为{td.UnderlyingCode}的定义文件型债券收益互换交易"); - } - } - } - /// /// 单标的生成开仓事件 /// /// diff --git a/YLErpDAL/Modules/SystemModule/ClientDataModel.cs b/YLErpDAL/Modules/SystemModule/ClientDataModel.cs index ba68169c..0f8ce8f4 100644 --- a/YLErpDAL/Modules/SystemModule/ClientDataModel.cs +++ b/YLErpDAL/Modules/SystemModule/ClientDataModel.cs @@ -110,13 +110,6 @@ namespace YLErp.Modules.SystemModule Value = m.id.ToString() }).ToList(); } - public static List GetClientSwapType() - { - List list = new List(); - list.Add(new SelectItem { Text = "普通", Value = "0" }); - list.Add(new SelectItem { Text = "定义文件", Value = "1" }); - return list; - } /// /// 获取变更字段列表 /// diff --git a/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs b/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs index 23397eda..28490f99 100644 --- a/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs +++ b/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs @@ -179,8 +179,6 @@ namespace YLErp.Modules.TradeModule.DealModule result.ErrorMsg = $"客户:{td.ClientName},交易编号:{td.TradeNumber},状态为:{td.TradeStatus},不能被确认"; return result; } - // 校验定义文件类型互换 - new SwapTradeService(UserInfo).ExistLongShortTrade(td); //判断交易对手方信息是否允许确认 var client = DataCacheProvider.GetClientDataSource().GetData(td.ClientId); diff --git a/YLErpDAL/Modules/TradeModule/DocGenerateModule/ConfirmationGenerateService.cs b/YLErpDAL/Modules/TradeModule/DocGenerateModule/ConfirmationGenerateService.cs index 90d9656e..6f5e1b10 100644 --- a/YLErpDAL/Modules/TradeModule/DocGenerateModule/ConfirmationGenerateService.cs +++ b/YLErpDAL/Modules/TradeModule/DocGenerateModule/ConfirmationGenerateService.cs @@ -57,9 +57,6 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule statusList.Add(ConsTrade.已到期); statusList.Add(ConsTrade.已平仓); statusList.Add(ConsTrade.已执行); - } - if (PS.Config.Is山西固收) - { statusList.Add(ConsTrade.审批中); } TradeDalService service = new TradeDalService(this); @@ -75,47 +72,17 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule //---------------------------------- // 交易现金交割记录 //---------------------------------- - List allTradeList = new List(); - if (PS.Config.Is山西固收) - { - allTradeList = DbContext.trade.Where(x=> tradeIds.Contains(x.id)).ToList(); - } - else - { - allTradeList = service.GetTradeOrEodTradeOfTidASid(tradeIds, SystemValueDate); - } + List allTradeList = allTradeList = DbContext.trade.Where(x => tradeIds.Contains(x.id)).ToList(); if (allTradeList.Count < 1) { throw new ServiceException("没有已确认的记录信息!"); } - //只选中一笔子交易,按一笔子交易生成确认书 - if (PS.Config.Is光大光子 || PS.Config.Is兴业商贸) - { - allTradeList.RemoveAll(x => x.ParentTradeId != 0 && !tradeIds.Contains(x.id)); - } var tradeDic = allTradeList.Where(O => statusList.Contains(O.TradeStatus) && O.ClientId != 0 && O.ParentTradeId == 0) .ToDictionary(n => n.id, n => new trade_contract_group { trade = n }); - if (PS.Config.Is长江) - { - foreach (var item in allTradeList) - { - if (item.ParentTradeId != 0) - { - if (item.StructureType != "牛市价差" && item.StructureType != "熊市价差") - { - if (tradeDic.ContainsKey(item.ParentTradeId)) - { - tradeDic.Remove(item.ParentTradeId); - } - tradeDic.Add(item.id, new trade_contract_group { trade = item }); - } - } - } - } var cashQuery = from trade in allTradeList join tradeCash in DbContext.trade_cash on trade.id equals tradeCash.TradeId where tradeCash.ValidState != ConsGlobal.InValid && !tradeCash.IsDeleted diff --git a/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillGenerateService.cs b/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillGenerateService.cs index a68d1679..2a66f0a8 100644 --- a/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillGenerateService.cs +++ b/YLErpDAL/Modules/TradeModule/DocGenerateModule/SwapSettlementBillGenerateService.cs @@ -68,7 +68,6 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule var resultList = new List(); AppManager.TryResolve(out ITradeSettleBillGenerator generatorV2); Dictionary> noDMAFlows = new Dictionary>(); - Dictionary> DMAFlows = new Dictionary>(); List extendList = null; if (flowEvents != null && flowEvents.Any()) { @@ -105,33 +104,19 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule } if (trade.ValidState!=ConsGlobal.InValid) { - if (trade.StructureType == "多空组合"||trade.StructureType== "定义文件型债券收益互换") + if (noDMAFlows.ContainsKey(trade.ClientId)) { - if (DMAFlows.ContainsKey(trade.ClientId)) - { - DMAFlows[trade.ClientId].Add(flowEvent); - } - else - { - DMAFlows[trade.ClientId] = new List { flowEvent }; - } + noDMAFlows[trade.ClientId].Add(flowEvent); } else { - if (noDMAFlows.ContainsKey(trade.ClientId)) - { - noDMAFlows[trade.ClientId].Add(flowEvent); - } - else - { - noDMAFlows[trade.ClientId] = new List { flowEvent }; - } + noDMAFlows[trade.ClientId] = new List { flowEvent }; } } } - if (noDMAFlows.Count()==0&& DMAFlows.Count()==0) + if (noDMAFlows.Count()==0) { throw new ServiceException("没有需要生成的确认书"); } @@ -140,11 +125,6 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule var noDMAResults = GenerateShanxiSwap(item.Key, item.Value, trades, swapPositions, allFlowEvents, generatorV2, docType); resultList.AddRange(noDMAResults); } - foreach (var item in DMAFlows) - { - var DMAResults = GenerateShanxiSwap(item.Key, item.Value, trades, swapPositions, allFlowEvents, generatorV2, docType); - resultList.AddRange(DMAResults); - } return resultList; } diff --git a/YLErpWeb/App_Data/Menus.txt b/YLErpWeb/App_Data/Menus.txt index f3f44123..18926d39 100644 --- a/YLErpWeb/App_Data/Menus.txt +++ b/YLErpWeb/App_Data/Menus.txt @@ -48,7 +48,6 @@ {Name:"阶梯费率",Rights:["互换簿记预设-阶梯费率"],Url:"SwapRate"}, {Name:"浮动利率",Rights:["互换簿记预设-浮动利率"],Url:"SwapFloatRate"}, {Name:"簿记账户与衡泰关系",Rights:["互换簿记预设-簿记账户与衡泰关系"],Url:"EtradeAccount/Index"}, - {Name:"做市时间配置",Rights:["互换簿记预设-做市时间配置"],Url:"TrsOpen/Index"} ] }, {Name:"数据管理",Rights:["基础参数管理"],Icon:"menu-icon iconone" diff --git a/YLErpWeb/App_Docs/导入模板/互换预付金率导入模板.xlsx b/YLErpWeb/App_Docs/导入模板/互换预付金率导入模板.xlsx index 503d9d1e..ffe8cdb6 100644 Binary files a/YLErpWeb/App_Docs/导入模板/互换预付金率导入模板.xlsx and b/YLErpWeb/App_Docs/导入模板/互换预付金率导入模板.xlsx differ diff --git a/YLErpWeb/App_Docs/导出模板/结算报告模板_浙商.xlsx b/YLErpWeb/App_Docs/导出模板/结算报告模板_浙商.xlsx new file mode 100644 index 00000000..343eccaa Binary files /dev/null and b/YLErpWeb/App_Docs/导出模板/结算报告模板_浙商.xlsx differ diff --git a/YLErpWeb/Common/GlobalData.cs b/YLErpWeb/Common/GlobalData.cs index 79edd11a..625fb3dd 100644 --- a/YLErpWeb/Common/GlobalData.cs +++ b/YLErpWeb/Common/GlobalData.cs @@ -325,12 +325,9 @@ namespace YLErp.Web new SelectListItem {Value = ConsTrade.确认成交, Text = ConsTrade.确认成交 }, new SelectListItem {Value = ConsTrade.已到期, Text = ConsTrade.已到期 }, new SelectListItem {Value = ConsTrade.已执行, Text = ConsTrade.已执行 }, - new SelectListItem {Value = ConsTrade.已平仓, Text = ConsTrade.已平仓 } + new SelectListItem {Value = ConsTrade.已平仓, Text = ConsTrade.已平仓 }, + new SelectListItem { Value= ConsTrade.审批中, Text = ConsTrade.审批中 } }; - if (PS.Config.Is山西固收) - { - list.Add(new SelectListItem { Value= ConsTrade.审批中, Text = ConsTrade.审批中 }); - } return list; } diff --git a/YLErpWeb/Controllers/AccountController.cs b/YLErpWeb/Controllers/AccountController.cs index 1d306252..ac68699e 100644 --- a/YLErpWeb/Controllers/AccountController.cs +++ b/YLErpWeb/Controllers/AccountController.cs @@ -83,11 +83,6 @@ namespace YLErp.Web.Controllers Expires = DateTimeOffset.Now.AddHours(1) }); } - else if (!hasError && !PS.Config.Is山西固收) - { - var str = Server.CacheProvider.Get(_auth_login + guid)?.ToString(); - model.NeedCaptcha = hasError = !string.IsNullOrEmpty(str) && str.EndsWith("##"); - } Server.CacheProvider.Set(_auth_login + guid, hasError ? "##" : "#", TimeSpan.FromMinutes(20)); diff --git a/YLErpWeb/Controllers/SwapTrade2Controller.cs b/YLErpWeb/Controllers/SwapTrade2Controller.cs index 68da6f50..909f1291 100644 --- a/YLErpWeb/Controllers/SwapTrade2Controller.cs +++ b/YLErpWeb/Controllers/SwapTrade2Controller.cs @@ -65,12 +65,9 @@ namespace YLErp.Web.Controllers StructureType = "普通收益互换", InitialMargin = 0 }; - if (PS.Config.Is山西固收) - { - r.StructureType = "普通债券类收益互换"; - r.ExerciseDate = QdpCalendarHelper.GetNonHolidayDefore(r.StartDate.Value.AddDays(14)); - tradeExtendJson.FlowBookMode = (int)FlowBookModeEnum.重置; - } + r.StructureType = "普通债券类收益互换"; + r.ExerciseDate = QdpCalendarHelper.GetNonHolidayDefore(r.StartDate.Value.AddDays(14)); + tradeExtendJson.FlowBookMode = (int)FlowBookModeEnum.重置; r.trade_extend = new trade_extend() { ExtendJson = JsonHelper.Serialize(tradeExtendJson) @@ -340,7 +337,6 @@ namespace YLErp.Web.Controllers try { bool edit = req.id != 0; - swapTradeService.ExistLongShortTrade(req); var r = swapTradeService.SaveTrade(req); swapTradeService.AddPushLog(r); Task.Run(() => @@ -813,23 +809,6 @@ namespace YLErp.Web.Controllers return View(); } /// - /// 互换估值 - /// - /// - /// - /// - /// - [MyAuthorize("结算管理-每日估值报告")] - public ActionResult TradeMarketReport_DmaEodPosition(int? clientId, string startTime, string endTime, bool ParentFlag) - { - ViewBag.ClientId = clientId; - ViewBag.StartTime = startTime; - ViewBag.EndTime = endTime; - ViewBag.ParentFlag = ParentFlag; - ViewBag.StructureType = "定义文件型债券收益互换"; - return View(); - } - /// /// 互换持仓明细 /// /// diff --git a/YLErpWeb/Controllers/clientController.cs b/YLErpWeb/Controllers/clientController.cs index 3cc4ddc8..3eeeaebb 100644 --- a/YLErpWeb/Controllers/clientController.cs +++ b/YLErpWeb/Controllers/clientController.cs @@ -511,37 +511,12 @@ namespace YLErp.Web.Controllers var task2 = Task.Run(() => { var clientIds = clientList.Select(O => O.id).ToList(); - if (PS.Config.Is山西固收) - { - return ClientBalanceUtility.GetClientRiskMonitorForShanXiGuShou(clientIds, req.ValueDate.Value, req.MarginShownType); - } - return ClientBalanceUtility.GetClientRiskMonitor(clientIds, req.ValueDate.Value, req.MarginShownType); + return ClientBalanceUtility.GetClientRiskMonitorForShanXiGuShou(clientIds, req.ValueDate.Value, req.MarginShownType); }); - var task3 = Task.Run(() => - { - if (PS.Config.Company == Configuration.CompanyEnum.国海) - { - var nameList = clientList.Select(n => n.Name).ToList(); - return yldb.QuotaMonitor_Client.Where(O => O.ValueDate == req.ValueDate.Value && nameList.Contains(O.ClientName)).ToDictionary(K => K.ClientName, V => V.CreditExposure); - } - return null; - }); - var task4 = Task.Run(() => - { - if (PS.Config.Is润和) - { - var levelIds = clientList.Where(O => O.LevelId != null).Select(O => O.LevelId).Distinct().ToList(); - var ratioInfos = clientDB.clientlevel.Where(O => O.Ratio != null && levelIds.Contains(O.id)).Select(O => new { O.id, O.Ratio }).ToDictionary(K => K.id, V => V.Ratio); - return ratioInfos; - } - return null; - }); - Task.WaitAll(task1, task2, task3, task4); + Task.WaitAll(task1, task2); var sList = task1.Result; var banlanceList = task2.Result ?? Array.Empty(); - var creditExposureDict = task3.Result ?? new Dictionary(); - var ratioDict = task4.Result ?? new Dictionary(); //var sList = new ClientQueryService(curUser).SearchList(req, predicate); //var clientIds = clientList.Select(O => O.id).ToList(); @@ -706,8 +681,6 @@ namespace YLErp.Web.Controllers x.availableNetFundSums = (clientBalance.PositionNotionalPrincipal / x.NetFundSum); x.EAD = clientBalance.EAD; var clientName = client?.Name ?? ""; - //这个字段只有国海用得到 - x.CreditExposure = creditExposureDict.ContainsKey(clientName) ? creditExposureDict[clientName] : null; x.MinimumTransferAmount = client?.MinimumTransferAmount; x.LastHTSettlemetTime = clientBalance.LastHTSettlemetTime; @@ -717,11 +690,6 @@ namespace YLErp.Web.Controllers x.AvailableAmount = clientBalance.AvailableAmount + clientBalance.TotalCredit; x.DesirableFund = Math.Max(clientBalance.AvailableAmount, 0); - if (!ratioDict.TryGetValue(client.LevelId ?? 0, out var ratio)) - { - ratio = 1; - } - switch ((MarginOptionEnum)client.MarginOptionType) { case MarginOptionEnum.单向追保: @@ -740,7 +708,7 @@ namespace YLErp.Web.Controllers default: break; } - x.SpanValue = x.HoldingDeposit / ratio; + x.SpanValue = x.HoldingDeposit; } //拼装标签值 diff --git a/YLErpWeb/Controllers/clientbalanceController.cs b/YLErpWeb/Controllers/clientbalanceController.cs index e3ba2499..6df99171 100644 --- a/YLErpWeb/Controllers/clientbalanceController.cs +++ b/YLErpWeb/Controllers/clientbalanceController.cs @@ -479,40 +479,8 @@ namespace YLErp.Web.Controllers { EmailTradeConfirmResultType status; string message; - if (PS.Config.Company == Configuration.CompanyEnum.中金) - { - var report = new SettlementReportForZJService(user).GetReportData(emailData, userAssetUnits, template); - (status, message) = new SettlementReportForZJService(user).SendSettlementReports(emailData, report, template, recevier); - } - else if (PS.Config.Is国投) - { - var report = new SettlementReportFotGTService(user).GetReportData(emailData, userAssetUnits, template); - (status, message) = new SettlementReportFotGTService(user).SendSettlementReports(emailData, report, template, skipCheckMarginCall, recevier); - } - else if (PS.Config.Is山西固收) - { - var report = new SettlementReportFotShanXiService(user).GetReportData(emailData, userAssetUnits, template); - (status, message) = new SettlementReportFotShanXiService(user).SendSettlementReports(emailData, report, template, skipCheckMarginCall, recevier); - } - else - { - var report = new SettlementReportService(user).GetReportData(emailData, userAssetUnits, template); - var pdfHtml = string.Empty; - var txtHtml = string.Empty; - if (!needHtml) - { - if (PS.Config.Is湘财) - { - pdfHtml = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientPdf_XiangCai", report); - } - else - { - pdfHtml = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientPdf", report); - } - txtHtml = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientTxt", report); - } - (status, message) = new SettlementReportService(user).SendSettlementReports(emailData, report, template, pdfHtml, txtHtml, skipCheckMarginCall, recevier); - } + var report = new SettlementReportFotShanXiService(user).GetReportData(emailData, userAssetUnits, template); + (status, message) = new SettlementReportFotShanXiService(user).SendSettlementReports(emailData, report, template, skipCheckMarginCall, recevier); switch (status) { case EmailTradeConfirmResultType.Succeed: @@ -609,60 +577,10 @@ namespace YLErp.Web.Controllers { userAssetUnits = GetUserAssetunitIds(); } - if (PS.Config.Company == Configuration.CompanyEnum.中金) - { - var report = new SettlementReportForZJService(CurUser).GetReportData(emailData, userAssetUnits, template); - var path = new SettlementReportForZJService(CurUser).GenerateFileEntry(report); - var relativePath = path.Substring(path.IndexOf("App_Docs") - 1); - return JsonSuccess("", relativePath); - } - else if (PS.Config.Is国投) - { - var report = new SettlementReportFotGTService(CurUser).GetReportData(emailData, userAssetUnits, template); - var path = new SettlementReportFotGTService(CurUser).GenerateFileEntry(report, emailData.TargetFileType); - var relativePath = path.Substring(path.IndexOf("App_Docs") - 1); - return JsonSuccess("", relativePath); - } - else if (PS.Config.Is山西固收) - { - var report = new SettlementReportFotShanXiService(CurUser).GetReportData(emailData, userAssetUnits, template); - var path = new SettlementReportFotShanXiService(CurUser).GenerateFileEntry(report, emailData.TargetFileType); - var relativePath = path.Substring(path.IndexOf("App_Docs") - 1); - return JsonSuccess("", relativePath); - } - else - { - var report = new SettlementReportService(CurUser).GetReportData(emailData, userAssetUnits, template); - try - { - - var html = ""; - if (emailData.TargetFileType.ToLower() == "pdf") - { - if (PS.Config.Is湘财) - { - html = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientPdf_XiangCai", report); - } - else - { - html = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientPdf", report); - } - } - if (emailData.TargetFileType.ToLower() == "txt") - { - html = await _viewRenderer.RenderToStringAsync("clientbalance/TradeMarketClientTxt", report); - } - - var path = new SettlementReportService(CurUser).GenerateFileEntry(report, emailData.TargetFileType, html); - //补丁,返回一个相对地址 - var relativePath = path.Substring(path.IndexOf("App_Docs") - 1); - return JsonSuccess("", relativePath); - } - catch (Exception e) - { - return JsonError(e.Message == "The number of columns in PdfPTable constructor must be greater than zero." ? "生成的pdf列表的列数必须大于零,请检查配置列不可为空" : e.Message); - } - } + var report = new SettlementReportFotShanXiService(CurUser).GetReportData(emailData, userAssetUnits, template); + var path = new SettlementReportFotShanXiService(CurUser).GenerateFileEntry(report, emailData.TargetFileType); + var relativePath = path.Substring(path.IndexOf("App_Docs") - 1); + return JsonSuccess("", relativePath); } //[ValidateInput(false)] public ViewResult TradeMarketClientTxt(DingShiReport report) diff --git a/YLErpWeb/Views/AccountOpeningProcess/clientListV2.cshtml b/YLErpWeb/Views/AccountOpeningProcess/clientListV2.cshtml index b03bc4df..5b627cd8 100644 --- a/YLErpWeb/Views/AccountOpeningProcess/clientListV2.cshtml +++ b/YLErpWeb/Views/AccountOpeningProcess/clientListV2.cshtml @@ -10,7 +10,6 @@ roles = CurUser.Roles.Select(s => s.Id).ToList(), isZhaoZheng = YLErp.PS.Config.Company == CompanyEnum.招证, isDongWu = YLErp.PS.Config.Company == CompanyEnum.东吴, - isShanxiGuShou = YLErp.PS.Config.Is山西固收, ViewTagPermission = CurUser.客户管理.客户标签查看权限, }; } diff --git a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapEdit.cshtml b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapEdit.cshtml index 70bd0acc..da6050ad 100644 --- a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapEdit.cshtml +++ b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapEdit.cshtml @@ -2,7 +2,6 @@ @{ ViewBag.Title = "预付金率 | 编辑"; Layout = "~/Views/Shared/_InfoLayout.cshtml"; - var hideMargin = PS.Config.Is山西固收 && Model.Type != "品种"; } @section CSS{ @@ -58,69 +57,27 @@ @Html.HiddenFor(model => model.EncryptId) @Html.HiddenFor(model => model.Type) @Html.MyDropdownFor(model => model.ClientId, ClientDataModel.GetAllClient()) - @if (!PS.Config.Is山西固收) - { - @if (Model.Type == "品种") - { - @Html.MyDropdownFor(model => model.VarietyId, varietyController.GetAllvarietyNameCode()) - } - } +
*
- @if (!hideMargin) - { -
- +
+ % -
- } - @if (!PS.Config.Is山西固收) - { -
- - - % -
-
- - +
+
+ + + % +
+
+ + %
- } - @if (PS.Config.Is山西固收) - { - @if (Model.Type != "品种") - { -
- - - % -
-
- - - % -
- } - else - { -
- - - % -
-
- - - % -
- - } - }
@MyControls.Btn("保存", "saveMarginRate()") diff --git a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapList.cshtml b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapList.cshtml index e5bc1561..f15bd968 100644 --- a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapList.cshtml +++ b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapList.cshtml @@ -4,8 +4,7 @@ var pageObj = new { canEdit = CurUser.基础参数管理.互换预付金率修改, - curTabIndex = Context.Request.Query["tab"].ToString().TrimToNull() ?? "1", - isShanZheng=PS.Config.Is山西固收 + curTabIndex = Context.Request.Query["tab"].ToString().TrimToNull() ?? "1" }; ViewData["tab-active-" + pageObj.curTabIndex] = "active"; } @@ -36,9 +35,6 @@ }
@Html.MyAceDropdownInput("ClientId", "客户名称", ClientDataModel.GetAllClient(), true, true, null, false) - @if(!PS.Config.Is山西固收){ - @Html.MyAceDropdownInput("VarietyId", "品种名", varietyController.GetAllvarietyCode(), true, true, null, false) - } @MyControls.SearchBtn() @if (CurUser.基础参数管理.互换预付金率修改) { @@ -52,17 +48,11 @@ -
-
-
-
diff --git a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapMonitorV2.cshtml b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapMonitorV2.cshtml index e87f168e..da2af131 100644 --- a/YLErpWeb/Views/MarginRateSwap/MarginRateSwapMonitorV2.cshtml +++ b/YLErpWeb/Views/MarginRateSwap/MarginRateSwapMonitorV2.cshtml @@ -48,7 +48,6 @@
@Html.MyAceDropdownInput("WarnningType", "提醒类型", TradeSwapMarginMonitorModel.GetWarnningTypes()) @Html.MyAceDropdownInput("ClientId", "客户名称", ClientDataModel.GetAllClient()) - @Html.MyAceDropdownInput("SwapType", "互换类型", ClientDataModel.GetClientSwapType()) @MyControls.SearchBtn() @MyControls.Btn("导出", "execExport()") diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml index 671b3973..6c29a6c4 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml @@ -92,7 +92,6 @@
@@ -335,9 +334,7 @@ diff --git a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_DmaEodPosition.cshtml b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_DmaEodPosition.cshtml deleted file mode 100644 index a314877e..00000000 --- a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_DmaEodPosition.cshtml +++ /dev/null @@ -1,109 +0,0 @@ -@{ - ViewBag.Title = "每日估值报告"; - ViewBag.Menu = "结算财务-每日估值报告"; - - Layout = "~/Views/Shared/_MainLayout.cshtml"; - var pageObj = new - { - EndTime = ViewBag.EndTime?.ToString(), - StartTime = ViewBag.StartTime?.ToString(), - valueDate = valuedateBLL.ValueDate.ToString("yyyy-MM-dd"), - configcolumn = configcolumn_data.定义文件互换估值, - StructureType = ViewBag.StructureType - }; -} -@section CSS{ - - -} -@section JS{ - - - -} - -
- @Html.MyAceDropdownInput("ClientId", "客户名称", ClientDataModel.GetAllClient(), false, true, null, false) - @Html.CheckBox("ParentFlag", false) @Html.Label(null,"包含子级", new { @style = "font-size:12px;" }) - @Html.ShortInput("ValueDateFrom", "起始日期:") - @Html.ShortInput("ValueDate", "结束日期:") - @MyControls.SearchBtn() - @if (CurUser.结算管理_每日估值报告邮件发送) - { - @MyControls.Btn("配置报告", "PopDesc()") - @MyControls.Btn("发送报告", "SendReport()") - } -
-
- -
-
- -
- -
- @Html.Raw(JqGridSimple.OutTable()) -
-
- -
- - @Html.Raw(DBCacheManager.Single.GetStr(CacheTable.DingShiDesc)) - -
- diff --git a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_EodPosition.cshtml b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_EodPosition.cshtml index 3bd85357..fd2d0bde 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_EodPosition.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_EodPosition.cshtml @@ -72,28 +72,20 @@ - - @* *@ + - @if (!PS.Config.Is申万) - { - - } -
- -
+ +
+ +
@Html.Raw(JqGridSimple.OutTable()) diff --git a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_HistoricalPositionSwapFlow.cshtml b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_HistoricalPositionSwapFlow.cshtml index c3d2216b..d0f4c089 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_HistoricalPositionSwapFlow.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_HistoricalPositionSwapFlow.cshtml @@ -36,10 +36,10 @@ } @@ -59,37 +59,28 @@
-
- -
+
@Html.Raw(JqGridSimple.OutTable()) diff --git a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_PositionSwapFlow.cshtml b/YLErpWeb/Views/SwapTrade2/TradeMarketReport_PositionSwapFlow.cshtml deleted file mode 100644 index 4dfa8fb1..00000000 --- a/YLErpWeb/Views/SwapTrade2/TradeMarketReport_PositionSwapFlow.cshtml +++ /dev/null @@ -1,111 +0,0 @@ -@{ - ViewBag.Title = "每日估值报告"; - ViewBag.Menu = "结算财务-每日估值报告"; - - Layout = "~/Views/Shared/_MainLayout.cshtml"; - var pageObj = new - { - EndTime = ViewBag.EndTime?.ToString(), - StartTime = ViewBag.StartTime?.ToString(), - valueDate = valuedateBLL.ValueDate.ToString("yyyy-MM-dd"), - configcolumn = configcolumn_data.持仓明细 - }; -} -@section CSS{ - - -} -@section JS{ - - - -} - -
- @Html.MyAceDropdownInput("ClientId", "客户名称", ClientDataModel.GetAllClient(), false, true, null, false) - @Html.CheckBox("ParentFlag", false) @Html.Label(null,"包含子级", new { @style = "font-size:12px;" }) - @Html.ShortInput("ValueDateFrom", "起始日期:") - @Html.ShortInput("ValueDate", "结束日期:") - @MyControls.SearchBtn() - @if (CurUser.结算管理_每日估值报告邮件发送) - { - @MyControls.Btn("配置报告", "PopDesc()") - @MyControls.Btn("发送报告", "SendReport()") - } -
-
-
-
- -
-
- @Html.Raw(JqGridSimple.OutTable()) -
-
- -
- - @Html.Raw(DBCacheManager.Single.GetStr(CacheTable.DingShiDesc)) - -
- diff --git a/YLErpWeb/Views/System/UserEdit.cshtml b/YLErpWeb/Views/System/UserEdit.cshtml index 600a7a26..57252de2 100644 --- a/YLErpWeb/Views/System/UserEdit.cshtml +++ b/YLErpWeb/Views/System/UserEdit.cshtml @@ -3,8 +3,8 @@ ViewBag.Title = "用户信息 | 编辑"; Layout = "~/Views/Shared/_InfoLayout.cshtml"; bool isUserEdit = (CurUser.系统管理.用户新增 && Model.Id == 0) || CurUser.系统管理.用户修改; - var accountPostName = PS.Config.Is山西固收 ? "对冲交易询价对象" : "客户经理"; - var traderName = PS.Config.Is山西固收 ? "非对冲交易询价对象" : "交易员"; + var accountPostName = "对冲交易询价对象"; + var traderName = "非对冲交易询价对象"; }