package com.ruoyi.inventory.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 药品库存对象 healthcare_drug_filing
 *
<<<<<<< HEAD
 * @author 蒋松霖
 * @date 2024-09-24
 */
@Data
public class HealthcareDrugFiling extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存记录ID */
    private Long id;

    /** 药品档案id */
    @Excel(name = "药品档案id")
    private Long archiveId;

    /** 库房id */
    @Excel(name = "库房id")
    private Long storeroomId;

    /** 库房名称 */
    @Excel(name = "备注")
    private String storeroomName;

    /** 药品编号 */
    private String medicineCode;

    /** 批次 */
    @Excel(name = "批号")
    private String batch;

    /** 有效期至 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期至", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiryDate;

    /** 盒数 */
    @Excel(name = "数量")
    private Integer boxCount;

    /** 包数 */
    @Excel(name = "包数")
    private Integer packCount;

    /** 零售价 */
    @Excel(name = "含税价")
    private double retailPrice;

    /** 含税金额 */
    @Excel(name = "含税金额")
    private double countPrice;

    /** 最小单位价格  这部分原来是minNumber如果有问题就改回来 知无涯*/
    @Excel(name = "最小单位价格")
    private double minPrice;

    /** 最小单位数量 这部分原来是minPrice如果有问题就改回来 知无涯*/
    @Excel(name = "最小单位数量")
    private double minNumber;

    /** 最大包装单位 */
    @Excel(name = "包装单位")
    private String packageUnit ;

    /** 最小包装单位 */
    @Excel(name = "最小包装单位")
    private String splitUnit;

    /** 判断是否有子节点 */
    @Excel(name = "判断是否有子节点")
    private boolean hasChildren = true;

    /** 药品名称 */
    @Excel(name = "商品名称")
    private String medicineName;

    /** 生产厂家 */
    @Excel(name = "生产厂家")
    private String manufacturer;

    /** 条码 */
    @Excel(name = "商品条码")
    private String barcode;

    /** 规格 */
    @Excel(name = "商品规格")
    private String specification;


    /** 剂量单位 */
    private String dosageUnit;

    /** 库存药品单位，用于存储提取excel导入时提取的默认包装单位*/
    private String inventoryUnit;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("archiveId", getArchiveId())
//            .append("medicineCode", getMedicineCode())
            .append("batch", getBatch())
            .append("expiryDate", getExpiryDate())
            .append("boxCount", getBoxCount())
            .append("packCount", getPackCount())
            .append("retailPrice", getRetailPrice())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

}
