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.ZqWsNurseSubmitDTO;

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