jiangping
2025-04-23 80ed2bed5c8c12b8b48f6dab09fb51002a9ef5cc
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -172,7 +172,7 @@
            if (erpVisitDTO.getEndtime().getTime() <= erpVisitDTO.getStarttime().getTime()) {
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,预约结束时间必须大于开始时间!");
            }
            if (Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18
            if (StringUtils.isNotBlank(erpVisitDTO.getIdcardNo()) && Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18
                //&&!IdcardUtil.isValidCard(visits.getIdcardNo())
            ){
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!");
@@ -240,9 +240,8 @@
        getHkDeviceRoles(visits,isERP);
        //检验拜访人是否合法
        Member visitMember = isValideVisitedUser(visits.getReceptMemberId());
        if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())
                &&visits.getIdcardNo().length()!=18
        ){
        if(StringUtils.isNotBlank(visits.getIdcardNo()) && Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())
                &&visits.getIdcardNo().length()!=18 ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!");
        }
        Date date = new Date();