Exemple #1
0
        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);
            }
        }
Exemple #2
0
        private void GetContractInfo(string key)
        {
            string contactno = 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);          //借款人信息

            //印章小图片
            //this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #3
0
        private void GetContractInfo(string key)
        {
            string contactno = 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);          //借款人信息



            UserEnterpriseInfo userEnterprise = new Common.Contract().GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value, proModel.Type ?? 0);

            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 = "东莞市俊特团贷网络信息服务有限公司";
                }
            }

            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #4
0
        private void GetContractInfo(string key)
        {
            string contactno = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);

            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }
            if (submodel.AddDate.Value <= DateTime.Parse("2015-07-31"))
            {
                Response.Redirect(string.Format("/Contract/ContractJzdb.aspx?key={0}&type=mobileapp", key));
                return;
            }
            Dapper.DynamicParameters param = new Dapper.DynamicParameters();
            param = new Dapper.DynamicParameters();
            param.Add("@ProjectId", submodel.ProjectId);
            param.Add("@curUserId", WebUserAuth.UserId);
            string strSQL  = "select Count(1) from project(nolock) where Id=@ProjectId and UserId=@curUserId";
            bool   isExist = PublicConn.QuerySingle <int>(strSQL, ref param) > 0;

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && !isExist)
            {
                HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                HttpContext.Current.Response.End();
                return;
            }
            this.subBasicModel     = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel          = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel    = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息
            this.SharesPercent     = (publisherModel.NumberOfShares * 10000m / 100000000m * 100m).ToString("0.00");
            this.PrincipalInterest = submodel.Amount.Value + submodel.InterestAmount.Value;
            AssureModel            = new Common.Contract().GetAssureOrganizationByProjectId(proModel.Id);
            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);
            RepaymentTypeDesc      = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);
            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #5
0
        private void GetContractInfo(string key)
        {
            string contactno = 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);          //借款人信息

            WebSettingInfo gylSet = new WebSettingBLL().GetWebSettingInfo("75F593E2-40FF-4777-A6F8-4ED54D39FF70");

            if (gylSet.Param2Value.IsEmpty())
            {
                gylSet.Param2Value = "2017-02-10";
            }
            if (proModel.AddDate >= DateTime.Parse(gylSet.Param2Value))
            {
                DanBaoCompany = "东莞市志诚非融资性担保有限公司";
                DanBaoImage   = "http://image.tuandai.com/User/UserUpload/201508/20150825145522_3283.png";
            }

            //印章小图片
            //this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = this.GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #6
0
        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.proModel = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);

            this.subBasicModel = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value);//获取承接人信息

            string strSQL   = " Select top 1 * From t_SubScribeTransfer with(nolock) Where m_Id=@m_Id ";
            var    dyParams = new Dapper.DynamicParameters();

            dyParams.Add("@m_Id", submodel.TranId);
            t_SubScribeTransferInfo mSubScribeTransfer = PublicConn.QuerySingle <t_SubScribeTransferInfo>(strSQL, ref dyParams);

            mSubscribe = new SubscribeBLL().GetSubscribeById(mSubScribeTransfer.m_FromSubscribeId);


            if (this.mSubscribe.SubscribeUserId != WebUserAuth.UserId && this.submodel.SubscribeUserId != WebUserAuth.UserId)
            {
                HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                HttpContext.Current.Response.End();
            }

            this.publisherModel = userbll.GetUserBasicInfoModelById(mSubscribe.SubscribeUserId.Value);//获取转让人信息

            this.borrowModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #7
0
        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();
        }
Exemple #8
0
        private void GetContractInfo(string key)
        {
            string contactno = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }

            Dapper.DynamicParameters param = new Dapper.DynamicParameters();
            param = new Dapper.DynamicParameters();
            param.Add("@projectId", submodel.ProjectId);
            param.Add("@curUserId", WebUserAuth.UserId);
            string strSQL  = "select Count(1) from project where Id=@projectId and UserId=@curUserId";
            bool   isExist = PublicConn.QuerySingle <int>(strSQL, ref param) > 0;

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && !isExist)
            {
                HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                HttpContext.Current.Response.End();
                return;
            }
            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息

            ProjectsmEntity = new Common.Contract().GetProjectSM(proModel.Id);                       //获取私募宝信息

            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 = "东莞市俊特团贷网络信息服务有限公司";
                }
            }

            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #9
