Beispiel #1
0
 protected void GetQueryString()
 {
     if (HeadControl1.IsFirstLoad)
     {
         EndTime                        = DateTime.Now.Date.AddDays(-1);
         BeginTime                      = EndTime.AddDays(-30);
         HeadControl1.PlatID            = CookiePlatid.ToString();
         HeadControl1.SoftID            = CookieSoftid.ToString();
         inputzhouqi.Value              = Period.GetDescription();
         HeadControl1.BeginTime         = BeginTime;
         HeadControl1.EndTime           = EndTime;
         HeadControl1.Channel1.SoftId   = HeadControl1.SoftID.ToString();
         HeadControl1.Channel1.Platform = HeadControl1.PlatID.ToString();
     }
     else
     {
         BeginTime = HeadControl1.BeginTime;
         EndTime   = HeadControl1.EndTime;
         SetRequestCookie(Convert.ToInt32(HeadControl1.SoftID), Convert.ToInt32(HeadControl1.PlatID));
     }
     HeadControl1.Channel1.PeriodCheck = false;
 }
 protected void GetQueryString()
 {
     if (HeadControl1.IsFirstLoad)
     {
         softsid                        = CookieSoftid;
         platformsid                    = CookiePlatid;
         EndTime                        = DateTime.Now.Date.AddDays(-1);
         BeginTime                      = EndTime.AddDays(-30);
         HeadControl1.PlatID            = platformsid.ToString();
         HeadControl1.SoftID            = softsid.ToString();
         HeadControl1.Channel1.SoftId   = HeadControl1.SoftID.ToString();
         HeadControl1.Channel1.Platform = HeadControl1.PlatID.ToString();
     }
     else
     {
         platformsid = Convert.ToInt32(HeadControl1.PlatID);
         softsid     = Convert.ToInt32(HeadControl1.SoftID);
         BeginTime   = HeadControl1.BeginTime;
         EndTime     = HeadControl1.EndTime;
         SetRequestCookie(softsid, platformsid);
     }
     HeadControl1.Channel1.PeriodCheck = false;
     Period = PeriodSelector1.SelectedPeriod;
 }
Beispiel #3
0
    protected void btnAdd_Click(object sender, System.EventArgs e)
    {
        string Isuse = "";

        try
        {
            Isuse = Shove._Web.Utility.FilteSqlInfusion(tbIsuse.Text.Trim());
        }
        catch { }

        if (Isuse == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "期号不能为空!");

            return;
        }

        DataTable dt = new DAL.Tables.T_Isuses().Open("[ID]", "[Name] = '" + Isuse + "' and LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(tbLotteryID.Text), "");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().FullName);

            return;
        }

        if (dt.Rows.Count > 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, "期号已经存在,请不要输入重名期号!");

            return;
        }

        System.DateTime StartTime, EndTime;

        object time = PF.ValidLotteryTime(tbStartTime.Text);

        if (time == null)
        {
            Shove._Web.JavaScript.Alert(this.Page, "开始时间格式输入错误!");
            return;
        }

        StartTime = (DateTime)time;

        time = PF.ValidLotteryTime(tbEndTime.Text);

        if (time == null)
        {
            Shove._Web.JavaScript.Alert(this.Page, "截止时间格式输入错误!");
            return;
        }

        EndTime = (DateTime)time;

        if (EndTime <= StartTime)
        {
            Shove._Web.JavaScript.Alert(this.Page, "截止时间应该在开始时间之后!");

            return;
        }

        string AdditionasXml = "";

        if ((tbLotteryID.Text == SZJS.Lottery.SFC.sID || tbLotteryID.Text == SZJS.Lottery.ZCSFC.sID || tbLotteryID.Text == SZJS.Lottery.ZCRJC.sID) && (BuildAdditionasXmlForSFC(ref AdditionasXml) < 0))
        {
            return;
        }

        if ((tbLotteryID.Text == SZJS.Lottery.JQC.sID) && (BuildAdditionasXmlForJQC(ref AdditionasXml) < 0))
        {
            return;
        }

        if ((tbLotteryID.Text == SZJS.Lottery.LCBQC.sID) && (BuildAdditionasXmlForLCBQC(ref AdditionasXml) < 0))
        {
            return;
        }

        if ((tbLotteryID.Text == SZJS.Lottery.LCDC.sID) && (BuildAdditionasXmlForLCDC(ref AdditionasXml) < 0))
        {
            return;
        }

        if ((tbLotteryID.Text == SZJS.Lottery.ZCDC.sID) && (BuildAdditionasXmlForZCDC(ref AdditionasXml) < 0))
        {
            return;
        }

        int LotteryID = int.Parse(tbLotteryID.Text);

        long   NewIsuseID        = -1;
        string ReturnDescription = "";

        int Result = DAL.Procedures.P_IsuseAdd(LotteryID, Isuse, StartTime, EndTime, AdditionasXml, ref NewIsuseID, ref ReturnDescription);

        if (Result < 0)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().FullName);

            return;
        }

        if (NewIsuseID < 0)
        {
            PF.GoError(ErrorNumber.Unknow, ReturnDescription, this.GetType().FullName);

            return;
        }

        if (cbAutoNext10Isuse.Visible && cbAutoNext10Isuse.Checked && (AdditionasXml == ""))
        {
            string IsuseYear = Isuse.Substring(0, Isuse.Length - 3);
            int    IsuseNum  = Shove._Convert.StrToInt(Isuse.Substring(Isuse.Length - 3, 3), 0);

            for (int i = 1; i <= 9; i++)
            {
                IsuseNum++;
                string NextIsuse = IsuseYear + IsuseNum.ToString().PadLeft(3, '0');
                StartTime = StartTime.AddDays(1);
                EndTime   = EndTime.AddDays(1);
                int Results = -1;
                Results = DAL.Procedures.P_IsuseAdd(LotteryID, NextIsuse, StartTime, EndTime, "", ref NewIsuseID, ref ReturnDescription);
                if (Results < 0)
                {
                    break;
                }

                if (NewIsuseID < 0)
                {
                    continue;
                }
            }
        }

        this.Response.Redirect("Isuse2.aspx?LotteryID=" + tbLotteryID.Text, true);
    }
