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); }