Exemplo n.º 1
0
 /// <summary>
 /// 获取办公报件信息
 /// </summary>
 /// <param name="sb">拼接字符串</param>
 /// <param name="kqhref">考勤href</param>
 /// <param name="dbhref">待办href</param>
 /// <param name="dxhref">短信href</param>
 /// <param name="target">页面跳转方式</param>
 /// <param name="nums">报价数量</param>
 private static void GetOAInfoStr(StringBuilder sb, string kqhref, string dbhref, string dxhref, string target, int[] nums)
 {
     sb.AppendFormat("<div class=\"officeTools floatRight\">");
     if (ConfigCls.getOAShowMethod() == "1")
     {
         sb.AppendFormat("<dl class=\"floatLeft\">");
         sb.AppendFormat("<dt><img src=\"../../images/tools/tool_kq.png\"></dt>");
         sb.AppendFormat("<dd><a href=\"" + kqhref + "\" target=\"" + target + "\">考勤</a></dd>");
         //sb.AppendFormat("<dd><a href=\"#\" onclick='ShowMessageDialog(\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\")' >考勤</a></dd>", kqhref, "考勤签到签退", "1150px", "400px", true);
         //sb.AppendFormat("<dd><a href=\"#\" onclick='OpenMessageDialog(\"{0}\",\"{1}\")' >考勤</a></dd>", kqhref, "考勤签到签退");
         sb.AppendFormat("</dl>");
         sb.AppendFormat("<dl class=\"floatLeft\">");
         sb.AppendFormat("<dt><img src=\"../../images/tools/tool_db.png\"><span id=\"dbNum\">" + nums[0] + "</span></dt>");
         sb.AppendFormat("<dd><a href=\"" + dbhref + "\" target=\"" + target + "\">待办</a></dd>");
         sb.AppendFormat("</dl>");
         sb.AppendFormat("<dl class=\"floatLeft\">");
         sb.AppendFormat("<dt><img src=\"../../images/tools/tool_dx.png\"><span id=\"dxNum\">" + nums[1] + "</span></dt>");
         sb.AppendFormat("<dd><a href=\"" + dxhref + "\" target=\"" + target + "\">短信</a></dd>");
         //sb.AppendFormat("<dd><a href=\"#\" onclick='ShowMessageDialog(\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\")' >短信</a></dd>", dxhref, "信息专递", "1200px", "600px", true);
         //sb.AppendFormat("<dd><a href=\"#\" onclick='OpenMessageDialog(\"{0}\",\"{1}\")' >短信</a></dd>", dxhref, "信息专递");
         sb.AppendFormat("</dl>");
     }
     sb.AppendFormat("</div>");
 }
Exemplo n.º 2
0
        /// <summary>
        /// 怠工
        /// </summary>
        /// <param name="sw">参见模型</param>
        /// <returns>DT</returns>
        public static DataTable getDTSabotageByOrgNo(SabotageCount_SW sw)
        {
            string        LengthError = (ConfigCls.getPatrolLengthError() / 1000).ToString();//巡检距离误差
            StringBuilder sb          = new StringBuilder();

            if (PublicCls.OrgIsShi(sw.TopORGNO))
            {
                sb.AppendFormat(" select count(substring(BYORGNO,1,6)+'000000000') as C,substring(BYORGNO,1,6)+'000000000' as BYORGNO,SBDATE,");
                sb.AppendFormat(" case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end as PatrolLenErro", LengthError);
                sb.AppendFormat(" FROM      T_IPSFR_USER a left outer join T_IPS_REALDATATEMPORARY  b on a.HID=b.USERID");
                sb.AppendFormat(" where a.ISENABLE=1 and b.USERID is not null and a.PATROLLENGTH/1000>0");
                sb.AppendFormat(" and   (SBDATE >= '{0}') AND (SBDATE <= '{1}')", sw.DateBegin, sw.DateEnd);
                sb.AppendFormat(" group by SBDATE,substring(BYORGNO,1,6)+'000000000',case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end", LengthError);
            }
            else if (PublicCls.OrgIsXian(sw.TopORGNO))
            {
                sb.AppendFormat(" select count(BYORGNO) as C,BYORGNO,SBDATE,");
                sb.AppendFormat(" case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end as PatrolLenErro", LengthError);
                sb.AppendFormat(" FROM      T_IPSFR_USER a left outer join T_IPS_REALDATATEMPORARY  b on a.HID=b.USERID");
                sb.AppendFormat(" where a.ISENABLE=1 and b.USERID is not null and a.PATROLLENGTH/1000>0");
                sb.AppendFormat(" and   (SBDATE >= '{0}') AND (SBDATE <= '{1}')", sw.DateBegin, sw.DateEnd);
                sb.AppendFormat(" and   substring(BYORGNO,1,6)+'000000000'='{0}'", sw.TopORGNO);
                sb.AppendFormat(" group by SBDATE,BYORGNO,case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end", LengthError);
            }
            else
            {
                sb.AppendFormat(" select count(b.USERID) as C,b.USERID as BYORGNO,SBDATE,");
                sb.AppendFormat(" case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end as PatrolLenErro", LengthError);
                sb.AppendFormat(" FROM      T_IPSFR_USER a left outer join T_IPS_REALDATATEMPORARY  b on a.HID=b.USERID");
                sb.AppendFormat(" where a.ISENABLE=1 and b.USERID is not null and a.PATROLLENGTH/1000>0");
                sb.AppendFormat(" and   (SBDATE >= '{0}') AND (SBDATE <= '{1}')", sw.DateBegin, sw.DateEnd);
                sb.AppendFormat(" and   BYORGNO='{0}'", sw.TopORGNO);
                sb.AppendFormat(" group by SBDATE,b.USERID,case when(a.PATROLLENGTH/1000-b.PATROLLENGTH)<{0} then 1 else 0 end", LengthError);
            }
            return(DataBaseClass.FullDataSet(sb.ToString()).Tables[0]);
        }
Exemplo n.º 3
0
        //
        // GET: /Interface/

        public ActionResult SystemRedirect()
        {
            SystemCls.ClearLoginState();
            string uid = Request.Params["uid"];

            if (string.IsNullOrEmpty(uid))
            {
                ViewBag.logined = "自动登录失败";
            }
            else
            {
                T_SYSSEC_IPSUSER_Model m = T_SYSSEC_IPSUSERCls.getModel(new T_SYSSEC_IPSUSER_SW {
                    USERID = uid
                });

                CookieModel cookieM = new CookieModel();
                if (m != null)
                {
                    if (string.IsNullOrEmpty(m.USERID))
                    {
                        ViewBag.logined = "自动登录失败";
                    }
                    else
                    {
                        cookieM.UID      = m.USERID;
                        cookieM.userName = m.LOGINUSERNAME;
                        cookieM.trueName = m.USERNAME;
                        cookieM.SaveType = "true";
                        SystemCls.SaveLoginState(cookieM);
                        ViewBag.logined = "<script language=\"javascript\">window.location.href = '" + ConfigCls.getLoginRedirectUrl(m.USERID) + "';</script>";
                    }
                }
                else
                {
                    ViewBag.logined = "自动登录失败";
                }
            }
            return(View());
        }
