简要描述:

  • 获取开关锁报表

接口版本:

版本号 制定人 制定日期 修订日期
2.0.0 lenny 2020-08-20 2020-08-20

请求URL:

请求头:

参数名 是否必须 类型 说明
Content-Type string 请求类型: application/json

请求参数:

参数名 是否必须 类型 说明
FTokenID string 令牌ID
FAction string 方法名 (QueryReportOpenLockList)
FGUIDs string 车辆/设备唯一标识(多个以逗号隔开)
FSelectType int 1:按车辆查;0:按终端查
FStartTime datetime 开始时间 (UTC时间)
FEndTime datetime 结束时间 (UTC时间)
FDateType int 1:按接收时间查;0:按GPS时间查
#### 返回示例:

正确时返回:

{
    "Result": 200,
    "Message": "check token success",
    "FObject": [
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T01:55:35",
            "FLongitude": 113.917915,
            "FLatitude": 22.580486,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2"FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:38:03",
            "FLongitude": 113.917475,
            "FLatitude": 22.580903,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:21:56",
            "FLongitude": 113.917031,
            "FLatitude": 22.58096,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "eabd84fc-0228-4836-a0a2-3404ec074a13",
            "FVehicleName": "粤BXX3618",
            "FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
            "FAssetID": "7500313618",
            "FAssetTypeID": 3701,
            "FDateTime": "2020-08-19T12:34:19",
            "FLongitude": 0.0,
            "FLatitude": 0.0,
            "FMileage": 0,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "eabd84fc-0228-4836-a0a2-3404ec074a13",
            "FVehicleName": "粤BXX3618",
            "FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
            "FAssetID": "7500313618",
            "FAssetTypeID": 3701,
            "FDateTime": "2020-08-19T12:34:28",
            "FLongitude": 0.0,
            "FLatitude": 0.0,
            "FMileage": 0,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:41:59",
            "FLongitude": 113.917575,
            "FLatitude": 22.580896,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:01:44",
            "FLongitude": 113.91725,
            "FLatitude": 22.581255,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:02:10",
            "FLongitude": 113.917125,
            "FLatitude": 22.581151,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:02:14",
            "FLongitude": 113.917105,
            "FLatitude": 22.581125,
            "FMileage": 1,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:22:03",
            "FLongitude": 113.91732,
            "FLatitude": 22.581771,
            "FMileage": 1,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:40:16",
            "FLongitude": 113.917001,
            "FLatitude": 22.580985,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "eabd84fc-0228-4836-a0a2-3404ec074a13",
            "FVehicleName": "粤BXX3618",
            "FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
            "FAssetID": "7500313618",
            "FAssetTypeID": 3701,
            "FDateTime": "2020-08-19T12:34:47",
            "FLongitude": 0.0,
            "FLatitude": 0.0,
            "FMileage": 0,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:40:55",
            "FLongitude": 113.916995,
            "FLatitude": 22.581028,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T01:56:12",
            "FLongitude": 113.917831,
            "FLatitude": 22.580556,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T01:56:30",
            "FLongitude": 113.917691,
            "FLatitude": 22.580755,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:38:13",
            "FLongitude": 113.917415,
            "FLatitude": 22.580985,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:13:54",
            "FLongitude": 113.917273,
            "FLatitude": 22.581178,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T03:13:59",
            "FLongitude": 113.917228,
            "FLatitude": 22.581175,
            "FMileage": 1,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "b1b196d4-8883-4b52-88ac-a8b8fbe49ee7",
            "FVehicleName": "粤BXX2388",
            "FAssetGUID": "6808d56e-ea45-4d2c-a70b-bee72dfcf274",
            "FAssetID": "7291212388",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-21T07:16:44",
            "FLongitude": 113.917201,
            "FLatitude": 22.58152,
            "FMileage": 0,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "eabd84fc-0228-4836-a0a2-3404ec074a13",
            "FVehicleName": "粤BXX3618",
            "FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
            "FAssetID": "7500313618",
            "FAssetTypeID": 3701,
            "FDateTime": "2020-08-19T12:34:54",
            "FLongitude": 0.0,
            "FLatitude": 0.0,
            "FMileage": 0,
            "FType": 0,
            "FOpenType": -1,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "b1b196d4-8883-4b52-88ac-a8b8fbe49ee7",
            "FVehicleName": "粤BXX2388",
            "FAssetGUID": "6808d56e-ea45-4d2c-a70b-bee72dfcf274",
            "FAssetID": "7291212388",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-21T07:16:34",
            "FLongitude": 113.917068,
            "FLatitude": 22.581216,
            "FMileage": 0,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        },
        {
            "FVehicleGUID": "be2a1e27-b36e-4301-b2c8-465a62ad215f",
            "FVehicleName": "粤BXX3453",
            "FAssetGUID": "9c1d9a6d-9daf-4e8c-b409-0127743325ce",
            "FAssetID": "7581213453",
            "FAssetTypeID": 701,
            "FDateTime": "2020-08-20T02:38:49",
            "FLongitude": 113.917288,
            "FLatitude": 22.580951,
            "FMileage": 1,
            "FType": 1,
            "FOpenType": 2,
            "FUserName": ""
        }
    ]
}

