/// <summary> /// 删除上报数据 /// </summary> /// <returns>参见模型</returns> public JsonResult DeleteReportDataAjax() { Message ms = null; string reportid = Request.Params["reportid"]; if (string.IsNullOrEmpty(reportid)) { ms = new Message(false, "reportid参数传递错误", ""); return(Json(ms)); } var m = new T_IPSRPT_REPORT_Model(); m.opMethod = "Del"; m.REPORTID = reportid; ms = T_IPSRPT_REPORTCls.Manager(m); return(Json(ms)); }
/// <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)); }