protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null || (model.Type != 28)) { 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); fq_ItemSetsProjectInfo = new fq_ItemSetsProjectBLL().GetFqItemSetsProjectInfoByPorjectId(model.Id); if (fq_ItemSetsProjectInfo == null) { fq_ItemSetsProjectInfo = new Fq_ItemSetsProjectInfo(); } //信用档案 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); 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); }