Exemplo n.º 4
0
        /// <summary>
        /// 返回某用户拥有的权限
        /// </summary>
        /// <returns>返回DataTable</returns>
        public static DataTable getDTByUID(T_SYSSEC_IPSUSER_SW sw)
        {
            if (string.IsNullOrEmpty(sw.USERID))//如果未传递,则默认值为0,不取权限 该问题有可能为用户未登录,所以未获取到USERID
            {
                sw.USERID = "0";
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("SELECT    ROLEID, RIGHTID");
            sb.AppendFormat(" FROM       T_SYSSEC_ROLE_RIGHT");
            sb.AppendFormat(" where roleid in(select roleid from T_SYSSEC_USER_ROLE where userid={0})", sw.USERID);
            sb.AppendFormat(" and RIGHTID in(select RIGHTID from T_SYSSEC_RIGHT where SYSFLAG='{0}')", ConfigCls.getSystemFlag());//判断角色是否启用

            sb.AppendFormat(" ORDER BY RIGHTID ");

            DataSet ds = DataBaseClass.FullDataSet(sb.ToString());

            return(ds.Tables[0]);
        }
Exemplo n.º 5
0
        public FileResult CollectCountExportExcel()
        {
            string BYORGNO      = Request.Params["BYORGNO"];
            string TIMEBegin    = Request.Params["TIMEBegin"];
            string TIMEEnd      = Request.Params["TIMEEnd"];
            string HID          = Request.Params["HID"];
            string SYSTYPEVALUE = Request.Params["SYSTYPEVALUE"];
            var    vMenu        = T_SYS_MENUCls.getModel(new T_SYS_MENU_SW {
                MENUCODE = "004004", SYSFLAG = ConfigCls.getSystemFlag()
            });

            NPOI.HSSF.UserModel.HSSFWorkbook book   = new NPOI.HSSF.UserModel.HSSFWorkbook();
            NPOI.SS.UserModel.ISheet         sheet1 = book.CreateSheet("Sheet1"); //添加一个sheet
            sheet1.IsPrintGridlines = true;                                       //打印时显示网格线
            sheet1.DisplayGridlines = true;                                       //查看时显示网格线
            IRow row = sheet1.CreateRow(0);

            row.CreateCell(0).SetCellValue(vMenu.MENUNAME);
            row.GetCell(0).CellStyle = getCellStyleTitle(book);

            IEnumerable <T_IPSCOL_COLLECT_TypeCountModel> typeModel;
            var list = T_IPSCOL_COLLECTCls.getModelCount(new T_IPSCOL_COLLECT_SW {
                TopORGNO = BYORGNO, DateBegin = TIMEBegin, DateEnd = TIMEEnd
            }, out typeModel);
            int typeCount = 0;//计算类别有多少列

            foreach (var v in typeModel)
            {
                typeCount++;
            }
            sheet1.SetColumnWidth(0, 30 * 256);
            sheet1.SetColumnWidth(1, 20 * 256);
            for (int i = 0; i < typeCount; i++)
            {
                sheet1.SetColumnWidth(i + 2, 20 * 256);
            }
            row = sheet1.CreateRow(1);
            if (PublicCls.OrgIsZhen(BYORGNO) == false)
            {
                row.CreateCell(0).SetCellValue("单位");
            }
            else
            {
                row.CreateCell(0).SetCellValue("姓名");
            }
            row.CreateCell(1).SetCellValue("总数");
            int indexType = 2;//从第二列开始

            foreach (var v in typeModel)
            {
                row.CreateCell(indexType).SetCellValue(v.typeName);
                indexType++;
            }
            for (int i = 0; i < typeCount + 2; i++)
            {
                row.GetCell(i).CellStyle = getCellStyleHead(book);
            }
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, typeCount + 1));
            int rowI = 0;           //数据行

            foreach (var v in list) //循环获取数据
            {
                row = sheet1.CreateRow(rowI + 2);
                if (string.IsNullOrEmpty(v.ORGName) == false)
                {
                    row.CreateCell(0).SetCellValue(v.ORGName);
                    row.GetCell(0).CellStyle = getCellStyleLeft(book);
                }
                else
                {
                    row.CreateCell(0).SetCellValue(v.HName);
                    row.GetCell(0).CellStyle = getCellStyleCenter(book);
                }
                row.CreateCell(1).SetCellValue(v.CollectCount);
                row.GetCell(1).CellStyle = getCellStyleCenter(book);
                int TypeI = 2;//类型开始列
                foreach (var vv in v.TypeCountModel)
                {
                    row.CreateCell(TypeI).SetCellValue(vv.typeCount);
                    row.GetCell(TypeI).CellStyle = getCellStyleCenter(book);
                    TypeI++;
                }
                rowI++;
            }

            // 写入到客户端
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            book.Write(ms);
            ms.Seek(0, SeekOrigin.Begin);
            string fileName = vMenu.MENUNAME + DateTime.Now.ToString("yyyy-MM-dd") + ".xls";

            return(File(ms, "application/vnd.ms-excel", fileName));
        }
Exemplo n.º 6
0
        /// <summary>
        /// 导出
        /// </summary>
        /// <returns></returns>
        public FileResult HUCountExportExcel()
        {
            var vMenu = T_SYS_MENUCls.getModel(new T_SYS_MENU_SW {
                MENUCODE = "004001", SYSFLAG = ConfigCls.getSystemFlag()
            });

            //vMenu.MENUNAME 页面/菜单名称
            NPOI.HSSF.UserModel.HSSFWorkbook book = new NPOI.HSSF.UserModel.HSSFWorkbook();
            //添加一个sheet
            NPOI.SS.UserModel.ISheet sheet1 = book.CreateSheet("Sheet1");
            sheet1.IsPrintGridlines = true; //打印时显示网格线
            sheet1.DisplayGridlines = true; //查看时显示网格线
            sheet1.SetColumnWidth(0, 50 * 256);
            sheet1.SetColumnWidth(1, 10 * 256);
            sheet1.SetColumnWidth(2, 10 * 256);
            sheet1.SetColumnWidth(3, 10 * 256);
            sheet1.SetColumnWidth(4, 10 * 256);
            sheet1.SetColumnWidth(5, 10 * 256);
            IRow row = sheet1.CreateRow(0);

            row.CreateCell(0).SetCellValue(vMenu.MENUNAME);
            row.GetCell(0).CellStyle = getCellStyleTitle(book);
            row = sheet1.CreateRow(1);
            row.CreateCell(0).SetCellValue("单位");
            row.CreateCell(1).SetCellValue("总数");
            row.CreateCell(2).SetCellValue("性别");
            row.CreateCell(4).SetCellValue("固/兼职");
            row.GetCell(0).CellStyle = getCellStyleHead(book);
            row.GetCell(1).CellStyle = getCellStyleHead(book);
            row.GetCell(2).CellStyle = getCellStyleHead(book);
            row.GetCell(4).CellStyle = getCellStyleHead(book);
            row = sheet1.CreateRow(2);
            row.CreateCell(2).SetCellValue("男");
            row.CreateCell(3).SetCellValue("女");
            row.CreateCell(4).SetCellValue("固职");
            row.CreateCell(5).SetCellValue("兼职");
            row.GetCell(2).CellStyle = getCellStyleHead(book);
            row.GetCell(3).CellStyle = getCellStyleHead(book);
            row.GetCell(4).CellStyle = getCellStyleHead(book);
            row.GetCell(5).CellStyle = getCellStyleHead(book);
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, 5));
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 1, 2, 3));
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 1, 4, 5));
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 2, 0, 0));
            sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 2, 1, 1));
            T_IPSFR_USER_SW sw = new T_IPSFR_USER_SW();

            sw.TopORGNO = Request.Params["TopORGNO"];
            var list = HUReportCls.getHUCountModel(sw);
            int rowI = 0;

            foreach (var item in list)
            {
                row = sheet1.CreateRow(rowI + 3);
                row.CreateCell(0).SetCellValue(item.ORGName);
                row.CreateCell(1).SetCellValue(item.HUCount);
                row.CreateCell(2).SetCellValue(item.Sex0Count);
                row.CreateCell(3).SetCellValue(item.Sex1Count);
                row.CreateCell(4).SetCellValue(item.Onstate0Count);
                row.CreateCell(5).SetCellValue(item.Onstate1Count);
                for (int i = 0; i < 6; i++)
                {
                    if (i == 0)
                    {
                        row.GetCell(0).CellStyle = getCellStyleLeft(book);
                    }
                    else
                    {
                        row.GetCell(i).CellStyle = getCellStyleCenter(book);
                    }
                }
                rowI++;
            }
            // 写入到客户端
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            book.Write(ms);
            ms.Seek(0, SeekOrigin.Begin);
            string fileName = vMenu.MENUNAME + DateTime.Now.ToString("yyyy-MM-dd") + ".xls";

            return(File(ms, "application/vnd.ms-excel", fileName));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 三维整合页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Total3DIndex()
        {
            var type = Request.Params["type"];

            if (type == "0")
            {
                pubViewBag("020003", "020003", "三维护林员");
            }
            else if (type == "1")
            {
                pubViewBag("012006", "012006", "应急处置");
            }
            else if (type == "2")
            {
                pubViewBag("018003", "018003", "三维首页");
            }
            else if (type == "3")
            {
                pubViewBag("017001", "017001", "公益林");
            }
            else if (type == "4")
            {
                pubViewBag("044001", "044001", "动物三维");
            }
            else if (type == "5")
            {
                pubViewBag("045001", "045001", "植物三维");
            }
            else if (type == "6")
            {
                pubViewBag("046001", "046001", "生物三维");
            }
            CookieModel cookieInfo1 = SystemCls.getCookieInfo();

            ViewBag.LAYERNAME = T_SYS_LAYERCls.getLayerNameStr(new T_SYS_LAYER_SW {
                USERID = cookieInfo1.UID
            });
            ViewBag.DEFAULTCH = T_SYS_LAYERCls.getLayerDEFAULTCHStr(new T_SYS_LAYER_SW {
                USERID = cookieInfo1.UID
            });
            ViewBag.LAYERID = T_SYS_LAYERCls.getLayerFireLAYERID(new T_SYS_LAYER_SW {
                USERID = cookieInfo1.UID
            });
            ViewBag.Fire = T_SYS_LAYERCls.getTreeFireQuery(new T_SYS_LAYER_SW {
                USERID = cookieInfo1.UID
            });
            ViewBag.AllNAME = T_SYS_LAYERCls.getLayerAllNAME();
            var xcenter = Request.Params["xcenter"];
            var ycenter = Request.Params["ycenter"];
            var scale   = Request.Params["scale"];

            if (string.IsNullOrEmpty(xcenter) == false && string.IsNullOrEmpty(ycenter) == false)
            {
                double[] arr = ClsPositionTrans.GpsTransform(double.Parse(ycenter), double.Parse(xcenter), "2");
                xcenter = arr[1].ToString();
                ycenter = arr[0].ToString();
            }
            if (string.IsNullOrEmpty(scale) == false)
            {
                if (Convert.ToDouble(scale) >= 2311162)
                {
                    scale = "571830";
                }
                else if (Convert.ToDouble(scale) >= 1155581 && Convert.ToDouble(scale) < 2311162)
                {
                    scale = "321000";
                }
                else if (Convert.ToDouble(scale) >= 557790 && Convert.ToDouble(scale) < 1155581)
                {
                    scale = "138440";
                }
                else if (Convert.ToDouble(scale) >= 288895 && Convert.ToDouble(scale) < 557790)
                {
                    scale = "65890";
                }
                else if (Convert.ToDouble(scale) >= 144447 && Convert.ToDouble(scale) < 288895)
                {
                    scale = "37210";
                }
                else if (Convert.ToDouble(scale) >= 72223 && Convert.ToDouble(scale) < 144447)
                {
                    scale = "12660";
                }
                else if (Convert.ToDouble(scale) >= 36111 && Convert.ToDouble(scale) < 72223)
                {
                    scale = "5981";
                }
                else if (Convert.ToDouble(scale) >= 18055 && Convert.ToDouble(scale) < 36111)
                {
                    scale = "3789";
                }
                else if (Convert.ToDouble(scale) >= 9027 && Convert.ToDouble(scale) < 18055)
                {
                    scale = "2390";
                }
                else if (Convert.ToDouble(scale) >= 4513 && Convert.ToDouble(scale) < 9027)
                {
                    scale = "1096";
                }
                else if (Convert.ToDouble(scale) >= 2256 && Convert.ToDouble(scale) < 4513)
                {
                    scale = "635";
                }
                else if (Convert.ToDouble(scale) < 1130)
                {
                    scale = "300";
                }
            }
            //从数据库里获取三维图层树
            CookieModel cookieInfo = SystemCls.getCookieInfo();
            string      result     = T_SYS_LAYERCls.getTree(new T_SYS_LAYER_SW {
                USERID = cookieInfo.UID
            });

            ViewBag.TreeData = result;
            ViewBag.xcenter  = xcenter;
            ViewBag.ycenter  = ycenter;
            ViewBag.scale    = scale;
            string strmenue = ViewBag.getPageMenuStr;

            ViewBag.getPageMenuStr = strmenue.Replace("window.location.href='/Home/Total3DIndex?type=0'", "showHlyFun()").Replace("window.location.href='/Home/Total3DIndex?type=1'", "showYjczFun()").Replace("window.location.href='/Home/Total3DIndex?type=2';", "showSyzrFun()").Replace("window.location.href='/Home/Total3DIndex?type=3';", "showGylFun()").Replace("window.location.href='/Home/Total3DIndex?type=4';", "showYsdwFun()").Replace("window.location.href='/Home/Total3DIndex?type=5';", "showYszwFun()").Replace("window.location.href='/Home/Total3DIndex?type=6';", "showYhswFun()");
            var reportMenuList = new List <MenuTypeModel>();//数据上报菜单
            var reportList     = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                MENUCODE = "002", SYSFLAG = ConfigCls.getSystemFlag()
            }).FirstOrDefault();                                                                                                                            //数据上报

            if (reportList != null)
            {
                foreach (var item in reportList.subMenuModel)
                {
                    var reportmodel = new MenuTypeModel();
                    reportmodel.DICTTYPEID = "5";
                    reportmodel.LICLASS    = item.LICLASS;
                    reportmodel.MENUNAME   = item.MENUNAME;
                    reportmodel.DICTVALUE  = item.MENUURL.Substring(item.MENUURL.Length - 1, 1);
                    reportMenuList.Add(reportmodel);
                }
            }
            ViewBag.reportlist = reportMenuList;//数据上报项目获取
            var collectList = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                MENUCODE = "003", SYSFLAG = ConfigCls.getSystemFlag()
            }).FirstOrDefault();                              //数据采集
            var collectMenuList = new List <MenuTypeModel>(); //数据采集

            if (collectList != null)
            {
                foreach (var item in collectList.subMenuModel)
                {
                    var collectmodel = new MenuTypeModel();
                    collectmodel.DICTTYPEID = "4";
                    collectmodel.LICLASS    = item.LICLASS;
                    collectmodel.MENUNAME   = item.MENUNAME;
                    collectmodel.DICTVALUE  = item.MENUURL.Substring(item.MENUURL.Length - 1, 1);
                    collectMenuList.Add(collectmodel);
                }
            }
            ViewBag.collectList = collectMenuList;//数据采集项目获取
            //var modelfirelist = GetCUrFireList();//当前火情
            return(View());
        }
