示例#1
0
        protected void LoadData()
        {
            ProjectBLL bll = new ProjectBLL();

            var dyParams = new Dapper.DynamicParameters();

            dyParams.Add("@SubscribeId", TransferId);
            dyParams.Add("@projectId", null, DbType.Guid, ParameterDirection.Output, 36);
            dyParams.Add("@addDate", null, DbType.DateTime, ParameterDirection.Output, 0);
            dyParams.Add("@refundedMonths", null, DbType.Int32, ParameterDirection.Output, 0);
            string strSQL = @"select @projectId=ProjectId, @addDate=AddDate,@refundedMonths= RefundedMonths FROM dbo.Subscribe WITH(NOLOCK) where Id=@SubscribeId";

            PublicConn.ExecuteTD(PublicConn.DBWriteType.Read, strSQL, ref dyParams);
            Guid projectId = dyParams.Get <Guid>("@projectId");

            //获取项目信息
            model = bll.GetProjectDetailInfo(projectId);
            DateTime investDate     = dyParams.Get <DateTime>("@addDate");
            int      refundedMonths = dyParams.Get <Int32>("@refundedMonths");
            string   sql            = string.Empty;

            if (model.RepaymentType.Value == 1)//到期还本息
            {
                sql = "SELECT dateDiff(day,@BeginDate,getdate())-1";
            }
            else
            {
                sql = "SELECT dateDiff(day,dbo.f_GetRepaymentAdvance_Date(@BeginDate,@Month),getdate())";
            }
            dyParams = new Dapper.DynamicParameters();
            dyParams.Add("@BeginDate", investDate);
            dyParams.Add("@Month", refundedMonths);
            DiffDay = PublicConn.QuerySingle <int>(sql, ref dyParams);

            WebSettingBLL websetbll = new WebSettingBLL();

            WebSettingEntity = websetbll.GetWebSettingInfo("588B23C6-56EC-40C1-80A6-09B19C6F21E1");
            if (WebSettingEntity == null)
            {
                WebSettingEntity = new WebSettingInfo();
            }

            zqzrRateSet = websetbll.GetWebSettingInfo("63C10EF7-3961-4CA3-B277-147AAD8E7D42");
            if (zqzrRateSet.Param1Value == "1" && DateTime.Parse(zqzrRateSet.Param2Value) < DateTime.Now && DateTime.Now < DateTime.Parse(zqzrRateSet.Param3Value))
            {
                IsOpenRateLimit = true;
            }
        }
示例#2
0
        /// <summary>
        /// We返现标签
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        protected string ShowWePubCach(WeProductDetailInfo model)
        {
            string pic = "";

            //发标时就设置返现
            if ((model.TuandaiCashRate ?? 0) > 0)
            {
                WebSettingBLL  webSettingBll = new WebSettingBLL();
                WebSettingInfo AllWeCachSet  = webSettingBll.GetWebSettingInfo("421DBE8C-6435-4A9A-852A-EC51F0B0DDA8");

                string cashFormat = AllWeCachSet.Param2Value;
                if ((model.CashLimitAmount ?? 0) > 0)
                {
                    cashFormat = AllWeCachSet.Param1Value;
                }
                if (cashFormat.ToText() == "")
                {
                    cashFormat = ((model.CashLimitAmount ?? 0) > 0 ? "起投{Amount}元," : "") + "返现{Rate}%";
                }
                decimal limitAmount    = model.CashLimitAmount ?? 0;
                string  strLimitAmount = limitAmount >= 10000 ? ToolStatus.DeleteZero(limitAmount / 10000) + "万" : ToolStatus.DeleteZero(limitAmount / 1000) + "千";
                pic += "<div class=\"rect_r f11px c-ffffff text-center\" style=\"width: auto;padding: 0px 10px;\">" + cashFormat.Replace("{Rate}", ToolStatus.DeleteZero(model.TuandaiCashRate)).Replace("{Amount}", strLimitAmount) + "</div>";
            }
            return(pic);
        }
示例#3
0
        protected bool IsAct1248 = false;    //是否1218后显示
        protected void Page_Load(object sender, EventArgs e)
        {
            StatusTab = WEBRequest.GetQueryString("tab");
            if (StatusTab == "")
            {
                StatusTab = "Inprogress";
            }

            TypeTab = WEBRequest.GetQueryString("typeTab");
            if (TypeTab == "")
            {
                TypeTab = "WePlan";
            }

            OrderTab = WEBRequest.GetQueryString("orderTab");
            if (OrderTab == "")
            {
                OrderTab = "1";
            }

            WebSettingBLL webSettingBll = new WebSettingBLL();

            curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7");

            if (DateTime.Now >= DateTime.Parse(curSellSet.Param1Value) && DateTime.Now <= DateTime.Parse("2016-12-25 23:59:59"))
            {
                IsAct1248 = true;
            }
        }
