package com.ruoyi.inventory.domain;

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

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

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

import lombok.Data;

/**
 * 药品档案对象 healthcare_drug_archive
 *
 * @author 蒋松霖
 * @date 2024-09-19
 */
@Data

public class HealthcareDrugArchive extends BaseEntity {
    private Integer pageNum;

    private Integer pageSize;

    private static final long serialVersionUID = 1L;

    /** 药品档案ID */
    private Long id;

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

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

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

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

    /** 零售价 */
    @Excel(name = "零售价")
    private BigDecimal retailPrice;

    /** 是否允许拆分 */
    private String isSplit;

    /** 最小单位数量 */
    private String minNumber;

    /** 用于判断是否为固态或者液态，用0,1表示 */
    private char state;

    /** 剂量（成分含量） */
    private String dosageForm;

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

    /** 容量 */
    private String volume;

    /** 容量单位 */
    private String volumeUnit;

    /** 最小包装数量 */
    private String unitQuantity;

    /** 最小包装单位 */
    private String splitUnit;

    /** 包装单位 */
    private String packageUnit;

    /** 查询条件：批次 */
    private String batch;

    /** 查询条件：有效期开始 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expiryDateStart;

    /** 查询条件：有效期结束 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expiryDateEnd;

    /** 查询条件：库房ID */
    private Long storeroomId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setMedicineName(String medicineName) {
        this.medicineName = medicineName;
    }

    public String getMedicineName() {
        return medicineName;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getSpecification() {
        return specification;
    }

    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    public void setIsSplit(String isSplit) {
        this.isSplit = isSplit;
    }

    public String getIsSplit() {
        return isSplit;
    }

    public void setDosageForm(String dosageForm) {
        this.dosageForm = dosageForm;
    }

    public String getDosageForm() {
        return dosageForm;
    }

    public void setDosageUnit(String dosageUnit) {
        this.dosageUnit = dosageUnit;
    }

    public String getDosageUnit() {
        return dosageUnit;
    }

    public void setVolumeUnit(String volumeUnit) {
        this.volumeUnit = volumeUnit;
    }

    public String getVolumeUnit() {
        return volumeUnit;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("medicineName", getMedicineName())
                .append("manufacturer", getManufacturer())
                .append("barcode", getBarcode())
                .append("specification", getSpecification())
                .append("retailPrice", getRetailPrice())
                .append("isSplit", getIsSplit())
                .append("state", getState())
                .append("dosageForm", getDosageForm())
                .append("dosageUnit", getDosageUnit())
                .append("volume", getVolume())
                .append("volumeUnit", getVolumeUnit())
                .append("unitQuantity", getUnitQuantity())
                .append("splitUnit", getSplitUnit())
                .append("packageUnit", getPackageUnit())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }

    // 用于存储关联的 HealthCareDrugFiling 列表
    private List<HealthcareDrugFiling> drugFilings;

    public List<HealthcareDrugFiling> getDrugFilings() {
        return drugFilings;
    }

    public void setDrugFilings(List<HealthcareDrugFiling> drugFilings) {
        this.drugFilings = drugFilings;
    }

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

    public boolean isHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(boolean hasChildren) {
        this.hasChildren = hasChildren;
    }
}
