孙伟人 9 months ago
parent
commit
698b7e98e7
  1. 87
      Code/智慧营区/DOCManageAPP(阿克苏)/ashx/AppHandler.ashx.cs
  2. 12
      Code/智慧营区/DOCManageAPP(阿克苏)/ashx/OaPerformanceRecordHandler.ashx.cs

87
Code/智慧营区/DOCManageAPP(阿克苏)/ashx/AppHandler.ashx.cs

@ -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 访客登记列表

12
Code/智慧营区/DOCManageAPP(阿克苏)/ashx/OaPerformanceRecordHandler.ashx.cs

@ -121,6 +121,7 @@ namespace FangYar.WebUI.ashx
string startDate = context.Request.Params["startDate"]; string startDate = context.Request.Params["startDate"];
string endDate = context.Request.Params["endDate"]; string endDate = context.Request.Params["endDate"];
string is_content = context.Request.Params["is_content"]; string is_content = context.Request.Params["is_content"];
string state = context.Request.Params["state"];
string page = context.Request.Params["page"]; string page = context.Request.Params["page"];
string limit = context.Request.Params["limit"]; string limit = context.Request.Params["limit"];
int pageIndex = 1; int pageIndex = 1;
@ -153,6 +154,15 @@ namespace FangYar.WebUI.ashx
{ {
where += " and date_format(TIME, '%Y-%m-%d') < date_format('" + endDate + "-01', '%Y-%m-%d') "; where += " and date_format(TIME, '%Y-%m-%d') < date_format('" + endDate + "-01', '%Y-%m-%d') ";
} }
if (!string.IsNullOrEmpty(state))
{
if (!string.IsNullOrEmpty(where))
{
where += "and";
}
where += " state = '" + state + "' ";
}
returnstr = "{\"code\":0,\"msg\":\"\","; returnstr = "{\"code\":0,\"msg\":\"\",";
int count = bll.GetRecordCount(where); int count = bll.GetRecordCount(where);
returnstr += "\"count\":" + count + ",\"data\":"; returnstr += "\"count\":" + count + ",\"data\":";
@ -198,6 +208,7 @@ namespace FangYar.WebUI.ashx
string DEPT_ID = context.Request.Params["DEPT_ID"]; string DEPT_ID = context.Request.Params["DEPT_ID"];
string DEPT_NAME = context.Request.Params["DEPT_NAME"]; string DEPT_NAME = context.Request.Params["DEPT_NAME"];
string TYPE = context.Request.Params["TYPE"]; string TYPE = context.Request.Params["TYPE"];
string TITLE = context.Request.Params["TITLE"];
FangYar.Model.OA.OA_PERFORMANCE_RECORD model = new Model.OA.OA_PERFORMANCE_RECORD(); FangYar.Model.OA.OA_PERFORMANCE_RECORD model = new Model.OA.OA_PERFORMANCE_RECORD();
model.ID = ID; model.ID = ID;
@ -228,6 +239,7 @@ namespace FangYar.WebUI.ashx
model.DEPT_NAME = DEPT_NAME; model.DEPT_NAME = DEPT_NAME;
} }
model.TYPE = TYPE; model.TYPE = TYPE;
model.TITLE = TITLE;
if (bll.Add(model)) if (bll.Add(model))
{ {
FangYar.BLL.OA.OA_PERFORMANCE_PUBLISH pbll = new FangYar.BLL.OA.OA_PERFORMANCE_PUBLISH(); FangYar.BLL.OA.OA_PERFORMANCE_PUBLISH pbll = new FangYar.BLL.OA.OA_PERFORMANCE_PUBLISH();

Loading…
Cancel
Save