package com.stylefeng.guns.modular.crossCity.warpper; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.util.Map; @ApiModel("同班次其他司机信息") public class OtherDriverShiftWarpper { @ApiModelProperty("司机排班记录id") private Integer lineShiftDriverId; @ApiModelProperty("司机头像") private String headImgUrl; @ApiModelProperty("司机姓名") private String driverName; @ApiModelProperty("车牌号") private String carLicensePlate; @ApiModelProperty("车型") private String carModel; @ApiModelProperty("车辆颜色") private String carColor; @ApiModelProperty("可乘车人数") private Integer laveSeat; @ApiModelProperty("总人数") private Integer totalSeat; @ApiModelProperty("评分") private Double score; @ApiModelProperty("发车时间") private String startTime; public Integer getLineShiftDriverId() { return lineShiftDriverId; } public void setLineShiftDriverId(Integer lineShiftDriverId) { this.lineShiftDriverId = lineShiftDriverId; } public String getHeadImgUrl() { return headImgUrl; } public void setHeadImgUrl(String headImgUrl) { this.headImgUrl = headImgUrl; } public String getDriverName() { return driverName; } public void setDriverName(String driverName) { this.driverName = driverName; } public String getCarLicensePlate() { return carLicensePlate; } public void setCarLicensePlate(String carLicensePlate) { this.carLicensePlate = carLicensePlate; } public String getCarModel() { return carModel; } public void setCarModel(String carModel) { this.carModel = carModel; } public String getCarColor() { return carColor; } public void setCarColor(String carColor) { this.carColor = carColor; } public Integer getLaveSeat() { return laveSeat; } public void setLaveSeat(Integer laveSeat) { this.laveSeat = laveSeat; } public Integer getTotalSeat() { return totalSeat; } public void setTotalSeat(Integer totalSeat) { this.totalSeat = totalSeat; } public Double getScore() { return score; } public void setScore(Double score) { this.score = score; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public static OtherDriverShiftWarpper fromMap(Map map) { OtherDriverShiftWarpper warpper = new OtherDriverShiftWarpper(); if (map == null) { return warpper; } warpper.setLineShiftDriverId(map.get("lineShiftDriverId") == null ? null : Integer.valueOf(map.get("lineShiftDriverId").toString())); warpper.setHeadImgUrl(map.get("headImgUrl") == null ? "" : map.get("headImgUrl").toString()); warpper.setDriverName(map.get("driverName") == null ? "" : map.get("driverName").toString()); warpper.setCarLicensePlate(map.get("carLicensePlate") == null ? "" : map.get("carLicensePlate").toString()); warpper.setCarModel(map.get("carModel") == null ? "" : map.get("carModel").toString()); warpper.setCarColor(map.get("carColor") == null ? "" : map.get("carColor").toString()); warpper.setLaveSeat(map.get("laveSeat") == null ? 0 : Integer.valueOf(map.get("laveSeat").toString())); warpper.setTotalSeat(map.get("totalSeat") == null ? 0 : Integer.valueOf(map.get("totalSeat").toString())); warpper.setScore(map.get("score") == null ? 0D : Double.valueOf(map.get("score").toString())); warpper.setStartTime(map.get("startTime") == null ? "" : map.get("startTime").toString()); return warpper; } public static List fromMaps(List> maps) { List list = new ArrayList<>(); if (maps == null) { return list; } for (Map map : maps) { list.add(fromMap(map)); } return list; } }