Beispiel #1
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        /// <returns></returns>
        public string ListBind()
        {
            int       count = 0;
            DataTable dt    = GetList(ref count);

            if (dt != null && dt.Rows.Count > 0)
            {
                string type = Request["type"];

                if (type == "Graph")
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.单位卷宗统计Web, "单位卷宗制作情况统计图形获取成功", UserInfo, UserRole, this.Request);
                    return(StatisticsDataHelper.GetGraph(dt, new String[] { "AJNUM", "YZZNUM", "WZZNUM", "JNUM", "MLNUM", "WJNUM", "WJYNUM" }, "DWMC"));
                }
                else
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.单位卷宗统计Web, "单位卷宗制作情况统计数据获取成功", UserInfo, UserRole, this.Request);
                    return("{\"Total\":" + count + ",\"Rows\":" + JsonHelper.JsonString(dt) + "}");
                }
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.单位卷宗统计Web, "未找到单位卷宗制作情况统计信息", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到单位卷宗制作情况统计信息", null));
        }
Beispiel #2
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        /// <returns></returns>
        public string ListBind()
        {
            string type       = Request["type"];
            string page       = Request["page"];
            string rows       = Request["pagesize"];
            string key        = Request["key"];
            string casename   = Request["casename"];
            string dutyman    = Request["dutyman"];
            string dwbm       = Request["dwbm"];
            string timebegin  = Request["timebegin"];
            string timeend    = Request["timeend"];
            int    pageNumber = int.Parse(page);
            int    pageSize   = int.Parse(rows);

            string where = string.Empty;

            object[] values = new object[0];

            if (!string.IsNullOrEmpty(key))
            {
                where += " and a.BMSAH like '%" + StringPlus.ReplaceSingle(key) + "%'";
            }
            if (!string.IsNullOrEmpty(casename))
            {
                where += " and a.JZMC like '%" + StringPlus.ReplaceSingle(casename) + "%'";
            }
            if (!string.IsNullOrEmpty(dwbm))
            {
                where += " and c.DWMC like '%" + StringPlus.ReplaceSingle(dwbm) + "%'";
            }
            if (!string.IsNullOrEmpty(dutyman))
            {
                where += " and a.JZSCRXM like '%" + StringPlus.ReplaceSingle(dutyman) + "%'";
            }
            if (!string.IsNullOrEmpty(timebegin))
            {
                where += " and a.CJSJ >= to_date('" + StringPlus.ReplaceSingle(timebegin) + "','yyyy-mm-dd')";
            }
            if (!string.IsNullOrEmpty(timeend))
            {
                where += " and a.CJSJ <= to_date('" + Convert.ToDateTime(StringPlus.ReplaceSingle(timeend)).AddDays(1).ToString("yyyy-MM-dd") + "','yyyy-mm-dd')";
            }

            EDRS.BLL.DataStatistics bll = new EDRS.BLL.DataStatistics(this.Request);
            Decimal count;
            DataSet ds = bll.GetJZNumberByReport(where, UserInfo.DWBM, UserInfo.GH, "1", (int)EnumConfig.文件存储空间大小分配, out count, values);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                if (type == "Graph")
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.卷宗数量统计Web, "卷宗数量统计图形获取成功", UserInfo, UserRole, this.Request);
                    return(StatisticsDataHelper.GetGraph(dt, new String[] { "WJDX" }, "WJDX") + "," + (count * 1024 * 1024 * 1024));
                }
                else
                {
                    //数据日志
                    OperateLog.AddLog(OperateLog.LogType.卷宗数量统计Web, "卷宗数量统计列表获取成功", UserInfo, UserRole, this.Request);
                    return("{\"Total\":" + 1 + ",\"Rows\":" + JsonHelper.JsonString(dt) + "}");
                }
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.卷宗数量统计Web, "未找到卷宗统计信息", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到卷宗统计信息", null));
        }