|
@ -107,6 +107,12 @@ namespace FangYar.WebUI.ashx |
|
|
case "AppUpdateAlarmEmpStateByOrgId": |
|
|
case "AppUpdateAlarmEmpStateByOrgId": |
|
|
returnstr = AppUpdateAlarmEmpStateByOrgId(context); |
|
|
returnstr = AppUpdateAlarmEmpStateByOrgId(context); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case "AppGetAlarmCarListByOrgIdApprovalState": |
|
|
|
|
|
returnstr = AppGetAlarmCarListByOrgIdApprovalState(context); |
|
|
|
|
|
break; |
|
|
|
|
|
case "AppUpdateAlarmCarStateByOrgId": |
|
|
|
|
|
returnstr = AppUpdateAlarmCarStateByOrgId(context); |
|
|
|
|
|
break; |
|
|
case "AppGetAlarmCarListByOrgId": |
|
|
case "AppGetAlarmCarListByOrgId": |
|
|
returnstr = AppGetAlarmCarListByOrgId(context); |
|
|
returnstr = AppGetAlarmCarListByOrgId(context); |
|
|
break; |
|
|
break; |
|
@ -2503,6 +2509,87 @@ namespace FangYar.WebUI.ashx |
|
|
BLL.SysOperationLogHelp.AddSysOperationLog(context, Common.EnumOperationLogType.Query, "APP操作请求", "车辆报警列表查询"); |
|
|
BLL.SysOperationLogHelp.AddSysOperationLog(context, Common.EnumOperationLogType.Query, "APP操作请求", "车辆报警列表查询"); |
|
|
return returnstr; |
|
|
return returnstr; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//车辆报警列表查询(待审批)
|
|
|
|
|
|
private string AppGetAlarmCarListByOrgIdApprovalState(HttpContext context) |
|
|
|
|
|
{ |
|
|
|
|
|
string returnstr = ""; |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
FangYar.BLL.TBL_ALARMDATA alarmBll = new FangYar.BLL.TBL_ALARMDATA(); |
|
|
|
|
|
|
|
|
|
|
|
string OrgId = context.Request.Params["orgId"]; |
|
|
|
|
|
string keywords = context.Request.Params["keywords"]; |
|
|
|
|
|
string page = context.Request.Params["page"]; |
|
|
|
|
|
string limit = context.Request.Params["limit"]; |
|
|
|
|
|
int pageIndex = 1; |
|
|
|
|
|
int pageSize = 10; |
|
|
|
|
|
if (!string.IsNullOrEmpty(page)) { pageIndex = int.Parse(page); } |
|
|
|
|
|
if (!string.IsNullOrEmpty(limit)) { pageSize = int.Parse(limit); } |
|
|
|
|
|
string where = " ALARM_TYPE='2' and state = '0' "; |
|
|
|
|
|
if (!string.IsNullOrEmpty(OrgId)) |
|
|
|
|
|
{ |
|
|
|
|
|
where += " and (ORG_ID ='" + OrgId + "' or ORG_ID in (select o.org_id from fire_org o where o.pid = '" + OrgId + "') )"; |
|
|
|
|
|
} |
|
|
|
|
|
if (!string.IsNullOrEmpty(keywords)) |
|
|
|
|
|
{ |
|
|
|
|
|
where += " and CAR_NUM like '%" + keywords + "%'"; |
|
|
|
|
|
} |
|
|
|
|
|
returnstr = "{\"code\":0,\"msg\":\"\","; |
|
|
|
|
|
int count = alarmBll.GetRecordCount(where); |
|
|
|
|
|
returnstr += "\"count\":" + count + ",\"data\":"; |
|
|
|
|
|
if (count == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
returnstr += "[]"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
DataTable dt = alarmBll.GetListByPage(where, " TIME desc ", (pageIndex - 1) * pageSize, pageSize).Tables[0]; |
|
|
|
|
|
returnstr += FangYar.Common.JsonHelper.ToJson(dt); |
|
|
|
|
|
} |
|
|
|
|
|
returnstr += "}"; |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception e) |
|
|
|
|
|
{ |
|
|
|
|
|
returnstr = "{\"code\":-1,\"msg\":\"error\",\"count\":0,\"data\":[]}"; |
|
|
|
|
|
// 记录操作日志
|
|
|
|
|
|
BLL.SysOperationLogHelp.AddSysOperationLog(context, Common.EnumOperationLogType.Error, "APP操作请求", "车辆报警列表查询异常:" + e); |
|
|
|
|
|
} |
|
|
|
|
|
// 记录操作日志
|
|
|
|
|
|
BLL.SysOperationLogHelp.AddSysOperationLog(context, Common.EnumOperationLogType.Query, "APP操作请求", "车辆报警列表查询"); |
|
|
|
|
|
return returnstr; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//审批车辆报警
|
|
|
|
|
|
private string AppUpdateAlarmCarStateByOrgId(HttpContext context) |
|
|
|
|
|
{string returnstr = "", msg = "审批失败!"; |
|
|
|
|
|
int code = 0; |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
string id = context.Request.Params["id"]; |
|
|
|
|
|
string OPINION = context.Request.Params["OPINION"]; |
|
|
|
|
|
|
|
|
|
|
|
string sql = " update tbl_alarmdata set state='1',OPINION='"+ OPINION + "' where id='" + id + "' "; |
|
|
|
|
|
var n1 = FangYar.Common.MySqlHelper.Execute(sql); |
|
|
|
|
|
if (n1 > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
msg = "审批成功!"; |
|
|
|
|
|
code = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
msg = "审批失败!"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
catch(Exception e) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
returnstr = "{\"code\":" + code + ",\"msg\":\"" + msg + "\"}"; |
|
|
|
|
|
return returnstr; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 访客登记列表
|
|
|
#region 访客登记列表
|
|
|