Exemplo n.º 8
0
        /// <summary>
        /// 二维整合页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Total2DIndex()
        {
            pubViewBag("030", "030", "二维护林员");
            var CenterX = Request.Params["CenterX"];
            var CenterY = Request.Params["CenterY"];
            var CenterZ = Request.Params["CenterZ"];

            if (string.IsNullOrEmpty(CenterX) == false && string.IsNullOrEmpty(CenterY) == false)
            {
                double[] arr = ClsPositionTrans.GpsTransform(double.Parse(CenterY), double.Parse(CenterX), "1");
                CenterX = arr[1].ToString();
                CenterY = arr[0].ToString();
            }
            else
            {
                CenterX = ConfigCls.getConfigValue("Longitude");
                CenterY = ConfigCls.getConfigValue("Latitude");
            }
            if (string.IsNullOrEmpty(CenterZ) == false)
            {
                if (Convert.ToDouble(CenterZ) >= 571000)
                {
                    CenterZ = "8";
                }
                else if (Convert.ToDouble(CenterZ) >= 321000 && Convert.ToDouble(CenterZ) < 571000)
                {
                    CenterZ = "9";
                }
                else if (Convert.ToDouble(CenterZ) >= 138000 && Convert.ToDouble(CenterZ) < 321000)
                {
                    CenterZ = "10";
                }
                else if (Convert.ToDouble(CenterZ) >= 65000 && Convert.ToDouble(CenterZ) < 138000)
                {
                    CenterZ = "11";
                }
                else if (Convert.ToDouble(CenterZ) >= 37000 && Convert.ToDouble(CenterZ) < 65000)
                {
                    CenterZ = "12";
                }
                else if (Convert.ToDouble(CenterZ) >= 12600 && Convert.ToDouble(CenterZ) < 37000)
                {
                    CenterZ = "13";
                }
                else if (Convert.ToDouble(CenterZ) >= 5980 && Convert.ToDouble(CenterZ) < 12600)
                {
                    CenterZ = "14";
                }
                else if (Convert.ToDouble(CenterZ) >= 3700 && Convert.ToDouble(CenterZ) < 5980)
                {
                    CenterZ = "15";
                }
                else if (Convert.ToDouble(CenterZ) >= 2390 && Convert.ToDouble(CenterZ) < 3700)
                {
                    CenterZ = "16";
                }
                else if (Convert.ToDouble(CenterZ) >= 1096 && Convert.ToDouble(CenterZ) < 2390)
                {
                    CenterZ = "17";
                }
                else if (Convert.ToDouble(CenterZ) >= 635 && Convert.ToDouble(CenterZ) < 1096)
                {
                    CenterZ = "18";
                }
                else if (Convert.ToDouble(CenterZ) < 635)
                {
                    CenterZ = "19";
                }
            }
            else
            {
                CenterZ = "10";
            }
            ViewBag.CenterX = CenterX;
            ViewBag.CenterY = CenterY;
            ViewBag.CenterZ = CenterZ;
            ViewBag.rights  = T_SYSSEC_RIGHTCls.getRightStrByUID(new T_SYSSEC_IPSUSER_SW {
                USERID = SystemCls.getUserID()
            });
            return(View());
        }
