| | |
| | | //检查是否必须答题,并且符合答题要求 |
| | | ProblemLog problemLog = isValidProblemLog(visits); |
| | | //获取申请的海康访问门禁组信息 |
| | | getHkDeviceRoles(visits,isERP); |
| | | // getHkDeviceRoles(visits,isERP); |
| | | //检验拜访人是否合法 |
| | | Member visitMember = isValideVisitedUser(visits.getReceptMemberId()); |
| | | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())&&visits.getIdcardNo().length()!=18 |
| | |
| | | } |
| | | //访客报备 |
| | | if(visits.getType().equals(Constants.TWO) |
| | | && (StringUtils.isBlank( visits.getName()) |
| | | && (StringUtils.isBlank( visits.getName()) |
| | | || StringUtils.isBlank( visits.getPhone()) |
| | | || StringUtils.isBlank( visits.getCompanyName())) |
| | | || StringUtils.isBlank( visits.getCarNos()) |
| | | || Objects.isNull( visits.getMemberNum()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,信息填写不正确!"); |
| | | }else if(visits.getType().equals(Constants.ONE) && StringUtils.isBlank(visits.getConstructionReason())){ |
| | | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,未填写施工事由!"); |
| | | } |
| | | if(visits.getEndtime().getTime() < System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,入厂时间必须大于当前时间!");// |
| | |
| | | |
| | | |
| | | @Override |
| | | public VisitDetailVO getVisitDetail(Integer id){ |
| | | public VisitDetailVO getVisitDetail(Integer id,Integer memberId){ |
| | | Visits visits = visitsMapper.selectById(id); |
| | | if(Objects.isNull(visits)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | visitsMapper.selectList(new QueryWrapper<Visits>().lambda() |
| | | .select(Visits::getName,Visits::getPhone,Visits::getQrcode,Visits::getFaceImg,Visits::getImgurl,Visits::getIdcardDecode,Visits::getStatus) |
| | | .eq(Visits::getParentId,id))); |
| | | |
| | | |
| | | if(Objects.nonNull(memberId)){ |
| | | visitDetailVO.setApproveDateVO( |
| | | approveService.arrangeApprovedData(id, |
| | | visits.getType(), |
| | | memberId) |
| | | ); |
| | | } |
| | | return visitDetailVO; |
| | | } |
| | | |