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

public class WsNurseSubmitValidate {
    public static void verifyNurseSubmitDTO(WsNurseSubmitDTO dto) throws BaseException {
        if (Func.isBlank(dto.getInHospIndexNo())) {
            throw new BaseException("住院号不能为空！");
        }
        if (Func.isEmpty(dto.getVisitNo())) {
            throw new BaseException("住院次数不能为空！");
        }
        if (Func.isEmpty(dto.getSubmitTime())) {
            throw new BaseException("提交时间不能为空！");
        }
        if (Func.isEmpty(dto.getFilesCount())) {
            throw new BaseException("文件数量不能为空！");
        }
        if (dto.getFilesCount() < 1) {
            throw new BaseException("文件数量不能小于1！");
        }
    }
}
