简要描述:
- 按设备或车辆查询车次报告
接口版本:
| 版本号 | 制定人 | 制定日期 | 修订日期 | 
|---|---|---|---|
| 1.0.0 | lenny | 2022-09-22 | 2020-09-22 | 
请求URL:
- 国际客户:https://icloud.assetscontrols.com:3443/OpenApi/Admin
- 国内客户:https://cloud.assetscontrols.com:3443/OpenApi/Admin
请求方式:
| 参数名 | 是否必须 | 类型 | 说明 | 
|---|---|---|---|
| Content-Type | 是 | string | 请求类型: application/json | 
请求参数:
| 参数名 | 是否必须 | 类型 | 说明 | 
|---|---|---|---|
| FTokenID | 是 | string | 令牌ID | 
| FAction | 是 | string | 方法名 (QueryReportRouteDepartureListByFGUIDs ) | 
| FGUIDs | 是 | string | 车辆/设备唯一标识(多个以逗号隔开) | 
| FSelectType | 是 | int | 1:按车辆查;0:按终端查 | 
| FStatus | 是 | int | 运单状态(-2:查询全部; -1:作废;0:查询未完成;1:查询已完成 2:已超期(实际到达时间大于计划完成时间表示已超期) 3:计划单) | 
| FStartTime | 是 | datetime | 开始时间 (UTC时间) | 
| FEndTime | 是 | datetime | 结束时间 (UTC时间) | 
| FTimeDifferent | 是 | int | 时差(秒) | 
| FKey | 否 | string | 按运单号模糊查询 | 
| FPageSize | 否 | int | 分页查询 每页记录数 | 
| FPageIndex | 否 | int | 分页查询 当前页数 | 
返回示例:
正确时返回:
{
    "Result": 200,
    "Message": "check token success",
    "FObject": {
        "Table": [
            {
                "FTotalCount": 2
            }
        ],
        "Table1": [
            {
                "FGUID": "fa7cc011-21d5-4c78-bca1-b02871122314",
                "FVehicleGUID": "d7ca53d2-eb4c-4ab9-ba1a-9477becd4563",
                "FVehicleName": "KAA111A",
                "FWaybill": "",
                "FGoods": "",
                "FAssetGUID": "ac305cdc-24d0-4b2b-9581-69bf53fc1235",
                "FAssetID": "3454354353",
                "FRouteGUID": "7ed92857-8770-4351-9904-0d66d0933452",
                "FCarrier": "",
                "FDriverGUID": "00000000-0000-0000-0000-000000000000",
                "FDriverName": "",
                "FDriverPhone": "",
                "FPlanStartTime": "2024-12-03T06:02:00",
                "FActualStartTime": "2024-12-03T06:01:13.937",
                "FPlanEndTime": "2024-12-03T21:00:00",
                "FActualEndTime": null,
                "FStatus": 4,
                "FFinishTime": "2024-12-03T06:02:59.903",
                "FAgentGUID": "0f0f2e76-4733-4388-9242-9ed7db004562",
                "FCreateTime": "2024-12-03T06:00:54.07",
                "FContainerNo": "",
                "FCargoDescribe": "",
                "FConsignee": "",
                "FFinishType": 2,
                "FDepartureType": 0,
                "FPlannedDuration": 30,
                "RowNo": 1,
                "FRouteName": "a-c",
                "FRouteCode": "20241017094717",
                "FAgentName": "KPM Tech Solution",
                "TransportationTime": "451",
                "TransportationMileage": "0",
                "ViewDetails": ""
            } 
        ]
    }
}错误时返回:
//表示传入的公司的唯一标识为空,应该是数据格式不对
{
    "Result": 102,
    "Message": "FGUIDs is null",
    "FObject": []
}
//表示token过期异常报错
{
    "Result": 104,
    "Message": "token error or timeout",
    "FObject": []
}
//表示有异常报错
{
    "Result": 105,
    "Message": "fail",
    "FObject": null
}
返回Table参数说明:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| FTotalCount | int | 分页总数量 | 
返回Table1参数说明:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| FGUID | string | 运单唯一标识 | 
| FVehicleGUID | String | 车辆唯一标识 | 
| FVehicleName | string | 车牌号 | 
| FAssetGUID | string | 设备唯一标识 | 
| FAssetID | string | 设备号 | 
| FRouteGUID | string | 路线唯一标识 | 
| FRouteName | string | 路线名称 | 
| FRouteCode | string | 路线编码 | 
| FAgentGUID | string | 公司唯一标识 | 
| FAgentName | string | 公司名称 | 
| FPlanStartTime | DateTime | 计划开始时间(UTC时间) | 
| FPlanEndTime | DateTime | 计划结束时间(UTC时间) | 
| FActualStartTime | DateTime | 实际发车时间(UTC时间) | 
| FActualEndTime | DateTime | 实际到达时间(UTC时间) | 
| FFinishTime | DateTime | 完成时间(UTC时间) | 
| FCreateTime | DateTime | 创建时间(UTC时间) | 
| FWaybill | string | 订单号 | 
| FGoods | string | 货物名称 | 
| FCarrier | string | 承运商 | 
| FDriverName | string | 司机名 | 
| FDriverPhone | string | 司机电话 | 
| FContainerNo | string | 货箱 | 
| FCargoDescribe | string | 货物描述 | 
| FConsignee | string | 收货人 | 
| FFinishType | int | 完成规则 0:出目的地完成 1:到达目的地完成 2:目的地内开锁完成 5:回到起点完成 | 
| FDepartureType | int | 运单类型 0:普通单 1:计划单 | 
| FPlannedDuration | int | 计划单提前时间(分钟) | 
| FStatus | int | 运单状态( -1:作废;0:未完成;1:自动完成 2:已超期(实际到达时间大于计划完成时间表示已超期) 3:计划单) 4:手动完成 | 
| TransportationTime | int | 耗时(秒) | 
| TransportationMileage | int | 里程值 | 
| ViewDetails | string | 运单详情链接 | 
备注:
- 更多返回错误代码如下:
- 106:账户过期
- 103:用户名或者密码错误
- 102:请求参数错误
- 104:token过期异常报错
- 105:表示有异常报错
请求示例:
Java:
String result = "";
//请求路径
String url = "https://cloud.assetscontrols.com:3443/OpenApi/Admin";  
//请求参数 ,json格式参数,建议用对象传入
String body = "{\"FAction\": \"QueryReportRouteDepartureListByFGUIDs\", \"FPageSize\": 50, \"FPageIndex\": 1, \"FStatus\": 0, \"FGUIDs\": \"661E7209-C77E-4A54-AFB8-6D956F962BDF\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\", \"FTokenID\": \"ec51d691-d9a7-4f74-95a8-1856be2ae741\", \"FTimeDifferent\": 28800, \"FLanguage\": \"1\"}";
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 = "https://cloud.assetscontrols.com:3443/OpenApi/Admin";  
//请求参数 ,json格式参数,建议用对象传入
string body = "{\"FAction\": \"QueryReportRouteDepartureListByFGUIDs\", \"FPageSize\": 50, \"FPageIndex\": 1, \"FStatus\": 0, \"FGUIDs\": \"661E7209-C77E-4A54-AFB8-6D956F962BDF\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\", \"FTokenID\": \"ec51d691-d9a7-4f74-95a8-1856be2ae741\", \"FTimeDifferent\": 28800, \"FLanguage\": \"1\"}"; 
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 = 'https://cloud.assetscontrols.com:3443/OpenApi/Admin'
      data = {
        'FAction': 'QueryReportRouteDepartureListByFGUIDs',
        'FTokenID': 'ec51d691-d9a7-4f74-95a8-1856be2ae741',
        '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',
        'FStatus':0,
        'FPageSize':50,
        'FPageIndex':1,
        'FTimeDifferent':28800,
        'FLanguage':1
       }
      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;文档更新时间: 2025-08-05 11:24   作者:刘家帅