Beispiel #4
0
    protected void btnMultiAdd_Click(object sender, System.EventArgs e)
    {
        int    LotteryID = int.Parse(tbLotteryID.Text);
        string Isuse     = "";

        if (LotteryID != SLS.Lottery.SSQ.ID && LotteryID != SLS.Lottery.TCCJDLT.ID)
        {
            btnMultiAdd.Visible = false;
            btnMultiAdd.Enabled = false;
            return;
        }
        try
        {
            Isuse = Shove._Web.Utility.FilteSqlInfusion(tbIsuse.Text.Trim());
        }
        catch { }

        if (Isuse == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "期号不能为空!");

            return;
        }
        System.DateTime StartTime, EndTime;

        object time = PF.ValidLotteryTime(tbStartTime.Text);

        if (time == null)
        {
            Shove._Web.JavaScript.Alert(this.Page, "开始时间格式输入错误!");
            return;
        }
        DayOfWeek dow = ((DateTime)time).DayOfWeek;

        switch (LotteryID)
        {
        case SLS.Lottery.TCCJDLT.ID:
            if (dow != DayOfWeek.Monday && dow != DayOfWeek.Wednesday && dow != DayOfWeek.Saturday)
            {
                Shove._Web.JavaScript.Alert(this.Page, "开始时间输入不正确(周一、三、六)!");
                return;
            }
            break;

        case SLS.Lottery.SSQ.ID:
            if (dow != DayOfWeek.Tuesday && dow != DayOfWeek.Thursday && dow != DayOfWeek.Sunday)
            {
                Shove._Web.JavaScript.Alert(this.Page, "开始时间输入不正确(周二、四、日)!");
                return;
            }
            break;

        default:
            Shove._Web.JavaScript.Alert(this.Page, "开始时间输入不正确!");
            return;
        }

        StartTime = (DateTime)time;
        EndTime   = StartTime;
        switch (LotteryID)
        {
        case SLS.Lottery.TCCJDLT.ID:
            if (EndTime.DayOfWeek == DayOfWeek.Wednesday)
            {
                EndTime = EndTime.AddDays(3);
            }
            else
            {
                EndTime = EndTime.AddDays(2);
            }
            break;

        case SLS.Lottery.SSQ.ID:
            if (EndTime.DayOfWeek == DayOfWeek.Thursday)
            {
                EndTime = EndTime.AddDays(3);
            }
            else
            {
                EndTime = EndTime.AddDays(2);
            }
            break;
        }
        int x = 0;

        if (!int.TryParse(tbMultiDays.Text, out x))
        {
            Shove._Web.JavaScript.Alert(this.Page, "增加天数格式输入错误!");
            return;
        }
        long   NewIsuseID        = -1;
        string ReturnDescription = "";

        DataTable dt;

        for (int i = 0; i < x; i++)
        {
            dt = new DAL.Tables.T_Isuses().Open("[ID]", "[Name] = '" + Isuse + "' and LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(tbLotteryID.Text), "");
            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_IsuseAdd");
                i = i - 1;
            }
            else if (dt.Rows.Count == 0)
            {
                int Result = DAL.Procedures.P_IsuseAdd(LotteryID, Isuse, StartTime, EndTime, "", ref NewIsuseID, ref ReturnDescription);

                if (Result < 0)
                {
                    PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_IsuseAdd");
                    return;
                }
                else if (NewIsuseID < 0)
                {
                    PF.GoError(ErrorNumber.Unknow, ReturnDescription, "Admin_IsuseAdd");
                    return;
                }
                else
                {
                    DAL.Tables.T_TotalMoney dtTotalMoney = new DAL.Tables.T_TotalMoney();
                    dtTotalMoney.IsuseID.Value    = NewIsuseID;
                    dtTotalMoney.TotalMoney.Value = "";

                    if (dtTotalMoney.Insert() < 0)
                    {
                        Shove._Web.JavaScript.Alert(this.Page, "添加奖池奖金失败!");
                        return;
                    }
                }
            }
            Isuse     = (int.Parse(Isuse) + 1).ToString();
            StartTime = EndTime;
            switch (LotteryID)
            {
            case SLS.Lottery.TCCJDLT.ID:
                if (EndTime.DayOfWeek == DayOfWeek.Wednesday)
                {
                    EndTime = EndTime.AddDays(1);
                }
                break;

            case SLS.Lottery.SSQ.ID:
                if (EndTime.DayOfWeek == DayOfWeek.Thursday)
                {
                    EndTime = EndTime.AddDays(1);
                }
                break;
            }
            EndTime           = EndTime.AddDays(2);
            NewIsuseID        = -1;
            ReturnDescription = "";
        }
        Shove._Web.Cache.ClearCache(CacheKey.LotteryCalendar);
        Shove._Web.Cache.ClearCache(DataCache.IsusesInfo + tbLotteryID.Text.Trim());
        this.Response.Redirect("Isuse.aspx?LotteryID=" + tbLotteryID.Text, true);
    }
