package thyyxxk.webserver.entity.medicalinsurance.setllistupld;


import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.math.RoundingMode;

@Data
@Accessors(chain = true)
public class MzChargitems {
    // 费用类别
    private String medChrgitmType;
    // 总额
    private String detItemFeeSumamt;

    // 甲类
    private String claaSumfee;
    // 乙类
    private String clabAmt;
    // 自费
    private String fulamtOwnpayAmt;
    // 其他
    private String othAmt;

    public String getMedChrgitm() {
        return medChrgitmType;
    }

    public String getAmt() {
        if (detItemFeeSumamt == null) {
            return "0.00";
        }
        BigDecimal decimal = new BigDecimal(detItemFeeSumamt);
        return decimal.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public String getFulamtOwnpayAmt() {
        if (fulamtOwnpayAmt == null) {
            return "0.00";
        }
        BigDecimal decimal = new BigDecimal(fulamtOwnpayAmt);
        return decimal.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public String getClaaSumfee() {
        if (claaSumfee == null) {
            return "0.00";
        }
        BigDecimal decimal = new BigDecimal(claaSumfee);
        return decimal.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public String getClabAmt() {
        if (clabAmt == null) {
            return "0.00";
        }
        BigDecimal decimal = new BigDecimal(clabAmt);
        return decimal.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public String getOthAmt() {
        if (othAmt == null) {
            return "0.00";
        }
        BigDecimal decimal = new BigDecimal(othAmt);
        return decimal.setScale(2, RoundingMode.HALF_UP).toString();
    }

}
