package com.xhpc.common.data.redis;

import com.xhpc.common.data.up.BaseData;

//充电订单结算数据
public class CacheOrderData extends BaseData {

    private String orderNo; //交易流水号
    private String pileNo; //桩号
    private String gunId; //枪号
    private String startTime; //开始时间CP56Time2a格式
    private String endTime; //结束时间CP56Time2a格式
    private Integer t1Price; //尖单价
    private Integer t1PowerQuantity; //尖电量
    private Integer t1LossQuantity; //计损尖电量
    private Integer t1Cost; //尖金额
    private Integer t2Price; //峰单价
    private Integer t2PowerQuantity; //峰电量
    private Integer t2LossQuantity; //计损峰电量
    private Integer t2Cost; //峰金额
    private Integer t3Price; //平单价
    private Integer t3PowerQuantity; //平电量
    private Integer t3LossQuantity; //计损平电量
    private Integer t3Cost; //平金额
    private Integer t4Price; //谷单价
    private Integer t4PowerQuantity; //谷电量
    private Integer t4LossQuantity; //计损谷电量
    private Integer t4Cost; //谷金额
    private Integer electricMeterStart; //电表总起值
    private Integer electricMeterEnd; //电表总止值
    private Integer totalPowerQuantity; //总电量
    private Integer totalLossPowerQuantity; //计损总电量
    private Integer cost; //消费金额
    private String vinNormal; //VIN 码，此处 VIN 码和充电时 VIN码不同，正序直接上传，无需补0和反序
    private String transactionFlag; //交易标识
    private String transactionDatetime; //交易日期、时间CP56Time2a格式
    private String stopReason; //停止原因
    private String cardNo; //物理卡号
    private Integer startSoc;
    private Integer endSoc;
    private Integer status;//1自动结算，2异常

    public CacheOrderData() {
        super();
    }

    public CacheOrderData(CacheRealtimeData cacheRData, String startTime, Integer startSoc, Integer endSoc) {

        this.orderNo = cacheRData.getOrderNo();
        this.pileNo = cacheRData.getPileNo();
        this.gunId = cacheRData.getGunId();
        this.startTime = startTime;
        this.endTime = cacheRData.getCreateTime();
//        this.t1Price = cacheRData.gett1Price; //todo: after v1.1 realtime data from pile
//        this.t1PowerQuantity = t1PowerQuantity;
//        this.t1LossQuantity = t1LossQuantity;
//        this.t1Cost = t1Cost;
//        this.t2Price = t2Price;
//        this.t2PowerQuantity = t2PowerQuantity;
//        this.t2LossQuantity = t2LossQuantity;
//        this.t2Cost = t2Cost;
//        this.t3Price = t3Price;
//        this.t3PowerQuantity = t3PowerQuantity;
//        this.t3LossQuantity = t3LossQuantity;
//        this.t3Cost = t3Cost;
//        this.t4Price = t4Price;
//        this.t4PowerQuantity = t4PowerQuantity;
//        this.t4LossQuantity = t4LossQuantity;
//        this.t4Cost = t4Cost;
//        this.electricMeterStart = electricMeterStart; //不会有
//        this.electricMeterEnd = electricMeterEnd; //不会有
        this.totalPowerQuantity = cacheRData.getChargingDegree();
        this.totalLossPowerQuantity = cacheRData.getLossChargingDegree();
        this.cost = cacheRData.getAmountCharged();
//        this.vinNormal = vinNormal; //不会有
//        this.transactionFlag = transactionFlag;
//        this.transactionDatetime = transactionDatetime;
//        this.stopReason = stopReason;
//        this.cardNo = cardNo;
        this.startSoc = startSoc;
        this.endSoc = endSoc;
//        this.status = status; //todo 字段成谜
    }

    public String getOrderNo() {

        return orderNo;
    }

    public void setOrderNo(String orderNo) {

        this.orderNo = orderNo;
    }

    public String getPileNo() {

        return pileNo;
    }

    public void setPileNo(String pileNo) {

        this.pileNo = pileNo;
    }

    public String getGunId() {

        return gunId;
    }

    public void setGunId(String gunId) {

        this.gunId = gunId;
    }

    public String getStartTime() {

        return startTime;
    }

    public void setStartTime(String startTime) {

        this.startTime = startTime;
    }

    public String getEndTime() {

        return endTime;
    }

    public void setEndTime(String endTime) {

        this.endTime = endTime;
    }

    public Integer getT1Price() {

        return t1Price;
    }

    public void setT1Price(Integer t1Price) {

        this.t1Price = t1Price;
    }

    public Integer getT1PowerQuantity() {

        return t1PowerQuantity;
    }

    public void setT1PowerQuantity(Integer t1PowerQuantity) {

        this.t1PowerQuantity = t1PowerQuantity;
    }

    public Integer getT1LossQuantity() {

        return t1LossQuantity;
    }

    public void setT1LossQuantity(Integer t1LossQuantity) {

        this.t1LossQuantity = t1LossQuantity;
    }

    public Integer getT1Cost() {

        return t1Cost;
    }

    public void setT1Cost(Integer t1Cost) {

        this.t1Cost = t1Cost;
    }

    public Integer getT2Price() {

        return t2Price;
    }

    public void setT2Price(Integer t2Price) {

        this.t2Price = t2Price;
    }

    public Integer getT2PowerQuantity() {

        return t2PowerQuantity;
    }

    public void setT2PowerQuantity(Integer t2PowerQuantity) {

        this.t2PowerQuantity = t2PowerQuantity;
    }

    public Integer getT2LossQuantity() {

        return t2LossQuantity;
    }

    public void setT2LossQuantity(Integer t2LossQuantity) {

        this.t2LossQuantity = t2LossQuantity;
    }