Exemplo n.º 9
0
        /// <summary>
        /// 菜单
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            pubViewBag("020002", "020002", "二维护林员");
            var CenterX = Request.Params["CenterX"];
            var CenterY = Request.Params["CenterY"];
            var CenterZ = Request.Params["CenterZ"];

            if (string.IsNullOrEmpty(CenterX) == false && string.IsNullOrEmpty(CenterY) == false)
            {
                double[] arr = ClsPositionTrans.GpsTransform(double.Parse(CenterY), double.Parse(CenterX), "1");
                CenterX = arr[1].ToString();
                CenterY = arr[0].ToString();
            }
            else
            {
                CenterX = ConfigCls.getConfigValue("Longitude");
                CenterY = ConfigCls.getConfigValue("Latitude");
            }
            if (string.IsNullOrEmpty(CenterZ) == false)
            {
                if (Convert.ToDouble(CenterZ) >= 571000)
                {
                    CenterZ = "8";
                }
                else if (Convert.ToDouble(CenterZ) >= 321000 && Convert.ToDouble(CenterZ) < 571000)
                {
                    CenterZ = "9";
                }
                else if (Convert.ToDouble(CenterZ) >= 138000 && Convert.ToDouble(CenterZ) < 321000)
                {
                    CenterZ = "10";
                }
                else if (Convert.ToDouble(CenterZ) >= 65000 && Convert.ToDouble(CenterZ) < 138000)
                {
                    CenterZ = "11";
                }
                else if (Convert.ToDouble(CenterZ) >= 37000 && Convert.ToDouble(CenterZ) < 65000)
                {
                    CenterZ = "12";
                }
                else if (Convert.ToDouble(CenterZ) >= 12600 && Convert.ToDouble(CenterZ) < 37000)
                {
                    CenterZ = "13";
                }
                else if (Convert.ToDouble(CenterZ) >= 5980 && Convert.ToDouble(CenterZ) < 12600)
                {
                    CenterZ = "14";
                }
                else if (Convert.ToDouble(CenterZ) >= 3700 && Convert.ToDouble(CenterZ) < 5980)
                {
                    CenterZ = "15";
                }
                else if (Convert.ToDouble(CenterZ) >= 2390 && Convert.ToDouble(CenterZ) < 3700)
                {
                    CenterZ = "16";
                }
                else if (Convert.ToDouble(CenterZ) >= 1096 && Convert.ToDouble(CenterZ) < 2390)
                {
                    CenterZ = "17";
                }
                else if (Convert.ToDouble(CenterZ) >= 635 && Convert.ToDouble(CenterZ) < 1096)
                {
                    CenterZ = "18";
                }
                else if (Convert.ToDouble(CenterZ) < 635)
                {
                    CenterZ = "19";
                }
            }
            else
            {
                CenterZ = "10";
            }
            ViewBag.CenterX = CenterX;
            ViewBag.CenterY = CenterY;
            ViewBag.CenterZ = CenterZ;
            ViewBag.rights  = T_SYSSEC_RIGHTCls.getRightStrByUID(new T_SYSSEC_IPSUSER_SW {
                USERID = SystemCls.getUserID()
            });
            string method = Request.Params["Method"];
            string str    = ViewBag.getPageMenuStr;

            ViewBag.getPageMenuStr = str.Replace("window.location.href='/Home/Index?Method=report&TID=1';", "getReport(&quot;1&quot;,&quot;0&quot;,&quot;火情&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=2';", "getReport(&quot;2&quot;,&quot;0&quot;,&quot;病虫害&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=3';", "getReport(&quot;3&quot;,&quot;0&quot;,&quot;盗砍盗伐&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=4';", "getReport(&quot;4&quot;,&quot;0&quot;,&quot;安全隐患&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=1';", "getCollect(&quot;1&quot;,&quot;0&quot;,&quot;建筑物&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=2';", "getCollect(&quot;2&quot;,&quot;0&quot;,&quot;消防设施&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=3';", "getCollect(&quot;3&quot;,&quot;0&quot;,&quot;道路&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=4';", "getCollect(&quot;4&quot;,&quot;0&quot;,&quot;可燃物载量&quot;)")
                                     .Replace("window.location.href='/Home/Index';", "(getLonLat(&quot;&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=dm';", "(GetDmFun())")
                                     .Replace("window.location.href='/Home/Index?Method=hot';", "(getHot(&quot;0&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=alarm';", "(getAlarm(&quot;0&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=dl';", "(GetElecFun())");

            ViewBag.getPageMenuStr = ViewBag.getPageMenuStr;
            switch (method)
            {
            case "alarm":
                ViewBag.loadFunc = "getAlarm(\"0\")";    //一键报警
                break;

            case "hot":
                ViewBag.loadFunc = "getHot(\"0\")";    //热点
                break;

            case "report":    //数据上报
                var reportsw = new T_SYS_DICTSW();
                reportsw.DICTTYPEID = "5";
                reportsw.DICTVALUE  = Request.Params["TID"];
                var reportmodel = T_SYS_DICTCls.getModel(reportsw);
                ViewBag.loadFunc = "getReport(\"" + Request.Params["TID"] + "\",\"0\",\"" + reportmodel.DICTNAME + "\")";    //1 火情 2 病虫害 3 盗砍盗伐  //第一个参数是数据类型 第二个参数是处理状态
                break;

            case "collect":    //数据采集
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "4";
                sw.DICTVALUE  = Request.Params["TID"];
                var model = T_SYS_DICTCls.getModel(sw);
                ViewBag.loadFunc = "getCollect(\"" + Request.Params["TID"] + "\",\"0\",\"" + model.DICTNAME + "\")";    //第一个参数是数据类型 第二个参数是处理状态 第三个参数名字
                break;

            default:
                ViewBag.loadFunc = "getLonLat(\"\")";
                break;
            }
            string TID = Request.Params["TID"];

            if (method == "report")//上报
            {
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "5";
                sw.DICTVALUE  = TID;
                var model = T_SYS_DICTCls.getModel(sw);
                if (TID.Length == 1)
                {
                    pubViewBag("00200" + TID, "00200" + TID, model.DICTNAME);
                }
                else if (TID.Length == 2)
                {
                    pubViewBag("0020" + TID, "0020" + TID, model.DICTNAME);
                }
                else
                {
                    pubViewBag("002" + TID, "002" + TID, model.DICTNAME);
                }
            }
            else if (method == "collect")//采集
            {
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "4";
                sw.DICTVALUE  = TID;
                var model = T_SYS_DICTCls.getModel(sw);
                if (TID.Length == 1)
                {
                    pubViewBag("00300" + TID, "00300" + TID, model.DICTNAME);
                }
                else if (TID.Length == 2)
                {
                    pubViewBag("0030" + TID, "0030" + TID, model.DICTNAME);
                }
                else
                {
                    pubViewBag("003" + TID, "003" + TID, model.DICTNAME);
                }
            }
            else if (method == "dm")
            {
                pubViewBag("001002", "001002", "点名管理");
            }
            else if (method == "dl")
            {
                pubViewBag("001005", "001005", "电量查询");
            }
            else if (method == "hot")
            {
                pubViewBag("001003", "001003", "热点追踪");
            }
            else if (method == "alarm")
            {
                pubViewBag("001004", "001004", "报警管理");
            }
            else
            {
                pubViewBag("001001", "001001", "巡查监控");
            }
            ViewBag.Method = Request.Params["Method"];       //类别方法 用于GIS页面
            ViewBag.TID    = Request.Params["TID"];          //类别ID
            return(View());
        }