0
        private void GetContractInfo(string key)
        {
            bool   isUndertake = false; //是否承接人
            string contactno   = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            companyName   = "东莞团贷网互联网科技服务有限公司";

            Dapper.DynamicParameters param = new Dapper.DynamicParameters();
            param = new Dapper.DynamicParameters();
            param.Add("@BorrowerUserId", submodel.BorrowerUserId);
            param.Add("@curUserId", WebUserAuth.UserId);
            string strSQL  = "select Count(1) from project where UserId=@BorrowerUserId and UserId=@curUserId";
            bool   isExist = PublicConn.QuerySingle <int>(strSQL, ref param) > 0;

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && !isExist)
            {
                string sql = @"SELECT c.* FROM (
                           SELECT b.* FROM dbo.Subscribe a
                           RIGHT JOIN dbo.t_SubScribeTransfer  b ON a.id=b.m_FromSubscribeId
                           WHERE a.ContractNo=@ContractNo) M 
                           INNER JOIN dbo.Subscribe c ON c.TranId=M.M_id
                           WHERE c.SubscribeUserId=@SubscribeUserId";
                param = new Dapper.DynamicParameters();
                param.Add("@ContractNo", contactno);
                param.Add("@SubscribeUserId", WebUserAuth.UserId);
                var mSubscribe = PublicConn.QuerySingle <SubscribeInfo>(sql, ref param);

                if (mSubscribe == null)//判断是否是承接人查看借款人与转让人的合同
                {
                    HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                    HttpContext.Current.Response.End();
                    return;
                }
                isUndertake = true;
            }
            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息

            AssureModel = new AssureOrganizationInfo();
            this.AssureModel.FullName = "东莞市志诚非融资性担保有限公司";
            this.AssureModel.image    = "http://image.tuandai.com/User/UserUpload/201508/20150825145522_3283.png";

            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }

            if (isUndertake)
            {
                this.subBasicModel.RealName      = StringHandler.MaskStartPre(subBasicModel.RealName, 1);  //出借人
                this.subBasicModel.IdentityCard  = StringHandler.MaskCardNo(subBasicModel.IdentityCard);   //出借人身份证号
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #10
0
        /// <summary>
        /// 获取合同信息
        /// add by huangbinglai
        /// 20160326
        /// </summary>
        /// <param name="key">合同编号</param>
        private void GetContractInfo(string key)
        {
            string contactno = this.key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);


            string sql = @"select * from project  where UserId=@UserId  and Id=@Id";

            Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters();
            dyParams.Add("@UserId", WebUserAuth.UserId);
            dyParams.Add("@Id", submodel.ProjectId);
            ProjectDetailInfo projectModel = PublicConn.QuerySingle <ProjectDetailInfo>(sql, ref dyParams);

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && projectModel == null)
            {
                HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                HttpContext.Current.Response.End();
            }

            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);          //获取发布人信息



            sql      = @"select u.OrgTypeId,u.OrgId,ISNULL(o.SubTypeId,0) AS SubTypeId from fq_UserApply u
                INNER JOIN fq_Organization o ON u.OrgId=o.OrgId
                where u.ProjectId=@ProjectId";
            dyParams = new Dapper.DynamicParameters();
            dyParams.Add("@ProjectId", submodel.ProjectId);
            mOrgInfo = PublicConn.QuerySingle <OrgInfo>(sql, ref dyParams);

            if (mOrgInfo.OrgTypeId == 5)//分期乐
            {
                if (mOrgInfo.SubTypeId == 3)
                {
                    #region 小树时代
                    xssdmodel = new xssdcontract();
                    xssdmodel.ProContactNo = contactno;                                                   //合同
                    if (proModel.UserId == WebUserAuth.UserId)                                            //借款人查看
                    {
                        xssdmodel.InvestUserName = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                        xssdmodel.InvestCardNo   = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
                        xssdmodel.OrgName        = publisherModel.RealName;                               //机构名称
                        xssdmodel.OrgCode        = publisherModel.IdentityCard;                           //机构编码
                    }
                    else
                    {
                        xssdmodel.InvestUserName = subBasicModel.RealName;      //出借人
                        xssdmodel.InvestCardNo   = subBasicModel.IdentityCard;  //出借人身份证号
                        xssdmodel.OrgName        = publisherModel.RealName;     // StringHandler.MaskStartPre(publisherModel.RealName, 1); //机构名称
                        xssdmodel.OrgCode        = publisherModel.IdentityCard; // StringHandler.MaskCardNo(publisherModel.IdentityCard); //机构编码
                    }
                    Dapper.DynamicParameters para1 = new Dapper.DynamicParameters();
                    para1.Add("@OrgId", publisherModel.Id);
                    sql = "select  OrgLegalPerson from fq_Organization where OrgId=@OrgId";
                    string OrgLegalPerson = PublicConn.QuerySingle <string>(sql, ref para1);
                    xssdmodel.OrgLegalPerson = string.IsNullOrEmpty(OrgLegalPerson) ? "" : proModel.UserId == WebUserAuth.UserId ? OrgLegalPerson : StringHandler.MaskStartPre(OrgLegalPerson, 1); //机构法定代表人

                    xssdmodel.Grade          = proModel.Grade;
                    xssdmodel.SubContractNo  = submodel.ContractNo;
                    xssdmodel.Amount         = submodel.Amount.Value.ToString("N");         //借款金额小写
                    xssdmodel.InterestAmount = submodel.InterestAmount.Value.ToString("N"); //借款利息小写
                    xssdmodel.DeadLine       = proModel.Deadline.Value.ToString();          //借款期限
                    decimal PerAmount = Math.Round((submodel.Amount.Value + submodel.InterestAmount.Value) / proModel.Deadline.Value, 2);
                    xssdmodel.PerAmount = PerAmount.ToString("N");                          //每月回款金额
                    xssdmodel.Rate      = proModel.InterestRate.Value.ToString();           //利率
                    //最后回款时间
                    sql = "select  MAX(CycDate) CycDate  from SubscribeDetail where SubscribeId=@SubscribeId";
                    Dapper.DynamicParameters para2 = new Dapper.DynamicParameters();
                    para2.Add("@SubscribeId", submodel.Id);
                    DateTime?MAXDate  = PublicConn.QuerySingle <DateTime?>(sql, ref para2);
                    DateTime LastDate = MAXDate ?? DateTime.Now.AddMonths(proModel.Deadline ?? 0);
                    xssdmodel.ExpireYear      = LastDate.Year.ToString();
                    xssdmodel.ExpireMonth     = LastDate.Month.ToString();
                    xssdmodel.ExpireDay       = LastDate.Day.ToString();
                    xssdmodel.BorrowSignYear  = submodel.AddDate.Value.Year.ToString();//签字日期
                    xssdmodel.BorrowSignMonth = submodel.AddDate.Value.Month.ToString();
                    xssdmodel.BorrowSignDay   = submodel.AddDate.Value.Day.ToString();
                    #endregion
                }
                else if (mOrgInfo.SubTypeId == 5)
                {
                    #region 你我金融
                    kldmodel = new Kldcontract();
                    kldmodel.ProContactNo = contactno;
                    if (proModel.UserId == WebUserAuth.UserId)                                           //借款人查看
                    {
                        kldmodel.InvestUserName = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                        kldmodel.InvestCardNo   = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
                        kldmodel.OrgName        = publisherModel.RealName;                               //机构名称
                        kldmodel.OrgCode        = publisherModel.IdentityCard;                           //机构编码
                    }
                    else
                    {
                        kldmodel.InvestUserName = subBasicModel.RealName;      //出借人
                        kldmodel.InvestCardNo   = subBasicModel.IdentityCard;  //出借人身份证号
                        kldmodel.OrgName        = publisherModel.RealName;     // StringHandler.MaskStartPre(publisherModel.RealName, 1); //机构名称
                        kldmodel.OrgCode        = publisherModel.IdentityCard; // StringHandler.MaskCardNo(publisherModel.IdentityCard); //机构编码
                    }
                    Dapper.DynamicParameters para2 = new Dapper.DynamicParameters();
                    para2.Add("@OrgId", publisherModel.Id);
                    sql = "select  OrgLegalPerson from fq_Organization where OrgId=@OrgId";
                    string OrgLegalPerson = PublicConn.QuerySingle <string>(sql, ref para2);
                    kldmodel.OrgLegalPerson = string.IsNullOrEmpty(OrgLegalPerson) ? "" : proModel.UserId == WebUserAuth.UserId ? OrgLegalPerson : StringHandler.MaskStartPre(OrgLegalPerson, 1); //机构法定代表人
                    kldmodel.Grade          = proModel.Grade;
                    kldmodel.SubContractNo  = submodel.ContractNo;
                    kldmodel.Amount         = submodel.Amount.Value.ToString("N");         //借款金额小写
                    kldmodel.InterestAmount = submodel.InterestAmount.Value.ToString("N"); //借款利息小写
                    kldmodel.DeadLine       = proModel.Deadline.Value.ToString();          //借款期限
                    decimal PerAmount = Math.Round((submodel.Amount.Value + submodel.InterestAmount.Value) / proModel.Deadline.Value, 2);
                    kldmodel.PerAmount  = PerAmount.ToString("N");                         //每月回款金额
                    kldmodel.Rate       = proModel.InterestRate.Value.ToString();          //利率
                    kldmodel.ReturnType = convertType(submodel.RepaymentType);
                    var para = new SqlParameter[] { new SqlParameter("projectid", submodel.ProjectId) };

                    sql   = "select max(CycDate) from SubscribeDetail where SubscribeId=@subscribeId";
                    para2 = new Dapper.DynamicParameters();
                    para2.Add("@subscribeId", submodel.Id);
                    DateTime?maxCycDate = PublicConn.QuerySingle <DateTime?>(sql, ref para2);
                    //最后回款时间
                    DateTime LastDate = maxCycDate.HasValue ? maxCycDate.Value : DateTime.Now.AddMonths(proModel.Deadline ?? 0);
                    kldmodel.ExpireYear      = LastDate.Year.ToString();
                    kldmodel.ExpireMonth     = LastDate.Month.ToString();
                    kldmodel.ExpireDay       = LastDate.Day.ToString();
                    kldmodel.BorrowSignYear  = submodel.AddDate.Value.Year.ToString();//签字日期
                    kldmodel.BorrowSignMonth = submodel.AddDate.Value.Month.ToString();
                    kldmodel.BorrowSignDay   = submodel.AddDate.Value.Day.ToString();
                    #endregion
                }
                else if (mOrgInfo.SubTypeId == 4)
                {
                    #region 快来贷
                    kldmodel = new Kldcontract();
                    kldmodel.ProContactNo = contactno;
                    if (proModel.UserId == WebUserAuth.UserId)                                           //借款人查看
                    {
                        kldmodel.InvestUserName = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                        kldmodel.InvestCardNo   = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
                        kldmodel.OrgName        = publisherModel.RealName;                               //机构名称
                        kldmodel.OrgCode        = publisherModel.IdentityCard;                           //机构编码
                    }
                    else
                    {
                        kldmodel.InvestUserName = subBasicModel.RealName;      //出借人
                        kldmodel.InvestCardNo   = subBasicModel.IdentityCard;  //出借人身份证号
                        kldmodel.OrgName        = publisherModel.RealName;     // StringHandler.MaskStartPre(publisherModel.RealName, 1); //机构名称
                        kldmodel.OrgCode        = publisherModel.IdentityCard; // StringHandler.MaskCardNo(publisherModel.IdentityCard); //机构编码
                    }
                    Dapper.DynamicParameters para2 = new Dapper.DynamicParameters();
                    para2.Add("@OrgId", publisherModel.Id);
                    sql = "select  OrgLegalPerson from fq_Organization where OrgId=@OrgId";
                    string OrgLegalPerson = PublicConn.QuerySingle <string>(sql, ref para2);
                    kldmodel.OrgLegalPerson = string.IsNullOrEmpty(OrgLegalPerson) ? "" : proModel.UserId == WebUserAuth.UserId ? OrgLegalPerson : StringHandler.MaskStartPre(OrgLegalPerson, 1); //机构法定代表人

                    kldmodel.Grade          = proModel.Grade;
                    kldmodel.SubContractNo  = submodel.ContractNo;
                    kldmodel.Amount         = submodel.Amount.Value.ToString("N");         //借款金额小写
                    kldmodel.InterestAmount = submodel.InterestAmount.Value.ToString("N"); //借款利息小写
                    kldmodel.DeadLine       = proModel.Deadline.Value.ToString();          //借款期限
                    decimal PerAmount = Math.Round((submodel.Amount.Value + submodel.InterestAmount.Value) / proModel.Deadline.Value, 2);
                    kldmodel.PerAmount  = PerAmount.ToString("N");                         //每月回款金额
                    kldmodel.Rate       = proModel.InterestRate.Value.ToString();          //利率
                    kldmodel.ReturnType = convertType(submodel.RepaymentType);

                    sql   = "select max(CycDate) from SubscribeDetail where SubscribeId=@subscribeId";
                    para2 = new Dapper.DynamicParameters();
                    para2.Add("@subscribeId", submodel.Id);
                    DateTime?maxCycDate = PublicConn.QuerySingle <DateTime?>(sql, ref para2);

                    //最后回款时间
                    DateTime LastDate = maxCycDate.HasValue ? maxCycDate.Value : DateTime.Now.AddMonths(proModel.Deadline ?? 0);
                    kldmodel.ExpireYear      = LastDate.Year.ToString();
                    kldmodel.ExpireMonth     = LastDate.Month.ToString();
                    kldmodel.ExpireDay       = LastDate.Day.ToString();
                    kldmodel.BorrowSignYear  = submodel.AddDate.Value.Year.ToString();//签字日期
                    kldmodel.BorrowSignMonth = submodel.AddDate.Value.Month.ToString();
                    kldmodel.BorrowSignDay   = submodel.AddDate.Value.Day.ToString();
                    if (string.IsNullOrEmpty(proModel.Guarantors) || proModel.Guarantors.ToInt(0) <= 0)
                    {
                        HttpContext.Current.Response.Write("对不起,该项目未指定担保机构,不能查看合同!");
                        HttpContext.Current.Response.End();
                        return;
                    }
                    #endregion
                }

                if (mOrgInfo.SubTypeId.ToString().IsIn("4", "5"))
                {
                    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
                    {
                        //当未指定担保机构时则退出  allen  2015-05-07
                        if (string.IsNullOrEmpty(proModel.Guarantors) || proModel.Guarantors.ToInt(0) <= 0)
                        {
                            HttpContext.Current.Response.Write("对不起,该项目未指定担保机构,不能查看合同!");
                            HttpContext.Current.Response.End();
                            return;
                        }
                        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 = "东莞市俊特团贷网络信息服务有限公司";
                        }
                    }
                    //印章小图片
                    assureModel.image = new Common.Contract().GetSmallImage(assureModel.image);
                    kldmodel.Assure   = assureModel != null ? assureModel.FullName : "东莞市志诚非融资性担保有限公司";
                }
            }
            else//分期宝
            {
                #region 分期宝
                fqbmodel = new fqbcontract();
                fqbmodel.ProContactNo = contactno;                                                   //合同
                if (proModel.UserId == WebUserAuth.UserId)                                           //借款人查看
                {
                    fqbmodel.CreditorName   = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                    fqbmodel.CreditorCardNo = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
                    fqbmodel.DebtorName     = publisherModel.RealName;                               //借款人
                    fqbmodel.DebtorCardNo   = publisherModel.IdentityCard;                           //借款人身份证号
                }
                else
                {
                    fqbmodel.CreditorName   = subBasicModel.RealName;                                 //出借人
                    fqbmodel.CreditorCardNo = subBasicModel.IdentityCard;                             //出借人身份证号
                    fqbmodel.DebtorName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                    fqbmodel.DebtorCardNo   = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
                }
                Dapper.DynamicParameters para = new Dapper.DynamicParameters();
                para.Add("@projectid", submodel.ProjectId);
                sql = @"DECLARE @IsPrivateAccounts BIT=0 --是否私账,默认公账
                                SELECT @IsPrivateAccounts=ISNULL(b.IsPrivateAccounts,0) FROM dbo.fq_UserApply(nolock) a
                                INNER JOIN  dbo.fq_Organization(nolock) b ON a.OrgId=b.OrgId
                                WHERE a.ProjectId=@projectid
                                IF	@IsPrivateAccounts=0
                                BEGIN
	                                SELECT u.RealName as OrgName,o.ProductName FROM fq_UserApply a with(nolock) 
	                                INNER JOIN  fq_OrgProduct(nolock) o ON a.ProductId = o.Id  
	                                INNER JOIN  dbo.UserBasicInfo(nolock) u ON a.OrgId = u.Id
	                                where a.ProjectId=@projectid
                                END
                                ELSE
                                BEGIN
	                                SELECT u.ShortName as OrgName,o.ProductName FROM fq_UserApply a with(nolock) 
	                                INNER JOIN  fq_OrgProduct(nolock) o ON a.ProductId = o.Id  
	                                INNER JOIN  dbo.fq_Organization(nolock) u ON a.OrgId = u.OrgId
	                                where a.ProjectId=@projectid
                                END";
                var OrgInfo = PublicConn.QuerySingle <FqbOrg>(sql, ref para);
                fqbmodel.Assure        = OrgInfo.OrgName;//担保人
                fqbmodel.OrgName       = OrgInfo.OrgName;
                fqbmodel.ProductName   = OrgInfo.ProductName;
                fqbmodel.Amount        = proModel.Amount.Value.ToString("N");
                fqbmodel.BorrowMoney   = submodel.Amount.Value.ToString("N");                                      //借款金额小写
                fqbmodel.BorrowMoneyCn = ChineseNum.GetUpperMoney(double.Parse(submodel.Amount.Value.ToString())); //借款金额大写
                fqbmodel.DeadLine      = proModel.Deadline.Value.ToString();                                       //借款期限
                fqbmodel.Rate          = proModel.InterestRate.Value.ToString();                                   //利率
                // dic["OverRate1"] = debtorModel.OverRate.Value.ToString();//逾期利率
                fqbmodel.OverRate          = fqbmodel.Rate;
                fqbmodel.Address           = "广东省东莞市南城区";                            //签署地
                fqbmodel.RepaymentTypeName = ToolStatus.ConvertRepaymentType(proModel.RepaymentType ?? 0);
                fqbmodel.BorrowSignYear    = submodel.AddDate.Value.Year.ToString(); //签字日期
                fqbmodel.BorrowSignMonth   = submodel.AddDate.Value.Month.ToString();
                fqbmodel.BorrowSignDay     = submodel.AddDate.Value.Day.ToString();

                #endregion
            }
        }
