package com.stylefeng.guns.modular.system.warpper;
|
|
|
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSONObject;
|
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 ServerCarModelWarpper {
|
@ApiModelProperty("车型id")
|
private Integer id;
|
@ApiModelProperty("车型名称")
|
private String name;
|
@ApiModelProperty("车型照片")
|
private String img;
|
@ApiModelProperty("预估金额-专车对应独享")
|
private Double amount;
|
@ApiModelProperty("包车的价格")
|
private String price;
|
@ApiModelProperty("预估里程(公里)")
|
private Double mileage;
|
@ApiModelProperty("预估时间(分钟)")
|
private Double duration;
|
|
@ApiModelProperty("预估金额-专车对应一口价")
|
private Double buyNowAmount;
|
@ApiModelProperty("预估金额-专车对应一人拼成价格")
|
private Double putTogetherOneAmount;
|
@ApiModelProperty("预估金额-专车对应一人未拼成价格")
|
private Double notAssembledOneAmount;
|
@ApiModelProperty("预估金额-专车对应两人拼成价格")
|
private Double putTogetherTwoAmount;
|
@ApiModelProperty("预估金额-专车对应两人未拼成价格")
|
private Double notAssembledTwoAmount;
|
@ApiModelProperty("预估金额-专车对应三人拼成价格")
|
private Double putTogetherThreeAmount;
|
@ApiModelProperty("预估金额-专车对应三人未拼成价格")
|
private Double notAssembledThreeAmount;
|
@ApiModelProperty("是否开启拼车(1=是,2=否)")
|
private Integer isOpen;
|
|
@ApiModelProperty("是否开启独享(1=是,2=否)")
|
private Integer isOpenExclusive;
|
@ApiModelProperty("是否开启一口价(1=是,2=否)")
|
private Integer isOpenPrice;
|
|
@ApiModelProperty("一人拼成规则")
|
private JSONObject contentPutOne;//一人拼成
|
@ApiModelProperty("一人未拼成规则")
|
private JSONObject contentNotOne;//一人未拼成
|
@ApiModelProperty("2人拼成规则")
|
private JSONObject contentPutTwo;//2人拼成
|
@ApiModelProperty("2人未拼成规则")
|
private JSONObject contentNotTwo;//2人未拼成
|
@ApiModelProperty("3人拼成规则")
|
private JSONObject contentPutThree;//3人拼成
|
@ApiModelProperty("3人未拼成规则")
|
private JSONObject contentNotThree;//3人未拼成
|
@ApiModelProperty("独享规则")
|
private JSONObject contentExclusive;//独享
|
@ApiModelProperty("一口价规则")
|
private JSONObject contentPrice;//一口价
|
|
@ApiModelProperty("计价说明(拼车)")
|
private String fareTypeNote1;
|
@ApiModelProperty("计价说明(独享)")
|
private String fareTypeNote2;
|
@ApiModelProperty("计价说明(一口价)")
|
private String fareTypeNote3;
|
@ApiModelProperty("独享是否勾选(0=否,1=是)")
|
private Integer dx_check;
|
@ApiModelProperty("一口价是否勾选(0=否,1=是)")
|
private Integer ykj_check;
|
@ApiModelProperty("拼车是否勾选(0=否,1=是)")
|
private Integer pc_check;
|
|
public String getFareTypeNote1() {
|
return fareTypeNote1;
|
}
|
|
public void setFareTypeNote1(String fareTypeNote1) {
|
this.fareTypeNote1 = fareTypeNote1;
|
}
|
|
public String getFareTypeNote2() {
|
return fareTypeNote2;
|
}
|
|
public void setFareTypeNote2(String fareTypeNote2) {
|
this.fareTypeNote2 = fareTypeNote2;
|
}
|
|
public String getFareTypeNote3() {
|
return fareTypeNote3;
|
}
|
|
public void setFareTypeNote3(String fareTypeNote3) {
|
this.fareTypeNote3 = fareTypeNote3;
|
}
|
|
public JSONObject getContentPutOne() {
|
return contentPutOne;
|
}
|
|
public void setContentPutOne(JSONObject contentPutOne) {
|
this.contentPutOne = contentPutOne;
|
}
|
|
public JSONObject getContentNotOne() {
|
return contentNotOne;
|
}
|
|
public void setContentNotOne(JSONObject contentNotOne) {
|
this.contentNotOne = contentNotOne;
|
}
|
|
public JSONObject getContentPutTwo() {
|
return contentPutTwo;
|
}
|
|
public void setContentPutTwo(JSONObject contentPutTwo) {
|
this.contentPutTwo = contentPutTwo;
|
}
|
|
public JSONObject getContentNotTwo() {
|
return contentNotTwo;
|
}
|
|
public void setContentNotTwo(JSONObject contentNotTwo) {
|
this.contentNotTwo = contentNotTwo;
|
}
|
|
public JSONObject getContentPutThree() {
|
return contentPutThree;
|
}
|
|
public void setContentPutThree(JSONObject contentPutThree) {
|
this.contentPutThree = contentPutThree;
|
}
|
|
public JSONObject getContentNotThree() {
|
return contentNotThree;
|
}
|
|
public void setContentNotThree(JSONObject contentNotThree) {
|
this.contentNotThree = contentNotThree;
|
}
|
|
public JSONObject getContentExclusive() {
|
return contentExclusive;
|
}
|
|
public void setContentExclusive(JSONObject contentExclusive) {
|
this.contentExclusive = contentExclusive;
|
}
|
|
public JSONObject getContentPrice() {
|
return contentPrice;
|
}
|
|
public void setContentPrice(JSONObject contentPrice) {
|
this.contentPrice = contentPrice;
|
}
|
|
public Integer getIsOpenExclusive() {
|
return isOpenExclusive;
|
}
|
|
public void setIsOpenExclusive(Integer isOpenExclusive) {
|
this.isOpenExclusive = isOpenExclusive;
|
}
|
|
public Integer getIsOpenPrice() {
|
return isOpenPrice;
|
}
|
|
public void setIsOpenPrice(Integer isOpenPrice) {
|
this.isOpenPrice = isOpenPrice;
|
}
|
|
public Double getBuyNowAmount() {
|
return buyNowAmount;
|
}
|
|
public void setBuyNowAmount(Double buyNowAmount) {
|
this.buyNowAmount = buyNowAmount;
|
}
|
|
public Double getPutTogetherOneAmount() {
|
return putTogetherOneAmount;
|
}
|
|
public void setPutTogetherOneAmount(Double putTogetherOneAmount) {
|
this.putTogetherOneAmount = putTogetherOneAmount;
|
}
|
|
public Double getNotAssembledOneAmount() {
|
return notAssembledOneAmount;
|
}
|
|
public void setNotAssembledOneAmount(Double notAssembledOneAmount) {
|
this.notAssembledOneAmount = notAssembledOneAmount;
|
}
|
|
public Double getPutTogetherTwoAmount() {
|
return putTogetherTwoAmount;
|
}
|
|
public void setPutTogetherTwoAmount(Double putTogetherTwoAmount) {
|
this.putTogetherTwoAmount = putTogetherTwoAmount;
|
}
|
|
public Double getNotAssembledTwoAmount() {
|
return notAssembledTwoAmount;
|
}
|
|
public void setNotAssembledTwoAmount(Double notAssembledTwoAmount) {
|
this.notAssembledTwoAmount = notAssembledTwoAmount;
|
}
|
|
public Double getPutTogetherThreeAmount() {
|
return putTogetherThreeAmount;
|
}
|
|
public void setPutTogetherThreeAmount(Double putTogetherThreeAmount) {
|
this.putTogetherThreeAmount = putTogetherThreeAmount;
|
}
|
|
public Double getNotAssembledThreeAmount() {
|
return notAssembledThreeAmount;
|
}
|
|
public void setNotAssembledThreeAmount(Double notAssembledThreeAmount) {
|
this.notAssembledThreeAmount = notAssembledThreeAmount;
|
}
|
|
public Integer getIsOpen() {
|
return isOpen;
|
}
|
|
public void setIsOpen(Integer isOpen) {
|
this.isOpen = isOpen;
|
}
|
|
public Integer getId() {
|
return id;
|
}
|
|
public void setId(Integer id) {
|
this.id = id;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public String getImg() {
|
return img;
|
}
|
|
public void setImg(String img) {
|
this.img = img;
|
}
|
|
public Double getAmount() {
|
return amount;
|
}
|
|
public void setAmount(Double amount) {
|
this.amount = amount;
|
}
|
|
public String getPrice() {
|
return price;
|
}
|
|
public void setPrice(String price) {
|
this.price = price;
|
}
|
|
public Double getMileage() {
|
return mileage;
|
}
|
|
public void setMileage(Double mileage) {
|
this.mileage = mileage;
|
}
|
|
public Double getDuration() {
|
return duration;
|
}
|
|
public void setDuration(Double duration) {
|
this.duration = duration;
|
}
|
|
public Integer getDx_check() {
|
return dx_check;
|
}
|
|
public void setDx_check(Integer dx_check) {
|
this.dx_check = dx_check;
|
}
|
|
public Integer getYkj_check() {
|
return ykj_check;
|
}
|
|
public void setYkj_check(Integer ykj_check) {
|
this.ykj_check = ykj_check;
|
}
|
|
public Integer getPc_check() {
|
return pc_check;
|
}
|
|
public void setPc_check(Integer pc_check) {
|
this.pc_check = pc_check;
|
}
|
|
@Override
|
public String toString() {
|
return "ServerCarModelWarpper{" +
|
"id=" + id +
|
", name='" + name + '\'' +
|
", img='" + img + '\'' +
|
", amount=" + amount +
|
", price='" + price + '\'' +
|
", mileage=" + mileage +
|
", duration=" + duration +
|
'}';
|
}
|
|
public static ServerCarModelWarpper getServerCarModelWarpper(Map<String, Object> map){
|
ServerCarModelWarpper serverCarModelWarpper = new ServerCarModelWarpper();
|
if(null != map){
|
serverCarModelWarpper.setId(null != map.get("id") ? Integer.valueOf(map.get("id").toString()) : 0);
|
serverCarModelWarpper.setName(null != map.get("name") ? map.get("name").toString() : "");
|
serverCarModelWarpper.setImg(null != map.get("img") ? map.get("img").toString() : "");
|
serverCarModelWarpper.setAmount(null != map.get("amount") ? Double.valueOf(map.get("amount").toString()) : 0);
|
serverCarModelWarpper.setPrice(null != map.get("price") ? map.get("price").toString() : "");
|
serverCarModelWarpper.setMileage(null != map.get("mileage") ? Double.valueOf(map.get("mileage").toString()) : 0);
|
serverCarModelWarpper.setDuration(null != map.get("duration") ? Double.valueOf(map.get("duration").toString()) : 0);
|
}
|
return serverCarModelWarpper;
|
}
|
|
|
public static List<ServerCarModelWarpper>getServerCarModelWarppers(List<Map<String, Object>> list){
|
List<ServerCarModelWarpper> data = new ArrayList<>();
|
if(null != list){
|
for(Map<String, Object> map : list){
|
data.add(ServerCarModelWarpper.getServerCarModelWarpper(map));
|
}
|
}
|
return data;
|
}
|
}
|