/// <summary> /// 获取待审核(反馈)个数 /// </summary> /// <returns></returns> public JsonResult getSHFKCount() { Message ms = null; int count = 0; var curog = SystemCls.getCurUserOrgNo(); var bo = PublicCls.OrgIsShi(curog); //市 var bb = PublicCls.OrgIsXian(curog); //县 var bx = PublicCls.OrgIsZhen(curog); //镇 if (bo) { var list = JC_FIRECls.GetListModel(new JC_FIRE_SW { MANSTATESTR = "11,15" }); count = list.Count(); } else if (bb) { var list = JC_FIRECls.GetListModel(new JC_FIRE_SW { MANSTATESTR = "31,32,33,34" }); count = list.Count(); } else if (bx) { var list = JC_FIRECls.GetListModel(new JC_FIRE_SW { MANSTATESTR = "0,51" }); count = list.Count(); } ms = new Message(true, count.ToString(), ""); return(Json(ms)); }
/// <summary> /// 获取热点个数 /// </summary> /// <returns></returns> private IEnumerable <HotInfoModel> GetHotInfoList() { var result = new List <HotInfoModel>(); var sw = new JC_FIRE_SW(); var curogr = SystemCls.getCurUserOrgNo(); var bb = PublicCls.OrgIsXian(curogr); if (bb) { sw.BYORGNO = curogr; } var list = JC_FIRECls.GetListModel(sw); //遍历火情来源 Array ary = Enum.GetValues(typeof(EnumType)); //array是数组的基类, 无法实例化 foreach (int item in ary) { var info = new HotInfoModel(); info.HotType = item.ToString(); info.HotName = Enum.GetName(typeof(EnumType), item);//名称 if (list.Any()) { var firelist = list.Where(p => p.FIREFROM == info.HotType && ((p.ISOUTFIRE.Trim() == "1" && p.MANSTATE.Trim() != "4") || p.ISOUTFIRE.Trim() != "1")); //筛选热点类型 排除已灭的 info.HotSum = firelist.Count().ToString(); //热点个数 if (bb) //县 { info.QSSum = firelist.Where(p => p.MANSTATE != "1").ToList().Count.ToString(); info.WQSSum = firelist.Where(p => p.MANSTATE == "1").ToList().Count.ToString(); } else { info.QSSum = firelist.Where(p => p.MANSTATE == "1").ToList().Count.ToString(); info.WQSSum = firelist.Where(p => p.MANSTATE == "0").ToList().Count.ToString(); } if (bb)//县 { info.FKSum = firelist.Where(p => p.MANSTATE == "3" || p.MANSTATE == "4").ToList().Count.ToString(); info.WFKSum = firelist.Where(p => p.MANSTATE == "2").ToList().Count.ToString(); } else { info.FKSum = firelist.Where(p => p.MANSTATE == "4").ToList().Count.ToString(); info.WFKSum = firelist.Where(p => p.MANSTATE == "3").ToList().Count.ToString(); } } else { info.HotSum = "0"; info.QSSum = "0"; info.WQSSum = "0"; info.FKSum = "0"; info.WFKSum = "0"; } result.Add(info); } return(result); }
/// <summary> /// 三维定位--预警监测 /// </summary> /// <returns></returns> public ActionResult From2Dto3D() { 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.AllNAME = T_SYS_LAYERCls.getLayerAllNAME(); var result = new List <MapShowModel>(); var sw = new JC_FIRE_SW(); string jcfid = Request.Params["jcfid"]; if (!string.IsNullOrEmpty(jcfid)) { ViewBag.strjcfid = jcfid; var ss = jcfid.Split(','); if (ss.Length == 1) { sw.JCFID = jcfid; } else { sw.JCFIDSTR = jcfid; } } var list = JC_FIRECls.GetListModel(sw); if (list.Any()) { foreach (var item in list) { //var info = JC_FIRETICKLINGCls.GetFKFireInfoData(item.JCFID); var fklist = GetFKInfoList(item.JCFID); var recordlist = fklist.Select(p => p.MANSTATE).ToList();//MANSTATE状态集合 var model = new MapShowModel(); model.JCFID = item.JCFID; model.AREA = item.ZQWZ; model.BH = item.WXBH; if (Convert.ToInt32(item.MANSTATE) > 10)//大于10 说明已经入反馈阶段有顺序 { model.FKSTATE = StateSwitch.QSStateNew(SystemCls.getCurUserOrgNo(), item.MANSTATE); } else//签收无顺序性 状态判断是否反馈表包含 签到状态 1 市 2 县 3 乡镇 { model.FKSTATE = StateSwitch.QSStateNewList(SystemCls.getCurUserOrgNo(), recordlist); } //model.FKSTATE = StateSwitch.QSStateNew(SystemCls.getCurUserOrgNo(), info.JC_FireFKData.MANSTATE); result.Add(model); } } return(View(result)); }
/// <summary> /// 火情结束 /// </summary> /// <returns></returns> public JsonResult FireOverMethod() { Message ms = null; string jcfid = Request.Params["jcfid"]; var m = new JC_FIRE_Model(); m.JCFID = jcfid; m.ISOUTFIRE = "1"; m.FIREENDTIME = DateTime.Now.ToString(); ms = JC_FIRECls.MdyJCFireOver(m); return(Json(ms)); }
/// <summary> /// 获取火点信息 /// </summary> /// <returns></returns> public JsonResult GetFireDisTributionData() { MessageListObject ms = new MessageListObject(false, null); var curogr = SystemCls.getCurUserOrgNo(); if (string.IsNullOrEmpty(curogr)) { ms = new MessageListObject(false, null); } else { var dataList = JC_FIRECls.GetListModel(new JC_FIRE_SW() { BYORGNO = curogr, BeginTime = DateTime.Now.AddMonths(-6).ToShortDateString(), EndTime = DateTime.Now.ToShortDateString() }); ms = new MessageListObject(true, dataList); } return(Json(ms)); }
/// <summary> /// 获取当前火情 /// </summary> /// <returns></returns> private IEnumerable <EHCurFireMode> GetCUrFireList() { var result = new List <EHCurFireMode>(); var jcfirelist = JC_FIRECls.GetListModel(new JC_FIRE_SW { BYORGNO = SystemCls.getCurUserOrgNo() }).Where(p => (p.ISOUTFIRE.Trim() != "1")); //监测火情信息 if (jcfirelist.Any()) { foreach (var item in jcfirelist) { var firefkmodel = JC_FIRETICKLINGCls.GetModelList(new JC_FIRETICKLING_SW() { JCFID = item.JCFID, ISOUTFIRE = "0" }).Where(p => p.HOTTYPE == "1" || p.HOTTYPE == "6" || p.HOTTYPE == "10").FirstOrDefault(); if (firefkmodel != null) { var model = new EHCurFireMode(); model.ADDRESSS = item.ZQWZ; model.FIRENAME = item.FIRENAME; model.JCFID = item.JCFID; model.JD = item.JD; model.WD = item.WD; model.ORGNO = item.BYORGNO; var record = JC_FIRE_PROPCls.getModel(new JC_FIRE_PROP_SW { JCFID = item.JCFID }); if (record != null) { model.FIRELEVEL = record.FIRELEVEL; } if (model.FIRELEVEL == null) { model.FIRELEVEL = ""; } result.Add(model); } } } return(result); }
/// <summary> /// 获取当前火情——优化后 /// </summary> /// <returns></returns> private IEnumerable <EHCurFireMode> GetCUrFireListYH() { var result = new List <EHCurFireMode>(); var jcfirelist = JC_FIRECls.GetListModelYH(new JC_FIRE_SW { BYORGNO = SystemCls.getCurUserOrgNo() }); //监测火情信息 foreach (var item in jcfirelist) { var model = new EHCurFireMode(); model.ADDRESSS = item.ZQWZ; model.FIRENAME = item.FIRENAME; model.JCFID = item.JCFID; model.JD = item.JD; model.WD = item.WD; model.ORGNO = item.BYORGNO; model.FIRELEVEL = item.FIRELEVEL; result.Add(model); } return(result); }
/// <summary> /// 获取火情来源数据 /// </summary> /// <returns></returns> public JsonResult GetFireSourceData() { var result = new List <OutData>(); MessageListObject ms = new MessageListObject(false, null); var sw = new JC_FIRE_SW(); var curogr = SystemCls.getCurUserOrgNo(); if (!string.IsNullOrEmpty(curogr)) { var bo = PublicCls.OrgIsShi(curogr); var bb = PublicCls.OrgIsXian(curogr); var bx = PublicCls.OrgIsZhen(curogr); if (!bo) { sw.BYORGNO = curogr; } sw.isCountIndex = "1"; //遍历火情来源 Array ary = Enum.GetValues(typeof(EnumType)); //array是数组的基类, 无法实例化 var list = JC_FIRECls.GetListModel(sw); foreach (int item in ary) { string hotsum = "0"; var fireData = new OutData(); if (item.ToString() != "1")//排除红外相机 { if (list.Any()) { var firelist = list.Where(p => p.FIREFROM == item.ToString() && !string.IsNullOrEmpty(p.FIREFROM) && p.ISOUTFIRE != "1" && p.MANSTATE != "19" && p.MANSTATE != "18"); //筛选热点类型 排除已灭的 && ((p.ISOUTFIRE.Trim() == "1" && p.MANSTATE.Trim() != "4") || p.ISOUTFIRE.Trim() != "1") 已在程序中处理 hotsum = firelist.Count().ToString(); //热点个数 } fireData.name = Enum.GetName(typeof(EnumType), item); fireData.value = hotsum; result.Add(fireData); } } ms = new MessageListObject(true, result); } return(Json(ms)); }
/// <summary> /// 获取火情属性model /// </summary> /// <param name="jcfid"></param> /// <returns></returns> private YAFireLevelInfoModel GetFireLevelModel(string jcfid) { var model = new YAFireLevelInfoModel(); var record = JC_FIRECls.GetListModel(new JC_FIRE_SW { JCFID = jcfid }).FirstOrDefault(); if (record != null) { model.JCFID = record.JCFID; model.FIRETIME = record.FIRETIME; model.FIREENDTIME = record.FIREENDTIME; model.ISOUTFIRE = record.ISOUTFIRE; model.JD = record.JD; model.WD = record.WD; var recordsx = JC_FIRE_PROPCls.getModel(new JC_FIRE_PROP_SW { JCFID = jcfid }); //火情属性 if (recordsx != null) { model.JC_FIRE_PROPID = recordsx.JC_FIRE_PROPID; model.GHMJ = recordsx.GHMJ; model.GHLDMJ = recordsx.GHLDMJ; model.SHSLMJ = recordsx.SHSLMJ; model.RYS = recordsx.RYS; model.RYW = recordsx.RYW; model.MGSD = recordsx.MGSD; model.ZDQY = recordsx.ZDQY; model.GJJL = recordsx.GJJL; model.ZZH = recordsx.ZZH; model.QHS = recordsx.QHS; model.SSJB = recordsx.SSJB; model.FIRELEVEL = recordsx.FIRELEVEL; model.FIRECODE = recordsx.FIRECODE; } } return(model); }
/// <summary> /// ajax 获取各种火情数据 /// </summary> /// <returns></returns> public JsonResult GetFireInfosAjax() { int total = 0; //记录总数 string topOrg = ""; var firetype = Request.Params["firetype"]; //火情类型 string PageSize = Request.Params["PageSize"]; //记录个数 string page = Request.Params["page"]; //页数 if (string.IsNullOrEmpty(firetype)) { return(Json(new Message(false, "没有火情类型", ""))); } var currOrgNo = SystemCls.getCurUserOrgNo(); if (PublicCls.OrgIsXian(currOrgNo))//县 { topOrg = currOrgNo.Substring(0, 6); } else if (PublicCls.OrgIsZhen(currOrgNo))//乡镇 { topOrg = currOrgNo; } var result = JC_FIRECls.getModelPager(new JC_FIRE_SW { curPage = int.Parse(page), pageSize = int.Parse(PageSize), FIREFROM = firetype, TopORGNO = topOrg }, out total); StringBuilder sb = new StringBuilder(); sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">"); sb.AppendFormat("<thead>"); sb.AppendFormat("<tr>"); sb.AppendFormat("<th>序号</th>"); sb.AppendFormat("<th>区域</th>"); //sb.AppendFormat("<th>经度</th>"); //sb.AppendFormat("<th>纬度</th>"); sb.AppendFormat("<th>接收时间</th>"); //sb.AppendFormat("<th>周围(公里)</th>"); sb.AppendFormat("</tr>"); sb.AppendFormat("</thead>"); sb.AppendFormat("<tbody>"); if (result.Any()) { int i = 0; int rowB = (int.Parse(page) - 1) * int.Parse(PageSize); foreach (var s in result) { if (i % 2 == 0) { // onclick="moveto(@item.JD,@item.WD,'@item.FIRENAME',@item.JCFID);" sb.AppendFormat("<tr style=\"cursor: pointer;\" title='双击行定位' ondblclick=\"moveto(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\">"); } else { sb.AppendFormat("<tr style=\"cursor: pointer;\" title='双击行定位' class='row1' ondblclick=\"moveto(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\">"); } sb.AppendFormat("<td>{0}</td>", ++rowB); if (s.FIREFROM == "5")//护林员报警 { sb.AppendFormat("<td><font color=\"#FF0000;\">{0}</font></td>", StateSwitch.GetOrgNameByOrgNO(s.BYORGNO)); } else { sb.AppendFormat("<td><font color=\"#FF0000;\">{0}</font></td>", s.ZQWZ); } //sb.AppendFormat("<td>{0}</td>", Convert.ToDouble(s.JD).ToString("f3")); //sb.AppendFormat("<td>{0}</td>", Convert.ToDouble(s.WD).ToString("f3")); sb.AppendFormat("<td>{0}</td>", Convert.ToDateTime(s.RECEIVETIME).ToString("MM-dd HH:mm")); //sb.AppendFormat("<td><select onchange=\"GetHlyInfos(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\" id=\"areaselect_{0}\" ><option value=\"0\">请选择</option><option value=\"1\">1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option>/select></td>", s.JCFID); sb.AppendFormat("</tr>"); ++i; } } else { sb.AppendFormat("<tr>"); sb.AppendFormat("<td colspan='5'>未查询出结果</td>"); sb.AppendFormat("</tr>"); } sb.AppendFormat("</tbody>"); sb.AppendFormat("</table>"); string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW { curPage = int.Parse(page), pageSize = int.Parse(PageSize), rowCount = total, hidePageList = true, hidePageSize = true }); return(Json(new MessagePagerAjax(true, sb.ToString(), pageInfo))); }
/// <summary> /// 获取热点个数 /// </summary> /// <returns></returns> public ActionResult GetHotInfoJson() { var result = new List <HotInfoModel>(); var sw = new JC_FIRE_SW(); var curogr = SystemCls.getCurUserOrgNo(); var bo = PublicCls.OrgIsShi(curogr); var bb = PublicCls.OrgIsXian(curogr); var bx = PublicCls.OrgIsZhen(curogr); if (!bo) { sw.BYORGNO = curogr; } sw.isCountIndex = "1"; var list = JC_FIRECls.GetListModel(sw); StringBuilder sb = new StringBuilder(); //遍历火情来源 Array ary = Enum.GetValues(typeof(EnumType)); //array是数组的基类, 无法实例化 bool blnAlarm = false; //是否报警 foreach (int item in ary) { if (item.ToString() != "1") //&& item.ToString() != "6") { string[] arr = new string[5]; int wqs = 0; arr[0] = "0"; if (list.Any()) { var firelist = list.Where(p => p.FIREFROM == item.ToString() && !string.IsNullOrEmpty(p.FIREFROM) && p.ISOUTFIRE != "1" && p.MANSTATE != "19" && p.MANSTATE != "18"); //筛选热点类型 排除已灭的 && ((p.ISOUTFIRE.Trim() == "1" && p.MANSTATE.Trim() != "4") || p.ISOUTFIRE.Trim() != "1") 已在程序中处理 arr[0] = firelist.Count().ToString(); //热点个数 //签收 if (bo) //市 { arr[1] = JC_FIRECls.GetCount("1", item.ToString(), "", "0").ToString(); wqs = JC_FIRECls.GetCount("1", item.ToString(), "", "1"); arr[2] = wqs.ToString(); } else if (bb)//县 { //32 为本级单位签收 arr[1] = JC_FIRECls.GetCount("2,32", item.ToString(), curogr.Substring(0, 6), "0").ToString(); wqs = JC_FIRECls.GetCount("2,32", item.ToString(), curogr.Substring(0, 6), "1"); arr[2] = wqs.ToString(); } else//乡镇 { arr[1] = JC_FIRECls.GetCount("3", item.ToString(), curogr, "0").ToString(); wqs = JC_FIRECls.GetCount("3", item.ToString(), curogr, "1"); arr[2] = wqs.ToString(); } //上报 反馈 if (bo)//市 { arr[3] = firelist.Where(p => p.MANSTATE == "19" || p.MANSTATE == "18").ToList().Count.ToString(); arr[4] = firelist.Where(p => p.MANSTATE == "11" || p.MANSTATE == "15").ToList().Count.ToString(); } else if (bb)//县 { arr[3] = firelist.Where(p => p.MANSTATE == "11" || p.MANSTATE == "19" || p.MANSTATE == "15" || p.MANSTATE == "18").ToList().Count.ToString(); var wfkcount = firelist.Where(p => p.MANSTATE == "31" || p.MANSTATE == "33" || p.MANSTATE == "34").ToList().Count; string count = "0"; if (wqs <= wfkcount)//未反馈中去除未签收 { count = (wfkcount - wqs).ToString(); } arr[4] = count; } else//乡镇 { arr[3] = firelist.Where(p => Convert.ToInt32(p.MANSTATE) > 0 && Convert.ToInt32(p.MANSTATE) < 50).ToList().Count.ToString(); var wfkcount = firelist.Where(p => p.MANSTATE == "0" || p.MANSTATE == "51").ToList().Count; string count = "0"; if (wqs <= wfkcount)//未反馈中去除未签收 { count = (wfkcount - wqs).ToString(); } //arr[4] = "未反馈:" + count; arr[4] = count; } } else { arr[1] = "0"; arr[2] = "0"; arr[3] = "0"; arr[4] = "0"; } string strclass = "wxjk";//卫星报警 if (item == 3) { strclass = "dhbj";//电话报警 } else if (item == 4) { strclass = "dzjk";//电子监控 } else if (item == 5) { strclass = "lwhly";//瞭望护林员 } else if (item == 6) { strclass = "wrjxh"; //无人机巡护 } if (arr[2] != "0" || arr[4] != "0") //未签收 未上报报警 { blnAlarm = true; } sb.AppendFormat("<dl class=\"hqjc\">"); sb.AppendFormat("<dt class=\"floatLeft center\">"); sb.AppendFormat("<p><span class=\"same {1} floatLeft\"></span>|<span class=\"cor_ff0 floatRight\">{0}</span></p>", arr[0], strclass); //sb.AppendFormat("<p><a href='/MainYJJC/YJJCNIndex?typeid={1}' target='_blank'>{0}</a></p>", Enum.GetName(typeof(EnumType), item), item.ToString()); sb.AppendFormat("<p><a onClick=\"ShowFires({1})\" title=\"查看\">{0}</a></p>", Enum.GetName(typeof(EnumType), item), item.ToString()); sb.AppendFormat("</dt>"); sb.AppendFormat("<dd class=\"floatLeft\">"); sb.AppendFormat("<p>已签收:<span class=\"cor_4d9\">{0}</span></p>", arr[1]); sb.AppendFormat("<p>未签收:<span class=\"cor_ff7\">{0}</span></p>", arr[2]); sb.AppendFormat("<p>已上报:<span class=\"cor_4d9\">{0}</span></p>", arr[3]); sb.AppendFormat("<p>未上报:<span class=\"cor_ff7\">{0}</span></p>", arr[4]); sb.AppendFormat("</dd>"); sb.AppendFormat("<div class=\"floatRight\" style=\" margin-top: -20px;\"><p><a href='/MainYJJC/YJJCNIndex?typeid={0}' target='_blank' title=\"查看更多信息\">更多</a> </p></div>", item.ToString()); sb.AppendFormat("<div class=\"clear\"></div>"); sb.AppendFormat("</dl>"); } } if (blnAlarm) { sb.AppendFormat("<audio autoplay='autoplay'> <source src='/Content/albram.mp3' type='audio/mpeg'> </audio>"); } string type = Request.Params["type"];//用于所有页面公用提醒 if (type == "Alarm") { string a = SystemCls.getCurUserOrgNo(); if (string.IsNullOrEmpty(SystemCls.getCurUserOrgNo())) { return(Content(JsonConvert.SerializeObject(new Message(false, "", "")), "text/html;charset=UTF-8")); } if (blnAlarm) { return(Content(JsonConvert.SerializeObject(new Message(true, "<audio autoplay='autoplay'> <source src='/Content/albram.mp3' type='audio/mpeg'> </audio><img src='/images/fireAlarm.gif' width='25' height='30'>", "")), "text/html;charset=UTF-8")); } else { return(Content(JsonConvert.SerializeObject(new Message(true, "", "")), "text/html;charset=UTF-8")); } } return(Content(JsonConvert.SerializeObject(new Message(true, sb.ToString(), "")), "text/html;charset=UTF-8")); }
/// <summary> /// 保存热点信息 /// </summary> /// <returns></returns> public JsonResult SaveHotPointInfoAjax() { Message ms = null; string hotid = Request.Params["hotid"]; string hotresult = Request.Params["hotresult"]; if (string.IsNullOrEmpty(hotid)) { ms = new Message(false, "hotid参数传递错误!", ""); return(Json(ms)); } var m = new T_IPS_HOTS_Model(); m.opMethod = "Man"; m.HOTSID = hotid; m.MANRESULT = hotresult; m.MANUSERID = SystemCls.getUserID(); ms = T_IPS_HOTSCls.Manager(m); var jctype = System.Configuration.ConfigurationManager.AppSettings["ISJcFire"].ToString(); if (jctype.Trim() == "1")//增加至监测火情表 { var list = JC_FIRECls.GetListModel(new JC_FIRE_SW() { FIREFROMID = m.HOTSID }); if (!list.Any()) { if (ms.Success) { //红外相机 = 1, //卫星热点 = 2, //人工报警 = 3, //电子报警 = 4, //护林员火情上报 = 5 var sw = new T_IPS_HOTS_SW(); sw.HOTSID = hotid; var record = T_IPS_HOTSCls.getModel(sw); if (record != null) { JC_FIRE_Model model = new JC_FIRE_Model(); model.opMethod = "Add"; model.FIREFROMID = m.HOTSID; model.FIREFROM = "2";//卫星热点 model.FIRENAME = record.WXBH + record.ZQWZ + ClsSwitch.SwitTM(record.FXSJ) + "卫星热点火情"; model.FIRETIME = record.FXSJ; model.JD = record.JD; model.WD = record.WD; model.ZQWZ = record.ZQWZ; model.WXBH = record.WXBH; model.DQRDBH = record.DQRDBH; model.RSMJ = record.XS; model.DL = record.DL; model.YY = record.YY; model.JXHQSJ = record.JXHQSJ; model.RECEIVETIME = record.SBSJ; var mm = JC_FIRECls.Manager(model); } } } } return(Json(ms)); }
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, }
/// <summary> /// 报存上报信息 /// </summary> /// <returns>参见模型</returns> public JsonResult SaveReportDataAjax() { Message ms = null; string reportid = Request.Params["reportid"]; string address = Request.Params["address"]; string describe = Request.Params["describe"]; string result = Request.Params["result"]; if (string.IsNullOrEmpty(reportid)) { ms = new Message(false, "reportid上报id传参失败", ""); return(Json(ms)); } var m = new T_IPSRPT_REPORT_Model(); m.REPORTID = reportid; m.opMethod = "Man"; m.MANUSERID = SystemCls.getUserID(); m.ADDRESS = address.Trim(); m.COLLECTNAME = describe.Trim(); m.MANRESULT = result.Trim(); ms = T_IPSRPT_REPORTCls.Manager(m); var jctype = System.Configuration.ConfigurationManager.AppSettings["ISJcFire"].ToString(); //是否插入火情监测表 if (jctype.Trim() == "1") //增加至监测火情表 { var list = JC_FIRECls.GetListModel(new JC_FIRE_SW() { FIREFROMID = m.REPORTID }); if (!list.Any()) { if (ms.Success) { //红外相机 = 1, //卫星热点 = 2, //人工报警 = 3, //电子报警 = 4, //护林员火情 = 5 var sw = new T_IPSRPT_REPORT_SW(); sw.REPORTID = reportid; var record = T_IPSRPT_REPORTCls.getModel(sw); if (record != null) { if (record.SYSTYPEVALUE == "1")//1 为火情 { JC_FIRE_Model model = new JC_FIRE_Model(); model.opMethod = "Add"; model.FIREFROMID = m.REPORTID; model.FIREFROM = "5";//护林员火情上报 model.FIRENAME = ClsSwitch.SwitTM(record.REPORTTIME) + "护林员报警火情"; model.FIRETIME = record.REPORTTIME; var recordmodel = T_IPSRPT_REPORTCls.getDetailModelList(new T_IPSRPT_REPORT_SW() { REPORTID = record.REPORTID }).FirstOrDefault(); //获取数据详细 if (recordmodel != null) { model.JD = recordmodel.LONGITUDE; model.WD = recordmodel.LATITUDE; } model.BYORGNO = record.OrgNo; model.ZQWZ = record.ADDRESS; model.RECEIVETIME = record.MANTIME; var mm = JC_FIRECls.Manager(model); } } } } } return(Json(ms)); }