README.md 8.03 KB

公交调度系统BS版 0.1


目录



字典表


字典操作全部由前端负责,主要有2种。

1、将字典代码转换为中文 。片段加载完成后,包含 class="nt-dictionary" 的标签会被转换,data-group 为所属字典组。


<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span>

--转换后
<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span>

2、生成下拉框,当包含class="nt-dictionary" 的标签是select时。

<!- 原 -->
<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select>

<!-- 转换后 -->
<select class="nt-dictionary" data-group="XianLuXingZhi" >
    <option value="GJXL">过江线路</option>
    <option value="CCTXL">村村通线路</option>
    <option value="YXXL">夜宵线路</option>
    <option value="CSBS">穿梭巴士</option>
</select>

gps


实时gps接口

所有在线GPS: http://192.168.168.192:8080/transport_server/rtgps 根据设备号查询:http://192.168.168.192:8080/transport_server/rtgps/05B01901

Response:

{
    "data":[
    {
        "companyCode":5,
        "lineId":10329,
        "deviceId":"05B01901",
        "carparkNo":"00000000",
        "stopNo":"7C890002",
        "lon":121.549866,
        "lat":31.238798,
        "timestamp":1397104499000,
        "speed":42.0,
        "direction":245.9,
        "state":0,
        "upDown":0
    }]
}
-- -- --
companyCode int 公司代码
lineId int 线路编码
deviceId String 设备编号
carparkNo String 停车场编码
stopNo String 站点编码
lon float 经度
lat float 纬度
timestamp long 时间戳
speed float 速度
direction float 方向(角度)
state int 营运状态( 0 营运 ,1 非营运, -1 无效)
upDown int 上下行(0 上行 , 1 下行 , -1 无效)

进站数据


表名:

.. .. ..
id int 主键
deviceId String 设备号
lineId int 线路编码
stopNo long 站点编码
timestamp long 时间戳
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
createDate Date 创建时间

异常警报


大间隔


表名:

.. .. ..
id int 主键
line int 线路编码
station String 站点编码
cVehicle String 当前车辆编码
lastVehicle String 上一个车辆编码
interval long 间隔时间(秒)
timestamp long 时间戳
createDate Date 创建时间

超速


表名:

.. .. ..
id int 主键
vehicle String 车辆编码
line int 线路编码
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
lon float 经度
lat float 纬度
speed float 速度
timestamp long 时间戳
createDate Date 时间

越界


表名:

.. .. ..
id int 主键
vehicle String 车辆编码
line int 线路编码
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
lon float 经度
lat float 纬度
location String 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值
timestamp long 时间戳
createDate Date 时间

越站


表名:

.. .. ..
id int 主键
line int 线路编码
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
station String 站点编码
vehicle String 车辆编码
inData Date 进站时间
outDate Date 出站时间

聚集


表名:

.. .. ..
id int 主键
line int 线路编码
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
stations String 站点(多个用 , 号分隔。应该是连续站点)
vehicles String 车辆编码(多个用 , 号分隔)
timestamp long 时间戳
createDate Date 时间

掉线


表名:

.. .. ..
id int 主键
line int 线路编码
upDown int 上下行(0 上行 , 1 下行 , -1 无效)
vehicle String 车辆编码
lon float 经度
lat float 纬度
timestamp long 时间戳
createDate Date 时间

消息上传下发


消息下发接口

http://192.168.168.192:8080/transport_server/message

Request:

{
    "deviceId":12345,
    "timestamp":44324,
    "operCode":0x60,
    "data":{
        "companyCode":22,//short
        "deviceId":"029L2222",//string
        "timestamp":134326,//long
        "instructType":00,//short
        "dispatchInstruct":0x00,//short
        "msgId":12345,//long
        "alarmTime":201606012000,//long
        "serviceState":00000000,//long
        "txtContent":"你好"//string
    }
}
.. .. ..
deviceId string 设备编号
timestamp long 时间戳(ms)
operCode short 一级协议
data.companyCode short 公司代码
data.deviceId string 设备编号
data.timestamp long 时间戳
data.instructType short 保留 默认0
data.dispatchInstruct short 调度指令
data.msgId long 同上
data.alarmTime long 闹钟
data.serviceState long 多状态字节
data.txtContent string 下发的消息文本
{
    "deviceId":12345,
    "timestamp":44324,
    "operCode":0x64,
    "data":{
        "cityCode":22,//int
        "deviceId":"029L2222",//string
        "lineId":"134326"//string
    }
}
.. .. ..
deviceId string 设备编号
timestamp long 时间戳(ms)
operCode short 一级协议
data.cityCode short 城市区号
data.deviceId string 设备编号
data.lineId string 线路编号
{
    "deviceId":12345,
    "timestamp":44324,
    "operCode":0xC0,
    "data":{
        "operCode":0x86,
        "requestAck":0x06 // 0x06同意 0x15不同意
    }
}
.. .. ..
deviceId string 设备编号
timestamp long 时间戳(ms)
operCode short 一级协议
data.operCode short 二级协议
data.requestAck short 请求应答字

Response:

{
    "errCode":0
}

消息上传接口

Request:

{
    "deviceId":12345,
    "timestamp":44324,
    "status":0,// 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读
    "operCode":0x80,// 消息确认时无数据
    "data":{
        "operCode":0x26,//二级协议
        "requestCode":22//short
    }// 消息确认将无数据
}

Response:

{
    "errCode":0
}