Beispiel #5
0
        protected async override System.Threading.Tasks.Task CreatFormatter()
        {
            IPersonStatusReportService service = IOCContainer.Instance.Resolve <IPersonStatusReportService>();
            var response = new BaseResponse <PersonStatusReportModel>();

            response = service.QueryPersonStatusInfo(StartTime, EndTime.AddDays(1).AddSeconds(-1));

            var request = new PersonStatusFilter();

            request.startDate = StartTime;
            request.endDate   = EndTime.AddDays(1).AddSeconds(-1);
            try
            {
                var http   = HttpClientHelper.NciHttpClient;
                var result = await http.PostAsJsonAsync("/api/PersonStatusReport", request);

                var resultContent = await result.Content.ReadAsStringAsync();

                var ltcInfo = JsonConvert.DeserializeObject <PersonStatusReportModel>(resultContent);
                response.Data.DrugEntryNum      = ltcInfo.DrugEntryNum;
                response.Data.NSCPLNum          = ltcInfo.NSCPLNum;
                response.Data.BillV2Num         = ltcInfo.BillV2Num;
                response.Data.CostNum           = ltcInfo.CostNum;
                response.Data.InHospNum         = ltcInfo.InHospNum;
                response.Data.OutHospOfOtherNum = ltcInfo.OutHospOfOtherNum;
                response.Data.OutHospOfDeadNum  = ltcInfo.OutHospOfDeadNum;
                response.Data.LeaveHospNum      = ltcInfo.LeaveHospNum;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                response.ResultCode = -1;
            }
            var parameterContainer = new WorkbookParameterContainer();

            parameterContainer.Load(TemplateFormatterPath);
            #region 资格证待遇申请统计(期间)
            SheetParameterContainer sheetContainer = parameterContainer["资格证待遇申请统计(期间)"];
            var dataFormatter = new List <ElementFormatter>();
            #region 截止2016年年12月31日
            #region 申请数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xlan"], response.Data.AppCertlastYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qlan"], response.Data.AppCertlastYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jlan"], response.Data.AppCertlastYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tlan"], response.Data.AppCertlastYearNum.TotalNum));
            #endregion
            #region 通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xlbn"], response.Data.ByCertlastYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qlbn"], response.Data.ByCertlastYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jlbn"], response.Data.ByCertlastYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tlbn"], response.Data.ByCertlastYearNum.TotalNum));
            #endregion
            #region 未通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xlun"], response.Data.UnAppCertlastYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qlun"], response.Data.UnAppCertlastYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jlun"], response.Data.UnAppCertlastYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tlun"], response.Data.UnAppCertlastYearNum.TotalNum));
            #endregion
            #region 取消数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xlcn"], response.Data.CancelCertlastYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qlcn"], response.Data.CancelCertlastYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jlcn"], response.Data.CancelCertlastYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tlcn"], response.Data.CancelCertlastYearNum.TotalNum));
            #endregion
            #endregion
            #region 截止2017年3月31日
            #region 申请数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xan"], response.Data.AppCertYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qan"], response.Data.AppCertYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jan"], response.Data.AppCertYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tan"], response.Data.AppCertYearNum.TotalNum));
            #endregion
            #region 通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xbn"], response.Data.ByCertYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qbn"], response.Data.ByCertYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jbn"], response.Data.ByCertYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tbn"], response.Data.ByCertYearNum.TotalNum));
            #endregion
            #region 未通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xun"], response.Data.UnAppCertYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qun"], response.Data.UnAppCertYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jun"], response.Data.UnAppCertYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tun"], response.Data.UnAppCertYearNum.TotalNum));
            #endregion
            #region 取消数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xcn"], response.Data.CancelCertYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qcn"], response.Data.CancelCertYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jcn"], response.Data.CancelCertYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tcn"], response.Data.CancelCertYearNum.TotalNum));
            #endregion

            #endregion
            #region 查询期间
            #region 申请数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xasn"], response.Data.AppCertSearchYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qasn"], response.Data.AppCertSearchYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jasn"], response.Data.AppCertSearchYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tasn"], response.Data.AppCertSearchYearNum.TotalNum));
            #endregion
            #region 通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xsbn"], response.Data.ByCertSearchYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qsbn"], response.Data.ByCertSearchYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jsbn"], response.Data.ByCertSearchYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tsbn"], response.Data.ByCertSearchYearNum.TotalNum));
            #endregion
            #region 未通过数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xsun"], response.Data.UnAppCertSearchYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qsun"], response.Data.UnAppCertSearchYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jsun"], response.Data.UnAppCertSearchYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tsun"], response.Data.UnAppCertSearchYearNum.TotalNum));
            #endregion
            #region 取消数量
            dataFormatter.Add(new CellFormatter(sheetContainer["xscn"], response.Data.CancelCertSearchYearNum.XyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["qscn"], response.Data.CancelCertSearchYearNum.QkyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["jscn"], response.Data.CancelCertSearchYearNum.JmyyNum));
            dataFormatter.Add(new CellFormatter(sheetContainer["tscn"], response.Data.CancelCertSearchYearNum.TotalNum));
            #endregion

            #endregion

            Formatter = new SheetFormatter("资格证待遇申请统计(期间)", dataFormatter.ToArray());
            #endregion

            #region 操作数据(期间)
            SheetParameterContainer billsheetContainer = parameterContainer["操作数据(期间)"];
            var billdataFormatter = new List <ElementFormatter>();
            #region 药品导入数
            billdataFormatter.Add(new CellFormatter(billsheetContainer["xden"], response.Data.DrugEntryNum.XyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["qden"], response.Data.DrugEntryNum.QkyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["jden"], response.Data.DrugEntryNum.JmyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["tden"], response.Data.DrugEntryNum.TotalNum));
            #endregion
            #region 护理计划
            billdataFormatter.Add(new CellFormatter(billsheetContainer["xnspn"], response.Data.NSCPLNum.XyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["qnspn"], response.Data.NSCPLNum.QkyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["jnspn"], response.Data.NSCPLNum.JmyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["tnspn"], response.Data.NSCPLNum.TotalNum));
            #endregion
            #region 账单数量
            billdataFormatter.Add(new CellFormatter(billsheetContainer["xbilln"], response.Data.BillV2Num.XyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["qbilln"], response.Data.BillV2Num.QkyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["jbilln"], response.Data.BillV2Num.JmyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["tbilln"], response.Data.BillV2Num.TotalNum));
            #endregion
            #region 总费用
            billdataFormatter.Add(new CellFormatter(billsheetContainer["xcostn"], response.Data.CostNum.XyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["qcostn"], response.Data.CostNum.QkyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["jcostn"], response.Data.CostNum.JmyyNum));
            billdataFormatter.Add(new CellFormatter(billsheetContainer["tcostn"], response.Data.CostNum.TotalNum));
            #endregion
            Formatter1 = new SheetFormatter("操作数据(期间)", billdataFormatter.ToArray());
            #endregion

            #region 在院不在院情况统计(状态)
            SheetParameterContainer hospsheetContainer = parameterContainer["在院不在院情况统计(状态)"];
            var hospdataFormatter = new List <ElementFormatter>();
            #region 在院人数
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["xinhospn"], response.Data.InHospNum.XyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["qinhospn"], response.Data.InHospNum.QkyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["jinhospn"], response.Data.InHospNum.JmyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["tinhospn"], response.Data.InHospNum.TotalNum));
            #endregion
            #region 出院人数	 - 其他
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["xotherhospn"], response.Data.OutHospOfOtherNum.XyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["qotherhospn"], response.Data.OutHospOfOtherNum.QkyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["jotherhospn"], response.Data.OutHospOfOtherNum.JmyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["totherhospn"], response.Data.OutHospOfOtherNum.TotalNum));
            #endregion
            #region 出院人数	 - 死亡
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["xdeadhospn"], response.Data.OutHospOfDeadNum.XyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["qdeadhospn"], response.Data.OutHospOfDeadNum.QkyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["jdeadhospn"], response.Data.OutHospOfDeadNum.JmyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["tdeadhospn"], response.Data.OutHospOfDeadNum.TotalNum));
            #endregion
            #region 请假天数
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["xleahospn"], response.Data.LeaveHospNum.XyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["qleahospn"], response.Data.LeaveHospNum.QkyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["jleahospn"], response.Data.LeaveHospNum.JmyyNum));
            hospdataFormatter.Add(new CellFormatter(hospsheetContainer["tleahospn"], response.Data.LeaveHospNum.TotalNum));
            #endregion
            Formatter2 = new SheetFormatter("在院不在院情况统计(状态)", hospdataFormatter.ToArray());
            #endregion
        }
        protected void RgRefund_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            DateTime startTime       = StartTime == DateTime.MinValue ? DateTime.Now.AddMonths(-1) : StartTime;
            DateTime endTime         = EndTime == DateTime.MinValue ? DateTime.Now : Convert.ToDateTime(EndTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00"));
            var      checkRefundList = _refundDal.GetCheckRefundInfo(SearchKey, startTime, endTime, int.Parse(SearchCheckState), new Guid(SelectedFilialeId));

            //排除门店采购退回商品检查 modify by liangcanren at 2015-03-26
            checkRefundList     = checkRefundList.Where(act => act.SaleFilialeId != Guid.Empty && !string.IsNullOrEmpty(act.OrderNo)).ToList();
            RGRefund.DataSource = checkRefundList;
            if (checkRefundList.Count > 0)
            {
                var pageIndex   = RGRefund.CurrentPageIndex + 1;
                var pageSize    = RGRefund.PageSize;
                var orderIdList = checkRefundList.Select(w => w.OrderId).ToList();
                orderIdList  = pageIndex == 1 ? orderIdList.Take(pageSize).ToList() : orderIdList.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
                DicOrderClew = _operationLogManager.GetOperationLogList(orderIdList);
            }
        }
        protected void GetQueryString()
        {
            OrderBy = string.IsNullOrEmpty(Request["orderby"]) ? (string.IsNullOrEmpty(Request["hOrderBy"]) ? 0 : Convert.ToInt32(Request["hOrderBy"])) : Convert.ToInt32(Request["orderby"]);
            Desc    = string.IsNullOrEmpty(Request["Desc"]) ? (string.IsNullOrEmpty(Request["hDesc"]) ? true : Convert.ToBoolean(Request["hDesc"])) : Convert.ToBoolean(Request["desc"]);

            HeadControl1.IsHasNoPlat = true;

            //默认模式
            if (HeadControl1.IsFirstLoad)
            {
                SoftID              = CookieSoftid;
                Platform            = CookiePlatid;
                EndTime             = DateTime.Now.Date.AddDays(-1);
                BeginTime           = EndTime.AddDays(-30);
                HeadControl1.SoftID = SoftID.ToString();
                HeadControl1.PlatID = Platform.ToString();
            }
            else
            {
                SoftID    = Convert.ToInt32(HeadControl1.SoftID);
                Platform  = Convert.ToInt32(HeadControl1.PlatID);
                BeginTime = HeadControl1.BeginTime;
                EndTime   = HeadControl1.EndTime;
                SetRequestCookie(SoftID, Platform);
            }
            List <Sjqd_StatUsers> ranks = new StatUsersService().GetRankOfCountries(SoftID, Platform, ChannelTypeOptions.Category, 0, (int)PeriodSelector1.SelectedPeriod, ref BeginTime, ref EndTime);

            HeadControl1.BeginTime = BeginTime;
            HeadControl1.EndTime   = EndTime;
            switch (OrderBy)
            {
            case 0:
                ranks = (Desc ? ranks.OrderByDescending(a => a.NewUserCount) : ranks.OrderBy(a => a.NewUserCount)).ToList();
                break;

            case 1:
                ranks = (Desc ? ranks.OrderByDescending(a => a.NewUserCount - a.LastNewUserCount) : ranks.OrderBy(a => a.NewUserCount - a.LastNewUserCount)).ToList();
                break;

            default:
                ranks = (Desc ? ranks.OrderByDescending(a => (double)a.RetainedUserCount / a.OriginalNewUserCount) : ranks.OrderBy(a => (double)a.RetainedUserCount / a.OriginalNewUserCount)).ToList();
                break;
            }

            days = (EndTime - BeginTime).Days + 1;

            List <object> list = new List <object>();

            for (int i = 0; i < ranks.Count; i++)
            {
                list.Add(new
                {
                    RankIndex           = i + 1,
                    ID                  = ranks[i].ID,
                    Name                = ranks[i].Name,
                    NewUserCount        = Utility.SetNum(ranks[i].NewUserCount),
                    NewUserCountDiff    = Utility.SetNum(ranks[i].NewUserCount - ranks[i].LastNewUserCount),
                    ActiveUserCount     = Utility.SetNum(ranks[i].ActiveUserCount),
                    RetainedUserRate    = ranks[i].LastNewUserCount == 0 ? "" : ((decimal)ranks[i].RetainedUserCount / ranks[i].LastNewUserCount * 100).ToString("0.00") + "%",
                    RetainedUserAvgRate = (ranks[i].RetainedUserCountDailyRate * 100).ToString("0.00") + "%",
                    AvgDownCount        = (ranks[i].DownUserCount == 0 ? 0.00 : (ranks[i].DownCount * 1.0 / ranks[i].DownUserCount)).ToString("0.00"),
                    AvgDownCount_One    = (ranks[i].DownCountNotUpdate == 0 ? 0.00 : (ranks[i].DownCountNotUpdate * 1.0 / ranks[i].DownUserCountNotUpdate)).ToString("0.00")
                });
            }
            Repeater1.DataSource = list;
            Repeater1.DataBind();
        }
