Commit 41405a491b40548ea4f577c866d675d586e6a8de
1 parent
17670853
异常数据结构
Showing
1 changed file
with
195 additions
and
104 deletions
README.md
| 1 | -公交调度系统BS版 0.1 | ||
| 2 | -====== | ||
| 3 | ----------- | ||
| 4 | -## 目录 | ||
| 5 | ---------- | ||
| 6 | -* [字典表](#字典表) | ||
| 7 | -* [车载 gps 相关数据](#gps) | ||
| 8 | - * [实时gps数据接口 http](#实时gps接口) | ||
| 9 | - * [进出站数据 mysql 表](#进站数据) | ||
| 10 | - | ||
| 11 | ----------- | ||
| 12 | - | ||
| 13 | -## 字典表 | ||
| 14 | ----------- | ||
| 15 | -字典操作全部由前端负责,主要有2种。 | ||
| 16 | - | ||
| 17 | -1、将字典代码转换为中文 。片段加载完成后,包含 `class="nt-dictionary"` 的标签会被转换,data-group 为所属字典组。 | ||
| 18 | -``` html | ||
| 19 | - | ||
| 20 | -<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span> | ||
| 21 | - | ||
| 22 | ---转换后 | ||
| 23 | -<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span> | ||
| 24 | -``` | ||
| 25 | -2、生成下拉框,当包含`class="nt-dictionary"` 的标签是`select`时。 | ||
| 26 | -``` html | ||
| 27 | -<!- 原 --> | ||
| 28 | -<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select> | ||
| 29 | - | ||
| 30 | -<!-- 转换后 --> | ||
| 31 | -<select class="nt-dictionary" data-group="XianLuXingZhi" > | ||
| 32 | - <option value="GJXL">过江线路</option> | ||
| 33 | - <option value="CCTXL">村村通线路</option> | ||
| 34 | - <option value="YXXL">夜宵线路</option> | ||
| 35 | - <option value="CSBS">穿梭巴士</option> | ||
| 36 | -</select> | ||
| 37 | -``` | ||
| 38 | - | ||
| 39 | -## gps | ||
| 40 | ----------- | ||
| 41 | -### 实时gps接口 | ||
| 42 | - | ||
| 43 | -所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/) | ||
| 44 | -根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901) | ||
| 45 | - | ||
| 46 | -<span style="color: red">Response</span>: | ||
| 47 | -```json | ||
| 48 | -{ | ||
| 49 | - "data":[ | ||
| 50 | - { | ||
| 51 | - "companyCode":5, | ||
| 52 | - "lineId":10329, | ||
| 53 | - "deviceId":"05B01901", | ||
| 54 | - "carparkNo":"00000000", | ||
| 55 | - "stopNo":"7C890002", | ||
| 56 | - "lon":121.549866, | ||
| 57 | - "lat":31.238798, | ||
| 58 | - "timestamp":1397104499000, | ||
| 59 | - "speed":42.0, | ||
| 60 | - "direction":245.9, | ||
| 61 | - "state":0, | ||
| 62 | - "upDown":0 | ||
| 63 | - }] | ||
| 64 | -} | ||
| 65 | -``` | ||
| 66 | - | ||
| 67 | -| -字段- | -类型-|-备注-| | ||
| 68 | -| ---- | ---- | ---- | | ||
| 69 | -| companyCode | int | 公司代码 | | ||
| 70 | -| lineId | int | 线路编码 | | ||
| 71 | -| deviceId | String | 设备编号 | | ||
| 72 | -| carparkNo | String | 停车场编码 | | ||
| 73 | -| stopNo | String | 站点编码 | | ||
| 74 | -| lon | float | 经度 | | ||
| 75 | -| lat | float | 纬度 | | ||
| 76 | -| timestamp | long | 时间戳 | | ||
| 77 | -| speed | float | 速度| | ||
| 78 | -| direction | float | 方向(角度) | | ||
| 79 | -| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) | | ||
| 80 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)| | ||
| 81 | - | ||
| 82 | - | ||
| 83 | -### 进站数据 | ||
| 84 | ----------- | ||
| 85 | -mysql: | ||
| 86 | -表名: | ||
| 87 | - | ||
| 88 | -| 字段 | 类型 | 备注 | | ||
| 89 | -| ---- | ---- | ---- | | ||
| 90 | -| id | int | ID | | ||
| 91 | -| deviceId | String | 设备号 | | ||
| 92 | -| lineId | int | 线路编码 | | ||
| 93 | -| stopNo | long | 站点编码 | | ||
| 94 | -| timestamp | long | 时间戳 | | ||
| 95 | -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 96 | -| createDate | Date | 创建时间 | | ||
| 97 | - | ||
| 98 | - | ||
| 99 | - | ||
| 100 | - | ||
| 101 | - | ||
| 102 | - | ||
| 103 | - | ||
| 104 | - | 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 | +| createDate | Date | 创建时间 | | ||
| 122 | + | ||
| 123 | +### 超速 | ||
| 124 | +---------- | ||
| 125 | +表名: | ||
| 126 | + | ||
| 127 | +| .. | .. | .. | | ||
| 128 | +| ---- | ---- | ---- | | ||
| 129 | +| id | int | 主键 | | ||
| 130 | +| vehicle | String | 车辆编码 | | ||
| 131 | +| line | int | 线路编码 | | ||
| 132 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 133 | +| lon | float | 经度 | | ||
| 134 | +| lat | float | 纬度| | ||
| 135 | +| speed | float | 速度 | | ||
| 136 | +| createDate | Date | 时间 | | ||
| 137 | + | ||
| 138 | +### 越界 | ||
| 139 | +---------- | ||
| 140 | +表名: | ||
| 141 | + | ||
| 142 | +| .. | .. | .. | | ||
| 143 | +| ---- | ---- | ---- | | ||
| 144 | +| id | int | 主键 | | ||
| 145 | +| vehicle | String | 车辆编码 | | ||
| 146 | +| line | int | 线路编码 | | ||
| 147 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 148 | +| lon | float | 经度 | | ||
| 149 | +| lat | float | 纬度| | ||
| 150 | +| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值| | ||
| 151 | +| createDate | Date | 时间 | | ||
| 152 | + | ||
| 153 | + | ||
| 154 | +### 越站 | ||
| 155 | +---------- | ||
| 156 | +表名: | ||
| 157 | + | ||
| 158 | +| .. | .. | .. | | ||
| 159 | +| ---- | ---- | ---- | | ||
| 160 | +| id | int | 主键 | | ||
| 161 | +| line | int | 线路编码 | | ||
| 162 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 163 | +| station | String | 站点编码 | | ||
| 164 | +| vehicle | String | 车辆编码 | | ||
| 165 | +| inData | Date | 进站时间 | | ||
| 166 | +| outDate | Date | 出站时间 | | ||
| 167 | + | ||
| 168 | + | ||
| 169 | +### 聚集 | ||
| 170 | +---------- | ||
| 171 | +表名: | ||
| 172 | + | ||
| 173 | +| .. | .. | .. | | ||
| 174 | +| ---- | ---- | ---- | | ||
| 175 | +| id | int | 主键 | | ||
| 176 | +| line | int | 线路编码 | | ||
| 177 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 178 | +| stations | String | 站点(多个用 , 号分隔。应该是连续站点) | | ||
| 179 | +| vehicles | String | 车辆编码(多个用 , 号分隔) | | ||
| 180 | +| createDate | Date | 时间 | | ||
| 181 | + | ||
| 182 | + | ||
| 183 | +### 掉线 | ||
| 184 | +---------- | ||
| 185 | +表名: | ||
| 186 | + | ||
| 187 | +| .. | .. | .. | | ||
| 188 | +| ---- | ---- | ---- | | ||
| 189 | +| id | int | 主键 | | ||
| 190 | +| line | int | 线路编码 | | ||
| 191 | +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) | | ||
| 192 | +| vehicle | String | 车辆编码 | | ||
| 193 | +| lon | float | 经度 | | ||
| 194 | +| lat | float | 纬度| | ||
| 195 | +| createDate | Date | 时间 | | ||
| 105 | \ No newline at end of file | 196 | \ No newline at end of file |