package thyyxxk.webserver.entity.makedbzfees;

import lombok.Data;

import java.math.BigDecimal;

/**
 * @author dj
 */
@Data
public class MzChargeDetail {
    private String patientId;
    private Integer times;
    private Integer receiptNo;
    private Integer orderNo;
    private Integer itemNo;
    private Integer reqYj;
    private String chargeItemCode;
    private String billItemCode;
    private Double quantity;
    private BigDecimal unitPrice;
    private Integer payMark;
    private String serial;
    private String serialNo;
    private String groupNo;
    private String name;
    private Integer drugWin;
    private Integer reqNo;
    private String execDept;
    private String execDeptName;
    private String doctorCode;
    private String doctorName;
    private String realNo;
    private String tcName;
    private String chargeBillCode;
    private BigDecimal chargeFee;

    public BigDecimal getChargeFee() {
        BigDecimal price= (getUnitPrice() == null ? BigDecimal.ZERO : getUnitPrice()).setScale(2, BigDecimal.ROUND_HALF_UP);
        return price.multiply(BigDecimal.valueOf(getQuantity() == null ? 1D : getQuantity())).multiply(BigDecimal.valueOf(getDrugWin() == null ? 1D : getDrugWin()));
    }
}
