3.47火车对象

# 3.47 火车对象 </br> ## 数据结构说明 | 字段 | 数据类型 | 释义 | 取值 | 取值释义 | |----------|----------|------------------|------|----------| | id | int | 目标对象ID | 358| | | city| String | 出发城市 | | | | endcity| String | 到达城市 || | | trainno| String | 车次 | | | | date| String | 出发日期 | | | | type| String | 类型 | | 高铁、动车…… | | station| String | 出发站 (查询车次详情时为始发站) | | | | endstation| String | 到达站 (查询车次详情时为终点站) | | | | departtime| String | 出发时间 | | | | arrivaltime| String | 到达时间 | | | | costtime| String | 用时 | | | | seat_prices| List | 座位票价信息 | 见下方 | | | day| int |天数 | | 1=当天抵达,2=第二天抵达…… | | weekday| String |出发星期 | | | | stationlist| List |站点信息 | 见下方| 查询车次详情时返回 | </br> ## seat_prices数据结构说明 | 字段 | 数据类型 | 释义 | 取值 | 取值释义 | |----------|----------|------------------|------|----------| | item | String | 位置类型 | | 商务座、一等座、二等座…… | | price| double | 价格 | | | | number| String | 余量 || 有、无、或具体剩余票数 | ## stationlist数据结构说明 | 字段 | 数据类型 | 释义 | 取值 | 取值释义 | |----------|----------|------------------|------|----------| | no | int | 序号 | | 1=始发站 | | station| String| 车站 | | | | day| int | 天数 || | | arrivaltime| String| 到达时间 || 始发站缺省 | | departuretime| String| 出发时间 || | </br> ## 返回结果json示例 ~~~ 输入:明天上午从广州到北京的火车 输出: { "rtext":"我帮你查到了6趟火车:\n第1,7点28分发车的直达特快Z 1 1 2;\n第2,7点42分发车的高铁G 3 3 6;\n第3,8点25分发车的高铁G 8 2;\n第4,8点30分发车的直达特快Z 2 0 2;\n第5,11点15分发车的高铁G 3 3 8;\n第6,11点53分发车的高铁G 8 0。", "outc":0, "actions":[ { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"Z112", "type":"直达特快", "station":"广州", "endstation":"北京丰台", "departtime":"07:28", "arrivaltime":"05:28", "costtime":"22小时0分", "day":2, "seat_prices":[ { "item":"软卧上", "price":723, "number":"无" }, { "item":"硬卧上", "price":426, "number":"无" }, { "item":"硬座", "price":251, "number":"无" }, { "item":"无座", "price":251, "number":"有" } ] } }, { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"G336", "type":"高铁", "station":"广州南", "endstation":"北京西", "departtime":"07:42", "arrivaltime":"17:58", "costtime":"10小时16分", "day":1, "seat_prices":[ { "item":"商务座", "price":3041.5, "number":"无" }, { "item":"一等座", "price":1544.5, "number":"无" }, { "item":"二等座", "price":964.5, "number":"无" } ] } }, { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"G82", "type":"高铁", "station":"广州南", "endstation":"北京西", "departtime":"08:25", "arrivaltime":"16:27", "costtime":"8小时2分", "day":1, "seat_prices":[ { "item":"商务座", "price":3041.5, "number":"1" }, { "item":"一等座", "price":1544.5, "number":"无" }, { "item":"二等座", "price":964.5, "number":"1" } ] } }, { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"Z202", "type":"直达特快", "station":"广州", "endstation":"北京西", "departtime":"08:30", "arrivaltime":"06:49", "costtime":"22小时19分", "day":2, "seat_prices":[ { "item":"高级软卧上", "price":1383, "number":"无" }, { "item":"软卧上", "price":750, "number":"无" }, { "item":"硬卧上", "price":426, "number":"无" }, { "item":"硬座", "price":251, "number":"无" }, { "item":"无座", "price":251, "number":"有" } ] } }, { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"G338", "type":"高铁", "station":"广州南", "endstation":"北京西", "departtime":"11:15", "arrivaltime":"21:20", "costtime":"10小时5分", "day":1, "seat_prices":[ { "item":"商务座", "price":3041.5, "number":"无" }, { "item":"一等座", "price":1544.5, "number":"有" }, { "item":"二等座", "price":964.5, "number":"有" } ] } }, { "action":"VIEW", "target":{ "id":358, "city":"广州", "endcity":"北京", "date":"2023-10-08", "trainno":"G80", "type":"高铁", "station":"广州南", "endstation":"北京西", "departtime":"11:53", "arrivaltime":"19:30", "costtime":"7小时37分", "day":1, "seat_prices":[ { "item":"商务座", "price":3041.5, "number":"无" }, { "item":"一等座", "price":1544.5, "number":"无" }, { "item":"二等座", "price":964.5, "number":"有" } ] } } ], "intention":"TRAIN", "score":"1" } ~~~ ~~~ 输入:g80什么时候到广州 输出: { "rtext": "g80到达广州南的时间是11:50", "outc": 0, "actions": [ { "action": "VIEW", "target": { "id": 358, "date": "2024-05-27", "weekday": "星期一", "trainno": "G80", "type": "高铁", "station": "香港西九龙", "endstation": "北京西", "day": 0, "stationlist": [ { "no": 1, "station": "香港西九龙", "day": 1, "departuretime": "11:00" }, { "no": 2, "station": "深圳北", "day": 1, "arrivaltime": "11:18", "departuretime": "11:21" }, { "no": 3, "station": "广州南", "day": 1, "arrivaltime": "11:50", "departuretime": "11:53" }, { "no": 4, "station": "长沙南", "day": 1, "arrivaltime": "14:10", "departuretime": "14:13" }, { "no": 5, "station": "武汉", "day": 1, "arrivaltime": "15:31", "departuretime": "15:34" }, { "no": 6, "station": "郑州东", "day": 1, "arrivaltime": "17:08", "departuretime": "17:11" }, { "no": 7, "station": "石家庄", "day": 1, "arrivaltime": "18:27", "departuretime": "18:30" }, { "no": 8, "station": "北京西", "day": 1, "arrivaltime": "19:30", "departuretime": "19:30" } ] } } ], "intention": "TRAIN" } ~~~