package org.dromara.web.domain.vo;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.web.domain.ProductInOutRecord;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 产品出入库记录视图对象 product_in_out_record
 *
 * @author Lion Li
 * @date 2025-08-20
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = ProductInOutRecord.class)
public class ProductInOutRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long id;

    /**
     * 操作类型
     */
    @ExcelProperty(value = "操作类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "stock_oper_type")
    private String type;

    /**
     * 处方来源
     */
    @ExcelProperty(value = "处方来源", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "treatment_user_type")
    private String visitType;

    /**
     * 预包装单位
     */
    @ExcelProperty(value = "预包装单位", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "product_package_unit")
    private String preUnit;

    /**
     * 商品批号
     */
    @ExcelProperty(value = "商品批号")
    private String productBatchNo;

    @ExcelProperty(value = "商品类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "product_type")
    private String productType;

    @ExcelProperty(value = "商品编码")
    private String productNo;

    @ExcelProperty(value = "规格")
    private String specsName;

    /**
     * 凭证
     */
    @ExcelProperty(value = "凭证")
    private String attachment;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 生产日期
     */
    @ExcelProperty(value = "生产日期")
    private Date manufactureDate;

    /**
     * 失效日期
     */
    @ExcelProperty(value = "失效日期")
    private Date expirationDate;

    /**
     * 科室id
     */
    @ExcelProperty(value = "科室id")
    private Long deptId;

    /**
     * 科室名称
     */
    @ExcelProperty(value = "科室名称")
    private String deptName;

    /**
     * 分类Id
     */
    private Long categoryId;

    /**
     * 分类名称
     */
    @ExcelProperty(value = "分类名称")
    private String categoryName;

    /**
     * 警告数量
     */
    @ExcelProperty(value = "警告数量")
    private Long alertNum;

    /**
     * 货道号
     */
    @ExcelProperty(value = "货道号")
    private String lineNo;

    /**
     * 库位Id
     */
    @ExcelProperty(value = "库位Id")
    private Long locationId;

    /**
     * 库位名称
     */
    @ExcelProperty(value = "库位名称")
    private String locationName;

    /**
     * 产品Id
     */
    @ExcelProperty(value = "产品Id")
    private Long productId;

    /**
     * 产品名称
     */
    @ExcelProperty(value = "产品名称")
    private String productName;

    /**
     * 货道号
     */
    @ExcelProperty(value = "货道号")
    private String invoiceNo;

    @ExcelProperty(value = "临期提醒期")
    private Integer warningMonth;

    /**
     * 数量
     */
    @ExcelProperty(value = "数量")
    private Long num;

    /**
     * 单价
     */
    @ExcelProperty(value = "单价")
    private BigDecimal price;

    /**
     * 合计
     */
    @ExcelProperty(value = "合计")
    private BigDecimal totalPrice;

    /**
     * 单位
     */
    @ExcelProperty(value = "单位", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "product_package_unit")
    private String unit;

    /**
     * 入库批次
     */
    @ExcelProperty(value = "入库批次")
    private String serialNo;

    private Date createTime;

    private Long stockNum;

    /**
     * 状态（0正常 1停用）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
    private String status;


}