示例#4
0
        protected void LoadData()
        {
            Guid?          userId           = WebUserAuth.UserId;
            WeProductBLL   bll              = new WeProductBLL();
            WebSettingBLL  setbll           = new WebSettingBLL();
            WebSettingInfo setInfo1         = setbll.GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036");
            WebSettingInfo setInfo2         = setbll.GetWebSettingInfo("06A6344D-E1FB-4AAA-890A-E39351D5E7A3");
            decimal        rewardInterest_1 = 0;

            string strSQL = "select ProductId, OrderDate, isnull(InvestedAmount,0) as InvestedAmount, isnull(TuandaiRedRate,0) as TuandaiRedRate  from dbo.We_Order with(nolock) where Id=@weOrderId";

            Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters();
            dyParams.Add("@weOrderId", weOrderId);
            MyWePlanOrderInfo weOrderInfo = PublicConn.QuerySingle <MyWePlanOrderInfo>(strSQL, ref dyParams);

            //model = bll.GetWeProductInfo(weOrderInfo.ProductId);
            if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis)
            {
                string err         = string.Empty;
                var    weRedisInfo = TuanDai.RedisApi.Client.WePlanRedis.GetWePlanRedisByProductIdJson(weOrderInfo.ProductId,
                                                                                                       out err, TdConfig.ApplicationName);
                if (weRedisInfo != null)
                {
                    model = JsonConvert.DeserializeObject <WeProductDetailInfo>(weRedisInfo);
                }
                if (model == null || !string.IsNullOrEmpty(err))
                {
                    model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId);
                }
            }
            else
            {
                model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId);
            }
            DueInterestAmount = 0;

            //查询订单加息
            RewardRate += GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value);

            rewardInterest_1   = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value));
            RewardInterest     = rewardInterest_1;
            DueInterestAmount  = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, model.YearRate ?? 0);
            DueInterestAmount += RewardInterest;
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Context.Response.Redirect("//mvip.tdw.cn/pages/invest/invest_newHand.aspx");
            return;

            WebSettingBLL  websetbll     = new WebSettingBLL();
            WebSettingInfo setInfo       = websetbll.GetWebSettingInfo("28ED2C47-C151-47AA-9D58-63277C0483C1");
            WebSettingInfo NewHandExtSet = websetbll.GetWebSettingInfo("20B98405-633B-4559-95C9-C0E96DD3BD2C");
            int            limitRegDay   = NewHandExtSet.Param1Value.ToInt(30);

            IsNewHandNewRule = setInfo.Param5Value == "1";
            if (IsNewHandNewRule)
            {
                NewHandTips = "1.限" + DateTime.Today.AddDays(-limitRegDay).ToString("yyyy-MM-dd") + "起新注册用户。<br />2.注册30天内 , 限投" + setInfo.Param4Value + "次新手标。<br />3.新手标累计投资金额为" + int.Parse(setInfo.Param1Value) / 10000 + "万元。";
            }

            GetNewHandProject();
            type = Tool.WEBRequest.GetString("type");
        }
示例#6
0
        protected int IsRegHasOneMonth = 1;                    //注册是否满一个月

        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("/pages/downloadGuide.aspx", true);
            if (!this.IsPostBack)
            {
                var userId = WebUserAuth.UserId.Value;
                if (userId != null && userId != Guid.Empty)
                {
                    GetIsProjectFreePaidUser(userId);
                    GetUserVipMsg(userId);

                    var userBll = new UserBLL();
                    var user    = userBll.GetUserBasicInfoModelById(userId);
                    //2016.5.4号注册的加条件: 注册满1个月才能发资产标,即1个月零1天才能发资产标,一个月以内进入发标页面后弹框提示“您好,注册满一个月后才能发布资产标”
                    if (user.AddDate >= DateTime.Parse("2016-05-04 12:00"))
                    {
                        IsRegHasOneMonth = user.AddDate.Value.AddMonths(1) < DateTime.Now ? 1 : 0;
                    }
                    this.options = new List <Tuple <int, decimal, decimal, int, string> >();
                    var result1 = WXInvest.CheckNetIssueConditions(userId);
                    if (result1.Success)
                    {
                        var fund    = userBll.GetUserFundAccountInfo(userId);
                        var setting = WXInvest.GetJingSetting();
                        tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0);
                        creditAmount   = WXInvest.GetUserJingAvailableAmount(user, fund, setting, out maxDeadline);

                        string text = string.Format("资产标(借款额度{0}元)", ToolStatus.ConvertLowerMoney(creditAmount));
                        this.options.Add(new Tuple <int, decimal, decimal, int, string>(6, creditAmount, tuandaiFeeRate, maxDeadline, text));
                        this.deadLineDesc = string.Format("还款期限最高{0}个月", maxDeadline);
                    }

                    //资产标短期标配置
                    WebSettingBLL  setbll      = new WebSettingBLL();
                    WebSettingInfo deadlineDay = setbll.GetWebSettingInfo("78A758ED-6D5C-4991-A804-6601E50960AD");
                    minDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param1Value, 15);
                    maxDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param2Value, 29);
                    endDeadlineDay = deadlineDay.Param3Value.ToDateTime(DateTime.MaxValue);
                    //var result2 = WXInvest.CheckStockIssueConditions(userId);
                    //if (result2.Success)
                    //{
                    //    var setting = WXInvest.GetStockSetting();
                    //    var tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0);
                    //    var amount = user.aviCreditGrantingAmount ?? 0;
                    //    var text = string.Format("资产标-综合授信(授信额度{0}元)", ToolStatus.ConvertLowerMoney(amount));
                    //    this.options.Add(new Tuple<int, decimal, decimal, int, string>(7, amount, tuandaiFeeRate, 24, text));
                    //    if (!result1.Success) this.deadLineDesc = string.Format("还款期限最高{0}个月", 24);
                    //}
                }
            }
        }