Exemplo n.º 10
0
        public string getPageLeftMenu(string PageCode)
        {
            StringBuilder sb     = new StringBuilder();
            var           result = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                UID = SystemCls.getUserID(), SYSFLAG = ConfigCls.getSystemFlag()
            });
            var m = result.Where(p => p.MENUCODE == PageCode.Substring(0, 3)).FirstOrDefault();//获取该页面对应的菜单信息

            sb.AppendFormat("<ul class=\"page-menu\">\r\n");
            int indexI  = -1;
            int indexII = 0;

            if (m != null)
            {
                string tmp = m.MENULINKMODE;
                if (string.IsNullOrEmpty(tmp))
                {
                    tmp = m.MENUCODE;
                }
                string[] arr = tmp.Split(',');//循环数组,用于判断如果是多个模块组合成左侧菜单
                for (int i = 0; i < arr.Length; i++)
                {
                    var      mModel  = result.Where(p => p.MENUCODE == arr[i]).FirstOrDefault();
                    string[] arrHQJC = new string[55];
                    if (arr[i] == "040")//火情监控统计个数
                    {
                        var    list  = new List <JC_FIRE_Model>();
                        string orgno = "";
                        bool   bo    = PublicCls.OrgIsShi(SystemCls.getCurUserOrgNo());//市机构
                        if (!bo)
                        {
                            bool bc = PublicCls.OrgIsZhen(SystemCls.getCurUserOrgNo());//乡镇机构
                            if (bc)
                            {
                                orgno = SystemCls.getCurUserOrgNo();//
                            }
                            else
                            {
                                orgno = SystemCls.getCurUserOrgNo().Substring(0, 6);//
                            }
                        }
                        if (string.IsNullOrEmpty(orgno))
                        {
                            list = JC_FIRECls.GetListModel(new JC_FIRE_SW {
                            }).Where(p => p.ISOUTFIRE.Trim() != "1" && p.MANSTATE != "19" && p.MANSTATE != "18").ToList();                                                //不筛选出火已灭的记录并且已经上报(非火情)19为市(州)已经上报  // && p.MANSTATE != "19"
                        }
                        else
                        {
                            list = JC_FIRECls.GetListModel(new JC_FIRE_SW {
                            }).Where(p => p.BYORGNO.StartsWith(orgno.ToString()) && p.ISOUTFIRE.Trim() != "1" && p.MANSTATE != "19" && p.MANSTATE != "18").ToList();                                                //不筛选出火已灭的记录
                        }


                        arrHQJC[2] = list.Where(p => p.FIREFROM == "2").Count().ToString();
                        arrHQJC[5] = list.Where(p => p.FIREFROM == "5").Count().ToString();
                        arrHQJC[4] = list.Where(p => p.FIREFROM == "4").Count().ToString();
                        arrHQJC[6] = list.Where(p => p.FIREFROM == "6").Count().ToString();
                        arrHQJC[3] = list.Where(p => p.FIREFROM == "3").Count().ToString();
                    }
                    if (mModel != null)
                    {
                        indexI++;
                        sb.AppendFormat("<li><span><h1><span>{0}</span></h1></span>\r\n", mModel.MENUNAME);
                        sb.AppendFormat("<ul>\r\n");
                        foreach (var sv in mModel.subMenuModel)
                        {
                            var menu = false;
                            var num  = "";
                            if (arr[i] == "040")//火情监控
                            {
                                if (sv.MENUCODE == "040002")
                                {
                                    menu = true;
                                    num  = arrHQJC[2];
                                }
                                if (sv.MENUCODE == "040003")
                                {
                                    menu = true;
                                    num  = arrHQJC[3];
                                }
                                if (sv.MENUCODE == "040004")
                                {
                                    menu = true;
                                    num  = arrHQJC[4];
                                }
                                if (sv.MENUCODE == "040005")
                                {
                                    menu = true;
                                    num  = arrHQJC[5];
                                }
                                if (sv.MENUCODE == "040006")
                                {
                                    menu = true;
                                    num  = arrHQJC[6];
                                }
                            }
                            if (sv.MENUCODE == "009005")
                            {
                                menu = true;
                                num  = E_RECEIVE_Cls.getCount();
                            }
                            if (sv.MENUCODE == "011002")
                            {
                                menu = true;
                                num  = DC_ARMYCls.getCount();
                            }
                            if (sv.MENUCODE == "011003")
                            {
                                menu = true;
                                num  = DC_RESOURCE_NEWCls.getCount();
                            }
                            if (sv.MENUCODE == "011005")
                            {
                                menu = true;
                                num  = DC_EQUIP_NEWCls.getCount();
                            }
                            if (sv.MENUCODE == "011006")
                            {
                                menu = true;
                                num  = JC_FIRECls.getCount();
                            }
                            if (sv.MENUCODE == "011008")
                            {
                                menu = true;
                                num  = DC_REPOSITORYCls.getCount();
                            }
                            if (sv.MENUCODE == "011009")
                            {
                                menu = true;
                                num  = DC_CARCls.getCount();
                            }
                            if (sv.MENUCODE == "011011")
                            {
                                menu = true;
                                num  = TD_MOUNTAINCls.getCount();
                            }
                            if (sv.MENUCODE == "042001")
                            {
                                menu = true;
                                num  = WILD_ANIMALDISTRIBUTECls.getCount();
                            }
                            if (sv.MENUCODE == "043001")
                            {
                                menu = true;
                                num  = WILD_BOTANYDISTRIBUTECls.getCount();
                            }
                            if (sv.MENUCODE == "016001")
                            {
                                menu = true;
                                num  = DC_UTILITY_CAMPCls.getCount();
                            }
                            if (sv.MENUCODE == "016002")
                            {
                                menu = true;
                                num  = DC_UTILITY_OVERWATCHCls.getCount();
                            }
                            if (sv.MENUCODE == "016003")
                            {
                                menu = true;
                                num  = DC_UTILITY_ISOLATIONSTRIPCls.getCount();
                            }
                            if (sv.MENUCODE == "016004")
                            {
                                menu = true;
                                num  = DC_UTILITY_PROPAGANDASTELECls.getCount();
                            }
                            if (sv.MENUCODE == "016005")
                            {
                                menu = true;
                                num  = DC_UTILITY_RELAYCls.getCount();
                            }
                            if (sv.MENUCODE == "016006")
                            {
                                menu = true;
                                num  = DC_UTILITY_MONITORINGSTATIONCls.getCount();
                            }
                            if (sv.MENUCODE == "016007")
                            {
                                menu = true;
                                num  = DC_UTILITY_FIRECHANNELCls.getCount();
                            }
                            if (sv.MENUCODE == "016008")
                            {
                                menu = true;
                                num  = DC_UTILITY_FACTORCOLLECTSTATIONCls.getCount();
                            }
                            if (PageCode == sv.MENUCODE)
                            {
                                if (menu == true)
                                {
                                    sb.AppendFormat("<li class=\"title liCur\" onclick=\"window.location.href='{0}';\"><label class=\" {2}\"></label>{1}<font color =\"red\">[{3}]</font></li>\r\n", sv.MENUURL, sv.MENUNAME, sv.LICLASS, num);
                                }
                                else
                                {
                                    sb.AppendFormat("<li class=\"title liCur\" onclick=\"window.location.href='{0}';\"><label class=\" {2}\"></label>{1}</li>\r\n", sv.MENUURL, sv.MENUNAME, sv.LICLASS);
                                }
                                indexII = indexI;
                            }
                            else
                            {
                                if (menu == true)
                                {
                                    sb.AppendFormat("<li class=\"title {2}\" onclick=\"window.location.href='{0}';\"><label class=\" {2}\"></label>{1}<font color =\"red\">[{3}]</font></li>\r\n", sv.MENUURL, sv.MENUNAME, sv.LICLASS, num);
                                }
                                else
                                {
                                    sb.AppendFormat("<li class=\"title {2}\" onclick=\"window.location.href='{0}';\"><label class=\" {2}\"></label>{1}</li>\r\n", sv.MENUURL, sv.MENUNAME, sv.LICLASS);
                                }
                            }
                        }
                        sb.AppendFormat("</ul>\r\n");
                        sb.AppendFormat("</li>\r\n");
                    }
                }
            }
            sb.AppendFormat("</ul>\r\n");
            string str = "";

            str += "        <script type=\"text/javascript\">\r\n";
            str += "            function menuEvent() {";
            str += "                var $parent_li, $ul, $span;\r\n";
            str += "                $(\".page-menu li>span\").click(function () {\r\n";
            str += "                    $span = $(this);\r\n";
            str += "                    $parent_li = $span.parent();\r\n";
            str += "                    $parent_li.siblings().children(\"ul\").slideUp();\r\n";
            str += "                    $ul = $span.next(\"ul\");\r\n";
            str += "                    $ul.slideToggle();\r\n";
            str += "                });\r\n";
            str += "                $(\".page-menu>li:eq(" + indexII + ")>span\").click();\r\n";
            str += "            }\r\n";
            str += "            $(function () {\r\n";
            str += "                menuEvent();\r\n";
            str += "            })\r\n";
            str += "        </script>\r\n";
            return(sb.ToString() + str);//008,009,010,011,
        }
Exemplo n.º 11
0
        public string getHeadMenuStr1(string menuCodeList)
        {
            //string str=SystemCls.getT_SYS_DEFINEMENU(new T_SYS_MENU_SW { UID =SystemCls.getUserID(), SYSFLAG = ConfigCls.getSystemFlag() });;
            string loadFunc = Request.Params["loadFunc"]; //调用方法
            string Method   = Request.Params["Method"];   //调用方法
            string TID      = Request.Params["TID"];      //调用方法
            string PageCode = Request.Params["PageCode"]; //调用方法
            var    result   = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                UID = SystemCls.getUserID(), SYSFLAG = ConfigCls.getSystemFlag()
            });
            StringBuilder sb     = new StringBuilder();
            bool          blnMp3 = false;

            sb.AppendFormat("<ul class='nav ace-nav'>");
            sb.AppendFormat("<li class='light-blue'>");
            sb.AppendFormat("<a href='{0}' class='dropdown-toggle'>", ConfigCls.getLoginRedirectUrl());
            sb.AppendFormat("<i class='{0}' style='width:25px; {1}'></i>", "fa fa-wrench", "color:#ff0000;");
            sb.AppendFormat("{0}", "返回首页");
            sb.AppendFormat("</a>");
            sb.AppendFormat("</li>");
            foreach (var v in result)
            {
                if (menuCodeList.Contains("," + v.MENUCODE + ","))
                {
                    sb.AppendFormat("<li class='light-blue'>");
                    sb.AppendFormat("<a data-toggle='dropdown' href='#' class='dropdown-toggle'>");
                    sb.AppendFormat("<i class='{0}' style='width:25px; {1}'></i>", v.MENUICO, v.LICLASS);
                    sb.AppendFormat("{0}", v.MENUNAME);
                    sb.AppendFormat("<span class='badge badge-important'>{0}</span>", v.showCount);
                    sb.AppendFormat("<i class='icon-caret-down'></i>");
                    sb.AppendFormat("</a>");
                    sb.AppendFormat("<ul class='user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close'>");
                    var subResult = v.subMenuModel;
                    foreach (var sv in subResult)
                    {
                        sb.AppendFormat("<li>");
                        string codelist = ",001,002,003,";
                        //string a = sv.MENUCODE.Substring(0, 3);
                        if (string.IsNullOrEmpty(loadFunc) == false && codelist.Contains("," + sv.MENUCODE.Substring(0, 3) + ",") && codelist.Contains("," + PageCode.Substring(0, 3) + ","))
                        {
                            string func = "";
                            if (sv.MENUCODE == "001002")
                            {
                                func = "GetDmFun()";//点名管理
                            }
                            else if (sv.MENUCODE == "001004")
                            {
                                func = "getAlarm(\"0\")";//报警管理
                            }
                            else if (sv.MENUCODE == "001005")
                            {
                                func = "GetElecFun()";//电量管理
                            }
                            else if (sv.MENUCODE == "001003")
                            {
                                func = "getHot(\"0\")";                    //热点管理
                            }
                            else if (sv.MENUCODE.Substring(0, 3) == "002") //上报
                            {
                                func = "getReport(\"" + sv.TID + "\",\"0\",\"" + sv.MENUNAME + "\")";
                            }
                            else if (sv.MENUCODE.Substring(0, 3) == "003")//采集
                            {
                                func = "getCollect(\"" + sv.TID + "\",\"0\",\"" + sv.MENUNAME + "\")";
                            }
                            else
                            {
                                func = "getLonLat(\"\")";
                            }

                            sb.AppendFormat("<a href='#' onclick='({0})'>", func);
                            sb.AppendFormat("<i class='{0}' style='width:25px; {1}'></i>", sv.MENUICO, sv.LICLASS);
                            sb.AppendFormat("{0}", sv.MENUNAME);
                            if (string.IsNullOrEmpty(sv.showCount) == false)
                            {
                                sb.AppendFormat("<span class='badge badge-important'>{0}</span>", sv.showCount);
                            }
                            sb.AppendFormat("</a>");
                        }
                        else
                        {
                            sb.AppendFormat("<a href='{0}'>", sv.MENUURL);
                            sb.AppendFormat("<i class='{0}' style='width:25px; {1}'></i>", sv.MENUICO, sv.LICLASS);
                            sb.AppendFormat("{0}", sv.MENUNAME);
                            if (string.IsNullOrEmpty(sv.showCount) == false)
                            {
                                sb.AppendFormat("<span class='badge badge-important'>{0}</span>", sv.showCount);
                            }
                            sb.AppendFormat("</a>");
                        }
                        sb.AppendFormat("</li>");
                        if (string.IsNullOrEmpty(sv.showCount) == false)
                        {
                            blnMp3 = true;
                        }
                    }
                    sb.AppendFormat("      <li class='divider'></li>");
                    sb.AppendFormat("</ul>");
                    sb.AppendFormat("</li>");
                }
            }
            sb.AppendFormat("<li class='light-blue'>");
            sb.AppendFormat("<a data-toggle='dropdown' href='#' class='dropdown-toggle'>");
            sb.AppendFormat("      <img class='nav-user-photo' src='../Content/themes/assets/avatars/user.jpg' alt='Jason's Photo' />");
            sb.AppendFormat("      <span class='user-info'>");
            sb.AppendFormat("          <small>欢迎光临,</small>");
            CookieModel cookieInfo = SystemCls.getCookieInfo();

            sb.AppendFormat("          <font color='red'>{0}</font>", cookieInfo.trueName);
            sb.AppendFormat("      </span>");
            sb.AppendFormat("<i class='icon-caret-down'></i>");
            sb.AppendFormat("</a>");
            sb.AppendFormat("<ul class='user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close'>");
            foreach (var v in result)
            {
                string codeStr = ",006,007,";
                if (codeStr.Contains("," + v.MENUCODE + ","))
                {
                    sb.AppendFormat("      <li class='divider'></li>");
                    var subResult = v.subMenuModel;
                    foreach (var sv in subResult)
                    {
                        sb.AppendFormat("<li>");
                        sb.AppendFormat("<a href='{0}'>", sv.MENUURL);
                        sb.AppendFormat("<i class='{0}' style='width:25px; {1}'></i>", sv.MENUICO, sv.LICLASS);
                        sb.AppendFormat("{0}", sv.MENUNAME);
                        sb.AppendFormat("<span class='badge badge-important'>{0}</span>", sv.showCount);
                        sb.AppendFormat("</a>");
                        sb.AppendFormat("</li>");
                    }
                }
            }
            sb.AppendFormat("      <li class='divider'></li>");
            sb.AppendFormat("      <li>");
            sb.AppendFormat("          <a href='/System/LoginOut'>");
            sb.AppendFormat("              <i class='fa fa-power-off'></i>");
            sb.AppendFormat("              退出");
            sb.AppendFormat("          </a>");
            sb.AppendFormat("      </li>");
            sb.AppendFormat("</ul>");
            sb.AppendFormat("</li>");
            sb.AppendFormat("</ul>");
            if (blnMp3 == true)
            {
                sb.AppendFormat("    <audio autoplay='autoplay'>        <source src='/Content/albram.mp3' type='audio/mpeg'>    </audio>");
            }
            string str = sb.ToString();

            str = str.Replace("<i class='", "<i class='fa-1x ");
            return(str);
        }
