package com.maintain.business.domain.bo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.maintain.common.core.validate.AddGroup;
import com.maintain.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.maintain.common.core.domain.BaseEntity;

/**
 * 物料出库业务对象 erp_material_picking
 *
 * @author liushuai
 * @date 2025-04-03
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ErpMaterialPickingBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 报修单ID
     */
    @NotNull(message = "报修单不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long repairFormId;

    /**
     * 报修单号
     */
    private String repairNumber;

    /**
     * 出库单号
     */
    private String outNumber;

    /**
     * 退料单号
     */
    private String returnNumber;

    /**
     * 退料时间
     */
    private Date returnTime;

    /**
     * 供应商ID
     */
    @NotNull(message = "供应商不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long vendorId;

    /**
     * 供应商名称
     */
    private String vendorName;

    /**
     * 车辆ID
     */
    @NotNull(message = "车辆不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long carId;

    /**
     * 车牌号
     */
    private String plateNumber;

    /**
     * 出库金额
     */
    @NotNull(message = "出库金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal outMoney;

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

    /**
     * 领料人名称
     */
    private String receiveUserName;

    /**
     * 领料时间
     */
    private Date receiveTime;

    /**
     * 类型（1领料出库 2盘亏出库）
     */
    private Integer type;

    /**
     * 状态（1登记中 2已完成 3已退料）
     */
    private Integer state;

    /**
     * 状态（1登记中 2已完成 3已退料）
     */
    private List<Integer> stateList;

    /**
     * 结算状态（1待结算 2待确认 3已结算）
     */
    private Integer settlementState;

    /**
     * 出库时间
     */
    @NotNull(message = "出库时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date outTime;

    @NotEmpty(message = "出库明细不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<ErpMaterialPickingInfoAddBo> materialList;


}
