You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
59 lines
1.9 KiB
11 months ago
|
using System.Web;
|
||
|
using System.Data;
|
||
|
|
||
|
namespace FangYar.WebUI.Handle
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// VISGDT 的摘要说明 根据人证机设备编号 获取部门、人员Tree
|
||
|
/// </summary>
|
||
|
public class LSTQYZVISQuery : IHttpHandler
|
||
|
{
|
||
|
private FangYar.BLL.OA.TBL_VISITOR_REG vrbll = new FangYar.BLL.OA.TBL_VISITOR_REG();
|
||
|
private FangYar.BLL.OA.TBL_EPUIP_ORG eobll = new FangYar.BLL.OA.TBL_EPUIP_ORG();
|
||
|
|
||
|
public void ProcessRequest(HttpContext context)
|
||
|
{
|
||
|
context.Response.ContentType = "text/plain";
|
||
|
string returnStr = "";
|
||
|
|
||
|
returnStr = ReceiveAlarmInfoPlate(context);
|
||
|
context.Response.Write(returnStr);
|
||
|
}
|
||
|
|
||
|
//硬件接口:
|
||
|
//频繁触发获取访客访问状态
|
||
|
private string ReceiveAlarmInfoPlate(HttpContext context)
|
||
|
{
|
||
|
string returnstr = "";
|
||
|
try
|
||
|
{
|
||
|
string EpuId = context.Request.Params["deviceNumber"];
|
||
|
|
||
|
FangYar.Model.OA.TBL_EPUIP_ORG eoModel = eobll.EpuIdGetModel(EpuId);
|
||
|
if (eoModel.ORG_ID != null || eoModel.ORG_ID != "")
|
||
|
{
|
||
|
returnstr = "{\"code\":200,\"msg\":\"success\",\"data\":";
|
||
|
DataTable data = vrbll.queryVisReg(eoModel.ORG_ID);
|
||
|
returnstr += FangYar.Common.JsonHelper.ToJson(data);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
returnstr = "{\"code\":0,\"msg\":\"未查询到设备所属机构\",\"data\":[]";
|
||
|
}
|
||
|
returnstr += "}";
|
||
|
}
|
||
|
catch
|
||
|
{
|
||
|
returnstr = "{\"code\":0,\"msg\":\"error\",\"count\":0,\"data\":[]}";
|
||
|
}
|
||
|
return returnstr;
|
||
|
}
|
||
|
public bool IsReusable
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|