package thyyxxk.webserver.entity.inpatient.dismiss;

import lombok.Data;
import thyyxxk.webserver.utils.SnowFlakeId;

import java.util.Date;

@Data
public class DepositFile {
    private String inpatientNo;
    private Integer admissTimes;
    private Integer ledgerSn;
    private Integer depoTimes;
    private Date depoDate;
    private String opIdCode;
    private String depoAmount;
    private String depoType;
    private String status;
    private String windowNo;
    private String receiptNo;
    private Integer deleted;

    public DepositFile() {
    }

    public DepositFile(String inpatientNo, Integer admissTimes) {
        this.inpatientNo = inpatientNo;
        this.admissTimes = admissTimes;
    }

    public void initZjdzSettleDeposit(String depoAmount) {
        this.depoTimes += 1;
        this.depoDate = new Date();
        this.opIdCode = "00000";
        this.depoAmount = depoAmount;
        this.depoType = "B";
        this.status = "1";
        this.windowNo = "1";
        this.receiptNo = SnowFlakeId.instance().nextId();
        this.deleted = 0;
    }
}
