package com.sckw.transport.api.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author :chenXiaoFei
 * @version :1.0
 * @description : 运单详情
 * @create :2025-11-15 13:46:00
 */
@Data
public class WaybillOrderDetailVo implements Serializable {
    @Serial
    private static final long serialVersionUID = -8652529429805600924L;
    /**
     * 运单id
     */
    @Schema(description = "运单id")
    private String waybillOrderId;
    /**
     * 运单编号
     */
    @Schema(description = "运单编号")
    private String waybillOrderNo;
    /**
     * 物流订单id
     */
    @Schema(description = "物流订单id")
    private String logisticOrderId;
    /**
     * 物流订单号
     */
    @Schema(description = "物流订单号")
    private String logisticOrderNo;
    /**
     * 计费方式
     */
    @Schema(description = "计费方式")
    private String priceType;
    /**
     * 计费方式描述
     */
    @Schema(description = "计费方式描述")
    private String priceTypeDesc;
    /**
     * 车牌号
     */
    @Schema(description = "车牌号")
    private String truckNo;
    /**
     * 车辆轴数
     */
    @Schema(description = "车辆轴数")
    private String carAxis;
    /**
     * 所属车队
     */
    @Schema(description = "所属车队")
    private String fleetName;
    /**
     * 司机姓名
     */
    @Schema(description = "司机姓名")
    private String driverName;
    /**
     * 联系方式
     */
    @Schema(description = "联系方式")
    private String driverPhone;
    /**
     * 身份证号
     */
    @Schema(description = "身份证号")
    private String driverIdCard;
    /**
     * 商品名称
     */
    @Schema(description = "商品名称")
    private String goodsName;
    /**
     * 装货地址
     */
    @Schema(description = "装货地址")
    private String loadAddress;
    /**
     * 卸货地址
     */
    @Schema(description = "卸货地址")
    private String unloadAddress;
    /**
     * 任务量
     */
    @Schema(description = "任务量")
    private String taskVolume;
    /**
     * 装货量
     */
    @Schema(description = "装货量")
    private String loadAmount;
    /**
     * 卸货量
     */
    @Schema(description = "卸货量")
    private String unloadAmount;

    /**
     * 供应单位
     */
    @Schema(description = "供应单位")
    private String supplyEntName;

    /**
     * 托运企业
     */
    @Schema(description = "托运企业")
    private String transEntName;
    /**
     * 承运企业
     */
    @Schema(description = "承运企业")
   private String carrierEntName;
    /**
     * 装货完成率（装货量*任务量）*100%
     */
    @Schema(description = "装货完成率")
    private String loadCompleteRate;
    /**
     * 货损率（装货量-卸货量）*装货量*100%
     */
    @Schema(description = "货损率")
    private String lossRate;

    /**
     * 皮重
     */
    @Schema(description = "皮重")
    private BigDecimal tareAmount;

    /**
     * 毛重
     */
    @Schema(description = "毛重")
    private BigDecimal grossAmount;

    /**
     * 状态
     */
    @Schema(description = "状态")
    private Integer status;

    /**
     * 状态描述
     */
    @Schema(description = "状态描述")
    private String statusDesc;

    /**
     * 法定载重
     */
    @Schema(description = "法定载重")
    private BigDecimal legalLoad;

    /**
     * 装卸货之间距离
     */
    @Schema(description = "装卸货之间距离")
    private String distanceKm;

    /**
     * 装货地址经度
     */
    @Schema(description = "装货地址经度")
    private String loadLongitude;
    /**
     * 装货地址纬度
     */
    @Schema(description = "装货地址纬度")
    private String loadLatitude;

    /**
     * 卸货地址经度
     */
    @Schema(description = "卸货地址经度")
    private String unloadLongitude;
    /**
     * 卸货地址纬度
     */
    @Schema(description = "卸货地址纬度")
    private String unloadLatitude;

    /**
     * 过磅记录
     */
    @Schema(description = "过磅记录")
    private List<WeighingRecord> weighingRecords;

    /**
     * 单据信息
     */
    @Schema(description = "单据信息")
    private BillInfo billInfo;
    /**
     * 运单id列表
     */
    private List<Long> billOrderIdList;
    @Data
    public static class WeighingRecord implements Serializable{
        @Serial
        private static final long serialVersionUID = -2336627824004942658L;

        /**
         * 过磅时间
         */
        @Schema(description = "过磅时间")
        private String weighingTime;
        /**
         * 过磅描述
         */
        @Schema(description = "过磅描述")
        private String weighingDesc;
        /**
         * 过磅图片地址
         */
        @Schema(description = "过磅图片地址")
        private String weighingImgUrl;
        /**
         * 地磅名称
         */
        @Schema(description = "地磅名称")
        private String weighingName;

    }
    @Data
    public static class BillInfo implements  Serializable{
        @Serial
        private static final long serialVersionUID = 327264843861102865L;
        /**
         * 上传人名称
         */
        @Schema(description = "上传人名称")
        private String uploadByLabel;
        /**
         * 上传时间
         */
        @Schema(description = "上传时间")
        private String uploadTime;
        /**
         * 单据地址
         */
        @Schema(description = "单据地址")
        private String billUrl;
    }
}