示例#7
0
        private void GetData()
        {
            WebSettingBLL webSettingBll = new WebSettingBLL();

            preSellSet    = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29");
            curSellSet    = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7");
            sellSet518    = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1");
            IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"];
            if (IsPreView1218 == "1")
            {
                preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            else if (IsPreView1218 == "2")
            {
                preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59");

                curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            ProjectBLL bll = new ProjectBLL();

            WeList = GetInvestListWePlan(out recordCount);

            double divide = recordCount / GlobalUtils.PageSize;
            double floor  = System.Math.Floor(divide);

            if (recordCount % GlobalUtils.PageSize != 0)
            {
                floor++;
            }
            pageCount = Convert.ToInt32(floor);//总页数

            GetShowImage();
        }
示例#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;
            }
            GetBorrowUserInfo();

            WebSettingBLL setbll = new WebSettingBLL();
            //新手加息判断
            WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5");

            if (GylSetInfo != null)
            {
                GylPlusRate   = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0);
                Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0);
            }
            if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0))
            {
                IsShowPlusRate = true;
            }

            DynamicParameters dyParams;
            string            sql = "";

            if (WebUserAuth.IsAuthenticated && IsShowPlusRate)
            {
                //判断是否投资新手
                sql      = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid";
                dyParams = new DynamicParameters();
                dyParams.Add("@userid", WebUserAuth.UserId.Value);

                bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0;
                NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0;
            }

            dyParams = new DynamicParameters();
            dyParams.Add("@projectid", projectId);
            sql            = @"select  ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid";
            ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams);
            if (ProjectGylInfo != null)
            {
                OverallRanking = setbll.GetWebSettingInfo(new Guid("A874BE7E-492F-4A21-9064-B75CA16D2DF3").ToString());
            }
            if (ProjectGylInfo != null)
            {
                TotalCreditScore = ProjectGylInfo.CreditStatus + ProjectGylInfo.EnterpriseCredit + ProjectGylInfo.OperatingConditions + ProjectGylInfo.RoyalRiskAbility;
            }



            GetBusinessRange(model.Id);
            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);
        }
