示例#1
0
        protected bool GetData()
        {
            UserBLL userbll = new UserBLL();

            //获取项目信息
            model = bll.GetProjectDetailInfo(projectId.Value);
            if (model == null || !(model.Type == 48))
            {
                Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
                return(false);
            }

            var dyParams = new DynamicParameters();

            dyParams.Add("@userid", model.UserId);
            string 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.Empty;
            strSQL = @"select top 1 ext from Project_Common with(nolock) where ProjectId=@ProjectId";
            string ext = PublicConn.QuerySingle <string>(strSQL, ref dyParams);

            if (!string.IsNullOrEmpty(ext))
            {
                UserInfoExt = JsonConvert.DeserializeObject <ProjectUserInfoExt>(ext);
            }
            if (UserInfoExt == null)
            {
                UserInfoExt = new ProjectUserInfoExt();
            }

            dyParams = new DynamicParameters();
            dyParams.Add("@ProjectId", model.Id);
            strSQL  = string.Empty;
            strSQL  = @"select * from BorrowerComplianceInfo with(nolock) where ProjectId=@ProjectId";
            comInfo = PublicConn.QuerySingle <BorrowerComplianceInfo>(strSQL, ref dyParams);

            if (comInfo == null)
            {
                comInfo = new BorrowerComplianceInfo();
            }

            //信用档案
            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);
        }
示例#2
0
        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);
        }
示例#3
0
 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");
     if (!IsPostBack)
     {
         bll = new ProjectBLL();
         if (this.projectId != Guid.Empty)
         {
             if (!this.GetData())
             {
                 return;
             }
             //信用档案
             creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value);
             imageList  = CommUtils.GetProjectImages(this.projectId.Value);
         }
         else
         {
             Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
         }
     }
 }
示例#4
0
        protected bool GetData()
        {
            UserBLL userbll = new UserBLL();

            //获取项目信息
            model = bll.GetProjectDetailInfo(projectId.Value);
            if (model == null || !(model.Type == 30))
            {
                Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
                return(false);
            }


            var dyParams = new DynamicParameters();

            dyParams.Add("@userid", model.UserId);
            var strSQL = "select * from UserBasicInfo with(nolock) where Id=@userid";

            borrowUserInfo = PublicConn.QuerySingle <UserBasicInfoInfo>(strSQL, ref dyParams);

            dyParams = new DynamicParameters();
            dyParams.Add("@ProjectId", model.Id);

            string querySql = string.Format(@"SELECT  a.ID ,
                                                a.ItemID ,
                                                a.ItemName ,
                                                a.AddDate ,
                                                a.ProjectId ,
                                                a.Amount ,
                                                a.Deadline ,
                                                a.RealName ,
                                                a.IdentityCard ,
                                                a.TelNo ,
                                                a.MonthlyIncome ,
                                                a.Education ,
                                                a.Address ,
                                                a.IsHaveHouse ,
                                                a.ContractNo ,
                                                a.UserName ,
                                                a.InterestRate ,
                                                a.UserID ,
                                                a.OldProjectID ,
                                                a.Title ,
                                                a.StatusId ,
                                                a.FlowCount ,
                                                a.WithdrewStatus ,
                                                a.OrgId ,
                                                a.BorrowerInAmount ,
                                                a.OrgInAmount ,
                                                a.GuarantorInAmount ,
                                                a.TdInAmount ,
                                                a.WithdrawID ,
                                                a.WithdrawNumber ,
                                                a.IsSyncedFullScale ,
                                                a.ProjectType ,
                                                a.RepaymentType,
                                                b.MarrayStatus,
                                                b.HouseSituation,b.IsHaveChildren,b.BorrowerType
                                        FROM    dbo.fq_ItemSetsProject a WITH ( NOLOCK )
                                                INNER JOIN fq_ItemSetsProject_NiWoJinrong b WITH ( NOLOCK ) ON a.ID = b.ItemProjectId
                                        WHERE   ProjectId = @ProjectId
                                                OR CHARINDEX('{0}', OldProjectID) > 0", projectId);

            fq_ItemSetsProjectInfo = PublicConn.QuerySingle <Fq_nwjr_ItemSetsProjectInfo>(querySql, 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);
            InterestModel    = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value);
            return(true);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        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);
            }
            userApply = bll.WXGetFQUserApplyInfo(projectId.Value.ToText());
            if (userApply != null)
            {
                Organization = bll.WXGetOrganizationInfo(userApply.OrgId.HasValue ? userApply.OrgId.Value.ToText() : "");
            }
            else
            {
                userApply = new WXFQUserApplyInfo();
            }

            string strFile = string.Format(" oa.OrgTypeId ={0} and (f.UserId IS NULL OR f.UserId = '{1}') ", Organization.OrgTypeId, userApply.ApplyUserId);

            Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters();
            string strSQL   = string.Format(@" SELECT DISTINCT AuthName = a.Name, oa.AuthId, a.UploadedStyle,oa.SortOrder
                                             FROM fq_OrgAuthSetting oa with(nolock)
                                             INNER JOIN fq_AuthSetting a with(nolock) ON oa.AuthId = a.Id 
                                             INNER JOIN (SELECT AuthId,UserId from  dbo.fq_UserAuthFile with(nolock) WHERE (IsDelete IS NULL OR IsDelete = 0) AND IsHiddenInfo =0) f ON a.Id = f.AuthId 
                                             Where {0} Order by oa.SortOrder asc", strFile);
            var    AuthList = PublicConn.QueryBySql <AuthSet>(strSQL, ref dyParams);

            for (int i = 0; i < AuthList.Count; i++)
            {
                if (i == 0)
                {
                    AuthHtml = AuthList[i].AuthName;
                }
                else
                {
                    AuthHtml += "、" + AuthList[i].AuthName;
                }
            }

            //是否学生分期
            dyParams = new Dapper.DynamicParameters();
            dyParams.Add("@ProjectId", model.Id);
            strSQL         = "select isnull(IdentityTypeId,0) as IdentityTypeId from fq_UserApply with(nolock) where ProjectId=@ProjectId";
            IdentityTypeId = PublicConn.QuerySingle <int>(strSQL, ref dyParams);

            if (IdentityTypeId == 1)
            {
                //获取学生基本信息
                dyParams = new Dapper.DynamicParameters();
                dyParams.Add("@UserId", model.UserId);
                strSQL         = "select * from fq_ApplyEducation with(nolock) where UserId=@UserId";
                applyEducation = PublicConn.QuerySingle <ApplyEducation>(strSQL, ref dyParams);
            }
            else
            {
                borrowUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value);
                strSQL         = "select * from userDetailInfo with(nolock) where UserId=@UserId";
                dyParams       = new Dapper.DynamicParameters();
                dyParams.Add("@UserId", borrowUserInfo.Id);
                userDetai = PublicConn.QuerySingle <userDetailInfoInfo>(strSQL, ref dyParams);
            }
            //信用档案
            creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value);

            //项目展示图
            imageList     = CommUtils.GetProjectImages(this.projectId.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);
        }
示例#8
0
        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);
        }
示例#9
0
        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);
        }