Exemplo n.º 12
0
        public string getPageMenuStr(string PageCode)
        {
            //获取有权限的所有菜单
            List <SystemMenu_Model> result = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                UID = SystemCls.getUserID(), SYSFLAG = ConfigCls.getSystemFlag()
            }).ToList();
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("<dl>");
            List <SystemMenu_Model> topMenuResult = result.Where(p => p.ISTOPMENU == "1" && p.MENUCODE.Length == 3).ToList();//获取顶部菜单

            foreach (var v in topMenuResult)
            {
                string liClass = v.LICLASS;//判断样式
                if (string.IsNullOrEmpty(liClass))
                {
                    if (v.MENULINKMODE.Contains(PageCode.Substring(0, 3)))
                    {
                        liClass = " LiCur";
                    }
                    else
                    {
                        liClass = " LiDefault";
                    }
                }
                //判断跳转地址
                string   url = "";
                string[] arr = v.MENULINKMODE.Split(',');
                for (int kkk = 0; kkk < arr.Length; kkk++)
                {
                    foreach (var linkV in result.Where(p => p.MENUCODE == arr[kkk]))
                    {
                        foreach (var vv in linkV.subMenuModel)
                        {
                            if (string.IsNullOrEmpty(url))
                            {
                                if (string.IsNullOrEmpty(vv.MENUURL) == false)
                                {
                                    url = vv.MENUURL;
                                }
                            }
                        }
                    }
                }
                if (v.MENUDROWMTHOD == "1")//有下拉框
                {
                    sb.AppendFormat("<dd id='menuTop_{2}' class='{0}'>{1}", liClass, v.MENUNAME, v.MENUCODE);
                }
                else
                {
                    if (v.MENUOPENMETHOD == "1")//弹出
                    {
                        sb.AppendFormat("<dd  id='menuTop_{3}' class='{0}' onclick=\"window.open('{1}');\">{2}", liClass, url, v.MENUNAME, v.MENUCODE);
                    }
                    else //本页面跳转
                    {
                        sb.AppendFormat("<dd id='menuTop_{3}' class='{0}' ondblclick=\"window.open('{1}');\"  onclick=\"window.location.href='{1}';\">{2}", liClass, url, v.MENUNAME, v.MENUCODE);
                    }
                }
                if (v.MENUDROWMTHOD == "1")
                {
                    sb.AppendFormat(" <ul>");
                    foreach (var vv in v.subMenuModel)
                    {
                        sb.AppendFormat(" <li ondblclick=\"window.open('{0}');\" onclick=\"window.location.href='{0}';\"><a>{1}</a></li>", vv.MENUURL, vv.MENUNAME);
                    }
                    sb.AppendFormat(" </ul>");
                }
                sb.AppendFormat("</dd>");
            }
            sb.AppendFormat("</dl>");
            return(sb.ToString());
        }
