/// <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)); }
/// <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)); }