private void GetContractInfo(string key) { string contactno = this.key; this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno); if (submodel.AddDate < Convert.ToDateTime("2016-3-11")) { companyName = "广东俊特团贷网络信息服务股份有限公司"; } else { companyName = "东莞团贷网互联网科技服务有限公司"; } this.subBasicModel = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //基本信息 this.proModel = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value); //标信息 this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value); var Params = new Dapper.DynamicParameters(); Params.Add("@ProjectId", proModel.Id); string selSQL = @"select * from fq_ItemSetsProject with(nolock) where ProjectId=@ProjectId"; itemProjectInfo = PublicConn.QuerySingle <Fq_ItemSetsProjectInfo>(selSQL, ref Params); RepaymentTypeDesc = ToolStatus.ConvertRepaymentType(proModel.RepaymentType.Value); if (WebUserAuth.UserId == publisherModel.Id) { this.subBasicModel.RealName = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人 this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard); //出借人身份证号 } else { this.itemProjectInfo.RealName = StringHandler.MaskStartPre(itemProjectInfo.RealName, 1); //借款人 this.itemProjectInfo.IdentityCard = StringHandler.MaskCardNo(itemProjectInfo.IdentityCard); //出借人身份证号 } UserEnterpriseInfo userEnterprise = new Common.Contract().GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value, proModel.Type.Value); if (userEnterprise != null) { assureModel = new Common.Contract().GetAssureOrganizationByUserId(userEnterprise.UserId); } else { int gid = 0; int.TryParse(proModel.Guarantors, out gid); assureModel = new Common.Contract().GetAssureOrganizationById(gid); if (gid == 1 && DateTime.Now < DateTime.Parse("2013-11-27")) { assureModel.FullName = "东莞市俊特团贷网络信息服务有限公司"; } } //印章小图片 if (assureModel != null) { this.assureModel.image = this.GetSmallImage(this.assureModel.image); } }
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); }
private void GetContractInfo(string key) { string contactno = this.key; this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno); if (submodel.AddDate < Convert.ToDateTime("2016-3-11")) { companyName = "广东俊特团贷网络信息服务股份有限公司"; } else { companyName = "东莞团贷网互联网科技服务有限公司"; } this.subBasicModel = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); this.proModel = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value); //标信息 this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value); //获取发布人信息 //普惠借款人基本信息 string sql = "select * from fq_ItemSetsProject with(nolock) where ProjectId=@ProjectId"; var dyParams = new Dapper.DynamicParameters(); dyParams.Add("@ProjectId", proModel.Id); itemProjectInfo = PublicConn.QuerySingle <Fq_ItemSetsProjectInfo>(sql, ref dyParams); RepaymentTypeDesc = ToolStatus.ConvertRepaymentType(proModel.RepaymentType.Value); if (WebUserAuth.UserId == publisherModel.Id) { this.subBasicModel.RealName = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人 this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard); //出借人身份证号 } else { this.itemProjectInfo.RealName = StringHandler.MaskStartPre(itemProjectInfo.RealName, 1); //借款人 this.itemProjectInfo.IdentityCard = StringHandler.MaskCardNo(itemProjectInfo.IdentityCard); //出借人身份证号 } UserEnterpriseInfo userEnterprise = GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value); if (userEnterprise != null) { // this.assureModel = this.db.AssureOrganization.FirstOrDefault(p => p.UserId == userEnterprise.UserId); string sql1 = "select * from AssureOrganization with(nolock) where UserId=@UserId"; var dyParams1 = new Dapper.DynamicParameters(); dyParams1.Add("@UserId", userEnterprise.UserId); PublicConn.QuerySingle <AssureOrganizationInfo>(sql1, ref dyParams1); } else { if (!string.IsNullOrEmpty(proModel.Guarantors)) { int gid = 0; int.TryParse(proModel.Guarantors, out gid); string sql2 = "select * from AssureOrganization with(nolock) where Id=@Id"; var dyParams2 = new Dapper.DynamicParameters(); dyParams2.Add("@Id", gid); assureModel = PublicConn.QuerySingle <AssureOrganizationInfo>(sql2, ref dyParams2); } } //印章小图片 if (assureModel != null) { this.assureModel.image = this.GetSmallImage(this.assureModel.image); } // string orgsql = " select c.RealName from dbo.fq_ItemSetsProject as a with(nolock) inner join dbo.Fq_OrgItemSets as b with(nolock) on a.itemid = b.id inner join UserBasicInfo as c with(nolock) on b.orgid = c.id where projectid = @projectid"; //args = new SqlParameter[] { new SqlParameter("projectid", proModel.Id) }; //org = db.ExecuteStoreQuery<Org>(orgsql, args).FirstOrDefault(); }
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); }