Exemplo n.º 13
0
        /// <summary>
        /// 转换为护林员巡检线和责任区
        /// </summary>
        /// <returns></returns>
        public JsonResult ConvertHlyLineArea()
        {
            Message msg   = new Message(false, "转化失败!", "");
            string  cid   = Request.Params["cid"];   //采集id
            string  hid   = Request.Params["hid"];   //护林员id
            string  htype = Request.Params["htype"]; //护林员转换类型 0 表是线 1 表示面
            var     sw    = new T_IPSCOL_COLLECT_SW();

            sw.COLLECTID = cid;
            var list = T_IPSCOL_COLLECTCls.getDetailModelList(sw);

            if (list.Any())
            {
                string pointstr = string.Empty;
                int    j        = 0;
                string str      = string.Empty;
                foreach (var item in list)
                {
                    if (htype == "1")//面 特殊处理
                    {
                        if (j == 0)
                        {
                            str = item.LONGITUDE + "," + item.LATITUDE + "|";
                        }
                    }
                    //pointstr += item.ORILONGITUDE + "," + item.ORILATITUDE + ",,|";
                    pointstr += item.LONGITUDE + "," + item.LATITUDE + "|";
                    j++;
                }
                pointstr += str;
                var m = new T_IPSFR_ROUTERAIL_Model();//巡检线和责任区
                m.HID             = hid;
                m.longitLatitList = pointstr;
                m.longitLatitList = m.longitLatitList.Replace("|", ", , |");
                m.longitLatitList = m.longitLatitList + ";";
                m.opMethod        = "AddBatch";
                m.ROADTYPE        = htype;
                var ms = T_IPSFR_ROUTERAILCls.Manager(m);
                if (ms.Success)
                {
                    string jd      = "";
                    string wd      = "";
                    string line    = "";
                    string polygon = "";
                    //入三维空间库
                    #region 责任线
                    if (htype == "0")
                    {
                        m.longitLatitList = m.longitLatitList.Substring(0, m.longitLatitList.LastIndexOf(";"));
                        m.longitLatitList = m.longitLatitList.Replace(",,", "");
                        if (!string.IsNullOrEmpty(m.longitLatitList))
                        {
                            var result = T_IPSFR_USERCls.getListModel(new T_IPSFR_USER_SW {
                                HID = hid
                            }).FirstOrDefault();               //获取护林员信息
                            var m1 = new TD_DUTYROUTE_Model(); //三维责任路线模型
                            m1.opMethod  = m.opMethod;
                            m1.NAME      = result.HNAME;
                            m1.OBJECTID  = result.HID;
                            m1.ORGNAME   = result.ORGNAME;
                            m1.TELEPHONE = result.PHONE;
                            string[] arr = m.longitLatitList.Split('|');
                            for (int i = 0; i < arr.Length; i++)
                            {
                                if (!string.IsNullOrEmpty(arr[i]))
                                {
                                    string[] brr = arr[i].Split(',');
                                    double[] drr = ClsPositionTrans.GpsTransform(double.Parse(brr[1]), double.Parse(brr[0]), ConfigCls.getSDELonLatTransform());//坐标系转换
                                    wd = drr[0].ToString();
                                    jd = drr[1].ToString();
                                }
                                if (i == arr.Length - 1)//最后一条记录
                                {
                                    line += jd + " " + wd;
                                }
                                else
                                {
                                    line += jd + " " + wd + ",";
                                }
                            }
                            #region 中心点获取
                            if (arr.Length % 2 == 0)
                            {
                                string[] crr = arr[arr.Length / 2].Split(',');
                                double[] drr = ClsPositionTrans.GpsTransform(double.Parse(crr[1]), double.Parse(crr[0]), ConfigCls.getSDELonLatTransform());
                                m1.DISPLAY_X = drr[1].ToString();
                                m1.DISPLAY_Y = drr[0].ToString();
                            }
                            else
                            {
                                string[] crr = arr[(arr.Length + 1) / 2].Split(',');
                                double[] drr = ClsPositionTrans.GpsTransform(double.Parse(crr[1]), double.Parse(crr[0]), ConfigCls.getSDELonLatTransform());//中心点偏移
                                m1.DISPLAY_X = drr[1].ToString();
                                m1.DISPLAY_Y = drr[0].ToString();
                            }
                            #endregion
                            m1.Shape = "geometry::STGeomFromText('LINESTRING(" + line + ")',4326).MakeValid()";
                            DC_DUTYROUTECls.Manager(m1);
                        }
                    }
                    #endregion

                    #region 责任面
                    else
                    {
                        m.longitLatitList = m.longitLatitList.Substring(0, m.longitLatitList.LastIndexOf(";"));
                        m.longitLatitList = m.longitLatitList.Replace(",,", "");
                        if (!string.IsNullOrEmpty(m.longitLatitList))
                        {
                            var result = T_IPSFR_USERCls.getListModel(new T_IPSFR_USER_SW {
                                HID = hid
                            }).FirstOrDefault();              //获取护林员信息
                            var m2 = new TD_DUTYAREA_Model(); //三维责任区模型
                            m2.opMethod  = m.opMethod;
                            m2.NAME      = result.HNAME;
                            m2.OBJECTID  = result.HID;
                            m2.ORGNAME   = result.ORGNAME;
                            m2.TELEPHONE = result.PHONE;
                            string[] arr = m.longitLatitList.Split('|');
                            for (int i = 0; i < arr.Length; i++)
                            {
                                if (!string.IsNullOrEmpty(arr[i]))
                                {
                                    string[] brr = arr[i].Split(',');
                                    double[] drr = ClsPositionTrans.GpsTransform(double.Parse(brr[1]), double.Parse(brr[0]), ConfigCls.getSDELonLatTransform());//坐标系转换
                                    wd = drr[0].ToString();
                                    jd = drr[1].ToString();
                                }
                                if (i == arr.Length - 1)//最后一条记录
                                {
                                    polygon += jd + " " + wd;
                                }
                                else
                                {
                                    polygon += jd + " " + wd + ",";
                                }
                            }
                            #region 中心点获取
                            if (arr.Length % 2 == 0)
                            {
                                string[] crr = arr[arr.Length / 2].Split(',');
                                double[] drr = ClsPositionTrans.GpsTransform(double.Parse(crr[1]), double.Parse(crr[0]), ConfigCls.getSDELonLatTransform());
                                m2.DISPLAY_X = drr[1].ToString();
                                m2.DISPLAY_Y = drr[0].ToString();
                            }
                            else
                            {
                                string[] crr = arr[(arr.Length + 1) / 2].Split(',');
                                double[] drr = ClsPositionTrans.GpsTransform(double.Parse(crr[1]), double.Parse(crr[0]), ConfigCls.getSDELonLatTransform());//中心点偏移
                                m2.DISPLAY_X = drr[1].ToString();
                                m2.DISPLAY_Y = drr[0].ToString();
                            }
                            #endregion
                            m2.Shape = "geometry::STGeomFromText('Polygon((" + polygon + "))',4326).MakeValid()";
                            DC_DUTYAREACls.Manager(m2);
                        }
                    }
                    msg = new Message(true, "转换成功!", "");
                    #endregion
                }
            }
            return(Json(msg));
        }
Exemplo n.º 14
0
        /// <summary>
        /// 自动发送短信
        /// </summary>
        /// <returns></returns>
        public JsonResult AutoSendMsg()
        {
            Message ms = null;
            var     st = ConfigCls.getIsAutoSendFireLevelMsg(); //读取配置

            if (st == "1")                                      //自动
            {
                var smsmodel = YJ_DCSMS_TMPCls.GetListModel(new YJ_DCSMS_TMP_SW {
                    ISENABLE = "1"
                });                                                                                 //获取短信模板
                if (smsmodel.Any())
                {
                    int levelnum = 0;
                    foreach (var sms in smsmodel)
                    {
                        var FireLevellist = YJ_DANGERCLASSCls.getListModelTop(new YJ_DANGERCLASS_SW()
                        {
                        }).Where(p => p.DANGERCLASS == sms.DANGERCLASS);                                                                                //获取最新的火险等级
                        if (FireLevellist.Any())
                        {
                            var _cityorg  = "";               //市机构中间变量
                            var _contyorg = "";               //县机构中间变量
                            int i         = 0;
                            levelnum = FireLevellist.Count(); //当前火险等级个数
                            foreach (var level in FireLevellist)
                            {
                                var info = new YJ_DCSMS_SEND_SW();
                                info.opMethod        = "Add";
                                info.SMSSENDUSERLIST = sms.SMSSENDUSERLIST;
                                info.DCDATE          = level.DCDATE;
                                info.BYORGNO         = level.BYORGNO;
                                info.YJ_DCSMS_TMPID  = sms.YJ_DCSMS_TMPID;
                                //info.TMPCONTENT = sms.TMPCONTENT;

                                #region 通讯录接收人员
                                if (!string.IsNullOrEmpty(info.SMSSENDUSERLIST))
                                {
                                    var arrperson = info.SMSSENDUSERLIST.Split(',');
                                    info.TMPCONTENT = sms.TMPCONTENT.Replace("[num]", levelnum.ToString());//短信内容replace
                                    if (!string.IsNullOrEmpty(info.TMPCONTENT))
                                    {
                                        foreach (var p in arrperson)
                                        {
                                            var txlmodel = T_SYS_ADDREDDBOOKCls.getModel(new T_SYS_ADDREDDBOOK_SW {
                                                ADID = p
                                            });                                                                                 //通讯录
                                            if (txlmodel != null && !string.IsNullOrEmpty(txlmodel.PHONE))
                                            {
                                                try
                                                {
                                                    ////TODO  Send Message
                                                    //add redis
                                                    //队列
                                                    var msg = txlmodel.PHONE.Trim() + "|" + info.TMPCONTENT;
                                                    redisclient.EnqueueItemOnList("SendMsg", msg);//入队。
                                                    logs.Info("==入队列号码信息==" + msg);
                                                    //  client.SendMsg(info.TMPCONTENT, txlmodel.PHONE);
                                                    Thread.Sleep(200);
                                                }
                                                catch (Exception ex)
                                                {
                                                    logs.Error(ex.Message);
                                                }
                                            }
                                        }
                                        info.SMSSENDSTATUS = "1";//0 未发送 1 已发送 -1 发送失败
                                    }
                                }
                                #endregion

                                #region  发送值班员与护林员
                                if (string.IsNullOrEmpty(sms.SMSSENDUSERLIST))//接收人为空 发送值班员与护林员
                                {
                                    #region 值班员 与护林员
                                    if (sms.SMSGROUPTYPE == "1")                                //值班员
                                    {
                                        var cityorg  = level.BYORGNO.Substring(0, 4) + "00000"; //市机构码
                                        var contyorg = level.BYORGNO.Substring(0, 6) + "000";   //县机构码
                                        if (i == 0)                                             //初次
                                        {
                                            _cityorg  = cityorg;
                                            _contyorg = contyorg;
                                        }
                                        else
                                        {
                                            if (_cityorg == cityorg)//循环相同的市级单位 跳出循环
                                            {
                                                continue;
                                            }
                                            if (_contyorg == contyorg)//循环相同的县级单位 跳出循环
                                            {
                                                continue;
                                            }
                                        }
                                        info.TMPCONTENT = sms.TMPCONTENT.Replace("[cityconty]", level.TOPTOWNNAME).Replace("[num]", levelnum.ToString()); //短信内容replace
                                        string str     = cityorg + "," + contyorg;
                                        var    zbylist = OD_USERCls.GetOndutyUserid(level.DCDATE, str);                                                   //获取值班员useridlist
                                        if (zbylist.Any())
                                        {
                                            var zbystr = "";
                                            foreach (var zby in zbylist)
                                            {
                                                var m = T_SYSSEC_IPSUSERCls.getModel(new T_SYSSEC_IPSUSER_SW {
                                                    USERID = zby.ToString()
                                                });
                                                if (!string.IsNullOrEmpty(m.PHONE))
                                                {
                                                    if (zbylist.Count() == 1)
                                                    {
                                                        zbystr = zby;
                                                    }
                                                    else
                                                    {
                                                        zbystr += zby + ",";
                                                    }
                                                    try
                                                    {
                                                        ////TODO  Send Message
                                                        //add redis
                                                        //队列
                                                        var msg = m.PHONE.Trim() + "|" + info.TMPCONTENT;
                                                        redisclient.EnqueueItemOnList("SendMsg", msg);//入队。
                                                        logs.Info("==入队列号码信息==" + msg);
                                                        //client.SendMsg(info.TMPCONTENT, m.PHONE);
                                                        Thread.Sleep(200);
                                                    }
                                                    catch (Exception ex)
                                                    {
                                                        logs.Error(ex.Message);
                                                    }
                                                }
                                            }
                                            info.SMSSENDUSERLIST = zbystr; //值班员人员
                                            info.SMSSENDSTATUS   = "1";    //0 未发送 1 已发送 -1 发送失败
                                            // ms = YJ_DCSMS_SENDCls.Manager(info);
                                        }
                                        ++i;
                                    }
                                    else if (sms.SMSGROUPTYPE == "2")                                            //护林员
                                    {
                                        info.TMPCONTENT = sms.TMPCONTENT.Replace("[cityconty]", level.TOWNNAME); //短信内容replace
                                        var hlylist = T_IPSFR_USERCls.getListModel(new T_IPSFR_USER_SW {
                                            BYORGNO = info.BYORGNO
                                        });                                                                                        //护林员
                                        if (hlylist.Any())
                                        {
                                            var hlystr = "";//护林员人员 逗号分隔
                                            foreach (var hly in hlylist)
                                            {
                                                if (!string.IsNullOrEmpty(hly.PHONE))
                                                {
                                                    if (hlylist.Count() == 1)
                                                    {
                                                        hlystr = hly.HID;
                                                    }
                                                    else
                                                    {
                                                        hlystr += hly.HID + ",";
                                                    }
                                                    try
                                                    {
                                                        //TODO  Send Message
                                                        //add redis
                                                        //队列
                                                        var msg = hly.PHONE.Trim() + "|" + info.TMPCONTENT;
                                                        redisclient.EnqueueItemOnList("SendMsg", msg);//入队。
                                                        logs.Info("==入队列号码信息==" + msg);
                                                        //client.SendMsg(info.TMPCONTENT, hly.PHONE);
                                                        Thread.Sleep(200);
                                                    }
                                                    catch (Exception ex)
                                                    {
                                                        logs.Error(ex.Message);
                                                    }
                                                }
                                            }
                                            info.SMSSENDUSERLIST = hlystr; //护林员人员
                                            info.SMSSENDSTATUS   = "1";    //0 未发送 1 已发送 -1 发送失败
                                            //ms = YJ_DCSMS_SENDCls.Manager(info);
                                        }
                                    }
                                    #endregion
                                }
                                #endregion
                            }
                        }
                    }
                }
                else
                {
                    ms = new Message(true, "短信未设置模板!", "");
                }
            }
            else
            {
                ms = new Message(true, "短信发送已设置为手动发送,请手动发送短信!", "");
            }
            return(Json(ms));
        }
