package cn.hnthyy.thmz.vo;

import cn.hnthyy.thmz.Utils.NumberToCN;
import lombok.Data;

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

/**
 * 挂号清单视图类
 */
@Data
public class ReqrecVo {
    //收据号
    private String receiptBill;
    //机制号
    private String serialNo;
    //病人ID
    private String patientId;
    //病人姓名
    private String name;
    //科别
    private String unitCode;
    //号别
    private String chargeType;
    //状态
    private String cancelMark;
    //金额
    private BigDecimal chargeFee;
    //挂号日期
    private Date opDay;
    //收费员编号
    private String opId;
    //现金号数
    private Integer xjhs;
    //现金收款
    private BigDecimal xjsk;
    //现金退号数
    private Integer xjthhs;
    //现金退号费
    private BigDecimal xjth;
    //现金实收号数
    private Integer xjsshs;
    //现金实收金额
    private BigDecimal xjss;
    //银行卡号数
    private Integer yhkhs;
    //银行卡收款
    private BigDecimal yhksk;
    //银行卡退号号数
    private Integer yhkthhs;
    //银行卡退号费
    private BigDecimal yhkth;
    //银行卡实收号数
    private Integer yhksshs;
    //银行卡实收
    private BigDecimal yhkss;
    //医保卡号数
    private Integer ybkhs;
    //医保卡收款
    private BigDecimal ybksk;
    //医保卡退号号数
    private Integer ybkthhs;
    //医保卡退号费
    private BigDecimal ybkth;
    //医保卡实收号数
    private Integer ybksshs;
    //医保卡实收
    private BigDecimal ybkss;
    //支付宝号数
    private Integer zfbhs;
    //支付宝收款
    private BigDecimal zfbsk;
    //支付宝退号号数
    private Integer zfbthhs;
    //支付宝退号费
    private BigDecimal zfbth;
    //支付宝实收号数
    private Integer zfbsshs;
    //支付宝实收
    private BigDecimal zfbss;
    //微信号数
    private Integer wxhs;
    //微信收款
    private BigDecimal wxsk;
    //微信退号号数
    private Integer wxthhs;
    //微信退号费
    private BigDecimal wxth;
    //微信实收号数
    private Integer wxsshs;
    //微信实收
    private BigDecimal wxss;
    //本院记账号数
    private Integer byjzhs;
    //本院记账收款
    private BigDecimal byjzsk;
    //本院记账退号号数
    private Integer byjzthhs;
    //本院记账退号费
    private BigDecimal byjzth;
    //本院记账实收号数
    private Integer byjzsshs;
    //本院记账实收
    private BigDecimal byjzss;
    //微信自助号数
    private Integer wxzzhs;
    //微信自助收款
    private BigDecimal wxzzsk;
    //微信自助退号号数
    private Integer wxzzthhs;
    //微信自助退号费
    private BigDecimal wxzzth;
    //微信自助实收号数
    private Integer wxzzsshs;
    //微信自助实收
    private BigDecimal wxzzss;
    //支付宝自助号数
    private Integer zfbzzhs;
    //支付宝自助收款
    private BigDecimal zfbzzsk;
    //支付宝自助退号号数
    private Integer zfbzzthhs;
    //支付宝自助退号费
    private BigDecimal zfbzzth;
    //支付宝自助实收号数
    private Integer zfbzzsshs;
    //支付宝自助实收
    private BigDecimal zfbzzss;
    //合计号数
    private Integer hjhs;
    //合计收款
    private BigDecimal hjsk;
    //合计退号号数
    private Integer hjthhs;
    //合计退号费
    private BigDecimal hjth;
    //合计实收号数
    private Integer hjsshs;
    //合计实收
    private BigDecimal hjss;
    //诊察收入
    private BigDecimal zcsr;
    //检查收入
    private BigDecimal jcsr;
    //挂号费
    private BigDecimal ghsr;
    //挂号合计大写
    private String hjssdx;
    //挂号金额不含记账大写
    private String ghjebhjzdx;
    //挂号金额不含记账
    private BigDecimal ghjebhjz;
    //本院记账大写
    private String byjzssdx;
    //付款方式
    private String paymode;

    public BigDecimal getHjss() {
        if(hjss==null){
            hjss=BigDecimal.ZERO;
        }
        return hjss;
    }

    /**
     * 设置实收笔数
     */
    public void fomartReqrecVo(){
        ghjebhjz=(hjss==null?BigDecimal.ZERO:hjss).subtract(byjzss==null?BigDecimal.ZERO:byjzss);
        ghjebhjzdx=NumberToCN.number2CNMontrayUnit(ghjebhjz==null?BigDecimal.ZERO:ghjebhjz);
        hjssdx=NumberToCN.number2CNMontrayUnit(hjss==null?BigDecimal.ZERO:hjss);
        byjzssdx=NumberToCN.number2CNMontrayUnit(byjzss==null?BigDecimal.ZERO:byjzss);
    }
}
