package com.prolog.rdc.tms.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@Data
public class ShipBillFeeDetailDTO implements Serializable {

    @ApiModelProperty(value = "费用ID")
    private Long id;

    @ApiModelProperty(value = "运单ID")
    private String shipbillId;

    @ApiModelProperty(value = "运单编号")
    private String shipbillNo;

    @ApiModelProperty(value = "费用单号")
    private String expenseNo;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "含税金额")
    private BigDecimal taxAmt;

    @ApiModelProperty(value = "无税金额")
    private BigDecimal noTaxAmt;

    @ApiModelProperty(value = "税点")
    private String taxPoint;

    @ApiModelProperty(value = "税额")
    private BigDecimal tax;

    @ApiModelProperty(value = "所属部门ID")
    private String departmentId;

    @ApiModelProperty(value = "所属部门编码")
    private String departmentCode;

    @NotEmpty(message = "所属部门不能为空")
    @ApiModelProperty(value = "所属部门名称")
    private String departmentName;

    @ApiModelProperty(value = "支出总价")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "合同支出总价")
    private BigDecimal contractPayAmount;

    @ApiModelProperty(value = "运费")
    private BigDecimal transportationPrice;

    @ApiModelProperty(value = "提货费")
    private BigDecimal pickUpFee;

    @ApiModelProperty(value = "计费时间")
    private Date costDate;

    @ApiModelProperty(value = "计费合同")
    private String costContract;

    @ApiModelProperty(value = "计费价格表")
    private String costPriceTable;

    @ApiModelProperty(value = "计费类别")
    private Integer costType;

    @ApiModelProperty(value = "计费失败原因")
    private String costFailReason;

    @ApiModelProperty(value = "疫情补贴")
    private BigDecimal subsidies;

    @ApiModelProperty(value = "送货费")
    private BigDecimal deliveryFee;

    @ApiModelProperty(value = "货主ID")
    private Long cargoOwnerId;

    @NotEmpty(message = "货主信息不能为空")
    @ApiModelProperty(value = "货主编码")
    private String cargoOwnerCode;

    @ApiModelProperty(value = "货主名称")
    private String cargoOwnerName;

    @ApiModelProperty(value = "订单ID")
    private String orderId;

    @ApiModelProperty(value = "结算公司")
    private String settlementCompany;

    @ApiModelProperty(value = "结算部门")
    private String settlementDepartment;

    @ApiModelProperty(value = "同步状态")
    private Integer synchronousStatus;
    private String synchronousStatusName;

    @ApiModelProperty(value = "同步时间")
    private Date synchronousDate;

    @ApiModelProperty(value = "同步失败原因")
    private String synchronousFailReason;

    @ApiModelProperty(value = "核算时间")
    private Date settlementDate;

    @ApiModelProperty(value = "运单状态")
    private Integer shipBillStatus;
    private String shipBillStatusName;

    @ApiModelProperty(value = "异常状态")
    private Integer abnormalStatus;
    private String abnormalStatusName;

    @ApiModelProperty(value = "承运方(调度)类型 数据字典LINE_CARRIER_TYPE:1.承运商  2.司机")
    private Integer carrierType;
    private String carrierTypeName;

    @ApiModelProperty(value = "调度单号")
    private String loadingBillNo;

    @ApiModelProperty(value = "承运方名称")
    private String carrierName;

    @ApiModelProperty(value = "承运商ID")
    private Long carrierId;

    @ApiModelProperty(value = "承运商编码")
    private String carrierCode;

    @ApiModelProperty(value = "送货员姓名")
    private String deliveryName;

    @ApiModelProperty(value = "车牌号")
    private String vehicleCode;

    @ApiModelProperty(value = "车辆名称")
    private String vehicleName;

    @ApiModelProperty(value = "隶属机构ID")
    private Long affiliationId;

    @ApiModelProperty(value = "隶属机构编码")
    private String affiliationCode;

    @ApiModelProperty(value = "隶属机构名称")
    private String affiliationName;

    @ApiModelProperty(value = "WMS单据ID")
    private String wmsOrderId;

    @ApiModelProperty(value = "WMS单据编号")
    private String wmsOrderNo;

    @ApiModelProperty(value = "费用单状态")
    private Integer expenseStatus;

    @ApiModelProperty(value = "费用单状态")
    private String expenseStatusName;

    @NotNull(message = "订单类型不能为空")
    @ApiModelProperty(value = "订单类型 数据字典ORDER_TYPE：1普通 2紧急 3加急")
    private Integer orderType;
    private String orderTypeName;

    @NotNull(message = "业务类型不能为空")
    @ApiModelProperty(value = "订单业务类型 数据字典ORDER_BUSINESS_TYPE：1销售订单-直送  2销售订单-供应商配送 3采购订单-供应商配送 4采购订单-自提 5销售退货 6采购退货 7调拨")
    private Integer orderBusinessType;
    private String orderBusinessTypeName;

    @NotNull(message = "配送方式不能为空")
    @ApiModelProperty(value = "配送方式 数据字典DELIVERY_METHOD_TYPE：1配送 2自提")
    private Integer deliveryMethodType;
    private String deliveryMethodTypeName;

    @NotNull(message = "运输类型不能为空")
    @ApiModelProperty(value = "运输类型(运输模式) 数据字典TRANSPORT_TYPE:1整车 2零担")
    private Integer transportType;
    private String transportTypeName;

    @ApiModelProperty(value = "温度要求 数据字典TEMPERATURE_REQUIREMENT：1常温 2冷藏 3冷冻 4恒温")
    private Integer temperatureRequirement;
    private String temperatureRequirementName;

    @ApiModelProperty(value = "备注")
    private String memo;

    @ApiModelProperty(value = "下单时间")
    private Date orderDate;

    @ApiModelProperty(value = "提交时间")
    private Date submitDate;

    @ApiModelProperty(value = "审核时间")
    private Date auditDate;

    @ApiModelProperty(value = "调度时间")
    private Date loadingDate;

    @ApiModelProperty(value = "调度审核时间")
    private Date loadingAuditDate;

    @ApiModelProperty(value = "实际启运时间")
    private Date startDate;

    @ApiModelProperty(value = "实际送达时间")
    private Date deliveryDate;

    @ApiModelProperty(value = "回单时间")
    private Date receiptDate;

    @ApiModelProperty(value = "正本回单时间")
    private Date originalBackDate;

    @ApiModelProperty(value = "实际时效")
    private int actualTime;

    @ApiModelProperty(value = "完成时间")
    private Date completeDate;

    @ApiModelProperty(value = "发货方类型 数据字典SHIPPER_TYPE:1客户 2仓库 3供应商")
    private Integer shipperType;
    private String shipperTypeName;

    @ApiModelProperty(value = "发货方单位ID")
    private Long shipperUnitId;

    @ApiModelProperty(value = "发货方单位编码")
    private String shipperUnitCode;

    @ApiModelProperty(value = "发货方单位名称")
    private String shipperUnitName;

    @ApiModelProperty(value = "发货方ID")
    private Long shipperId;

    @ApiModelProperty(value = "发货方编码")
    private String shipperCode;

    @ApiModelProperty(value = "发货方名称")
    private String shipperName;

    @ApiModelProperty(value = "发货方联系人")
    private String shipperContact;

    @ApiModelProperty(value = "发货方手机号")
    private String shipperPhoneNumber;

    @ApiModelProperty(value = "发货方座机号")
    private String shipperLandlineNumber;

    @ApiModelProperty(value = "发货方邮箱")
    private String shipperEmail;

    private String shipperProvinceCityDistrict;

    @ApiModelProperty(value = "发货方关联手机号")
    private String shipperRelatedPhoneNumber;

    @ApiModelProperty(value = "发货方省编码")
    private String shipperProvince;

    @ApiModelProperty(value = "发货方省名称")
    private String shipperProvinceName;

    @ApiModelProperty(value = "发货方市编码")
    private String shipperCity;

    @ApiModelProperty(value = "发货方市名称")
    private String shipperCityName;

    @ApiModelProperty(value = "发货方区/县编码")
    private String shipperDistrict;

    @ApiModelProperty(value = "发货方区/县名称")
    private String shipperDistrictName;

    @ApiModelProperty(value = "详细地址")
    private String shipperAddress;

    @ApiModelProperty(value = "始发地 省市区")
    private String shipperAddressInfo;

    @ApiModelProperty(value = "发货方备注")
    private String shipperMemo;

    @ApiModelProperty(value = "发货方经度")
    private BigDecimal shipperLongitude;

    @ApiModelProperty(value = "发货方纬度")
    private BigDecimal shipperLatitude;

    @ApiModelProperty(value = "收货方类型 数据字典CONSIGNEE_TYPE:1客户 2仓库 3供应商")
    private Integer consigneeType;
    private String consigneeTypeName;

    @ApiModelProperty(value = "收货方单位ID")
    private Long consigneeUnitId;

    @NotEmpty(message = "收货方类型不能为空")
    @ApiModelProperty(value = "收货方单位编码")
    private String consigneeUnitCode;

    @ApiModelProperty(value = "收货方单位名称")
    private String consigneeUnitName;

    @ApiModelProperty(value = "收货方ID")
    private Long consigneeId;

    @ApiModelProperty(value = "收货方编码")
    private String consigneeCode;

    @ApiModelProperty(value = "收货方名称")
    private String consigneeName;

    @ApiModelProperty(value = "收货方联系人")
    private String consigneeContact;

    @ApiModelProperty(value = "收货方手机号")
    private String consigneePhoneNumber;

    @ApiModelProperty(value = "收货方座机号")
    private String consigneeLandlineNumber;

    @ApiModelProperty(value = "收货方邮箱")
    private String consigneeEmail;

    @ApiModelProperty(value = "收货方关联手机号")
    private String consigneeRelatedPhoneNumber;

    @ApiModelProperty(value = "收货方省编码")
    private String consigneeProvince;

    @ApiModelProperty(value = "收货方省名称")
    private String consigneeProvinceName;

    private String consigneeProvinceCityDistrict;

    @ApiModelProperty(value = "收货方市编码")
    private String consigneeCity;

    @ApiModelProperty(value = "收货方市名称")
    private String consigneeCityName;

    @ApiModelProperty(value = "收货方区/县编码")
    private String consigneeDistrict;

    @ApiModelProperty(value = "收货方区/县名称")
    private String consigneeDistrictName;

    @ApiModelProperty(value = "始发地详细地址")
    private String consigneeAddress;

    @ApiModelProperty(value = "始发地 省市区")
    private String consigneeAddressInfo;

    @ApiModelProperty(value = "收货方备注")
    private String consigneeMemo;

    @ApiModelProperty(value = "收货方经度")
    private BigDecimal consigneeLongitude;

    @ApiModelProperty(value = "收货方纬度")
    private BigDecimal consigneeLatitude;

    @ApiModelProperty(value = "总件数")
    private BigDecimal totalPcs;

    @ApiModelProperty(value = "总体积")
    private BigDecimal totalVolume;

    @ApiModelProperty(value = "总重量")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "拼箱数")
    private BigDecimal packageLclPiece;

    @ApiModelProperty(value = "包裹总重量")
    private BigDecimal packageTotalWeight;

    @ApiModelProperty(value = "包裹总体积")
    private BigDecimal packageTotalVolume;

    @ApiModelProperty(value = "包裹整件数")
    private BigDecimal packageWholePiece;

    @ApiModelProperty(value = "来源 数据字典SOURCE 1.新增 2.excel导入 3.接口导入")
    private Integer source;
    private String sourceName;

    @ApiModelProperty(value = "运单状态 数据字典SHIPBILL_STATUS:0已作废 10初始化 20已提交 5已回退")
    private Integer status;
    private String statusName;

    @ApiModelProperty(value = "司机ID")
    private Long driverId;

    @ApiModelProperty(value = "司机编号")
    private String driverCode;

    @ApiModelProperty(value = "司机名称")
    private String driverName;

    @ApiModelProperty(value = "司机手机号")
    private String driverPhoneNumber;

    @ApiModelProperty(value = "车辆ID")
    private Long vehicleTypeId;

    @ApiModelProperty(value = "车辆名称")
    private String vehicleTypeCode;

    @ApiModelProperty(value = "车辆名称")
    private String vehicleTypeName;

    @ApiModelProperty(value = "车型")
    private String vehicleType;

    @ApiModelProperty(value = "配载重量装载率")
    private String weightLoadingRate;

    @ApiModelProperty(value = "所属组织ID")
    private Long organizationId;

    @ApiModelProperty(value = "所属组织编码")
    private String organizationCode;

    @ApiModelProperty(value = "所属组织名称")
    private String organizationName;

    @ApiModelProperty(value = "扫描状态 数据字典SCAN_STATUS:10初始 20已装车扫描")
    private Integer scanStatus;

    @ApiModelProperty(value = "配送状态 数据字典DELIVERY_STATUS:10配送失败 20配送滞留 30配送成功")
    private Integer deliveryStatus;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createtime;

    @ApiModelProperty(name = "创建用户")
    private String createperson;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "修改时间")
    private Date updatetime;

    @ApiModelProperty(name = "修改用户")
    private String updateperson;

    @ApiModelProperty(name = "导入批次号")
    private String importBatchNumber;

    @ApiModelProperty(name = "详情")
    private List<ShipBillDetailDTO> list;


    @ApiModelProperty(value = "费用科目编码")
    private String expenseAccountCode;

    @ApiModelProperty(value = "费用科目名称")
    private String expenseAccountName;

    @ApiModelProperty(value = "费用编码")
    private String expenseCode;

    @ApiModelProperty(value = "费用名称")
    private String expenseName;

    @ApiModelProperty(value = "费用类别")
    private Integer expenseType;

    @ApiModelProperty(value = "费用类型名称")
    private String expenseTypeName;

    @ApiModelProperty(value = "费用说明")
    private String expenseMemo;

    @ApiModelProperty(value = "费用来源 1:价格表生成，2：手工录入")
    private Integer billingSource;
    private String billingSourceName;

    @ApiModelProperty(value = "核算状态")
    private Integer settlementStatus;
    private String settlementStatusName;

    @ApiModelProperty(value = "结算状态")
    private Integer checkStatus;
    private String checkStatusName;

    @ApiModelProperty(value = "计费状态 1：计费成功")
    private Integer billingStatus;
    private String billingStatusName;

    @ApiModelProperty(value = "结算周期")
    private Integer settlementCycle;

    @ApiModelProperty(value = "计费类别")
    private String billingTypeName;

    @ApiModelProperty(value = "价格表名称")
    private String billingPrice;
}