package thyyxxk.webserver.entity.medicalinsurance.setlinfo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @description: 查询结算列表参数
 * @author: DingJie
 * @create: 2021/8/914:43
 */
@Data
public class SlctSetlPrm {
    private Integer mode;
    private Integer acctPayFlag;
    private String insutype;
    @NotBlank(message = "结算类别不能为空！")
    private String clrType;
    private String setlOptins;
    @NotNull(message = "开始日期不能为空！")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date stmtBegndate;
    @NotNull(message = "结束日期不能为空！")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date stmtEnddate;
    private String patNo;
    private Integer revoked;

    public Integer getMode() {
        return null == mode ? 1 : mode;
    }

    public Integer getAcctPayFlag() {
        return null == acctPayFlag ? 1 : acctPayFlag;
    }
}