Exemplo n.º 15
0
        /// <summary>
        /// 预警响应措施
        /// </summary>
        /// <returns></returns>
        public string YJXYCS()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("<table style='border:1px solid #c9dfbb;width:100%;height:100% cellpadding=0 cellspacing=0;text-align:center;margin:0 auto;'>");
            var BYORGNO = SystemCls.getCurUserOrgNo();

            if (PublicCls.OrgIsShi(BYORGNO))
            {
                BYORGNO = ConfigCls.getConfigValue("ProvincialCapital");//州府所在地行政区划编码
            }
            var DANGERCLASS = YJ_DANGERCLASSCls.getModel(new YJ_DANGERCLASS_SW {
                BYORGNO = BYORGNO
            }).DANGERCLASS;

            if (string.IsNullOrEmpty(DANGERCLASS))
            {
                BYORGNO     = BYORGNO.Substring(0, 6) + "000000000";//如果乡镇没有,查市的
                DANGERCLASS = YJ_DANGERCLASSCls.getModel(new YJ_DANGERCLASS_SW {
                    BYORGNO = BYORGNO
                }).DANGERCLASS;
                if (string.IsNullOrEmpty(DANGERCLASS))
                {
                    BYORGNO = ConfigCls.getConfigValue("ProvincialCapital");
                    //BYORGNO = ConfigurationManager.AppSettings["ProvincialCapital"].ToString();//如果市没有,查州的
                    DANGERCLASS = YJ_DANGERCLASSCls.getModel(new YJ_DANGERCLASS_SW {
                        BYORGNO = BYORGNO
                    }).DANGERCLASS;
                    if (string.IsNullOrEmpty(DANGERCLASS))
                    {
                        DANGERCLASS = "";
                    }
                }
            }
            ViewBag.DANGERCLASS = DANGERCLASS;
            var result      = YJ_XY_WORKCls.getModelListMan(new YJ_XY_WORK_SW {
            });
            var resultClass = T_SYS_DICTCls.getListModel(new T_SYS_DICTSW
            {
                DICTTYPEID = "24",
                DICTVALUE  = DANGERCLASS
            });//火情预警等级
            var resultDept = T_SYS_DICTCls.getListModel(new T_SYS_DICTSW {
                DICTTYPEID = "25"
            });                                                                                 //预警响应部门

            foreach (var v in resultClass)
            {
                sb.AppendFormat("<tr style='background:{0};color:#000000'>", v.STANDBY1);
                //sb.AppendFormat("<td style='color:#000;font-weight:bold;font-size:14px;'>火险等级</td>");
                sb.AppendFormat("<td colspan=2 style='color:#000000;font-size:14px;text-align:center'>{0}</td>", v.DICTNAME);
                sb.AppendFormat("</tr>");
                foreach (var x in resultDept)
                {
                    sb.AppendFormat("<tr  style='background:{0};color:#000000'>", v.STANDBY1);
                    sb.AppendFormat("<td style='color:#000;font-weight:bold;font-size:9pt;'>{0}</td>", x.DICTNAME);
                    var jbs = result.Where(p => p.DANGERCLASS == DANGERCLASS && p.YJXYDEPT == x.DICTVALUE).FirstOrDefault();
                    if (jbs != null)
                    {
                        sb.AppendFormat("<td style='text-align:left;font-size:9pt;'>{0}</td>", jbs.YJXYCONTENT);
                    }
                    //sb.AppendFormat("{0}", jbs.YJXYCONTENT);
                    //else
                    //    sb.AppendFormat("{0}", "");
                    //sb.AppendFormat("</td>");
                    sb.AppendFormat("</tr>");
                }
            }
            sb.AppendFormat("</table>");
            return(sb.ToString());
        }
Exemplo n.º 16
0
        /// <summary>
        /// 文档管理Ajax列表
        /// </summary>
        /// <returns></returns>
        public ActionResult getDocDefaultAjax()
        {
            string PageSize = Request.Params["PageSize"];

            if (PageSize == "0")
            {
                PageSize = ConfigCls.getTableDefaultPageSize();
            }
            string Page       = Request.Params["Page"];
            string EMAILTITLE = Request.Params["TITLE"];
            string typeID     = (string.IsNullOrEmpty(Request.Params["typeID"])) ? "" : Request.Params["typeID"].ToString();
            string bigTypeID  = "";// (string.IsNullOrEmpty(Request.Params["ArtTID"])) ? "" : Request.Params["ArtTID"].ToString();

            if (typeID == "006101")
            {
                bigTypeID = "013";                    //通告公告
            }
            if (typeID == "006102")
            {
                bigTypeID = "014";                    //防火百科
            }
            if (typeID == "006103")
            {
                bigTypeID = "015";                    //帮助
            }
            if (typeID == "006024")
            {
                bigTypeID = "031";                    //有害生物
            }
            int             total = 0;
            ART_DOCUMENT_SW sw    = new ART_DOCUMENT_SW {
                curPage = int.Parse(Page), pageSize = int.Parse(PageSize), ARTTITLE = EMAILTITLE, ARTBigTYPEID = bigTypeID, BYORGNO = SystemCls.getCurUserOrgNo()
            };
            var           result = ART_DOCUMENTCls.getModelList(sw, out total);
            StringBuilder sb     = new StringBuilder();

            sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.AppendFormat("<thead>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<th style='width:10%;'>序号</th>");
            sb.AppendFormat("<th style='width:10%;'>类别</th>");
            sb.AppendFormat("<th style='width:30%;'>标题</th>");
            sb.AppendFormat("<th style='width:15%;'>添加人</th>");
            sb.AppendFormat("<th style='width:15%;'>时间</th>");
            sb.AppendFormat("<th style='width:20%;'>管理</th>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</thead>");
            sb.AppendFormat("<tbody>");
            int i = 0;

            foreach (var v in result)
            {
                if (i % 2 == 0)
                {
                    sb.AppendFormat("<tr>");
                }
                else
                {
                    sb.AppendFormat("<tr class='row1'>");
                }
                sb.AppendFormat("<td class=\"center\">{0}</td>", (i + 1).ToString());
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTTYPENAME);// v.ARTTYPENAME);
                sb.AppendFormat("<td class=\"left\"><a href=\"/ArtDocument/DocShow?ID={1}\" target='_blank'>{0}</a></td>", v.ARTTITLE, v.ARTID);
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTADDUSERName);
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTTIME);
                sb.AppendFormat("<td class=\"center\">");
                sb.AppendFormat("<a href='#' onclick=\"Mdy('{0}','{1}')\" class=\"searchBox_01 LinkMdy\">修改</a>", v.ARTID, typeID);
                sb.AppendFormat("&nbsp;<a href='#' onclick='Manager({0})' class=\"searchBox_01 LinkDel\">删除</a>", v.ARTID);
                sb.AppendFormat("</td>");
                sb.AppendFormat("</tr>");
                i++;
            }
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");
            string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW {
                curPage = sw.curPage, pageSize = sw.pageSize, rowCount = total
            });

            return(Content(JsonConvert.SerializeObject(new MessagePagerAjax(true, sb.ToString(), pageInfo)), "text/html;charset=UTF-8"));;
        }