package com.maintain.business.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.maintain.common.annotation.ExcelDictFormat;
import com.maintain.common.convert.ExcelDictConvert;
import lombok.Data;

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

/**
 * 物料出库视图对象 erp_material_picking
 *
 * @author liushuai
 * @date 2025-04-03
 */
@Data
@ExcelIgnoreUnannotated
public class ErpMaterialPickingVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 报修单ID
     */
    private Long repairFormId;

    /**
     * 报修单号
     */
    @ExcelProperty(value = "报修单号")
    private String repairNumber;

    /**
     * 出库单号
     */
    @ExcelProperty(value = "出库单号")
    private String outNumber;

    /**
     * 退料单号
     */
    @ExcelProperty(value = "退料单号")
    private String returnNumber;

    /**
     * 退料时间
     */
    @ExcelProperty(value = "退料时间")
    private Date returnTime;

    /**
     * 车辆ID
     */
    private Long carId;

    /**
     * 车牌号
     */
    @ExcelProperty(value = "车牌号")
    private String plateNumber;

    /**
     * 出库金额
     */
    @ExcelProperty(value = "出库金额")
    private BigDecimal outMoney;

    /**
     * 领料人ID
     */
    private Long receiveUserId;

    /**
     * 领料人名称
     */
    @ExcelProperty(value = "领料人名称")
    private String receiveUserName;

    /**
     * 领料时间
     */
    @ExcelProperty(value = "领料时间")
    private Date receiveTime;

    /**
     * 类型（1领料出库 2盘亏出库）
     */
    @ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "picking_type")
    private Integer type;

    /**
     * 状态（1已领料 2已退料）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "picking_state")
    private Integer state;

    /**
     * 结算状态（1待结算 2待确认 3已结算）
     */
    @ExcelProperty(value = "结算状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "picking_settlement_state")
    private Integer settlementState;

    /**
     * 出库时间
     */
    @ExcelProperty(value = "出库时间")
    private Date outTime;

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 出库明细列表
     */
    private List<ErpMaterialPickingInfoVo> pickingInfoList;

    /**
     * 结算明细列表
     */
    private List<ErpSettlementMaterialInfoVo> settlementMaterialInfoList;


}
