package com.example.tyre.maintenance.been;

import java.math.BigDecimal;


/**
 * 维保工单对象 biz_maintenance_order
 *
 * @author yangwl
 * @date 2026-04-16
 */
public class Order {


    /**
     * 工单ID
     */
    private Long orderId;

    /**
     * 工单编号
     */
    private String orderNo;

    /**
     * 车辆ID/轮胎ID
     */
    private Long vehicleId;

    /**
     * 车牌号码（冗余字段，便于查询）
     */
    private String plateNumber;

    /**
     * 维保类型（如：二级保养）
     */
    private String typeCode;
    private String typeName;

    /**
     * 维修站点/修理厂ID
     */
    private Long factoryId;

    /**
     * 仪表盘录入里程（截图中的必填项）
     */
    private String inputMileage;

    /**
     * 上次维保里程（快照）
     */
    private BigDecimal lastMileage;

    /**
     * 保养日期
     */
    private String maintainDate;

    /**
     * 补充说明
     */
    private String description;

    /**
     * 状态（UNSTARTED未开始, PROCESSING执行中, COMPLETED已完成）
     */
    private String status;

    /**
     * 1代表汽车、2代表轮胎
     */
    private String orderType;
    private String createBy;

    public String getCreateBy() {
        return createBy;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(Long vehicleId) {
        this.vehicleId = vehicleId;
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }

    public String getTypeCode() {

        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeName() {
        if (typeCode == null) {
            typeName = "";
        } else if (typeCode.equals("1")) {
            typeName ="二级保养";
        }else if (typeCode.equals("2")) {
            typeName ="抢碎修";
        }else if (typeCode.equals("3")) {
            typeName ="拆报废车";
        }else if (typeCode.equals("4")) {
            typeName ="月检";
        }else if (typeCode.equals("5")) {
            typeName ="小修";
        }else if (typeCode.equals("6")) {
            typeName ="轮胎修补";
        }else if (typeCode.equals("7")) {
            typeName ="轮胎报废";
        }
        return typeName;
    }

    public Long getFactoryId() {
        return factoryId;
    }

    public void setFactoryId(Long factoryId) {
        this.factoryId = factoryId;
    }

    public String getInputMileage() {
        return inputMileage;
    }

    public void setInputMileage(String inputMileage) {
        this.inputMileage = inputMileage;
    }

    public BigDecimal getLastMileage() {
        return lastMileage;
    }

    public void setLastMileage(BigDecimal lastMileage) {
        this.lastMileage = lastMileage;
    }

    public String getMaintainDate() {
        return maintainDate;
    }

    public void setMaintainDate(String maintainDate) {
        this.maintainDate = maintainDate;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }


}