示例#9
0
        private bool GetData()
        {
            //获取项目信息
            if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis)
            {
                this.model = new WeProductBLL().GetWePlanByRedis(TypeId, projectId.Value, IsPreSell, TdConfig.ApplicationName);
            }
            else
            {
                this.model = bll.GetWeProductInfo(projectId.Value);
            }
            if (model == null || model.IsFTB == false)
            {
                return(false);
            }

            #region 判断满标
            if (model.StartDate > DateTime.Now && model.StatusId == 1)
            {
                IsWeFinish = false;
            }
            else if (model.StartDate < DateTime.Now && model.OrderQty != model.TotalQty)
            {
                IsWeFinish = false;
            }
            else
            {
                IsWeFinish = true;
            }
            #endregion

            #region 判断新手标
            if (!model.IsNewHand)
            {
                WeFTBBLL ftbll = new WeFTBBLL();
                FTBRateList = this.GetWeFTBRateList(model.ProductTypeId ?? 0, model.StartDate ?? DateTime.Today);
                if (FTBRateList == null)
                {
                    FTBRateList = new List <WeProductFTBRateInfo>();
                }

                //补充提前退出前几个月的数据
                if (FTBRateList.Any())
                {
                    WeProductFTBRateInfo        firstRate = FTBRateList[0];
                    List <WeProductFTBRateInfo> tmpList   = new List <WeProductFTBRateInfo>();
                    for (int i = 1; i < model.ExitLockMonth; i++)
                    {
                        tmpList.Add(new WeProductFTBRateInfo()
                        {
                            MonthType = i, ProductTypeId = model.ProductTypeId ?? 0, YearRate = firstRate.YearRate
                        });
                    }
                    if (tmpList.Any())
                    {
                        FTBRateList.InsertRange(0, tmpList);
                    }
                }
                FTBRateList = FTBRateList.OrderByDescending(p => p.MonthType).ToList();
            }
            #endregion

            decimal deadLineType = model.DeadType == 1 ? 12 : 365;
            PreInterestRate = decimal.Parse("10000") * (model.Deadline ?? 0) * ((model.YearRate ?? 0) + (model.TuandaiRedRate ?? 0)) * decimal.Parse("0.01") / deadLineType;
            EbaoMultiple    = int.Parse(Math.Ceiling(model.YearRate.Value / decimal.Parse("2.5")).ToString());
            EbaoInterest    = GetEbaoMultipleInterest(10000);

            GetLimitInvestMoney();

            WebSettingBLL webSettingBll = new WebSettingBLL();

            preSellSet    = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29");
            curSellSet    = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7");
            sellSet518    = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1");
            IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"];
            if (IsPreView1218 == "1")
            {
                preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            else if (IsPreView1218 == "2")
            {
                preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59");

                curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            return(true);
        }
示例#10
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);
            }
            if (model.Type.Value != 19)
            {
                Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
                return(false);
            }

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

            if (gylSet.Param2Value.IsEmpty())
            {
                gylSet.Param2Value = "2017-02-10";
            }
            if (model.AddDate >= DateTime.Parse(gylSet.Param2Value))
            {
                DanBaoCompany = "东莞市志诚非融资性担保有限公司";
            }

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

            WebSettingBLL setbll = new WebSettingBLL();
            //新手加息判断
            WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5");

            if (GylSetInfo != null)
            {
                GylPlusRate   = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0);
                Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0);
            }
            if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0))
            {
                IsShowPlusRate = true;
            }


            DynamicParameters dyParams;
            string            sql = "";

            if (WebUserAuth.IsAuthenticated && IsShowPlusRate)
            {
                //判断是否投资新手
                sql      = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid";
                dyParams = new DynamicParameters();
                dyParams.Add("@userid", WebUserAuth.UserId.Value);

                bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0;
                NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0;
            }

            dyParams = new DynamicParameters();
            dyParams.Add("@projectid", projectId);
            sql            = @"select  ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid";
            ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams);


            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);
        }
示例#11
0
        private bool GetData()
        {
            //获取项目信息
            if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis)
            {
                this.model = new WeProductBLL().GetWePlanByRedis(TypeId, projectId.Value, IsPreSell, TdConfig.ApplicationName);
            }
            else
            {
                this.model = bll.GetWeProductInfo(projectId.Value);
            }

            if (model == null)
            {
                Response.Redirect("/pages/invest/we/WE_list.aspx", true);
                return(false);
            }

            if (model.IsWeFQB)
            {
                Response.Redirect(GlobalUtils.MTuanDaiURL + "/pages/invest/WE/WeFqb_detail.aspx?id=" + model.ProductId + (IsApp?"&type=mobileapp":""));
                return(false);
            }
            if (model.IsFTB)
            {
                Response.Redirect(GlobalUtils.MTuanDaiURL + "/pages/invest/WE/WeFtb_detail.aspx?id=" + model.ProductId + (IsApp ? "&type=mobileapp" : ""));
                return(false);
            }

            #region 判断满标
            if (model.StartDate > DateTime.Now && model.StatusId == 1)
            {
                IsWeFinish = false;
            }
            else if (model.StartDate < DateTime.Now && model.OrderQty != model.TotalQty)
            {
                IsWeFinish = false;
            }
            else if (((model.OrderQty == model.TotalQty && model.InvestCompleteDate.HasValue) || (model.OrderCompleteDate.HasValue && model.OrderCompleteDate.Value.AddDays(5) <= DateTime.Now)) && !model.IsWeFQB)
            {
                IsWeFinish = true;
            }
            else
            {
                IsWeFinish = true;
            }
            #endregion

            WebSettingBLL webSettingBll = new WebSettingBLL();
            preSellSet    = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29");
            curSellSet    = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7");
            sellSet518    = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1");
            IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"];
            if (IsPreView1218 == "1")
            {
                preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            else if (IsPreView1218 == "2")
            {
                preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd");
                preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59");
                curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd");
                curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59");
            }
            return(true);
        }