package thyyxxk.webserver.entity.inpatient.chargelist;

import lombok.Data;

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

@Data
public class ChargeItem {
    // 医保编码
    private String code;
    // 医保名称
    private String name;
    // 规格
    private String specification;
    // 单位
    private String unit;
    // 单价
    private BigDecimal price;
    // 数量
    private BigDecimal quantity;
    // 金额
    private BigDecimal cost;
    // 执行科室
    private String execDept;
    // 费用类别编码
    private String billItemCode;
    // 费用类别名称
    private String billItemName;
    // 收费时间
    private Date chargeDate;

    private String priceString;
    private String quantityString;
    private String costString;

    public String getPriceString() {
        return price.setScale(2, RoundingMode.HALF_DOWN).toString();
    }

    public String getQuantityString() {
        return quantity.setScale(1, RoundingMode.HALF_DOWN).toString();
    }

    public String getCostString() {
        return cost.setScale(2, RoundingMode.HALF_DOWN).toString();
    }
}
