/// <summary> /// 获取权限树 /// </summary> /// <returns></returns> //[UserAuth("AUTH_FUNC_VIW")] public ActionResult SearchOrgsTree(string id) { var all = new SYS_USER_DAL().GetUserORG(UserState.UserID); foreach (var org in all.Where(obj => obj.PAR_ORG_ID == "")) { org.PAR_ORG_ID = null; } var treelist = all.Where(obj => obj.ORG_LEVEL == all.Min(obj2 => obj2.ORG_LEVEL) && obj.ORG_LEVEL <= 2) .Select(obj => new ZtreeNode_ORG { id = obj.ORG_ID.ToString(), name = obj.ORG_NAM, open = true, isParent = true, children = all.Where(o => o.PAR_ORG_ID == obj.ORG_ID && o.ORG_LEVEL == 2)//只显示市,没有市不显示 .Select(obj2 => new ZtreeNode_ORG { id = obj2.ORG_ID.ToString(), name = obj2.ORG_NAM, open = true, isParent = true }).ToList() }).ToList(); return(Json(treelist, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 获取权限树 /// </summary> /// <returns></returns> //[UserAuth("AUTH_FUNC_VIW")] public ActionResult GetOrgs2Tree(string id, string check, int?disabled, string searchNam) { var all = new SYS_USER_DAL().GetUserORG(UserState.UserID); var hallall = DaoHall.FindList(); foreach (var org in all.Where(obj => obj.PAR_ORG_ID == "")) { org.PAR_ORG_ID = null; } var treelist = all.Where(obj => obj.ORG_LEVEL == 2)//市级 .Select(obj => new ZtreeNode_ORG { id = obj.ORG_ID.ToString(), name = obj.ORG_NAM, @checked = (check != null && check == obj.ORG_ID), open = true, Org_LV = (byte)obj.ORG_LEVEL, isParent = all.Any(obj2 => obj2.PAR_ORG_ID == obj.ORG_ID), chkDisabled = (disabled != null && disabled.ToString() == obj.ORG_ID), highlight = (!string.IsNullOrEmpty(searchNam) && obj.ORG_NAM.IndexOf(searchNam) > -1) }).ToList(); if (null != treelist && treelist.Count > 0) { foreach (var leaf in treelist) { List <ZtreeNode_ORG> leafchild = new List <ZtreeNode_ORG>(); GenOrgs2Tree(all, hallall, ref leafchild, leaf.id, check, disabled, searchNam); leaf.children = leafchild; } } else { if (null != all && all.Count > 0) { foreach (var item in all.Where(o => o.ORG_LEVEL == 4)) { List <ZtreeNode_ORG> leafchild = new List <ZtreeNode_ORG>(); GenOrgs2Tree(all, hallall, ref leafchild, item.PAR_ORG_ID, check, disabled, searchNam); treelist.AddRange(leafchild); } } } if (!string.IsNullOrEmpty(searchNam)) { GenOrgs2TreeOpen(treelist); } return(Json(treelist, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 获取权限树 /// </summary> /// <returns></returns> //[UserAuth("AUTH_FUNC_VIW")] public ActionResult GetOrgsManagerTree(string id, string check, int?disabled, string searchNam) { var all = new SYS_USER_DAL().GetUserORG(UserState.UserID); foreach (var org in all.Where(obj => obj.PAR_ORG_ID == "")) { org.PAR_ORG_ID = null; } bool rootHasAuth = true; if (!all.Any(o => o.ORG_LEVEL == 1))//处理没有省权限的数据 { rootHasAuth = false; all.Where(o => o.ORG_LEVEL == (all.Min(o2 => o2.ORG_LEVEL))) .ToList().ForEach(o => o.PAR_ORG_ID = null); } var tree = new ZtreeNode_ORG { id = "", name = "顶级机构", @checked = check == null, open = true, isParent = true, nocheck = true, hasauth = rootHasAuth, highlight = (!string.IsNullOrEmpty(searchNam) && "顶级机构".IndexOf(searchNam) > -1), children = GenOrgsManagerTree(all, null, check, disabled, searchNam) }; var treelist = new List <ZtreeNode_ORG> { tree }; if (!string.IsNullOrEmpty(id) || Request.Form["lv"] == "0") { if (id == "") { id = null; } treelist = GenOrgsManagerTree(all, id, check, disabled, searchNam); } if (!string.IsNullOrEmpty(searchNam)) { GenOrgsManagerTreeOpen(tree); GenOrgsManagerTreeOpen(tree);//递归达不到足够的深度,改为多次调用 GenOrgsManagerTreeOpen(tree); } return(Json(treelist, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(string hall, string start, string end, int status = 0, int pageIndex = 1, int pageSize = 20) { var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4), "ORG_ID", "ORG_NAM", false); int type = 0; ViewBag.hall = hall; ViewBag.status = status; DateTime?time1 = null; if (!string.IsNullOrEmpty(start)) { DateTime t1; DateTime.TryParse(start, out t1); time1 = t1; } DateTime?time2 = null; if (!string.IsNullOrEmpty(end)) { DateTime t2; DateTime.TryParse(end, out t2); time2 = t2; } ViewBag.start = start; ViewBag.end = end; var data = new WARN_ALARM_INFO_DETAIL_DAL().GetList(pageIndex, pageSize, "", time1, time2, type == 0 ? (int?)null : type, status == 0 ? (int?)null : status); return(View(data)); }
/// <summary> /// 获取报表标题组织的名称 /// </summary> /// <param name="orgId"></param> /// <param name="level"></param> /// <returns></returns> public string GetOrgName(string orgId, byte?level) { var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); var MainTitle = string.Empty; if (!string.IsNullOrEmpty(orgId)) { var obj = orgall.FirstOrDefault((o => o.ORG_ID == orgId)); if (obj != null) { MainTitle = obj.ORG_NAM; } } else { if (level != null) { var obj = orgall.Where(m => m.ORG_LEVEL == level).OrderBy(o => o.ORG_LEVEL).FirstOrDefault(); if (obj != null) { MainTitle = obj.ORG_NAM; } } else { var obj = orgall.OrderBy(o => o.ORG_LEVEL).FirstOrDefault(); if (obj != null) { MainTitle = obj.ORG_NAM; } } } return(MainTitle); }
public ActionResult Index(int?typeq, int?lvlq, string orgid, DateTime?start, DateTime?end, int pageIndex = 1, int pageSize = 20) { if (null != start) { ViewBag.Start = start.Value.ToString("yyyy-MM-dd"); } if (null != end) { ViewBag.End = end.Value.ToString("yyyy-MM-dd"); } var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgid); var selectlist = EnumHelper.GetCategorySelectList(typeof(WARN_INFO_DETAIL.WARN_TYP_ENUM)); if (null != typeq) { selectlist.Find(obj => obj.Value == typeq.Value.ToString()).Selected = true; } ViewBag.WARN_TYP_SELECTLIST = selectlist; var selectlist2 = EnumHelper.GetCategorySelectList(typeof(WARN_INFO_DETAIL.WARN_LVL_ENUM)); if (null != lvlq) { selectlist2.Find(obj => obj.Value == lvlq.Value.ToString()).Selected = true; } ViewBag.WARN_LVL_SELECTLIST = selectlist2; var orgs = orgall.Select(obj => obj.ORG_ID); if (!string.IsNullOrEmpty(orgid)) { orgs = orgs.Where(obj => obj == orgid); if (null == orgs || orgs.Count() == 0) { orgs = new List <string> { "-1" }; } } var halllist = DaoHall.FindList("", "ORG_ID in", orgs); var data = dao.GetList(pageIndex, pageSize, "CREATE_DTIME desc", "WARN_TYP", typeq, "WARN_LEVEL", lvlq, "HALL_NO in", null == halllist ? null : halllist.Select(obj => obj.HALL_NO), "CREATE_DTIME>=", start == null ? "'1970-01-01'" : "'" + start.Value + "'", "CREATE_DTIME<", end == null ? ("'" + DateTime.MaxValue.ToShortDateString() + "'") : ("'" + end.Value.AddDays(1) + "'")); foreach (var item in data.Items) { var h = halllist.FirstOrDefault(obj => obj.HALL_NO == item.HALL_NO); if (null != h) { item.HALL_NAM = h.HALL_NAM; } } return(View(data)); }
public ActionResult Index(string hallno, int pageIndex = 1, int pageSize = 20) { var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4), "ORG_ID", "ORG_NAM", true); ViewBag.hallno = hallno; var data = new WARN_ALARM_SEND_USER_CON_DAL().GetList(pageIndex, pageSize, hallno); return(View(data)); }
public ActionResult Index(string snam, string orgid, string orgnam, int pageIndex = 1, int pageSize = 20) { ViewBag.SNAM = snam; ViewBag.ORGID = orgid; ViewBag.ORGNAM = orgnam; var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); if (string.IsNullOrEmpty(orgid) && orgall != null) { orgid = orgall.FirstOrDefault(obj => obj.ORG_LEVEL == 4).ORG_ID; } ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgid); var orgs = orgall.Select(obj => obj.ORG_ID); if (!string.IsNullOrEmpty(orgid)) { orgs = orgs.Where(obj => obj == orgid); if (null == orgs || orgs.Count() == 0) { orgs = new List <string> { "-1" }; } } var halllist = DaoHall.FindList("", "ORG_ID in", orgs); var data = dao.GetList(pageIndex, pageSize, "Q_ID desc", "Q_SERIALNAME like", snam, "Q_SYSNO in", null == halllist ? null : halllist.Select(obj => obj.HALL_NO)); if (data != null && data.Items != null) { halllist = DaoHall.FindList(); var orglist = DaoOrganize.FindList(); foreach (var item in data.Items) { item.Hall = halllist.FirstOrDefault(obj => obj.HALL_NO == item.Q_SYSNO); item.Org = orglist.FirstOrDefault(obj => obj.ORG_ID == item.Hall.ORG_ID); } } return(View(data)); }
public ActionResult Index(string nam, string orgid, string orgnam, int?stafftype, int pageIndex = 1, int pageSize = 20) { ViewBag.NAM = nam; ViewBag.ORGID = orgid; ViewBag.ORGNAM = orgnam; ViewBag.STAFFTYP = stafftype; var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); if (string.IsNullOrEmpty(orgid) && orgall != null) { orgid = orgall.FirstOrDefault(obj => obj.ORG_LEVEL == 4).ORG_ID; } ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgid); GetCreateDT(orgid); var orgs = orgall.Select(obj => obj.ORG_ID); if (!string.IsNullOrEmpty(orgid)) { orgs = orgs.Where(obj => obj == orgid); if (null == orgs || orgs.Count() == 0) { orgs = new List <string> { "-1" }; } } var data = dao.GetList(pageIndex, pageSize, "", "STAFF_NAM like", nam , "ORG_ID in", orgs, "STAFF_TYP", stafftype); var orglist = DaoOrganize.FindList(); foreach (var item in data.Items) { item.ORG = orglist.FirstOrDefault(obj => obj.ORG_ID == item.ORG_ID); } return(View(data)); }
public ActionResult Index(DateTime?beginTime, DateTime?endTime, int?warnType, int?warnLevel, string orgId, int isSenior = 0, int pageIndex = 1, int pageSize = 20) { var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgId); var selectlist = EnumHelper.GetCategorySelectList(typeof(WARN_INFO_DETAIL.WARN_TYP_ENUM)); if (null != warnType) { selectlist.Find(obj => obj.Value == warnType.Value.ToString()).Selected = true; } ViewBag.WARN_TYP_SELECTLIST = selectlist; var selectlist2 = EnumHelper.GetCategorySelectList(typeof(WARN_INFO_DETAIL.WARN_LVL_ENUM)); if (null != warnLevel) { selectlist2.Find(obj => obj.Value == warnLevel.Value.ToString()).Selected = true; } ViewBag.WARN_LVL_SELECTLIST = selectlist2; beginTime = beginTime ?? DateTime.Now; endTime = endTime ?? DateTime.Now; ViewBag.BeginTime = beginTime.GetValueOrDefault().ToString("yyyy-MM-dd"); ViewBag.EndTime = endTime.GetValueOrDefault().ToString("yyyy-MM-dd"); ViewBag.WarnType = warnType; ViewBag.WarnLevel = warnLevel; ViewBag.OrgId = orgId; ViewBag.IsSenior = isSenior; var list = DETAIL_WARN_DISPOSAL_DAL.GetPager(beginTime, endTime, warnType, warnLevel, orgId, pageIndex, pageSize); return(View(list)); }
public ActionResult Index(DateTime?beginTime, DateTime?endTime, int pageIndex = 1, int pageSize = 20, bool export = false) { base.DateTimeInit(ref beginTime, ref endTime); // 初始化日期 var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", ""); var orgs = orgall.Select(obj => obj.ORG_ID); var mainTielt = GetOrgName(null, null); ViewBag.MainTitle = GetTitleName(mainTielt, "排队业务分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault()); var subtitle = GetTitleName(mainTielt, "", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault(), false); var exceltitle = GetTitleName(mainTielt, "排队业务分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault(), false); var halllist = base.UserHall.Select(x => x.HALL_NO).ToArray(); var data = new STAT_STAFF_QUEUE_BUSI_D_DAL().GetStatsInfo(pageIndex, int.MaxValue, halllist, beginTime, endTime); if (export)//导出 { var index = 0; var temp = data.Select(x => new { 序号 = ++index, 业务编码 = x.QUEUE_BUSI_CD, 业务名称 = x.Q_SERIALNAME, 呼叫量 = x.CALL_CNT, 呼叫率 = CommonHelper.DivisionOfPercent(x.CALL_CNT, data.Sum(obj => obj.CALL_CNT)), 超时等待量 = x.OVERTIME_WAIT_CNT, 超时等待率 = CommonHelper.DivisionOfTimeString(x.OVERTIME_WAIT_CNT, data.Sum(obj => obj.OVERTIME_WAIT_CNT)), 办理量 = x.HANDLE_CNT, 办理率 = CommonHelper.DivisionOfPercent(x.HANDLE_CNT, data.Sum(obj => obj.HANDLE_CNT)), 弃号量 = x.ABANDON_CNT, 弃号率 = CommonHelper.DivisionOfPercent(x.ABANDON_CNT, data.Sum(obj => obj.ABANDON_CNT)), 平均办理时间 = CommonHelper.DivisionOfTimeString(x.HANDLE_DUR, x.HANDLE_CNT), 平均等待时间 = CommonHelper.DivisionOfTimeString(x.WAIT_DUR, x.TOT_TICKET_CNT), 最长等待时间 = x.MAX_WAIT_DUR, 最长办理时间 = x.MAX_HANDLE_DUR, 超时办理量 = x.OVERTIME_HANDLE_CNT, 超时办理率 = CommonHelper.DivisionOfPercent(x.OVERTIME_HANDLE_CNT, x.TOT_TICKET_CNT), 人流量 = x.TOT_TICKET_CNT }).ToList().ToDataTable(); return(AsposeExcelHelper.OutFileToRespone(temp, exceltitle)); } else { DataSet ds = new DataSet(); DataTable dt = new DataTable(); ds.Tables.Add(dt); dt.Columns.Add("Q_SERIALNAME", typeof(string)); dt.Columns.Add("呼叫量", typeof(int)); dt.Columns.Add("办理量", typeof(int)); dt.Columns.Add("弃号量", typeof(int)); foreach (var item in data) { DataRow r = dt.NewRow(); r["Q_SERIALNAME"] = item.Q_SERIALNAME; r["呼叫量"] = item.CALL_CNT; r["办理量"] = item.HANDLE_CNT; r["弃号量"] = item.ABANDON_CNT; dt.Rows.Add(r); } ViewBag.ChartColumn3DXML = CreateMSColumn3DChart("排队业务分析", ds.Tables[0], 430, subtitle); ViewBag.ChartSplineXML = CreateMSSplineChart("排队业务报分析", ds, 430, null, null, subtitle); return(View(data)); } }
public ActionResult OtherIndex(DateTime?beginTime, DateTime?endTime, string orgid, int pageIndex = 1, int pageSize = 20, bool export = false) { base.DateTimeInit(ref beginTime, ref endTime); ViewBag.beginTime = beginTime == null ? "" : beginTime.Value.ToString("yyyy-MM-dd"); ViewBag.endTime = endTime == null ? "" : endTime.Value.ToString("yyyy-MM-dd"); var t = 3;//员工报表 ViewBag.NAM = "员工"; if (string.IsNullOrEmpty(Request.QueryString["t"]) || !int.TryParse(Request.QueryString["t"], out t)) { t = 1; } if (t == 1) { ViewBag.NAM = "省市"; ViewBag.NAMLink = "/STAT/statstaffqueuebusid/otherindex?t=2";//如果是省级,点击进入市级 } if (t == 2) { ViewBag.NAM = "服务厅"; ViewBag.NAMLink = "/STAT/statstaffqueuebusid/otherindex?t=3"; //如果是省级,点击进入员工报表 } if (GetHighLV == model.Enums.UserLV_ENUM.市级 && t < 2) //判断是否有权限 { return(Redirect("/STAT/statstaffqueuebusid/otherindex?t=2")); } if (GetHighLV == model.Enums.UserLV_ENUM.区级 && t < 2)//判断是否有权限 { return(Redirect("/STAT/statstaffqueuebusid/otherindex?t=2")); } if (GetHighLV == model.Enums.UserLV_ENUM.务厅级 && t < 3) //判断是否有权限 { return(Redirect("/STAT/statstaffqueuebusid/otherindex?t=3")); } if (GetHighLV == model.Enums.UserLV_ENUM.无权限)//判断是否有权限 { return(NoAuth); } var re = base.UserHall; var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgid); if (!string.IsNullOrEmpty(orgid)) { orgall = orgall.Where(obj => obj.ORG_ID == orgid).ToList(); if (null == orgall || orgall.Count() == 0) { orgall = new List <SYS_ORGANIZE> { new SYS_ORGANIZE { ORG_ID = "-1" } }; } } if (export) { pageIndex = 0; } List <dynamic> data = null; if (t == 1) { data = new STAT_STAFF_QUEUE_BUSI_D_DAL().Q_STATDATA_GROUP_CITY(null, beginTime, endTime, t); } if (t == 2) { var halllist = new SYS_HALL_DAL().GetOrgHallAndChild(orgid).ToArray(); data = new STAT_STAFF_QUEUE_BUSI_D_DAL().Q_STATDATA_GROUP_CITY(halllist, beginTime, endTime, t); } if (t == 3) { var halllist = new SYS_HALL_DAL().GetOrgHallAndChild(orgid).ToArray(); data = new STAT_STAFF_QUEUE_BUSI_D_DAL().Q_STATDATA_GROUP_CITY(halllist, beginTime, endTime, t); } string subTitle = ""; if (beginTime == null && endTime == null) { subTitle = GetSubTitle(orgid, data.Select(o => o.MIN_STAT_DT).Min(), data.Select(o => o.MAX_STAT_DT).Max()); } else { subTitle = GetSubTitle(orgid, beginTime, endTime); } ViewBag.subTitle = subTitle; if (export)//导出 { string xlnam = "人流量对比分析-省市"; if (t == 2) { xlnam = "人流量对比分析-服务厅"; } if (t == 3) { xlnam = "人流量对比分析-排队业务"; } return(ExportData(xlnam, subTitle, data)); } else { subTitle = subTitle.Replace("<span style='font-size:12px;'>", "") .Replace("</span>", "").Replace("人流量对比分析", ""); DataTable dtCHART = null; dtCHART = GroupByNAM(data, t); ViewBag.ChartColumn3DXML = CreateMSColumn3DChart("人流量对比分析", dtCHART, 420, subTitle, true); ViewBag.ChartSplineXML = CreateMSSplineChart("人流量对比分析", dtCHART, 420, null, null, subTitle); var page = new Page <dynamic>() { Items = data.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(), ItemsPerPage = pageSize, CurrentPage = pageIndex, TotalItems = data.Count }; return(View(page)); } }
public ActionResult Index(DateTime?beginTime, DateTime?endTime, string orgid, int pageIndex = 1, int pageSize = 20, bool export = false) { base.DateTimeInit(ref beginTime, ref endTime); // 初始化日期 var orgall = new SYS_USER_DAL().GetUserORG(UserState.UserID); ViewBag.UserORG = new SelectList(orgall.Where(obj => obj.ORG_LEVEL == 4) , "ORG_ID", "ORG_NAM", orgid); var orgs = orgall.Select(obj => obj.ORG_ID); //var mainTielt = GetOrgName(null, null); //ViewBag.MainTitle = GetTitleName(mainTielt, "业务大类分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault()); //var title = GetTitleName(mainTielt,"业务大类分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault(), false); var mainTielt = GetOrgName(null, null); ViewBag.MainTitle = GetTitleName(mainTielt, "业务大类分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault()); var subtitle = GetTitleName(mainTielt, "", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault(), false); var exceltitle = GetTitleName(mainTielt, "业务大类分析", beginTime.GetValueOrDefault(), endTime.GetValueOrDefault(), false); var halllist = base.UserHall.Select(x => x.HALL_NO).ToArray(); var data = new STAT_STAFF_LARGE_BUSI_D_DAL().GetStatsInfo(halllist, beginTime, endTime); if (export)//导出 { var index = 0; var temp = data.Select(x => new { 序号 = ++index, 业务大类 = x.DLS_SERIALNAME, 业务笔数 = x.BUSI_CNT, 业务折合量 = x.CONVERT_BUSI_CNT, 平均版办理时间 = (((int)(x.BUSI_CNT == 0 ? 0 : (x.HANDLE_DUR / x.BUSI_CNT))).ToTimeString()) + "%", 超时办理时间 = x.OVERTIME_HANDLE_CNT, 超时率 = ((x.BUSI_CNT == 0 ? 0 : (x.OVERTIME_HANDLE_CNT / x.BUSI_CNT)).ToString("P")) + "%", 城业务笔数 = x.LOCAL_CNT, 城办理率 = ((x.LOCAL_CNT * 100.0 / x.BUSI_CNT)).ToString("f2") + "%", }).ToList().ToDataTable(); return(AsposeExcelHelper.OutFileToRespone(temp, exceltitle)); } else { DataSet ds = new DataSet(); DataTable dt = new DataTable(); ds.Tables.Add(dt); dt.Columns.Add("NAME", typeof(string)); dt.Columns.Add("业务笔数", typeof(int)); dt.Columns.Add("业务折合量", typeof(int)); dt.Columns.Add("总办理时长", typeof(int)); dt.Columns.Add("超时办理量", typeof(int)); dt.Columns.Add("同城业务量", typeof(int)); foreach (var item in data) { var r = dt.NewRow(); r["NAME"] = item.DLS_SERIALNAME; r["业务笔数"] = item.BUSI_CNT; r["业务折合量"] = item.CONVERT_BUSI_CNT; r["总办理时长"] = item.HANDLE_DUR; r["超时办理量"] = item.OVERTIME_HANDLE_CNT; r["同城业务量"] = item.LOCAL_CNT; dt.Rows.Add(r); } ViewBag.ChartColumn3DXML = CreateMSColumn3DChart("业务大类分析", ds.Tables[0], 430, subtitle); ViewBag.ChartSplineXML = CreateMSSplineChart("业务大类分析", ds, 430, null, null, subtitle); return(View(data)); } }