/// <summary> /// 获取实时轨迹中历史轨迹点 /// </summary> /// <param name="phone"></param> /// <param name="time"></param> /// <returns></returns> public JsonResult GetRealDataAjax(string phone, string time) { string uid = Request.Params["uid"];//护林员id string maptype = Request.Params["maptype"]; MessageListObject msg = null; var sw = new T_IPS_REALDATASW(); sw.PHONE = phone.Trim(); sw.searchDate = DateTime.Now.ToString("yyyy-MM-dd"); sw.HID = uid; if (!string.IsNullOrEmpty(maptype)) { sw.MapType = maptype;//地图类型 } if (!string.IsNullOrEmpty(time)) { sw.DateBegin = Convert.ToDateTime(time).AddSeconds(1).ToString("yyyy-MM-dd HH:mm:ss"); } else { sw.DateEnd = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } var list = T_IPS_REALDATACls.getModelList(sw); if (list.Count() > 0) { msg = new MessageListObject(true, list); } return(Json(msg)); }
/// <summary> /// 获取火险等级数据 /// </summary> /// <returns></returns> public JsonResult GetFireLevelData() { var result = new List <OutData>(); MessageListObject ms = new MessageListObject(false, null); var dataList = YJ_DANGERCLASSCls.getListModel(new YJ_DANGERCLASS_SW { DCDATE = "2017-04-26 00:00:00.000" }); if (dataList.Any()) { var list = dataList.Where(p => p.BYORGNO.Substring(p.BYORGNO.Length - 3, 3) == "000"); if (list.Any()) { foreach (var item in list) { var levelData = new OutData(); levelData.name = item.TOWNNAME; levelData.value = item.DANGERCLASS; result.Add(levelData); } } ms = new MessageListObject(true, result); } return(Json(ms)); }
/// <summary> /// ajax 获取图片 /// </summary> /// <returns></returns> public JsonResult ShowAjaxImageIndex() { MessageListObject ms = null; //StringBuilder sb = new StringBuilder(); //sb.Append("<li style=\"transform-origin: center 256px 0px; transform: translate(0 px, 0 px) scale(0.4) translateZ(0px); opacity: 0.6; z-index: 8;\">"); var count = System.Configuration.ConfigurationManager.AppSettings["ImageCount"].ToString(); if (string.IsNullOrEmpty(count)) { count = "10"; } var sw = new JC_INFRAREDCAMERA_PHOTO_SW(); sw.TopCount = count; var imagelist = JC_INFRAREDCAMERACls.getListModelTopPhoto(sw); var imgurl = System.Configuration.ConfigurationManager.AppSettings["ImageUrl"].ToString(); foreach (var item in imagelist) { item.filename = item.filename.Replace(imgurl, ""); //sb.Append("<img src=\"" + item.filename + "\" class=\"sc-image\">"); //sb.Append("<div class=\"sc-content\">"); //sb.Append("<h2>设备: " + item.BasicInfoModel.INFRAREDCAMERANAME + "</h2>"); //sb.Append("<p>所属单位:【" + item.BasicInfoModel.ORGNAME + "】 手机号码:【" + item.tpa + "】 拍摄地点:【" + item.BasicInfoModel.ADDRESS + "】 接收时间:【" + item.recvdatetime + "】 </p>"); //sb.Append("</div>>"); //sb.Append("</li>"); } ms = new MessageListObject(true, imagelist); return(Json(ms)); }
/// <summary> /// ajax 获取当前火情 /// </summary> /// <returns></returns> public JsonResult GetCurrentFireInfo() { MessageListObject ms = null; var list = GetCUrFireList(); ms = new MessageListObject(true, list); return(Json(ms)); }
public JsonResult GetWeatherList() { MessageListObject msg = null; var sw = new YJ_WEATHER_SW(); var list = YJ_WEATHERCls.getNewListModel(sw); msg = new MessageListObject(true, list); return(Json(msg)); }
/// <summary> /// 获取火险等级 /// </summary> /// <returns></returns> public JsonResult GetFireLevelList() { MessageListObject msg = null; var sw = new YJ_DANGERCLASS_SW(); var list = YJ_DANGERCLASSCls.getListModelTop(sw).OrderByDescending(p => Convert.ToInt32(p.DANGERCLASS)); msg = new MessageListObject(true, list); return(Json(msg)); }
/// <summary> /// ajax 获取预警等级模板短信 /// </summary> /// <returns></returns> public JsonResult GetSmsTmpModel() { MessageListObject ms = null; string level = Request.Params["level"]; var list = YJ_DCSMS_TMPCls.GetListModel(new YJ_DCSMS_TMP_SW() { DANGERCLASS = level, ISENABLE = "1" }); ms = new MessageListObject(true, list); return(Json(ms)); }
/// <summary> /// 获取相机列表 /// </summary> /// <returns></returns> public JsonResult GetCamareaInfo() { MessageListObject msg = null; var sw = new JC_INFRAREDCAMERA_BASICINFO_SW(); var list = JC_INFRAREDCAMERACls.getListModel(sw); if (list.Count() > 0) { msg = new MessageListObject(true, list); } return(Json(msg)); }
/// <summary> /// 电子监控设备信息 /// </summary> /// <returns></returns> public ActionResult GetMonitorInfo() { MessageListObject msg = null; var sw = new JC_MONITOR_BASICINFO_SW(); var list = JC_MONITORCls.getListModel(sw); if (list.Count() > 0) { msg = new MessageListObject(true, list); } return(Json(msg)); }
/// <summary> /// 获取图层查询结果 /// </summary> /// <returns></returns> public JsonResult GetQueryLayerInfos() { string name = Request.Params["name"]; //名称 string flagstr = Request.Params["flagstr"]; //图层类型 var sw = new QueryLayerDataSW(); sw.FlagStr = flagstr; sw.Name = name; var list = TD_CUNZHUDICls.GetQueryLayerUnionResult(sw); var ms = new MessageListObject(true, list); return(Json(ms)); }
/// <summary> /// 获取历史经纬度(历史轨迹回放) /// </summary> /// <param name="uid"></param> /// <param name="time"></param> /// <returns></returns> public JsonResult GetHisLogLatAjax(string uid, string time) { MessageListObject ms = null; if (string.IsNullOrEmpty(uid) || string.IsNullOrEmpty(time)) { ms = new MessageListObject(false, null); return(Json(ms)); } string maptype = Request.Params["maptype"]; //地图类型 string starttime = Request.Params["starttime"]; //开始时分 string endtime = Request.Params["endtime"]; //结束时分 var model = new T_IPS_REALDATASW(); model.HID = uid; //model.searchDate = time; if (!string.IsNullOrEmpty(starttime.Trim()) && !string.IsNullOrEmpty(endtime.Trim()))//时分参数 { model.DateBegin = time + " " + starttime + ":00"; model.DateEnd = time + " " + endtime + ":00"; if (endtime.Trim() == "23:59") { model.DateEnd = time + " " + endtime + ":59"; } } if (!string.IsNullOrEmpty(maptype)) { model.MapType = maptype; } var list = T_IPS_REALDATACls.getModelList(model).ToList(); if (list.Any()) { for (int i = 0; i < list.Count; i++) { if (i != 0) { bool bo = ISBetweenInDistance(list[i - 1].LONGITUDE, list[i - 1].LATITUDE, list[i].LONGITUDE, list[i].LATITUDE);//去除在参数设置范围内的经纬度 if (bo) { list.Remove(list[i]); --i; } } } ms = new MessageListObject(true, list); } return(Json(ms)); }
/// <summary> /// 获取目前最新未处理热点 /// </summary> /// <returns></returns> public JsonResult GetHotPontListAjax() { MessageListObject ms = null; string state = Request.Params["state"]; var sw = new T_IPS_HOTS_SW(); sw.MANSTATE = state; var list = T_IPS_HOTSCls.getModelList(sw); if (list.Any()) { ms = new MessageListObject(true, list); } return(Json(ms)); }
/// <summary> /// Ajax获取fly文件 /// </summary> /// <returns></returns> public JsonResult GetFlyFireList() { var path = System.Configuration.ConfigurationManager.AppSettings["FireFlaPath"].ToString(); MessageListObject ms = null; var result = new List <FlaModel>(); string jcfid = Request.Params["jcfid"]; var list = GetFlaModelList(jcfid); foreach (var item in list) { var info = new FlaModel(); info.InjectFrom(item); // info.PLOTTINGFILENAME = path.Replace('~', ' ') + "/" + item.PLOTTINGFILENAME; result.Add(info); } ms = new MessageListObject(true, result); 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> public JsonResult GetAlarmListAjax() { string state = Request.Params["state"]; //处理状态 string starttime = Request.Params["starttime"]; //开始时间 string endtime = Request.Params["endtime"]; //开始时间 MessageListObject ms = null; var sw = new T_IPS_ALARM_SW(); sw.orgNo = SystemCls.getCurUserOrgNo(); sw.MANSTATE = state; sw.DateBegin = starttime; sw.DateEnd = endtime; sw.orgNo = SystemCls.getCurUserOrgNo(); var list = T_IPS_ALARMCls.getModelList(sw); if (list.Any()) { ms = new MessageListObject(true, list); } return(Json(ms)); }
/// <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> /// 检索获取数据上报数据 /// </summary> /// <returns>参见模型</returns> public JsonResult GetReportDataAjax() { MessageListObject ms = null; string starttime = Request.Params["starttime"]; //开始时间 string endtime = Request.Params["endtime"]; //开始时间 string type = Request.Params["type"]; //类型 string state = Request.Params["state"]; //状态 //if (string.IsNullOrEmpty(starttime) || string.IsNullOrEmpty(endtime) || string.IsNullOrEmpty(type)) //{ // ms = new MessageListObject(false, null); // return Json(ms); //} var sw = new T_IPSRPT_REPORT_SW(); sw.DateBegin = starttime; sw.DateEnd = endtime; sw.SYSTYPEVALUE = type; sw.orgNo = SystemCls.getCurUserOrgNo();//当前单位 if (state != "2") { sw.MANSTATE = state; } var list = T_IPSRPT_REPORTCls.getModelList(sw); if (list.Any()) { ms = new MessageListObject(true, list); } else { ms = new MessageListObject(false, null); } return(Json(ms)); }