1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| package com.fanghua.driver.bean
| data class OrderListBean1(
| val code: Int,
| val message: String,
| val resultUtil: OrderListResultUtil
| )
|
| data class OrderListResultUtil(
| val code: Int,
| val `data`: List<OrderBean>,
| val msg: String
| )
|
| data class OrderBean(
| val avatar: String,
| val cancelTimes: Int,
| val createTime: Long,
| val currentDistance: Double,
| val balance: Double = 0.0,
| val endAddress: String,
| val endLat: String,
| val endLng: String,
| val estimatedMileage: String,
| val estimatedTime: String,
| val id: String,
| val orderTimes: Int,
| val travelTime: String = "0",
| val actualMileage: String = "0",
| val pickUpTime: Int = 0, //预估接驾时间
| val source: Int,
| val waitTime: String,
| var state: Int, //订单状态(101=待接单,102=已接单,103=前往预约点,104=到达预约点,105=开始服务,106=到达目的地,107=待支付,108=待评价,109=已完成,201=转单中,301=已取消,401=等待中)
| val startAddress: String,
| val startLat: Double,
| val startLng: Double,
| val startPrice: Double,
| val estimatedPrice: Double,
| val userName: String,
| val userPhone: String
| ){
| fun getOrderListStateStr() = when(state){
| 301->"已取消"
| 108,109->"已完成"
| 201->"改派中"
| 107->"待支付"
| else->"服务中"
| }
|
| fun getCreator() = if (source == 3) "后台创建" else if (source == 2) "司机创建" else "乘客创建"
| }
|
|