package com.xw.yunwei.model import com.google.gson.annotations.SerializedName import com.xw.yunwei.extension.dateChangePattern /** * 常规任务任务充电详情 */ data class TaskNormalChargeModel( /** * 操作人 */ @SerializedName("handleUserName") val handleUserName: String? = null, /** * 操作时间 */ @SerializedName("handleTime") val handleTime: String? = null, /** * 记录创建人(前端忽略) */ @SerializedName("createBy") val createBy: String? = null, /** * 记录创建时间(前端忽略) */ @SerializedName("createTime") val createTime: String? = null, /** * 结束充电图片(URL或Base64) */ @SerializedName("endChargingPicture") val endChargingPicture: String? = null, /** * 结束充电操作人ID */ @SerializedName("endOperationsUserId") val endOperationsUserId: Long? = null, /** * 结束充电操作人名称 */ @SerializedName("endOperationsUserName") val endOperationsUserName: String? = null, /** * 结束剩余电量(百分比) */ @SerializedName("endRemainingBattery") val endRemainingBattery: Int? = null, /** * 结束充电时间 */ @SerializedName("endTime") val endTime: String? = null, /** * 任务ID */ @SerializedName("id") val id: Long? = null, /** * 车牌号 */ @SerializedName("plateNumber") val plateNumber: String? = null, /** * 开始充电图片(URL或Base64) */ @SerializedName("startChargingPicture") val startChargingPicture: String? = null, /** * 开始充电操作人ID */ @SerializedName("startOperationsUserId") val startOperationsUserId: Long? = null, /** * 开始充电操作人名称 */ @SerializedName("startOperationsUserName") val startOperationsUserName: String? = null, /** * 开始剩余电量(百分比) */ @SerializedName("startRemainingBattery") val startRemainingBattery: Int? = null, /** * 续航㎞ */ @SerializedName("mileageRange") val mileageRange: Double? = null, /** * 开始充电时间 */ @SerializedName("startTime") val startTime: String? = null, /** * 任务状态 * 0 = 待到达 * 1 = 待处理 * 2 = 已完成 * 3 = 已取消 */ @SerializedName("status") val status: Int? = null, /** * 任务类别 * 1 = 常规任务 * 2 = 事故任务 */ @SerializedName("taskCategory") val taskCategory: Int? = null, /** * 任务编号 */ @SerializedName("taskCode") val taskCode: String? = null, /** * 任务类型ID * 任务类别为2时:对应数据字典,多个逗号分割 * 任务类别为1时:枚举值 1-9 */ @SerializedName("taskTypeId") val taskTypeId: String? = null, /** * 任务紧急程度 * 0 = P0(最紧急) * 1 = P1 * 2 = P2 * 3 = P3(最不紧急) */ @SerializedName("taskUrgencyLevel") val taskUrgencyLevel: Int? = null, /** * 车辆编码 */ @SerializedName("vehicleCode") val vehicleCode: String? = null, /** * 车辆颜色 */ @SerializedName("vehicleColor") val vehicleColor: String? = null, /** * 车辆ID */ @SerializedName("vehicleId") val vehicleId: Long? = null, /** * 车辆地址/位置 */ @SerializedName("vehicleLocation") val vehicleLocation: String? = null ){ //获取显示开始充电时间 fun getShowStartTime(): String?{ return startTime?.dateChangePattern("yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss") } //获取显示结束充电时间 fun getShowEndTime(): String?{ return endTime?.dateChangePattern("yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss") } }