Beispiel #8
0
 public bool IsNeighborRelation(_EmployeeRelation relation)
 {
     return(EndTime.AddDays(1) == relation.BeginTime || relation.EndTime == BeginTime.AddDays(-1));
 }
Beispiel #9
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns></returns>
        public void Start(List <DepartmentEntity> entity)
        {
            try
            {
                //获取周期数据
                var      cycle = getCycle().FirstOrDefault(x => x.iswork);
                DateTime startTime;
                var      nowTime  = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
                int      num      = 0;
                int      totalday = 0;
                int      month    = 0;
                int      day      = 0;
                if (string.IsNullOrEmpty(cycle.starttime))
                {
                    startTime = nowTime;
                    num       = Util.Time.GetWeekNumberOfDay(nowTime);                 //星期几
                    totalday  = Util.Time.GetDaysOfMonth(nowTime.Year, nowTime.Month); //本月有多少天
                    month     = nowTime.Month;                                         //第几月
                    day       = nowTime.Day;                                           //第几天
                }
                else
                {
                    startTime = Convert.ToDateTime(cycle.starttime);
                    num       = Util.Time.GetWeekNumberOfDay(startTime);                   //星期几
                    totalday  = Util.Time.GetDaysOfMonth(startTime.Year, startTime.Month); //本月有多少天
                    month     = startTime.Month;                                           //第几月
                    day       = startTime.Day;                                             //第几天
                }
                //等于0或1
                if (Util.Time.DiffDays(nowTime, startTime) > 1)
                {
                    return;
                }
                var messagebll = new MessageBLL();
                foreach (var item in entity)
                {
                    var workFinish = getSevenSFinish(item.DepartmentId);
                    foreach (var finist in workFinish)
                    {
                        messagebll.FinishTodo("7S定点照片到期提醒", finist.Id);
                    }
                }
                //周期间隔时间
                var EndTime = startTime;
                switch (cycle.cycle)
                {
                case "每周":
                    EndTime   = EndTime.AddDays(7 - num);
                    startTime = startTime.AddDays(-num + 1);
                    break;

                case "每半月":
                    if (day > 15)
                    {
                        startTime = new DateTime(nowTime.Year, month, 16);
                        EndTime   = new DateTime(nowTime.Year, month, totalday);
                    }
                    else
                    {
                        startTime = new DateTime(nowTime.Year, month, 1);
                        EndTime   = new DateTime(nowTime.Year, month, 15);
                    }
                    break;

                case "每月":
                    startTime = new DateTime(nowTime.Year, month, 1);
                    EndTime   = new DateTime(nowTime.Year, month, totalday);
                    break;

                case "每季度":
                    if (month < 4)
                    {
                        startTime = new DateTime(nowTime.Year, 1, 1);
                        EndTime   = new DateTime(nowTime.Year, 3, 31);
                    }
                    else if (month < 7)
                    {
                        startTime = new DateTime(nowTime.Year, 4, 1);
                        EndTime   = new DateTime(nowTime.Year, 6, 30);
                    }
                    else
                    if (month < 9)
                    {
                        startTime = new DateTime(nowTime.Year, 7, 1);
                        EndTime   = new DateTime(nowTime.Year, 9, 30);
                    }
                    else
                    {
                        startTime = new DateTime(nowTime.Year, 10, 1);
                        EndTime   = new DateTime(nowTime.Year, 12, 31);
                    }
                    break;

                default:
                    break;
                }

                var Picture = new List <SevenSPictureEntity>();
                foreach (var item in entity)
                {
                    var one = new SevenSPictureEntity();
                    one.Id             = Guid.NewGuid().ToString();
                    one.deptname       = item.FullName;
                    one.deptid         = item.DepartmentId;
                    one.state          = "未提交";
                    one.CreateDate     = DateTime.Now;
                    one.ModifyDate     = DateTime.Now;
                    one.planeStartDate = startTime;
                    one.planeEndDate   = EndTime;
                    Picture.Add(one);
                }
                InsertList(Picture);
                var plantime = new SevenSPlanTimeEntity();
                plantime.Id       = Guid.NewGuid().ToString();
                plantime.PlanTime = startTime.ToString("yyyy-MM-dd") + "~" + EndTime.ToString("yyyy-MM-dd");
                SavePlanTime(plantime);
                //修改下周期
                setCycleTime(EndTime.AddDays(1).ToString("yyyy-MM-dd"));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        protected void GetQueryString()
        {
            //默认模式
            if (HeadControl1.IsFirstLoad)
            {
                SoftID   = CookieSoftid;
                Platform = CookiePlatid;
                //StatDate = UtilityService.GetInstance().GetMaxTimeCache(PeriodSelector1.SelectedPeriod, ReportType.UserUseNewActivity,CacheTimeOption.TenMinutes);
                //StatDate = StatDate.Date;
                EndTime   = DateTime.Now.Date.AddDays(-1);
                BeginTime = EndTime.AddDays(-30);
                //HeadControl1.SingleTime = StatDate;
                HeadControl1.SoftID = SoftID.ToString();
                HeadControl1.PlatID = Platform.ToString();
            }
            else
            {
                SoftID   = Convert.ToInt32(HeadControl1.SoftID);
                Platform = Convert.ToInt32(HeadControl1.PlatID);
                //StatDate =HeadControl1.SingleTime;
                BeginTime = HeadControl1.BeginTime;
                EndTime   = HeadControl1.EndTime;
                //UtilityHelp.SpecificateSingleTime(ref StatDate, (Report_Period)Convert.ToInt32(PeriodSelector1.SelectedPeriod));
                SetRequestCookie(SoftID, Platform);
            }
            int period = Convert.ToInt32(PeriodSelector1.SelectedPeriod);


            OrderBy = string.IsNullOrEmpty(Request["orderby"]) ? (string.IsNullOrEmpty(Request["hOrderBy"]) ? 0 : Convert.ToInt32(Request["hOrderBy"])) : Convert.ToInt32(Request["orderby"]);
            Desc    = string.IsNullOrEmpty(Request["Desc"]) ? (string.IsNullOrEmpty(Request["hDesc"]) ? true : Convert.ToBoolean(Request["hDesc"])) : Convert.ToBoolean(Request["desc"]);

            List <Sjqd_StatUsers> users = new StatUsersService().GetRankOfChannels(SoftID, Platform, 0, (int)PeriodSelector1.SelectedPeriod, ref BeginTime, ref EndTime);

            HeadControl1.BeginTime = BeginTime;
            HeadControl1.EndTime   = EndTime;
            //SetDescriptDate(EndTime, (Report_Period)period);

            GetRankOfCitiesUrl      = string.Format("/Services/GetMore.ashx?Action=GetRankOfAreas&AreaType=3&SoftIds={0}&Platforms={1}&Period={2}&StartDate={3:yyyy-MM-dd}&EndDate={4:yyyy-MM-dd}&OrderBy={5}&Desc={6}&v={7}&ChannelTypes={8}", SoftID, Platform, period, BeginTime, EndTime, OrderBy, Desc, DateTime.Now.Ticks, (int)ChannelTypeOptions.Customer);
            GetRankOfProvincesUrl   = string.Format("/Services/GetMore.ashx?Action=GetRankOfAreas&AreaType=2&SoftIds={0}&Platforms={1}&Period={2}&StartDate={3:yyyy-MM-dd}&EndDate={4:yyyy-MM-dd}&OrderBy={5}&Desc={6}&v={7}&ChannelTypes={8}", SoftID, Platform, period, BeginTime, EndTime, OrderBy, Desc, DateTime.Now.Ticks, (int)ChannelTypeOptions.Customer);
            GetRankOfCountriesUrl   = string.Format("/Services/GetMore.ashx?Action=GetRankOfAreas&AreaType=1&SoftIds={0}&Platforms={1}&Period={2}&StartDate={3:yyyy-MM-dd}&EndDate={4:yyyy-MM-dd}&OrderBy={5}&Desc={6}&v={7}&ChannelTypes={8}", SoftID, Platform, period, BeginTime, EndTime, OrderBy, Desc, DateTime.Now.Ticks, (int)ChannelTypeOptions.Customer);
            GetRankOfVersionsUrl    = string.Format("/Services/GetMore.ashx?Action=GetRankOfVersions&SoftIds={0}&Platforms={1}&Period={2}&StartDate={3:yyyy-MM-dd}&EndDate={4:yyyy-MM-dd}&OrderBy={5}&Desc={6}&v={7}&ChannelTypes={8}", SoftID, Platform, period, BeginTime, EndTime, OrderBy, Desc, DateTime.Now.Ticks, (int)ChannelTypeOptions.Customer);
            GetRankOfSubChannelsUrl = string.Format("/Services/GetMore.ashx?Action=GetRankOfSubChannels&SoftIds={0}&Platforms={1}&Period={2}&StartDate={3:yyyy-MM-dd}&EndDate={4:yyyy-MM-dd}&OrderBy={5}&Desc={6}&v={7}&ChannelTypes={8}", SoftID, Platform, period, BeginTime, EndTime, OrderBy, Desc, DateTime.Now.Ticks, (int)ChannelTypeOptions.Customer);



            if (Desc)
            {
                users = (OrderBy == 0 ? users.OrderByDescending(a => a.NewUserCount) : users.OrderByDescending(a => a.NewUserCount - a.LastNewUserCount)).ToList();
            }
            else
            {
                users = (OrderBy == 0 ? users.OrderBy(a => a.NewUserCount) : users.OrderBy(a => a.NewUserCount - a.LastNewUserCount)).ToList();
            }
            List <object> list = new List <object>();

            for (int i = 0; i < users.Count; i++)
            {
                list.Add(new
                {
                    RankIndex        = i + 1,
                    ChannelID        = users[i].ID,
                    ChannelName      = users[i].Name,
                    NewUserCount     = Utility.SetNum(users[i].NewUserCount),
                    NewUserCountDiff = Utility.SetNum(users[i].NewUserCount - users[i].LastNewUserCount),
                    ActiveUserCount  = Utility.SetNum(users[i].ActiveUserCount),
                    ActiveUserRate   = users[i].TotalUserCount == 0 ? "" : ((decimal)users[i].ActiveUserCount / users[i].TotalUserCount * 100).ToString("0.00") + "%",
                    OneTimeUserCount = users[i].TotalUserCount == 0 ? "" : Utility.SetNum(users[i].OneTimeUserCount) + (users[i].TotalUserCount == 0 ? "(--)" : ("(" + ((decimal)users[i].OneTimeUserCount / users[i].TotalUserCount * 100).ToString("0.00") + "%)")),
                    RetainedUserRate = users[i].OriginalNewUserCount == 0 ? "" : ((decimal)users[i].RetainedUserCount / users[i].OriginalNewUserCount * 100).ToString("0.00") + "%",
                    TotalUserCount   = Utility.SetNum(users[i].TotalUserCount)
                });
            }
            Repeater1.DataSource = list;
            Repeater1.DataBind();
        }
Beispiel #11
0
        protected void GetQueryString()
        {
            //Request["channeltype"] ==1 就是分类id了
            if (!string.IsNullOrEmpty(Request["channelid"]) && !string.IsNullOrEmpty(Request["channeltype"]))
            {
                channelId = Convert.ToInt32(Request["channelid"]);
                string name = "";
                //传过来是分类
                if (Request["channeltype"] != "1")
                {
                    var temp = new CfgChannelService().GetChannelCustomer(channelId);
                    softsid = temp.SoftID;
                    name    = temp.Name;
                    HeadControl1.Channel1.ParentId = temp.PID == 0 ? "Categorie_" + temp.CID : "Customer_" + temp.PID;
                }
                else
                {
                    var temp = new CfgChannelService().GetChannelCategory(channelId);
                    ;
                    softsid = temp.SoftID;
                    name    = temp.Name;
                    HeadControl1.Channel1.ParentId = "0";
                }
                //没有权限
                var softinfo = AvailableSofts.Find(p => p.ID == softsid);
                if (softinfo == null)
                {
                    Response.Redirect("/Reports/NoRight.aspx");
                }
                else
                {
                    HeadControl1.SoftID = softinfo.ID.ToString();
                    PlatformsidList     = new List <int> {
                        paraPlat
                    };
                    HeadControl1.PlatID                 = PlatformsidList[0].ToString();
                    EndTime                             = ds.GetMaxTimeCache(Period, ReportType.UserUseNewActivity, CacheTimeOption.TenMinutes);
                    BeginTime                           = EndTime.AddDays(-30);
                    inputzhouqi.Value                   = Period.GetDescription();
                    HeadControl1.BeginTime              = BeginTime;
                    HeadControl1.EndTime                = EndTime;
                    HeadControl1.Channel1.SoftId        = HeadControl1.SoftID;
                    HeadControl1.Channel1.Platform      = HeadControl1.PlatID;
                    HeadControl1.Channel1.SelectedValue = channelId.ToString();
                    HeadControl1.Channel1.SelectedText  = name;
                    HeadControl1.Channel1.SelectedCate  = Request["channeltype"];
                    //记住查看用户类型
                    usercate.Value = usercateType.ToString();
                }
            }
            //不是其他页面通过中间页面跳转过来的
            else
            {
                if (HeadControl1.IsFirstLoad)
                {
                    EndTime     =
                        EndTime =
                            ds.GetMaxTimeCache(Period, ReportType.UserUseNewActivity, CacheTimeOption.TenMinutes);
                    BeginTime       = EndTime.AddDays(-30);
                    softsid         = CookieSoftid;
                    PlatformsidList = new List <int> {
                        CookiePlatid
                    };
                    HeadControl1.PlatID            = PlatformsidList[0].ToString();
                    HeadControl1.SoftID            = softsid.ToString();
                    inputzhouqi.Value              = Period.GetDescription();
                    HeadControl1.BeginTime         = BeginTime;
                    HeadControl1.EndTime           = EndTime;
                    HeadControl1.Channel1.SoftId   = HeadControl1.SoftID.ToString();
                    HeadControl1.Channel1.Platform = HeadControl1.PlatID.ToString();
                }
                else
                {
                    BeginTime = HeadControl1.BeginTime;
                    EndTime   = HeadControl1.EndTime;
                    softsid   = Convert.ToInt32(HeadControl1.SoftID);
                    var platformsids = HeadControl1.PlatID.Split(',');
                    foreach (string item in platformsids)
                    {
                        PlatformsidList.Add(Convert.ToInt32(item));
                    }
                    SetRequestCookie(softsid, PlatformsidList[0]);
                }
                HeadControl1.Channel1.PeriodCheck = false;
            }
            //开启对比功能
            HeadControl1.HiddenCompareTime = false;

            /////有渠道商权限
            //LimitChannelCustom(Convert.ToInt32(HeadControl1.Channel1.SoftId));
        }
Beispiel #12
0
        //获取基础信息统计
        public void GetTableJcXx()
        {
            //已经按照时间倒叙了 取得范围是80天里面选
            _usersfor80Days = Ds.GetUsersWithNoPeriodCache(EndTime.AddDays(-80), EndTime, SoftID, PlatID, CacheTimeOption.HalfDay).OrderByDescending(p => p.StatDate).ToList();
            List <SoftUser> users = _usersfor80Days;

            if (users.Count != 0)
            {
                int totalNum = users.Max(p => p.TotalNum);
                //周用户数据
                SoftUser weekUser     = users.Where(p => p.Period == (int)net91com.Stat.Core.PeriodOptions.Weekly).OrderByDescending(p => p.StatDate).FirstOrDefault();
                int      weekActivity = 0;
                string   weekPercent  = "--";
                if (weekUser != null)
                {
                    weekActivity = weekUser.ActiveNum;
                    weekPercent  = weekUser.ActivityPercent;
                }
                SoftUser monthUser = users.Where(p => p.Period == (int)net91com.Stat.Core.PeriodOptions.Monthly).OrderByDescending(p => p.StatDate).FirstOrDefault();
                ///获取月留存数据
                var list = new RetainedUsersService(true)
                           .GetStatRetainedUsersCache(SoftID, PlatID, -1, net91com.Stat.Core.PeriodOptions.Monthly, EndTime.AddDays(-80), EndTime, CacheTimeOption.TenMinutes, ChannelTypeOptions.Category, loginService);
                Sjqd_StatChannelRetainedUsers lastretainuser = list.Count == 0? null:list.OrderBy(p => p.OriginalDate).Last();
                //数据库还 没有值
                int    monthActivity = 0;
                string monthPercent  = "--";
                int    monthnew      = 0;

                if (monthUser != null)
                {
                    monthActivity = monthUser.ActiveNum;
                    monthPercent  = monthUser.ActivityPercent;
                    monthnew      = monthUser.NewNum;
                }
                string percent = lastretainuser == null ? "--" : (lastretainuser.RetainedUserCount * 100 / (decimal)lastretainuser.OriginalNewUserCount).ToString("0.00") + "%";


                StringBuilder sb = new StringBuilder("<table   class=\" tablesorter \"   cellspacing=\"1\">");
                sb.Append(@" <thead><tr>
                     <th>累计用户</th>
                     <th>周活跃用户</th>     
                     <th>周跃率</th>   
                     <th>月活跃用户</th>
                     <th>月活跃率</th>
                     <th>月新增用户</th>
                     <th>上月留存率</th>
                     </tr></thead>");
                sb.Append("<tbody>");
                sb.Append("<tr class=\"tableover\">");
                sb.AppendFormat(@"<td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td>",
                                Utility.SetNum(totalNum), Utility.SetNum(weekActivity), weekPercent, Utility.SetNum(monthActivity), monthPercent,
                                monthnew, percent);

                sb.Append("</tr>");
                sb.Append("</tbody></table>");
                TabStrJcXx = sb.ToString();
            }
        }
Beispiel #13
0
        ///获取统计慨况
        public void GetTableGaiKuang()
        {
            DateTime hourendtime = EndTimeForHour.Date;
            //预计今日使用的数据,昨天之前的5天数据
            List <SoftUser> users = _usersfor80Days.Where(p => p.StatDate >= EndTime.AddDays(-5) && p.Period == (int)net91com.Stat.Core.PeriodOptions.Daily).ToList();

            if (users.Count != 0)
            {
                StringBuilder sb = new StringBuilder("<table   class=\" tablesorter \"   cellspacing=\"1\">");
                sb.Append(@" <thead><tr>
                     <th>指标</th>
                     <th>新增用户</th>     
                     <th>活跃用户</th>   
                     <th>新用户占比</th>
                     <th>日活跃度</th>
                     </tr></thead>");
                sb.Append("<tbody>");

                sb.Append("<tr class=\"tableover\">");
                int totalNumyes = users[0].NewNum + users[0].ActiveNum;
                sb.Append(string.Format(@"<td>昨日</td><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td> ",
                                        Utility.SetNum(users[0].NewNum), Utility.SetNum(totalNumyes), (users[0].NewNum / (double)totalNumyes * 100).ToString("0.00") + "%", (totalNumyes / (double)users[0].TotalNum * 100).ToString("0.00") + "%"));
                sb.Append("</tr>");

                SoftUser forecast = GetForeCastSoftUser(users.ToList());

                sb.Append("<tr class=\"tableover\">");
                int totalNumforeLast = forecast.NewNum + forecast.ActiveNum;
                sb.Append(string.Format(@"<td>预计今日</td><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td> ",
                                        Utility.SetNum(forecast.NewNum), Utility.SetNum(forecast.ActiveNum), (forecast.NewNum / (double)totalNumforeLast * 100).ToString("0.00") + "%", ((forecast.ActiveNum + forecast.NewNum) / (double)forecast.TotalNum * 100).ToString("0.00") + "%"));
                sb.Append("</tr>");

                //历史最高
                List <SoftUser> tempHigh = Sjqd_StatUsersService.GetInstance().GetMaxNumCache(EndTime.AddDays(-1000), EndTime, SoftID, PlatID, net91com.Stat.Core.PeriodOptions.Daily, CacheTimeOption.OneHour);

                sb.Append("<tr class=\"tableover\">");
                if (tempHigh.Count == 1)
                {
                    sb.Append(string.Format(@"<td>历史最高</td><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td> ",
                                            Utility.SetNum(tempHigh[0].NewNum) + "(" + tempHigh[0].StatDate.ToShortDateString() + ")",
                                            Utility.SetNum(tempHigh[0].ActiveNum + tempHigh[0].NewNum) + "(" + tempHigh[0].StatDate.ToShortDateString() + ")", "--", "--"));
                    sb.Append("</tr>");
                }
                else if (tempHigh.Count == 2)
                {
                    sb.Append(string.Format(@"<td>历史最高</td><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td> ",
                                            Utility.SetNum(tempHigh[0].NewNum) + "(" + tempHigh[0].StatDate.ToShortDateString() + ")",
                                            Utility.SetNum(tempHigh[1].ActiveNum + tempHigh[1].NewNum) + "(" + tempHigh[1].StatDate.ToShortDateString() + ")", "--", "--"));
                    sb.Append("</tr>");
                }
                else
                {
                    sb.Append(string.Format(@"<td>历史最高</td><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td> ",
                                            "--", "--", "--", "--"));
                    sb.Append("</tr>");
                }

                sb.Append("</tbody></table>");
                TabStrGaiKuang = sb.ToString();
            }

            _usersfor80Days.Clear();
            _usersfor80Days = null;
        }