    public Integer getT2Cost() {

        return t2Cost;
    }

    public void setT2Cost(Integer t2Cost) {

        this.t2Cost = t2Cost;
    }

    public Integer getT3Price() {

        return t3Price;
    }

    public void setT3Price(Integer t3Price) {

        this.t3Price = t3Price;
    }

    public Integer getT3PowerQuantity() {

        return t3PowerQuantity;
    }

    public void setT3PowerQuantity(Integer t3PowerQuantity) {

        this.t3PowerQuantity = t3PowerQuantity;
    }

    public Integer getT3LossQuantity() {

        return t3LossQuantity;
    }

    public void setT3LossQuantity(Integer t3LossQuantity) {

        this.t3LossQuantity = t3LossQuantity;
    }

    public Integer getT3Cost() {

        return t3Cost;
    }

    public void setT3Cost(Integer t3Cost) {

        this.t3Cost = t3Cost;
    }

    public Integer getT4Price() {

        return t4Price;
    }

    public void setT4Price(Integer t4Price) {

        this.t4Price = t4Price;
    }

    public Integer getT4PowerQuantity() {

        return t4PowerQuantity;
    }

    public void setT4PowerQuantity(Integer t4PowerQuantity) {

        this.t4PowerQuantity = t4PowerQuantity;
    }

    public Integer getT4LossQuantity() {

        return t4LossQuantity;
    }

    public void setT4LossQuantity(Integer t4LossQuantity) {

        this.t4LossQuantity = t4LossQuantity;
    }

    public Integer getT4Cost() {

        return t4Cost;
    }

    public void setT4Cost(Integer t4Cost) {

        this.t4Cost = t4Cost;
    }

    public Integer getElectricMeterStart() {

        return electricMeterStart;
    }

    public void setElectricMeterStart(Integer electricMeterStart) {

        this.electricMeterStart = electricMeterStart;
    }

    public Integer getElectricMeterEnd() {

        return electricMeterEnd;
    }

    public void setElectricMeterEnd(Integer electricMeterEnd) {

        this.electricMeterEnd = electricMeterEnd;
    }

    public Integer getTotalPowerQuantity() {

        return totalPowerQuantity;
    }

    public void setTotalPowerQuantity(Integer totalPowerQuantity) {

        this.totalPowerQuantity = totalPowerQuantity;
    }

    public Integer getTotalLossPowerQuantity() {

        return totalLossPowerQuantity;
    }

    public void setTotalLossPowerQuantity(Integer totalLossPowerQuantity) {

        this.totalLossPowerQuantity = totalLossPowerQuantity;
    }

    public Integer getCost() {

        return cost;
    }

    public void setCost(Integer cost) {

        this.cost = cost;
    }

    public String getVinNormal() {

        return vinNormal;
    }

    public void setVinNormal(String vinNormal) {

        this.vinNormal = vinNormal;
    }

    public String getTransactionFlag() {

        return transactionFlag;
    }

    public void setTransactionFlag(String transactionFlag) {

        this.transactionFlag = transactionFlag;
    }

    public String getTransactionDatetime() {

        return transactionDatetime;
    }

    public void setTransactionDatetime(String transactionDatetime) {

        this.transactionDatetime = transactionDatetime;
    }

    public String getStopReason() {

        return stopReason;
    }

    public void setStopReason(String stopReason) {

        this.stopReason = stopReason;
    }

    public String getCardNo() {

        return cardNo;
    }

    public void setCardNo(String cardNo) {

        this.cardNo = cardNo;
    }

    public Integer getStartSoc() {

        return startSoc == null ? 0 : startSoc;
    }

    public void setStartSoc(Integer startSoc) {

        this.startSoc = startSoc;
    }

    public Integer getEndSoc() {

        return endSoc == null ? 0 : endSoc;
    }

    public void setEndSoc(Integer endSoc) {

        this.endSoc = endSoc;
    }

    public Integer getStatus() {

        return status;
    }

    public void setStatus(Integer status) {

        this.status = status;
    }

    @Override
    public String toString() {

        return "CacheOrderData{" +
                "orderNo='" + orderNo + '\'' +
                ", pileNo='" + pileNo + '\'' +
                ", gunId='" + gunId + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", t1Price=" + t1Price +
                ", t1PowerQuantity=" + t1PowerQuantity +
                ", t1LossQuantity=" + t1LossQuantity +
                ", t1Cost=" + t1Cost +
                ", t2Price=" + t2Price +
                ", t2PowerQuantity=" + t2PowerQuantity +
                ", t2LossQuantity=" + t2LossQuantity +
                ", t2Cost=" + t2Cost +
                ", t3Price=" + t3Price +
                ", t3PowerQuantity=" + t3PowerQuantity +
                ", t3LossQuantity=" + t3LossQuantity +
                ", t3Cost=" + t3Cost +
                ", t4Price=" + t4Price +
                ", t4PowerQuantity=" + t4PowerQuantity +
                ", t4LossQuantity=" + t4LossQuantity +
                ", t4Cost=" + t4Cost +
                ", electricMeterStart=" + electricMeterStart +
                ", electricMeterEnd=" + electricMeterEnd +
                ", totalPowerQuantity=" + totalPowerQuantity +
                ", totalLossPowerQuantity=" + totalLossPowerQuantity +
                ", cost=" + cost +
                ", vinNormal='" + vinNormal + '\'' +
                ", transactionFlag='" + transactionFlag + '\'' +
                ", transactionDatetime='" + transactionDatetime + '\'' +
                ", stopReason='" + stopReason + '\'' +
                ", cardNo='" + cardNo + '\'' +
                ", startSoc=" + startSoc +
                ", endSoc=" + endSoc +
                ", status=" + status +
                '}';
    }

}
