protected bool IsAct1248 = false; //是否1218后显示 protected void Page_Load(object sender, EventArgs e) { StatusTab = WEBRequest.GetQueryString("tab"); if (StatusTab == "") { StatusTab = "Inprogress"; } TypeTab = WEBRequest.GetQueryString("typeTab"); if (TypeTab == "") { TypeTab = "WePlan"; } OrderTab = WEBRequest.GetQueryString("orderTab"); if (OrderTab == "") { OrderTab = "1"; } WebSettingBLL webSettingBll = new WebSettingBLL(); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); if (DateTime.Now >= DateTime.Parse(curSellSet.Param1Value) && DateTime.Now <= DateTime.Parse("2016-12-25 23:59:59")) { IsAct1248 = true; } }
/// <summary> /// We返现标签 /// </summary> /// <param name="model"></param> /// <returns></returns> protected string ShowWePubCach(WeProductDetailInfo model) { string pic = ""; //发标时就设置返现 if ((model.TuandaiCashRate ?? 0) > 0) { WebSettingBLL webSettingBll = new WebSettingBLL(); WebSettingInfo AllWeCachSet = webSettingBll.GetWebSettingInfo("421DBE8C-6435-4A9A-852A-EC51F0B0DDA8"); string cashFormat = AllWeCachSet.Param2Value; if ((model.CashLimitAmount ?? 0) > 0) { cashFormat = AllWeCachSet.Param1Value; } if (cashFormat.ToText() == "") { cashFormat = ((model.CashLimitAmount ?? 0) > 0 ? "起投{Amount}元," : "") + "返现{Rate}%"; } decimal limitAmount = model.CashLimitAmount ?? 0; string strLimitAmount = limitAmount >= 10000 ? ToolStatus.DeleteZero(limitAmount / 10000) + "万" : ToolStatus.DeleteZero(limitAmount / 1000) + "千"; pic += "<div class=\"rect_r f11px c-ffffff text-center\" style=\"width: auto;padding: 0px 10px;\">" + cashFormat.Replace("{Rate}", ToolStatus.DeleteZero(model.TuandaiCashRate)).Replace("{Amount}", strLimitAmount) + "</div>"; } return(pic); }
protected FundAccountInfo_Zx ZxFundModelFromDq; //定期库统计智享数据 protected void Page_Load(object sender, EventArgs e) { if (!WebUserAuth.IsAuthenticated) { Response.Redirect("//passport.tuandai.com/2login?ret=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl)); return; } var xiajia = new WebSettingBLL().GetWebSettingInfo("D3E0C6CC-30A0-4E5B-8A83-446269F8C96F"); if (xiajia == null) { xiajia = new WebSettingInfo(); xiajia.Param1Value = "2018-04-17"; } var userId = WebUserAuth.UserId.Value; var userModel = new UserBLL().GetUserBasicInfoModelById(userId); if ((GetDQDueInMoney(userId) <= 0 && new GlobalUtils().GetNewVipUserInfo(userId).Level < 5) || userModel.AddDate >= DateTime.Parse(xiajia.Param1Value)) { Response.Redirect("/Member/My_account.aspx"); } DqFundModel = GetDQFundModel(userId); if (DqFundModel == null) { DqFundModel = new WXFundStatistModel(); } if (DqFundModel.DueComeInterest >= decimal.Parse("-0.03") && DqFundModel.DueComeInterest < 0) { DqFundModel.DueComeInterest = 0; } GetZxFundModelFromDQ(userId); }
private void InitData() { SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); SetModel1 = new WebSettingBLL().GetWebSettingInfo("06A6344D-E1FB-4AAA-890A-E39351D5E7A3"); GetBannerList(); GetWeList(); GetLatestProject(); GetNewHandProject(); }
protected void Page_Load(object sender, EventArgs e) { weOrderId = WEBRequest.GetGuid("weorderid"); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { WebSettingDAL webSettingDal = new WebSettingDAL(); WebSettingInfo autoSetInfo = webSettingDal.GetWebSettingInfo("17191362-568A-4F46-8D7D-5C23D80C9D8B"); if (autoSetInfo != null) { limitPercent = autoSetInfo.Param3Value; } } }
protected void Page_Load(object sender, EventArgs e) { webset = new WebSettingBLL().GetWebSettingInfo("71E1B58D-449F-4C61-85A6-115C10630554"); if (webset == null) { webset = new WebSettingInfo(); webset.Param1Value = "2018-05-01"; } if (!IsPostBack) { this.GetData(); } }
protected int IsRegHasOneMonth = 1; //注册是否满一个月 protected void Page_Load(object sender, EventArgs e) { Response.Redirect("/pages/downloadGuide.aspx", true); if (!this.IsPostBack) { var userId = WebUserAuth.UserId.Value; if (userId != null && userId != Guid.Empty) { GetIsProjectFreePaidUser(userId); GetUserVipMsg(userId); var userBll = new UserBLL(); var user = userBll.GetUserBasicInfoModelById(userId); //2016.5.4号注册的加条件: 注册满1个月才能发资产标,即1个月零1天才能发资产标,一个月以内进入发标页面后弹框提示“您好,注册满一个月后才能发布资产标” if (user.AddDate >= DateTime.Parse("2016-05-04 12:00")) { IsRegHasOneMonth = user.AddDate.Value.AddMonths(1) < DateTime.Now ? 1 : 0; } this.options = new List <Tuple <int, decimal, decimal, int, string> >(); var result1 = WXInvest.CheckNetIssueConditions(userId); if (result1.Success) { var fund = userBll.GetUserFundAccountInfo(userId); var setting = WXInvest.GetJingSetting(); tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0); creditAmount = WXInvest.GetUserJingAvailableAmount(user, fund, setting, out maxDeadline); string text = string.Format("资产标(借款额度{0}元)", ToolStatus.ConvertLowerMoney(creditAmount)); this.options.Add(new Tuple <int, decimal, decimal, int, string>(6, creditAmount, tuandaiFeeRate, maxDeadline, text)); this.deadLineDesc = string.Format("还款期限最高{0}个月", maxDeadline); } //资产标短期标配置 WebSettingBLL setbll = new WebSettingBLL(); WebSettingInfo deadlineDay = setbll.GetWebSettingInfo("78A758ED-6D5C-4991-A804-6601E50960AD"); minDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param1Value, 15); maxDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param2Value, 29); endDeadlineDay = deadlineDay.Param3Value.ToDateTime(DateTime.MaxValue); //var result2 = WXInvest.CheckStockIssueConditions(userId); //if (result2.Success) //{ // var setting = WXInvest.GetStockSetting(); // var tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0); // var amount = user.aviCreditGrantingAmount ?? 0; // var text = string.Format("资产标-综合授信(授信额度{0}元)", ToolStatus.ConvertLowerMoney(amount)); // this.options.Add(new Tuple<int, decimal, decimal, int, string>(7, amount, tuandaiFeeRate, 24, text)); // if (!result1.Success) this.deadLineDesc = string.Format("还款期限最高{0}个月", 24); //} } } }
protected bool GetData() { //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } if (model.Type.Value != 36) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } HistoryItems(); GetBorrowUserInfo(); finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected void Page_Load(object sender, EventArgs e) { WebSetting = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); tdfrom = Tool.WEBRequest.GetQueryString("tdfrom"); showActivity = Tool.WEBRequest.GetQueryString("showActivity");//用来标识是否显示四周年加息活动浮窗 if (tdfrom.Contains("SNSMH-M1607-fzzxTT") || !string.IsNullOrEmpty(showActivity)) { IsShowRightBar = false; //分众传媒渠道去掉导航 } channel = Tool.WEBRequest.GetQueryString("channel"); //用来标识是否显示App下载 if (!IsPostBack) { GetStatistics(); } }
protected void LoadData() { ProjectBLL bll = new ProjectBLL(); var dyParams = new Dapper.DynamicParameters(); dyParams.Add("@SubscribeId", TransferId); dyParams.Add("@projectId", null, DbType.Guid, ParameterDirection.Output, 36); dyParams.Add("@addDate", null, DbType.DateTime, ParameterDirection.Output, 0); dyParams.Add("@refundedMonths", null, DbType.Int32, ParameterDirection.Output, 0); string strSQL = @"select @projectId=ProjectId, @addDate=AddDate,@refundedMonths= RefundedMonths FROM dbo.Subscribe WITH(NOLOCK) where Id=@SubscribeId"; PublicConn.ExecuteTD(PublicConn.DBWriteType.Read, strSQL, ref dyParams); Guid projectId = dyParams.Get <Guid>("@projectId"); //获取项目信息 model = bll.GetProjectDetailInfo(projectId); DateTime investDate = dyParams.Get <DateTime>("@addDate"); int refundedMonths = dyParams.Get <Int32>("@refundedMonths"); string sql = string.Empty; if (model.RepaymentType.Value == 1)//到期还本息 { sql = "SELECT dateDiff(day,@BeginDate,getdate())-1"; } else { sql = "SELECT dateDiff(day,dbo.f_GetRepaymentAdvance_Date(@BeginDate,@Month),getdate())"; } dyParams = new Dapper.DynamicParameters(); dyParams.Add("@BeginDate", investDate); dyParams.Add("@Month", refundedMonths); DiffDay = PublicConn.QuerySingle <int>(sql, ref dyParams); WebSettingBLL websetbll = new WebSettingBLL(); WebSettingEntity = websetbll.GetWebSettingInfo("588B23C6-56EC-40C1-80A6-09B19C6F21E1"); if (WebSettingEntity == null) { WebSettingEntity = new WebSettingInfo(); } zqzrRateSet = websetbll.GetWebSettingInfo("63C10EF7-3961-4CA3-B277-147AAD8E7D42"); if (zqzrRateSet.Param1Value == "1" && DateTime.Parse(zqzrRateSet.Param2Value) < DateTime.Now && DateTime.Now < DateTime.Parse(zqzrRateSet.Param3Value)) { IsOpenRateLimit = true; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Set = new WebSettingBLL().GetWebSettingInfo("5724A794-A380-45E8-837D-5326487E9C48"); amountSet = new WebSettingBLL().GetWebSettingInfo("f65b7518-e60f-4cd4-b895-895e40a84609"); Guid userid = WebUserAuth.UserId.Value; if (userid != Guid.Empty) { AviMoney = new UserBLL().GetUserAviMoney(userid); } else { Response.Redirect(GlobalUtils.WebURL + "/user/Login.aspx?ReturnUrl=" + HttpContext.Current.Request.RawUrl); } } }
protected void Page_Load(object sender, EventArgs e) { weOrderId = WEBRequest.GetGuid("weorderid"); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); if (weOrderId == null || weOrderId == Guid.Empty) { Response.Redirect("/Member/my_account.aspx"); return; } Guid? userId = WebUserAuth.UserId; WeOrderBLL webll = new WeOrderBLL(); model = webll.GetMyInvestWeFQBBaseDetail(userId.Value, weOrderId.Value); GetIsWeZnq(); } }
protected void Page_Load(object sender, EventArgs e) { userId = WebUserAuth.UserId.Value; xiajia = new WebSettingBLL().GetWebSettingInfo("D3E0C6CC-30A0-4E5B-8A83-446269F8C96F"); if (xiajia == null) { xiajia = new WebSettingInfo(); xiajia.Param1Value = "2018-04-17"; } if (!this.IsPostBack) { this.IsShowRightBar = GlobalUtils.IsWeiXinBrowser ? false : true; InitFormData(); GetMaxStatusString(); IsHavaTQJiaXi = new TuanDai.WXSystem.Core.Common.Activity20171218Helper().GetRateListByUserId(userId.ToString()) == null ? false : new TuanDai.WXSystem.Core.Common.Activity20171218Helper().GetRateListByUserId(userId.ToString()).Any(); } DQDueInMoney = GetDQDueInMoney(userId); }
protected void LoadData() { Guid? userId = WebUserAuth.UserId; WeProductBLL bll = new WeProductBLL(); WebSettingBLL setbll = new WebSettingBLL(); WebSettingInfo setInfo1 = setbll.GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); WebSettingInfo setInfo2 = setbll.GetWebSettingInfo("06A6344D-E1FB-4AAA-890A-E39351D5E7A3"); decimal rewardInterest_1 = 0; string strSQL = "select ProductId, OrderDate, isnull(InvestedAmount,0) as InvestedAmount, isnull(TuandaiRedRate,0) as TuandaiRedRate from dbo.We_Order with(nolock) where Id=@weOrderId"; Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters(); dyParams.Add("@weOrderId", weOrderId); MyWePlanOrderInfo weOrderInfo = PublicConn.QuerySingle <MyWePlanOrderInfo>(strSQL, ref dyParams); //model = bll.GetWeProductInfo(weOrderInfo.ProductId); if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { string err = string.Empty; var weRedisInfo = TuanDai.RedisApi.Client.WePlanRedis.GetWePlanRedisByProductIdJson(weOrderInfo.ProductId, out err, TdConfig.ApplicationName); if (weRedisInfo != null) { model = JsonConvert.DeserializeObject <WeProductDetailInfo>(weRedisInfo); } if (model == null || !string.IsNullOrEmpty(err)) { model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId); } } else { model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId); } DueInterestAmount = 0; //查询订单加息 RewardRate += GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value); rewardInterest_1 = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value)); RewardInterest = rewardInterest_1; DueInterestAmount = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, model.YearRate ?? 0); DueInterestAmount += RewardInterest; }
protected void Page_Load(object sender, EventArgs e) { Context.Response.Redirect("//mvip.tdw.cn/pages/invest/invest_newHand.aspx"); return; WebSettingBLL websetbll = new WebSettingBLL(); WebSettingInfo setInfo = websetbll.GetWebSettingInfo("28ED2C47-C151-47AA-9D58-63277C0483C1"); WebSettingInfo NewHandExtSet = websetbll.GetWebSettingInfo("20B98405-633B-4559-95C9-C0E96DD3BD2C"); int limitRegDay = NewHandExtSet.Param1Value.ToInt(30); IsNewHandNewRule = setInfo.Param5Value == "1"; if (IsNewHandNewRule) { NewHandTips = "1.限" + DateTime.Today.AddDays(-limitRegDay).ToString("yyyy-MM-dd") + "起新注册用户。<br />2.注册30天内 , 限投" + setInfo.Param4Value + "次新手标。<br />3.新手标累计投资金额为" + int.Parse(setInfo.Param1Value) / 10000 + "万元。"; } GetNewHandProject(); type = Tool.WEBRequest.GetString("type"); }
private void GetData() { var webset = new WebSettingBLL().GetWebSettingInfo("42E7BF6F-74F0-4375-A614-00AD81A4638E"); if (webset == null) { webset = new WebSettingInfo(); webset.Param1Value = "6"; } Guid userId = WebUserAuth.UserId.Value; model = WXGetMyBills(userId, 1, 10, DateTime.Now.AddDays(-int.Parse(webset.Param1Value)).ToDateString()); int recordCount = model.TotalCount; int firstPageSize = 10; if (recordCount < 10) { firstPageSize = 10 - recordCount; } var bigModel = WXGetMyBillsFromBigData(userId, DateTime.Now.AddMonths(-2), DateTime.Now.AddDays(-int.Parse(webset.Param1Value)), 1, 10, firstPageSize); if (firstPageSize < 10 && bigModel.List != null) { model.List.AddRange(bigModel.List); } recordCount += bigModel.TotalCount; double divide = recordCount / 10; double floor = System.Math.Floor(divide); if (recordCount % 10 != 0) { floor++; } pageCount = Convert.ToInt32(floor);//总页数 BannerList = new AdImageBLL().GetTuanDaiHot((int)ConstString.AdImageType.WEBImage, 1); }
protected void Page_Load(object sender, EventArgs e) { Response.Redirect("/Member/Repayment/my_return_list.aspx?typeTab=Disperse&tab=CompletedAndFlow", true); this.projectId = WEBRequest.GetGuid("projectid"); xiajia = new WebSettingBLL().GetWebSettingInfo("F6A58707-C4AE-4E80-9120-173FAF0D2812"); if (!IsPostBack) { bll = new ProjectBLL(); if (this.projectId != Guid.Empty) { if (!this.GetData()) { return; } } else { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); } } }
private void GetData() { WebSettingBLL webSettingBll = new WebSettingBLL(); preSellSet = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29"); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); sellSet518 = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1"); IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"]; if (IsPreView1218 == "1") { preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } else if (IsPreView1218 == "2") { preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"); curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } ProjectBLL bll = new ProjectBLL(); WeList = GetInvestListWePlan(out recordCount); double divide = recordCount / GlobalUtils.PageSize; double floor = System.Math.Floor(divide); if (recordCount % GlobalUtils.PageSize != 0) { floor++; } pageCount = Convert.ToInt32(floor);//总页数 GetShowImage(); }
private bool GetData() { //获取项目信息 if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { this.model = new WeProductBLL().GetWePlanByRedis(TypeId, projectId.Value, IsPreSell, TdConfig.ApplicationName); } else { this.model = bll.GetWeProductInfo(projectId.Value); } if (model == null) { Response.Redirect("/pages/invest/we/WE_list.aspx", true); return(false); } if (model.IsWeFQB) { Response.Redirect(GlobalUtils.MTuanDaiURL + "/pages/invest/WE/WeFqb_detail.aspx?id=" + model.ProductId + (IsApp?"&type=mobileapp":"")); return(false); } if (model.IsFTB) { Response.Redirect(GlobalUtils.MTuanDaiURL + "/pages/invest/WE/WeFtb_detail.aspx?id=" + model.ProductId + (IsApp ? "&type=mobileapp" : "")); return(false); } #region 判断满标 if (model.StartDate > DateTime.Now && model.StatusId == 1) { IsWeFinish = false; } else if (model.StartDate < DateTime.Now && model.OrderQty != model.TotalQty) { IsWeFinish = false; } else if (((model.OrderQty == model.TotalQty && model.InvestCompleteDate.HasValue) || (model.OrderCompleteDate.HasValue && model.OrderCompleteDate.Value.AddDays(5) <= DateTime.Now)) && !model.IsWeFQB) { IsWeFinish = true; } else { IsWeFinish = true; } #endregion WebSettingBLL webSettingBll = new WebSettingBLL(); preSellSet = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29"); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); sellSet518 = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1"); IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"]; if (IsPreView1218 == "1") { preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } else if (IsPreView1218 == "2") { preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"); curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } switch (model.Rating) { case 1: rating = "<span style=\"color:Green;\">低</span>"; break; case 2: rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: rating = "<span style=\"color:Red;\">高</span>"; break; } GetBorrowUserInfo(); WebSettingBLL setbll = new WebSettingBLL(); //新手加息判断 WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5"); if (GylSetInfo != null) { GylPlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0); Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0); } if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0)) { IsShowPlusRate = true; } DynamicParameters dyParams; string sql = ""; if (WebUserAuth.IsAuthenticated && IsShowPlusRate) { //判断是否投资新手 sql = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid"; dyParams = new DynamicParameters(); dyParams.Add("@userid", WebUserAuth.UserId.Value); bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0; NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0; } dyParams = new DynamicParameters(); dyParams.Add("@projectid", projectId); sql = @"select ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid"; ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams); if (ProjectGylInfo != null) { OverallRanking = setbll.GetWebSettingInfo(new Guid("A874BE7E-492F-4A21-9064-B75CA16D2DF3").ToString()); } if (ProjectGylInfo != null) { TotalCreditScore = ProjectGylInfo.CreditStatus + ProjectGylInfo.EnterpriseCredit + ProjectGylInfo.OperatingConditions + ProjectGylInfo.RoyalRiskAbility; } GetBusinessRange(model.Id); finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); return(true); }
protected void Page_Load(object sender, EventArgs e) { Guid userId = WebUserAuth.UserId.Value; UserBLL bll = new UserBLL(); UserSettingBLL uBll = new UserSettingBLL(); SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); if (userId != null && userId != Guid.Empty) { var rInfo = new UserRiskEvaluationBLL().GetAssassTimeThisYear(userId, TdConfig.ApplicationName); if (rInfo == null) { Response.Redirect("/Member/safety/pre_invest.aspx", true); } AviMoney = bll.GetUserAviMoney(userId); userModel = bll.GetUserBasicInfoModelById(userId); userSetting = uBll.GetUserSettingInfo(userId); if (userSetting == null) { userSetting = new UserSettingInfo(); userSetting.IsTenderNeedPayPassword = false; } //假如数据还不同步过来,设置未身份证验证 if (userModel == null) { userModel = new UserBasicInfoInfo(); userModel.IsValidateIdentity = false; AviMoney = 0; } } else { Response.Redirect("/user/Login.aspx?ReturnUrl=" + Request.RawUrl, true); } Tool.CookieHelper.WriteCookie("InvestUrl", HttpContext.Current.Request.RawUrl, 30); var projectIdStr = Tool.WEBRequest.GetQueryString("projectid");// Request.QueryString["projectid"]; if (!string.IsNullOrEmpty(projectIdStr)) { projectId = Guid.Parse(projectIdStr); //model = new WeProductBLL().GetWeProductInfo(projectId); string isOpenMobileCode = "false"; var webSet = new WebSettingBLL().GetWebSettingInfo("C7FC6726-A36D-4035-A36C-957D43F5EF96"); if (webSet == null) { webSet = new WebSettingInfo(); } if (webSet.Param1Value == "1") { isOpenMobileCode = "true"; } if (IsZQZR(projectId) && !TuanDai.PortalSystem.Redis.mRedis.GetZqzrInvestCodePass(projectId, userId) && isOpenMobileCode == "true") { IsShowMobileCode = true; } } else { Response.Redirect("/pages/invest/invest_list.aspx"); } investType = Tool.WEBRequest.GetQueryString("investType"); //Request.QueryString["investType"]; var payMoneyStr = Tool.WEBRequest.GetQueryString("payMoney"); //Request.QueryString["payMoney"]; if (!string.IsNullOrEmpty(payMoneyStr) && payMoneyStr != "NaN") { PayMoney = decimal.Parse(payMoneyStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } ProfitMoney = Tool.WEBRequest.GetQueryString("profitMoney"); //Request.QueryString["profitMoney"]; var unitStr = Tool.WEBRequest.GetQueryString("unit"); //Request.QueryString["unit"]; if (!string.IsNullOrEmpty(unitStr)) { unit = int.Parse(unitStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } var repeatInvestTypeStr = Tool.WEBRequest.GetQueryString("repeatInvestType"); //Request.QueryString["repeatInvestType"]; if (!string.IsNullOrEmpty(repeatInvestTypeStr)) { RepeatInvestType = int.Parse(repeatInvestTypeStr); } if (Tool.WEBRequest.GetQueryString("PrizeId") != "") { PrizeId = WEBRequest.GetGuid("PrizeId"); } PrizeName = WEBRequest.GetQueryString("PrizeName"); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } switch (model.Rating) { case 1: rating = "<span style=\"color:Green;\">低</span>"; break; case 2: rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: rating = "<span style=\"color:Red;\">高</span>"; break; } finishProcess = CommUtils.GetProjectProcess(model); imageList = CommUtils.GetProjectImages(this.projectId.Value); creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value); allMonthBadrate = calcrate(model.TotalSumShares ?? 0, model.badShares ?? 0); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } borrowerUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value); borrowerUserInfoExt = userbll.GetUserBasicInfoExtInfo(model.UserId.Value); this.GetBorrowerData(); InterestRateNum1 = ToolStatus.DeleteZero(model.InterestRate.Value).Split('.')[0]; InterestRateNum2 = ToolStatus.DeleteZero(model.InterestRate.Value).Contains(".") ? ToolStatus.DeleteZero(model.InterestRate.Value).Split('.')[1] : string.Empty; if (model.Status != 3 && model.Status != 6) { RemainMoney = (int.Parse(ToolStatus.diff(model.TotalShares ?? 0, model.CastedShares ?? 0)) * decimal.Parse(ToolStatus.DeleteZero(model.LowerUnit.Value))).ToString("N2"); } else { RemainMoney = "0"; } finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); List <SubscribeTotalInfo> repaylist = new SubscribeBLL().GetRepaymentInfo(this.projectId.Value); if (repaylist != null && repaylist.Count > 0) { foreach (SubscribeTotalInfo item in repaylist) { switch (item.status) { case 1: repayedAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; case 2: overdueAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; case 3: duerepayAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; } } } string jzsql = "select isnull(AvgNetAssets,0) from VipMonthlyNetAssets with(nolock) where UserId=@UserId and ReportDate=@ReportDate"; var dyParamJZ = new Dapper.DynamicParameters(); dyParamJZ.Add("@UserId", model.UserId.Value); dyParamJZ.Add("@ReportDate", DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01")); this.monthJZ = TuanDai.DB.TuanDaiDB.QueryFirstOrDefault <decimal>(TdConfig.ApplicationName, TdConfig.DBReportWrite, jzsql, ref dyParamJZ); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); // 截标时间为NULL时候取审核时间 +4 天 if (model.TenderDate == null) { WebSettingInfo set = new WebSettingBLL().GetWebSettingInfo("3F902315-6986-44FF-9F00-9D420C07FCDA"); if (model.AddDate >= Convert.ToDateTime(set.Param4Value)) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(2); } else { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(4); } } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } if (model.Type.Value != 19) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } WebSettingInfo gylSet = new WebSettingBLL().GetWebSettingInfo("75F593E2-40FF-4777-A6F8-4ED54D39FF70"); if (gylSet.Param2Value.IsEmpty()) { gylSet.Param2Value = "2017-02-10"; } if (model.AddDate >= DateTime.Parse(gylSet.Param2Value)) { DanBaoCompany = "东莞市志诚非融资性担保有限公司"; } switch (model.Rating) { case 1: rating = "<span style=\"color:Green;\">低</span>"; break; case 2: rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: rating = "<span style=\"color:Red;\">高</span>"; break; } GetBorrowUserInfo(); WebSettingBLL setbll = new WebSettingBLL(); //新手加息判断 WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5"); if (GylSetInfo != null) { GylPlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0); Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0); } if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0)) { IsShowPlusRate = true; } DynamicParameters dyParams; string sql = ""; if (WebUserAuth.IsAuthenticated && IsShowPlusRate) { //判断是否投资新手 sql = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid"; dyParams = new DynamicParameters(); dyParams.Add("@userid", WebUserAuth.UserId.Value); bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0; NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0; } dyParams = new DynamicParameters(); dyParams.Add("@projectid", projectId); sql = @"select ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid"; ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams); finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } borrowUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value); borrowerUserInfoExt = userbll.GetUserBasicInfoExtInfo(model.UserId.Value); //信用档案 creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value); imageList = CommUtils.GetProjectImages(this.projectId.Value); finishProcess = CommUtils.GetProjectProcess(model); this.GetUserDetailInfo(); //风险等级 switch (model.Rating) { case 1: this.rating = "<span style=\"color:Green;\">低</span>"; break; case 2: this.rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: this.rating = "<span style=\"color:Red;\">高</span>"; break; } SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); allMonthBadrate = calcrate(model.TotalSumShares ?? 0, model.badShares ?? 0); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } string sql = "select RiskAssessment,FundUse,RepaymentAssure from project_xd with(nolock) where ProjectId=@ProjectId"; Dapper.DynamicParameters Parprojectxd = new Dapper.DynamicParameters(); Parprojectxd.Add("@ProjectId", projectId); projectXDInfo = PublicConn.QuerySingle <Project_xdInfo>(sql, ref Parprojectxd); if (projectXDInfo == null) { projectXDInfo = new Project_xdInfo(); } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null || (model.Type != 29)) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } string strSQL = @"select b.OrgId,b.ShortName, ProjectDesc,OrgDecription,ProjectDescription,ProjectRiskDesc from dbo.fq_ItemSetsProject a with(nolock) INNER JOIN dbo.fq_Organization b ON a.OrgId=b.OrgId WHERE projectid = @projectid OR CHARINDEX(@projectid,OldProjectID)>0"; DynamicParameters dyParams = new DynamicParameters(); dyParams.Add("@projectid", model.Id.ToString()); organization = PublicConn.QuerySingle <Organizations>(strSQL, ref dyParams); if (organization == null) { organization = new Organizations(); organization.ShortName = "沐金农"; } dyParams = new DynamicParameters(); dyParams.Add("@userid", model.UserId); strSQL = "select * from UserBasicInfo with(nolock) where Id=@userid"; borrowUserInfo = PublicConn.QuerySingle <UserBasicInfoInfo>(strSQL, ref dyParams); dyParams = new DynamicParameters(); dyParams.Add("@ProjectId", model.Id); strSQL = string.Format(@"SELECT a.*,b.Profession,b.HouseSituation,b.BorrowerType,b.FarmingLand,b.LastZJBTAmount,b.LastNJGZBTAmount,b.LastLZBTAmount,b.Plant,b.BreedDes FROM dbo.fq_ItemSetsProject a with(nolock) inner join fq_ItemSetsProject_mjn b with(nolock) on a.ID=b.ItemProjectId WHERE ProjectId=@ProjectId OR CHARINDEX('{0}',OldProjectID)>0" , model.Id); fq_ItemSetsProjectInfo = PublicConn.QuerySingle <Fq_mjn_ItemSetsProjectInfo>(strSQL, ref dyParams); //信用档案 creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value); finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null || !(model.Type == 24) && !(model.Type == 25) && !(model.Type == 42)) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } string strSQL = @"select b.id,b.ShortName, ProjectDesc,OrgDecription from dbo.fq_ItemSetsProject a with(nolock) INNER JOIN dbo.fq_OrganizationExtend b ON a.OrgId=b.OrgId AND b.ProjectType=@ProjectType WHERE projectid = @projectid OR CHARINDEX(@projectid,OldProjectID)>0"; DynamicParameters dyParams = new DynamicParameters(); dyParams.Add("@projectid", model.Id.ToString()); dyParams.Add("@ProjectType", model.Type); organization = PublicConn.QuerySingle <Organizations>(strSQL, ref dyParams); if (organization == null) { organization = new Organizations(); } dyParams = new DynamicParameters(); dyParams.Add("@ProjectId", model.Id); strSQL = string.Format("SELECT * FROM dbo.fq_ItemSetsProject with(nolock) WHERE ProjectId=@ProjectId OR CHARINDEX('{0}',OldProjectID)>0", model.Id); fq_ItemSetsProjectInfo = PublicConn.QuerySingle <Fq_ItemSetsProjectInfo>(strSQL, ref dyParams); //信用档案 creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value); finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } if (model.Type.Value != 32) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } DynamicParameters dyParams; string sql = ""; finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } sql = "select RiskAssessment,FundUse,RepaymentAssure from project_xd with(nolock) where ProjectId=@ProjectId"; Dapper.DynamicParameters Parprojectxd = new Dapper.DynamicParameters(); Parprojectxd.Add("@ProjectId", projectId); projectXDInfo = PublicConn.QuerySingle <Project_xdInfo>(sql, ref Parprojectxd); if (projectXDInfo == null) { projectXDInfo = new Project_xdInfo(); } return(true); }
private bool GetData() { //获取项目信息 if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { this.model = new WeProductBLL().GetWePlanByRedis(TypeId, projectId.Value, IsPreSell, TdConfig.ApplicationName); } else { this.model = bll.GetWeProductInfo(projectId.Value); } if (model == null || model.IsFTB == false) { return(false); } #region 判断满标 if (model.StartDate > DateTime.Now && model.StatusId == 1) { IsWeFinish = false; } else if (model.StartDate < DateTime.Now && model.OrderQty != model.TotalQty) { IsWeFinish = false; } else { IsWeFinish = true; } #endregion #region 判断新手标 if (!model.IsNewHand) { WeFTBBLL ftbll = new WeFTBBLL(); FTBRateList = this.GetWeFTBRateList(model.ProductTypeId ?? 0, model.StartDate ?? DateTime.Today); if (FTBRateList == null) { FTBRateList = new List <WeProductFTBRateInfo>(); } //补充提前退出前几个月的数据 if (FTBRateList.Any()) { WeProductFTBRateInfo firstRate = FTBRateList[0]; List <WeProductFTBRateInfo> tmpList = new List <WeProductFTBRateInfo>(); for (int i = 1; i < model.ExitLockMonth; i++) { tmpList.Add(new WeProductFTBRateInfo() { MonthType = i, ProductTypeId = model.ProductTypeId ?? 0, YearRate = firstRate.YearRate }); } if (tmpList.Any()) { FTBRateList.InsertRange(0, tmpList); } } FTBRateList = FTBRateList.OrderByDescending(p => p.MonthType).ToList(); } #endregion decimal deadLineType = model.DeadType == 1 ? 12 : 365; PreInterestRate = decimal.Parse("10000") * (model.Deadline ?? 0) * ((model.YearRate ?? 0) + (model.TuandaiRedRate ?? 0)) * decimal.Parse("0.01") / deadLineType; EbaoMultiple = int.Parse(Math.Ceiling(model.YearRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = GetEbaoMultipleInterest(10000); GetLimitInvestMoney(); WebSettingBLL webSettingBll = new WebSettingBLL(); preSellSet = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29"); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); sellSet518 = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1"); IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"]; if (IsPreView1218 == "1") { preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } else if (IsPreView1218 == "2") { preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"); curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } return(true); }