错误时返回:

{
    "Result": 102,
    "Message": "Action is error",
    "FObject": []
}

返回参数说明:

参数名 类型 说明
FVehicleGUID String 车辆唯一标识
FVehicleName String 车牌号
FAssetGUID String 设备唯一标识
FAssetID String 设备ID
FAssetTypeID Int 设备类型
FDateTime DateTime 开关锁GPS时间
FLongitude Decimal 经度
FLatitude Decimal 纬度
FMileage Int 里程
FType Int 锁状态 (1:开;0:关)
FOpenType Int 开锁类型 (-1:关锁 1:刷卡;2:远程;3:蓝牙)
FCreateTime DateTime 开关锁按收时间
FUserName String 开锁人

备注:

  • 更多返回错误代码如下:
  • 104:token错误或过期
  • 105:异常错误
  • 102:请求参数错误

请求示例:

Java:

String result = "";
//请求路径
String url = "http://cloud.assetscontrols.com:8092/OpenApi/Report";  
//请求参数 ,json格式参数,建议用对象传入
String body = "{FAction:\"QueryReportOpenLockList\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUIDs:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\",FDateType:\"0\"}";
URL realUrl = new URL(url);
// 设置通用请求的属性
URLConnection conn = realUrl.openConnection(); 
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "keep-Alive");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("method", "post");
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
PrintWriter pw = new PrintWriter(conn.getOutputStream());
// 发送请求参数
pw.print(body);
// flush输出流的缓冲  
pw.flush();   
// 定义BufferedReader输入流来读取URL的响应
BufferedReader bufReader = new BufferedReader(new InputStreamReader(conn.getInputStream()));  
// 定义BufferedReader输入流来读取URL的响应
String line;
while ((line = bufReader.readLine()) != null) {
     result += line;        
 }
//返回的是json字符串
return result;

C#:

//请求路径
string url = "http://cloud.assetscontrols.com:8092/OpenApi/Report";  
//请求参数 ,json格式参数,建议用对象传入
string body = "{FAction:\"QueryReportOpenLockList\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUIDs:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\",FDateType:\"0\"}"; 
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
 //请求方式 post / get
request.Method = "post"; 
request.Accept = "*/*";    
request.ContentType = "application/json";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
byte[] buffer = encoding.GetBytes(body);
request.ContentLength = buffer.Length;
request.GetRequestStream().Write(buffer, 0, buffer.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
    //返回的是json字符串
    return reader.ReadToEnd();
}

Python:

 url = 'http://cloud.assetscontrols.com:8092/OpenApi/Report'
      data = {
      'FAction': 'QueryReportOpenLockList',
      'FTokenID': '3acef045-d302-4032-b40a-d9ee6c1519cd',
      'FGUIDs':'BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E',
      'FSelectType':1,
      'FStartTime':'2020-08-05 16:00:00',
      'FEndTime':'2020-08-12 15:59:59',
      'FDateType':0
       }
      data = parse.urlencode(data).encode('utf-8')
      headers = {
       'User-Agent': r'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
                     r'Chrome/45.0.2454.85 Safari/537.36 115Browser/6.0.3',
       'Connection': 'keep-alive'
       }
      req = request.Request(url, headers=headers, data=data)  
      page = request.urlopen(req).read()
      page = page.decode('utf-8')
      # json_array = json.loads(page)
      return page;

Node.js:

文档更新时间: 2024-08-19 13:57   作者:刘家帅