Commit b14608baa7d9db5cb44194c6c7199fd754c6ffda
1 parent
bcb94001
1
Showing
1 changed file
with
307 additions
and
307 deletions
README.md
| 1 | -公交调度系统BS版 0.1 | |
| 2 | -====== | |
| 3 | ----------- | |
| 4 | -## 目录 | |
| 5 | ---------- | |
| 6 | - * [字典表](#字典表) | |
| 7 | - * [车载 gps 相关数据](#gps) | |
| 8 | - * [实时gps数据接口 http](#实时gps接口) | |
| 9 | - * [进出站数据表结构](#进站数据) | |
| 10 | - * [异常警报表结构](#异常警报) | |
| 11 | - * [大间隔](#大间隔) | |
| 12 | - * [超速](#超速) | |
| 13 | - * [越界](#越界) | |
| 14 | - * [越站](#越站) | |
| 15 | - * [聚集](#聚集) | |
| 16 | - * [掉线](#掉线) | |
| 17 | - * [消息上传下发](#消息上传下发) | |
| 18 | - | |
| 19 | ----------- | |
| 20 | - | |
| 21 | -## 字典表 | |
| 22 | ----------- | |
| 23 | -字典操作全部由前端负责,主要有2种。 | |
| 24 | - | |
| 25 | -1、将字典代码转换为中文 。片段加载完成后,包含 `class="nt-dictionary"` 的标签会被转换,data-group 为所属字典组。 | |
| 26 | -``` html | |
| 27 | - | |
| 28 | -<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span> | |
| 29 | - | |
| 30 | ---转换后 | |
| 31 | -<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span> | |
| 32 | -``` | |
| 33 | -2、生成下拉框,当包含`class="nt-dictionary"` 的标签是`select`时。 | |
| 34 | -``` html | |
| 35 | -<!- 原 --> | |
| 36 | -<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select> | |
| 37 | - | |
| 38 | -<!-- 转换后 --> | |
| 39 | -<select class="nt-dictionary" data-group="XianLuXingZhi" > | |
| 40 | - <option value="GJXL">过江线路</option> | |
| 41 | - <option value="CCTXL">村村通线路</option> | |
| 42 | - <option value="YXXL">夜宵线路</option> | |
| 43 | - <option value="CSBS">穿梭巴士</option> | |
| 44 | -</select> | |
| 45 | -``` | |
| 46 | - | |
| 47 | -## gps | |
| 48 | ----------- | |
| 49 | -### 实时gps接口 | |
| 50 | - | |
| 51 | -所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/) | |
| 52 | -根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901) | |
| 53 | - | |
| 54 | -<span style="color: red">Response</span>: | |
| 55 | -```json | |
| 56 | -{ | |
| 57 | - "data":[ | |
| 58 | - { | |
| 59 | - "companyCode":5, | |
| 60 | - "lineId":10329, | |
| 61 | - "deviceId":"05B01901", | |
| 62 | - "carparkNo":"00000000", | |
| 63 | - "stopNo":"7C890002", | |
| 64 | - "lon":121.549866, | |
| 65 | - "lat":31.238798, | |
| 66 | - "timestamp":1397104499000, | |
| 67 | - "speed":42.0, | |
| 68 | - "direction":245.9, | |
| 69 | - "state":0, | |
| 70 | - "upDown":0 | |
| 71 | - }] | |
| 72 | -} | |
| 73 | -``` | |
| 74 | - | |
| 75 | -| -- | --|--| | |
| 76 | -| ---- | ---- | ---- | | |
| 77 | -| companyCode | int | 公司代码 | | |
| 78 | -| lineId | int | 线路编码 | | |
| 79 | -| deviceId | String | 设备编号 | | |
| 80 | -| carparkNo | String | 停车场编码 | | |
| 81 | -| stopNo | String | 站点编码 | | |
| 82 | -| lon | float | 经度 | | |
| 83 | -| lat | float | 纬度 | | |
| 84 | -| timestamp | long | 时间戳 | | |
| 85 | -| speed | float | 速度| | |
| 86 | -| direction | float | 方向(角度) | | |
| 87 | -| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) | | |
| 88 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)| | |
| 89 | - | |
| 90 | - | |
| 91 | -### 进站数据 | |
| 92 | ----------- | |
| 93 | -表名: | |
| 94 | - | |
| 95 | -| .. | .. | .. | | |
| 96 | -| ---- | ---- | ---- | | |
| 97 | -| id | int | 主键 | | |
| 98 | -| deviceId | String | 设备号 | | |
| 99 | -| lineId | int | 线路编码 | | |
| 100 | -| stopNo | long | 站点编码 | | |
| 101 | -| timestamp | long | 时间戳 | | |
| 102 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 103 | -| createDate | Date | 创建时间 | | |
| 104 | - | |
| 105 | - | |
| 106 | -### 异常警报 | |
| 107 | ----------- | |
| 108 | - | |
| 109 | -### 大间隔 | |
| 110 | ----------- | |
| 111 | -表名: | |
| 112 | - | |
| 113 | -| .. | .. | .. | | |
| 114 | -| ---- | ---- | ---- | | |
| 115 | -| id | int | 主键 | | |
| 116 | -| line | int | 线路编码 | | |
| 117 | -| station | String | 站点编码 | | |
| 118 | -| cVehicle | String | 当前车辆编码 | | |
| 119 | -| lastVehicle | String | 上一个车辆编码 | | |
| 120 | -| interval | long | 间隔时间(秒) | | |
| 121 | -| timestamp | long | 时间戳 | | |
| 122 | -| createDate | Date | 创建时间 | | |
| 123 | - | |
| 124 | -### 超速 | |
| 125 | ----------- | |
| 126 | -表名: | |
| 127 | - | |
| 128 | -| .. | .. | .. | | |
| 129 | -| ---- | ---- | ---- | | |
| 130 | -| id | int | 主键 | | |
| 131 | -| vehicle | String | 车辆编码 | | |
| 132 | -| line | int | 线路编码 | | |
| 133 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 134 | -| lon | float | 经度 | | |
| 135 | -| lat | float | 纬度| | |
| 136 | -| speed | float | 速度 | | |
| 137 | -| timestamp | long | 时间戳 | | |
| 138 | -| createDate | Date | 时间 | | |
| 139 | - | |
| 140 | -### 越界 | |
| 141 | ----------- | |
| 142 | -表名: | |
| 143 | - | |
| 144 | -| .. | .. | .. | | |
| 145 | -| ---- | ---- | ---- | | |
| 146 | -| id | int | 主键 | | |
| 147 | -| vehicle | String | 车辆编码 | | |
| 148 | -| line | int | 线路编码 | | |
| 149 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 150 | -| lon | float | 经度 | | |
| 151 | -| lat | float | 纬度| | |
| 152 | -| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值| | |
| 153 | -| timestamp | long | 时间戳 | | |
| 154 | -| createDate | Date | 时间 | | |
| 155 | - | |
| 156 | - | |
| 157 | -### 越站 | |
| 158 | ----------- | |
| 159 | -表名: | |
| 160 | - | |
| 161 | -| .. | .. | .. | | |
| 162 | -| ---- | ---- | ---- | | |
| 163 | -| id | int | 主键 | | |
| 164 | -| line | int | 线路编码 | | |
| 165 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 166 | -| station | String | 站点编码 | | |
| 167 | -| vehicle | String | 车辆编码 | | |
| 168 | -| inData | Date | 进站时间 | | |
| 169 | -| outDate | Date | 出站时间 | | |
| 170 | - | |
| 171 | - | |
| 172 | -### 聚集 | |
| 173 | ----------- | |
| 174 | -表名: | |
| 175 | - | |
| 176 | -| .. | .. | .. | | |
| 177 | -| ---- | ---- | ---- | | |
| 178 | -| id | int | 主键 | | |
| 179 | -| line | int | 线路编码 | | |
| 180 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 181 | -| stations | String | 站点(多个用 , 号分隔。应该是连续站点) | | |
| 182 | -| vehicles | String | 车辆编码(多个用 , 号分隔) | | |
| 183 | -| timestamp | long | 时间戳 | | |
| 184 | -| createDate | Date | 时间 | | |
| 185 | - | |
| 186 | - | |
| 187 | -### 掉线 | |
| 188 | ----------- | |
| 189 | -表名: | |
| 190 | - | |
| 191 | -| .. | .. | .. | | |
| 192 | -| ---- | ---- | ---- | | |
| 193 | -| id | int | 主键 | | |
| 194 | -| line | int | 线路编码 | | |
| 195 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 196 | -| vehicle | String | 车辆编码 | | |
| 197 | -| lon | float | 经度 | | |
| 198 | -| lat | float | 纬度| | |
| 199 | -| timestamp | long | 时间戳 | | |
| 200 | -| createDate | Date | 时间 | | |
| 201 | - | |
| 202 | -## 消息上传下发 | |
| 203 | ----------- | |
| 204 | -### 消息下发接口 | |
| 205 | -[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/) | |
| 206 | - | |
| 207 | -<span style="color: red">Request</span>: | |
| 208 | -```json | |
| 209 | -{ | |
| 210 | - "deviceId":12345, | |
| 211 | - "timestamp":44324, | |
| 212 | - "operCode":0x60, | |
| 213 | - "data":{ | |
| 214 | - "companyCode":22,//short | |
| 215 | - "deviceId":"029L2222",//string | |
| 216 | - "timestamp":134326,//long | |
| 217 | - "instructType":00,//short | |
| 218 | - "dispatchInstruct":0x00,//short | |
| 219 | - "msgId":12345,//long | |
| 220 | - "alarmTime":201606012000,//long | |
| 221 | - "serviceState":00000000,//long | |
| 222 | - "txtContent":"你好"//string | |
| 223 | - } | |
| 224 | -} | |
| 225 | -``` | |
| 226 | -| .. | .. | .. | | |
| 227 | -| ---- | ---- | ---- | | |
| 228 | -| deviceId | string | 设备编号 | | |
| 229 | -| timestamp | long | 时间戳(ms) | | |
| 230 | -| operCode | short | 一级协议 | | |
| 231 | -| data.companyCode | short | 公司代码 | | |
| 232 | -| data.deviceId | string | 设备编号 | | |
| 233 | -| data.timestamp | long | 时间戳 | | |
| 234 | -| data.instructType | short | 保留 默认0 | | |
| 235 | -| data.dispatchInstruct | short | 调度指令 | | |
| 236 | -| data.msgId | long | 同上 | | |
| 237 | -| data.alarmTime | long | 闹钟 | | |
| 238 | -| data.serviceState | long | 多状态字节 | | |
| 239 | -| data.txtContent | string | 下发的消息文本 | | |
| 240 | -```json | |
| 241 | -{ | |
| 242 | - "deviceId":12345, | |
| 243 | - "timestamp":44324, | |
| 244 | - "operCode":0x64, | |
| 245 | - "data":{ | |
| 246 | - "cityCode":22,//int | |
| 247 | - "deviceId":"029L2222",//string | |
| 248 | - "lineId":"134326"//string | |
| 249 | - } | |
| 250 | -} | |
| 251 | -``` | |
| 252 | -| .. | .. | .. | | |
| 253 | -| ---- | ---- | ---- | | |
| 254 | -| deviceId | string | 设备编号 | | |
| 255 | -| timestamp | long | 时间戳(ms) | | |
| 256 | -| operCode | short | 一级协议 | | |
| 257 | -| data.cityCode | short | 城市区号 | | |
| 258 | -| data.deviceId | string | 设备编号 | | |
| 259 | -| data.lineId | string | 线路编号 | | |
| 260 | - | |
| 261 | -```json | |
| 262 | -{ | |
| 263 | - "deviceId":12345, | |
| 264 | - "timestamp":44324, | |
| 265 | - "operCode":0xC0, | |
| 266 | - "data":{ | |
| 267 | - "operCode":0x86, | |
| 268 | - "requestAck":0x06 // 0x06同意 0x15不同意 | |
| 269 | - } | |
| 270 | -} | |
| 271 | -``` | |
| 272 | -| .. | .. | .. | | |
| 273 | -| ---- | ---- | ---- | | |
| 274 | -| deviceId | string | 设备编号 | | |
| 275 | -| timestamp | long | 时间戳(ms) | | |
| 276 | -| operCode | short | 一级协议 | | |
| 277 | -| data.operCode | short | 二级协议 | | |
| 278 | -| data.requestAck | short | 请求应答字 | | |
| 279 | - | |
| 280 | -<span style="color: red">Response</span>: | |
| 281 | -```json | |
| 282 | -{ | |
| 283 | - "errCode":0 | |
| 284 | -} | |
| 285 | -``` | |
| 286 | - | |
| 287 | -### 消息上传接口 | |
| 288 | - | |
| 289 | -<span style="color: red">Request</span>: | |
| 290 | -```json | |
| 291 | -{ | |
| 292 | - "deviceId":12345, | |
| 293 | - "timestamp":44324, | |
| 294 | - "status":0,// 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读 | |
| 295 | - "operCode":0x80,// 消息确认时无数据 | |
| 296 | - "data":{ | |
| 297 | - "operCode":0x26,//二级协议 | |
| 298 | - "requestCode":22//short | |
| 299 | - }// 消息确认将无数据 | |
| 300 | -} | |
| 301 | -``` | |
| 302 | - | |
| 303 | -<span style="color: red">Response</span>: | |
| 304 | -```json | |
| 305 | -{ | |
| 306 | - "errCode":0 | |
| 307 | -} | |
| 1 | +公交调度系统BS版 0.1 | |
| 2 | +====== | |
| 3 | +---------- | |
| 4 | +## 目录 | |
| 5 | +--------- | |
| 6 | + * [字典表](#字典表) | |
| 7 | + * [车载 gps 相关数据](#gps) | |
| 8 | + * [实时gps数据接口 http](#实时gps接口) | |
| 9 | + * [进出站数据表结构](#进站数据) | |
| 10 | + * [异常警报表结构](#异常警报) | |
| 11 | + * [大间隔](#大间隔) | |
| 12 | + * [超速](#超速) | |
| 13 | + * [越界](#越界) | |
| 14 | + * [越站](#越站) | |
| 15 | + * [聚集](#聚集) | |
| 16 | + * [掉线](#掉线) | |
| 17 | + * [调度消息上传下发](#调度消息上传下发) | |
| 18 | + | |
| 19 | +---------- | |
| 20 | + | |
| 21 | +## 字典表 | |
| 22 | +---------- | |
| 23 | +字典操作全部由前端负责,主要有2种。 | |
| 24 | + | |
| 25 | +1、将字典代码转换为中文 。片段加载完成后,包含 `class="nt-dictionary"` 的标签会被转换,data-group 为所属字典组。 | |
| 26 | +``` html | |
| 27 | + | |
| 28 | +<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span> | |
| 29 | + | |
| 30 | +--转换后 | |
| 31 | +<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span> | |
| 32 | +``` | |
| 33 | +2、生成下拉框,当包含`class="nt-dictionary"` 的标签是`select`时。 | |
| 34 | +``` html | |
| 35 | +<!- 原 --> | |
| 36 | +<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select> | |
| 37 | + | |
| 38 | +<!-- 转换后 --> | |
| 39 | +<select class="nt-dictionary" data-group="XianLuXingZhi" > | |
| 40 | + <option value="GJXL">过江线路</option> | |
| 41 | + <option value="CCTXL">村村通线路</option> | |
| 42 | + <option value="YXXL">夜宵线路</option> | |
| 43 | + <option value="CSBS">穿梭巴士</option> | |
| 44 | +</select> | |
| 45 | +``` | |
| 46 | + | |
| 47 | +## gps | |
| 48 | +---------- | |
| 49 | +### 实时gps接口 | |
| 50 | + | |
| 51 | +所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/) | |
| 52 | +根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901) | |
| 53 | + | |
| 54 | +<span style="color: red">Response</span>: | |
| 55 | +```json | |
| 56 | +{ | |
| 57 | + "data":[ | |
| 58 | + { | |
| 59 | + "companyCode":5, | |
| 60 | + "lineId":10329, | |
| 61 | + "deviceId":"05B01901", | |
| 62 | + "carparkNo":"00000000", | |
| 63 | + "stopNo":"7C890002", | |
| 64 | + "lon":121.549866, | |
| 65 | + "lat":31.238798, | |
| 66 | + "timestamp":1397104499000, | |
| 67 | + "speed":42.0, | |
| 68 | + "direction":245.9, | |
| 69 | + "state":0, | |
| 70 | + "upDown":0 | |
| 71 | + }] | |
| 72 | +} | |
| 73 | +``` | |
| 74 | + | |
| 75 | +| -- | --|--| | |
| 76 | +| ---- | ---- | ---- | | |
| 77 | +| companyCode | int | 公司代码 | | |
| 78 | +| lineId | int | 线路编码 | | |
| 79 | +| deviceId | String | 设备编号 | | |
| 80 | +| carparkNo | String | 停车场编码 | | |
| 81 | +| stopNo | String | 站点编码 | | |
| 82 | +| lon | float | 经度 | | |
| 83 | +| lat | float | 纬度 | | |
| 84 | +| timestamp | long | 时间戳 | | |
| 85 | +| speed | float | 速度| | |
| 86 | +| direction | float | 方向(角度) | | |
| 87 | +| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) | | |
| 88 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)| | |
| 89 | + | |
| 90 | + | |
| 91 | +### 进站数据 | |
| 92 | +---------- | |
| 93 | +表名: | |
| 94 | + | |
| 95 | +| .. | .. | .. | | |
| 96 | +| ---- | ---- | ---- | | |
| 97 | +| id | int | 主键 | | |
| 98 | +| deviceId | String | 设备号 | | |
| 99 | +| lineId | int | 线路编码 | | |
| 100 | +| stopNo | long | 站点编码 | | |
| 101 | +| timestamp | long | 时间戳 | | |
| 102 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 103 | +| createDate | Date | 创建时间 | | |
| 104 | + | |
| 105 | + | |
| 106 | +### 异常警报 | |
| 107 | +---------- | |
| 108 | + | |
| 109 | +### 大间隔 | |
| 110 | +---------- | |
| 111 | +表名: | |
| 112 | + | |
| 113 | +| .. | .. | .. | | |
| 114 | +| ---- | ---- | ---- | | |
| 115 | +| id | int | 主键 | | |
| 116 | +| line | int | 线路编码 | | |
| 117 | +| station | String | 站点编码 | | |
| 118 | +| cVehicle | String | 当前车辆编码 | | |
| 119 | +| lastVehicle | String | 上一个车辆编码 | | |
| 120 | +| interval | long | 间隔时间(秒) | | |
| 121 | +| timestamp | long | 时间戳 | | |
| 122 | +| createDate | Date | 创建时间 | | |
| 123 | + | |
| 124 | +### 超速 | |
| 125 | +---------- | |
| 126 | +表名: | |
| 127 | + | |
| 128 | +| .. | .. | .. | | |
| 129 | +| ---- | ---- | ---- | | |
| 130 | +| id | int | 主键 | | |
| 131 | +| vehicle | String | 车辆编码 | | |
| 132 | +| line | int | 线路编码 | | |
| 133 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 134 | +| lon | float | 经度 | | |
| 135 | +| lat | float | 纬度| | |
| 136 | +| speed | float | 速度 | | |
| 137 | +| timestamp | long | 时间戳 | | |
| 138 | +| createDate | Date | 时间 | | |
| 139 | + | |
| 140 | +### 越界 | |
| 141 | +---------- | |
| 142 | +表名: | |
| 143 | + | |
| 144 | +| .. | .. | .. | | |
| 145 | +| ---- | ---- | ---- | | |
| 146 | +| id | int | 主键 | | |
| 147 | +| vehicle | String | 车辆编码 | | |
| 148 | +| line | int | 线路编码 | | |
| 149 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 150 | +| lon | float | 经度 | | |
| 151 | +| lat | float | 纬度| | |
| 152 | +| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值| | |
| 153 | +| timestamp | long | 时间戳 | | |
| 154 | +| createDate | Date | 时间 | | |
| 155 | + | |
| 156 | + | |
| 157 | +### 越站 | |
| 158 | +---------- | |
| 159 | +表名: | |
| 160 | + | |
| 161 | +| .. | .. | .. | | |
| 162 | +| ---- | ---- | ---- | | |
| 163 | +| id | int | 主键 | | |
| 164 | +| line | int | 线路编码 | | |
| 165 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 166 | +| station | String | 站点编码 | | |
| 167 | +| vehicle | String | 车辆编码 | | |
| 168 | +| inData | Date | 进站时间 | | |
| 169 | +| outDate | Date | 出站时间 | | |
| 170 | + | |
| 171 | + | |
| 172 | +### 聚集 | |
| 173 | +---------- | |
| 174 | +表名: | |
| 175 | + | |
| 176 | +| .. | .. | .. | | |
| 177 | +| ---- | ---- | ---- | | |
| 178 | +| id | int | 主键 | | |
| 179 | +| line | int | 线路编码 | | |
| 180 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 181 | +| stations | String | 站点(多个用 , 号分隔。应该是连续站点) | | |
| 182 | +| vehicles | String | 车辆编码(多个用 , 号分隔) | | |
| 183 | +| timestamp | long | 时间戳 | | |
| 184 | +| createDate | Date | 时间 | | |
| 185 | + | |
| 186 | + | |
| 187 | +### 掉线 | |
| 188 | +---------- | |
| 189 | +表名: | |
| 190 | + | |
| 191 | +| .. | .. | .. | | |
| 192 | +| ---- | ---- | ---- | | |
| 193 | +| id | int | 主键 | | |
| 194 | +| line | int | 线路编码 | | |
| 195 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | |
| 196 | +| vehicle | String | 车辆编码 | | |
| 197 | +| lon | float | 经度 | | |
| 198 | +| lat | float | 纬度| | |
| 199 | +| timestamp | long | 时间戳 | | |
| 200 | +| createDate | Date | 时间 | | |
| 201 | + | |
| 202 | +## 调度消息上传下发 | |
| 203 | +---------- | |
| 204 | +### 调度消息下发接口 | |
| 205 | +[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/) | |
| 206 | + | |
| 207 | +<span style="color: red">Request</span>: | |
| 208 | +```json | |
| 209 | +{ | |
| 210 | + "deviceId":12345, | |
| 211 | + "timestamp":44324, | |
| 212 | + "operCode":0x60, | |
| 213 | + "data":{ | |
| 214 | + "companyCode":22,//short | |
| 215 | + "deviceId":"029L2222",//string | |
| 216 | + "timestamp":134326,//long | |
| 217 | + "instructType":00,//short | |
| 218 | + "dispatchInstruct":0x00,//short | |
| 219 | + "msgId":12345,//long | |
| 220 | + "alarmTime":201606012000,//long | |
| 221 | + "serviceState":00000000,//long | |
| 222 | + "txtContent":"你好"//string | |
| 223 | + } | |
| 224 | +} | |
| 225 | +``` | |
| 226 | +| .. | .. | .. | | |
| 227 | +| ---- | ---- | ---- | | |
| 228 | +| deviceId | string | 设备编号 | | |
| 229 | +| timestamp | long | 时间戳(ms) | | |
| 230 | +| operCode | short | 一级协议 | | |
| 231 | +| data.companyCode | short | 公司代码 | | |
| 232 | +| data.deviceId | string | 设备编号 | | |
| 233 | +| data.timestamp | long | 时间戳 | | |
| 234 | +| data.instructType | short | 保留 默认0 | | |
| 235 | +| data.dispatchInstruct | short | 调度指令 | | |
| 236 | +| data.msgId | long | 同上 | | |
| 237 | +| data.alarmTime | long | 闹钟 | | |
| 238 | +| data.serviceState | long | 多状态字节 | | |
| 239 | +| data.txtContent | string | 下发的消息文本 | | |
| 240 | +```json | |
| 241 | +{ | |
| 242 | + "deviceId":12345, | |
| 243 | + "timestamp":44324, | |
| 244 | + "operCode":0x64, | |
| 245 | + "data":{ | |
| 246 | + "cityCode":22,//int | |
| 247 | + "deviceId":"029L2222",//string | |
| 248 | + "lineId":"134326"//string | |
| 249 | + } | |
| 250 | +} | |
| 251 | +``` | |
| 252 | +| .. | .. | .. | | |
| 253 | +| ---- | ---- | ---- | | |
| 254 | +| deviceId | string | 设备编号 | | |
| 255 | +| timestamp | long | 时间戳(ms) | | |
| 256 | +| operCode | short | 一级协议 | | |
| 257 | +| data.cityCode | short | 城市区号 | | |
| 258 | +| data.deviceId | string | 设备编号 | | |
| 259 | +| data.lineId | string | 线路编号 | | |
| 260 | + | |
| 261 | +```json | |
| 262 | +{ | |
| 263 | + "deviceId":12345, | |
| 264 | + "timestamp":44324, | |
| 265 | + "operCode":0xC0, | |
| 266 | + "data":{ | |
| 267 | + "operCode":0x86, | |
| 268 | + "requestAck":0x06 // 0x06同意 0x15不同意 | |
| 269 | + } | |
| 270 | +} | |
| 271 | +``` | |
| 272 | +| .. | .. | .. | | |
| 273 | +| ---- | ---- | ---- | | |
| 274 | +| deviceId | string | 设备编号 | | |
| 275 | +| timestamp | long | 时间戳(ms) | | |
| 276 | +| operCode | short | 一级协议 | | |
| 277 | +| data.operCode | short | 二级协议 | | |
| 278 | +| data.requestAck | short | 请求应答字 | | |
| 279 | + | |
| 280 | +<span style="color: red">Response</span>: | |
| 281 | +```json | |
| 282 | +{ | |
| 283 | + "errCode":0 | |
| 284 | +} | |
| 285 | +``` | |
| 286 | + | |
| 287 | +### 调度消息上传接口 | |
| 288 | + | |
| 289 | +<span style="color: red">Request</span>: | |
| 290 | +```json | |
| 291 | +{ | |
| 292 | + "deviceId":12345, | |
| 293 | + "timestamp":44324, | |
| 294 | + "status":0,// 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读 | |
| 295 | + "operCode":0x80,// 消息确认时无数据 | |
| 296 | + "data":{ | |
| 297 | + "operCode":0x26,//二级协议 | |
| 298 | + "requestCode":22//short | |
| 299 | + }// 消息确认将无数据 | |
| 300 | +} | |
| 301 | +``` | |
| 302 | + | |
| 303 | +<span style="color: red">Response</span>: | |
| 304 | +```json | |
| 305 | +{ | |
| 306 | + "errCode":0 | |
| 307 | +} | |
| 308 | 308 | ``` |
| 309 | 309 | \ No newline at end of file | ... | ... |