Exemple #11
0
        private void GetContractInfo(string key)
        {
            bool   isUndertake = false; //是否承接人
            string contactno   = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }

            Dapper.DynamicParameters param = null;
            param = new Dapper.DynamicParameters();
            param.Add("@BorrowerUserId", submodel.BorrowerUserId);
            param.Add("@curUserId", WebUserAuth.UserId);
            string strSQL  = "select Count(1) from project where UserId=@BorrowerUserId and UserId=@curUserId";
            bool   isExist = PublicConn.QuerySingle <int>(strSQL, ref param) > 0;

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && !isExist)
            {
                string sql = @"SELECT c.* FROM (
                           SELECT b.* FROM dbo.Subscribe a
                           RIGHT JOIN dbo.t_SubScribeTransfer  b ON a.id=b.m_FromSubscribeId
                           WHERE a.ContractNo=@ContractNo) M 
                           INNER JOIN dbo.Subscribe c ON c.TranId=M.M_id
                           WHERE c.SubscribeUserId=@SubscribeUserId";
                param = new Dapper.DynamicParameters();
                param.Add("@ContractNo", contactno);
                param.Add("@SubscribeUserId", WebUserAuth.UserId);
                var mSubscribe = PublicConn.QuerySingle <SubscribeInfo>(sql, ref param);

                if (mSubscribe == null)//判断是否是承接人查看借款人与转让人的合同
                {
                    HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                    HttpContext.Current.Response.End();
                    return;
                }
                isUndertake = true;
            }
            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息


            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
            {
                if (proModel.Guarantors.ToText() == "")
                {
                    assureModel = new AssureOrganizationInfo();
                }
                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 = "东莞市俊特团贷网络信息服务有限公司";
                    }
                }
            }

            //印章小图片
            this.assureModel.image = new Common.Contract().GetSmallImage(this.assureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }

            if (isUndertake)
            {
                this.subBasicModel.RealName      = StringHandler.MaskStartPre(subBasicModel.RealName, 1);  //出借人
                this.subBasicModel.IdentityCard  = StringHandler.MaskCardNo(subBasicModel.IdentityCard);   //出借人身份证号
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Exemple #12
0
        protected void GetBorrowUserInfo()
        {
            if (ProjectId != null && ProjectId != Guid.Empty)
            {
                string sql = @"select b.Id as UserId, b.Birthday, b.TelNo, b.sex, b.AddDate, b.NickName, b.BankCity, b.CreditRatingName,b.UserTypeId,b.RealName, a.Type as ProjectType from Project a
                               inner join UserBasicInfo b with(nolock)  on b.Id=a.UserId
                               where a.Id=@projectId ";
                Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters();
                dyParams.Add("@projectId", ProjectId);
                borrowerUserInfo = PublicConn.QuerySingle <BorrowUserInfo>(sql, ref dyParams);
                if (borrowerUserInfo == null)
                {
                    borrowerUserInfo = new BorrowUserInfo();
                }

                string phone = borrowerUserInfo.TelNo.ToText();
                if (!phone.IsEmpty())
                {
                    if (phone.Length > 11)
                    {
                        phone = phone.Left(11);
                    }
                }
                borrowerUserInfo.TelNo = phone;

                SimpleUserExt userBasicInfo_Ext = null;
                dyParams = new Dapper.DynamicParameters();
                dyParams.Add("@userid", borrowerUserInfo.UserId);
                sql = @"select Marriage,Graduation,IsHasChildren, IsHaveHouse,IsHaveCar,Address from t_UserBasicInfo_Ext with(nolock) where UserId=@userid";
                userBasicInfo_Ext = PublicConn.QuerySingle <SimpleUserExt>(sql, ref dyParams);

                if (userBasicInfo_Ext != null)
                {
                    borrowerUserInfo.Marriage   = userBasicInfo_Ext.Marriage;
                    borrowerUserInfo.Graduation = userBasicInfo_Ext.Graduation;
                    if (userBasicInfo_Ext.IsHasChildren == true)
                    {
                        borrowerUserInfo.IsHasChildren = "有";
                    }
                    else
                    {
                        borrowerUserInfo.IsHasChildren = "否";
                    }
                    borrowerUserInfo.IsHasHouse = userBasicInfo_Ext.IsHaveHouse ? "有" : "无";
                    if (borrowerUserInfo.BankCity.IsEmpty())
                    {
                        borrowerUserInfo.BankCity = StringHandler.MaskStarPre3(userBasicInfo_Ext.Address);
                    }
                }
                //是否项目集标的
                if (borrowerUserInfo.ProjectType.ToString().IsIn("24", "25", "27", "28", "29", "31", "33"))
                {
                    Fq_ItemSetsProjectInfo fq_ItemSetsProjectInfo = new fq_ItemSetsProjectBLL().GetFqItemSetsProjectInfoByPorjectId(ProjectId);
                    if (fq_ItemSetsProjectInfo != null)
                    {
                        borrowerUserInfo.BankCity   = StringHandler.MaskStartPre(Tool.WebFormHandler.CutString(fq_ItemSetsProjectInfo.Address, 6), 3);
                        borrowerUserInfo.Industry   = StringHandler.MaskStartPre(fq_ItemSetsProjectInfo.CompanyIndustryTypeId, 6);
                        borrowerUserInfo.Salary     = fq_ItemSetsProjectInfo.MonthlyIncome + "元";
                        borrowerUserInfo.IsHasHouse = fq_ItemSetsProjectInfo.IsHaveHouse ? "有" : "无";
                        borrowerUserInfo.Graduation = fq_ItemSetsProjectInfo.Education;
                        borrowerUserInfo.Marriage   = fq_ItemSetsProjectInfo.MarrayStatus ? "已婚" : "未婚";
                    }
                }
                if (borrowerUserInfo.ProjectType >= 39)
                {
                    sql      = "select ext from dbo.Project_Common where ProjectId=@ProjectId";
                    dyParams = new Dapper.DynamicParameters();
                    dyParams.Add("@ProjectId", ProjectId);
                    string ext = PublicConn.QuerySingle <string>(sql, ref dyParams);
                    if (ext.IsNotEmpty())
                    {
                        var borrowExtInfo = JsonConvert.DeserializeObject <BorrowExtInfo>(ext);
                        if (borrowExtInfo != null)
                        {
                            borrowerUserInfo.Marriage   = borrowExtInfo.marriage;
                            borrowerUserInfo.Graduation = borrowExtInfo.education;
                            borrowerUserInfo.IsHasHouse = borrowExtInfo.housingSituation.IsEmpty() ? "无" : borrowExtInfo.housingSituation;
                            borrowerUserInfo.BankCity   = borrowExtInfo.city;
                        }
                    }
                }

                //查询借款人合规表信息
                string strSQL = "select * from BorrowerComplianceInfo with(nolock) where ProjectId=@projectId";
                dyParams = new Dapper.DynamicParameters();
                dyParams.Add("@projectId", ProjectId);
                PageBorrowerComplianceInfo compInfo = PublicConn.QuerySingle <PageBorrowerComplianceInfo>(strSQL, ref dyParams);
                if (compInfo != null)
                {
                    borrowerUserInfo.IsShowExt = "1";
                    borrowerUserInfo.Industry  = compInfo.Trade;
                    if (compInfo.CompanyName.IsNotEmpty())
                    {
                        borrowerUserInfo.RealName = StringHandler.MaskStartPre(compInfo.CompanyName, 1);
                    }
                    borrowerUserInfo.Salary        = compInfo.IncomePerMonth.ToText() == "" ? "无" : compInfo.IncomePerMonth;
                    borrowerUserInfo.CurrentDebts  = compInfo.CurrentDebt.IsEmpty() ? "无" : compInfo.CurrentDebt;
                    borrowerUserInfo.OtherBorrow   = compInfo.OtherPlatformsBorrow.IsEmpty() ? "无" : compInfo.OverdueSituation;
                    borrowerUserInfo.CreditOverDue = compInfo.OverdueSituation.IsEmpty() ? "无" : compInfo.OtherPlatformsBorrow;
                    borrowerUserInfo.RegAmount     = compInfo.RegisteredCapital.IsEmpty() ? "无" : compInfo.RegisteredCapital;
                    borrowerUserInfo.RegAddress    = compInfo.RegisteredAddress.IsEmpty() ? "无" : StringHandler.MaskStartPre(compInfo.RegisteredAddress, 6);
                    borrowerUserInfo.RegDate       = compInfo.EstablishedTime.ToString("yyyy年MM月dd日");
                    borrowerUserInfo.LegalName     = compInfo.LegalPerson.IsEmpty() ? "无" : StringHandler.MaskStartPre(compInfo.LegalPerson, 1);
                }
            }
            else
            {
                borrowerUserInfo = new BorrowUserInfo();
            }
        }