package cn.iocoder.yudao.module.order.vo.orderItem;

import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;

import java.math.BigDecimal;
import java.util.*;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Data
@ApiModel("管理后台 - 订单项查询 VO")
public class OrderItemQueryVO {

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

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

    @ApiModelProperty(value = "订单类型：1 普货 2 重货 3 泡货")
    private Integer orderItemType;

    @ApiModelProperty(value = "运输方式id")
    private Integer transportId;

    @ApiModelProperty(value = "线路ID")
    private Long lineId;

    @ApiModelProperty(value = "渠道ID")
    private Long channelId;

    @ApiModelProperty(value = "订单项状态详情见字典")
    private Integer itemStatus;

    @ApiModelProperty(value = "商品ID")
    private Long prodId;

    @ApiModelProperty(value = "产品类型")
    private Integer prodType;

    @ApiModelProperty(value = "产品中文标题")
    private String prodTitleZh;

    @ApiModelProperty(value = "产品英文标题")
    private String prodTitleEn;

    @ApiModelProperty(value = "商品第三方链接")
    private String link;

    @ApiModelProperty(value = "品牌ID")
    private Long brand;

    @ApiModelProperty(value = "0 无牌 1 有牌 2 中性")
    private Integer brandType;

    @ApiModelProperty(value = "费用模式：无牌价0，有牌价1，中性品牌价2")
    private Integer feeType;

    @ApiModelProperty(value = "是否预付：0 到付 1 预付")
    private Integer isPayAdvance;

    @ApiModelProperty(value = "计费方式：0 运费/清关费 1 全包价")
    private Integer charging;

    @ApiModelProperty(value = "数量")
    private Integer quantity;

    @ApiModelProperty(value = "件数")
    private Integer num;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "箱规")
    private String boxGauge;

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

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

    @ApiModelProperty(value = "货值")
    private BigDecimal worth;

    @ApiModelProperty(value = "货值金额单位ID")
    private Integer worthCurrency;

    @ApiModelProperty(value = "商品特性(可选多个特性ID)")
    private String prodAttrIds;

    @ExcelProperty(value = "结果")
    @ApiModelProperty(value = "结果")
    private String result;

    @ExcelProperty("结果状态(多个以逗号拼接，状态详情")
    @ApiModelProperty(value = "结果状态(多个以逗号拼接，状态详情")
    private String resultStatus;

    @ApiModelProperty(value = "是否特价")
    private Boolean specialPriceType;

    @ApiModelProperty(value = "运费单价")
    private BigDecimal oneSeaFreight;

    @ApiModelProperty(value = "旧运费单价")
    private BigDecimal oldOneSeaFreight;

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

    @ApiModelProperty(value = "原来运费")
    private BigDecimal originalSeaFreight;

    @ApiModelProperty(value = "运费货币单位ID")
    private Integer seaFreightCurrency;

    @ApiModelProperty(value = "运费体积单位")
    private Long seaFreightVolume;

    @ApiModelProperty(value = "清关费单价(成交)")
    private BigDecimal oneClearanceFreight;

    @ApiModelProperty(value = "旧清关费单价(成交)")
    private BigDecimal oldOneClearanceFreight;

    @ApiModelProperty(value = "清关费(小计)")
    private BigDecimal clearanceFreight;

    @ApiModelProperty(value = "原清关费(原始)")
    private BigDecimal originalClearanceFreight;

    @ApiModelProperty(value = "清关费货币单位ID")
    private Integer clearanceFreightCurrency;

    @ApiModelProperty(value = "清关费体积单位")
    private Long clearanceFreightVolume;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "开始创建时间")
    private Date beginCreateTime;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @ApiModelProperty(value = "结束创建时间")
    private Date endCreateTime;

    @ApiModelProperty("快递单号")
    private String expressNo;

    @ApiModelProperty(value = "原订单项id")
    private Long orgItemId;

    @ApiModelProperty(value = "空运清关费来源：1 商品 2 渠道")
    private Integer airClearanceSource;


    /**
     * 入仓信息json
     */
    @ApiModelProperty(value = "入仓信息VO")
    @TableField(exist = false)
    private WarehouseInInfoVO warehouseInInfoVO;
    /**
     * 是否仓库入仓新品
     */
    @ApiModelProperty(value = "是否仓库入仓新品 0 下单货物  1 非下单货物-即新品 ")
    private Boolean isWarehouseInAdd;

    /**
     * 入仓信息json
     */
    @ApiModelProperty(value = "入仓信息json")
    private String warehouseInInfo;
    /**
     * 材质
     */
    @ApiModelProperty(value = "材质")
    private String material;


    @ApiModelProperty(value = "应收运费(成本) = 应收单价 * 原始重泡货标准的收费数据")
    private BigDecimal receivableSeaFreight;

    @ApiModelProperty(value = "应收清关费(成本) = 应收单价 * 原始重泡货标准的收费数据")
    private BigDecimal receivableClearanceFreight;

    @ApiModelProperty(value = "应收收费数量")
    private BigDecimal orgChargeQuantity = BigDecimal.ZERO;

    @ApiModelProperty(value = "应收收费件数")
    private Integer orgChargeNum = 0;

    @ApiModelProperty(value = "应收收费体积")
    private BigDecimal orgChargeVolume = BigDecimal.ZERO;

    @ApiModelProperty(value = "应收收费重量")
    private BigDecimal orgChargeWeight = BigDecimal.ZERO;


    @ApiModelProperty(value = "是否需要单询，0-否，1-是")
    private Integer needOrderInquiry;

    @ApiModelProperty(value = "是否处理过单询异常")
    private Boolean isHandlerOrderInquiryException;

    @ApiModelProperty(value = "是否处理了渠道特性异常")
    private Boolean handlerChannelAttrException;

    @ApiModelProperty(value = "到仓材质")
    private String checkMaterial;

    @ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
    private String warehouseCheckProdAttrIds;

    @ApiModelProperty(value = "到仓品牌")
    private Long checkBrand;

    @ApiModelProperty(value = "到仓：0 无牌 1 有牌 2 中性")
    private Integer checkBrandType;
    /**
     * 到仓信息json
     */
    @ApiModelProperty(value = "到仓信息json")
    private String warehouseCheckInfo;

    /**
     * 到仓信息json
     */
    @ApiModelProperty(value = "到仓信息VO")
    private WarehouseCheckInfoVO warehouseCheckInfoVO;


}
