package com.docus.server.message.validate;

import com.docus.core.util.Func;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.message.dto.ZqRecordSubmitDTO;

public class ZqRecordSubmitValidate {
    public static void verifyRecordSubmitDTO(ZqRecordSubmitDTO recordSubmitDto) throws BaseException{
        String jzh = recordSubmitDto.getJzh();
        String inpatientNo = recordSubmitDto.getInpatientNo();
        String name = recordSubmitDto.getName();
        String submitDate = recordSubmitDto.getSubmitDate();
        if (Func.isBlank(jzh)
                && Func.isBlank(inpatientNo)
                && Func.isBlank(name)) {
            throw new BaseException("住院流水号、住院号、患者姓名 不可全部为空！");
        }
        if (Func.isBlank(submitDate)) {
            throw new BaseException("提交时间不能为空！");
        }
    }
}
