| | |
| | | } |
| | | |
| | | private Member getMemberListParam(String cardno, Visits visits, List<Member> addList, List<Member> editList) { |
| | | if(!StringUtils.isNotBlank(visits.getCarNos()) |
| | | // &&!Constants.checkCarNo(visits.getCarNos()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,车牌号【"+visits.getCarNos()+"】不合法,请核实后重试~"); |
| | | } |
| | | // if(!StringUtils.isNotBlank(visits.getCarNos()) |
| | | //// &&!Constants.checkCarNo(visits.getCarNos()) |
| | | // ){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,车牌号【"+visits.getCarNos()+"】不合法,请核实后重试~"); |
| | | // } |
| | | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())&&cardno.length()!=18 |
| | | //&&!IdcardUtil.isValidCard(cardno) |
| | | ){ |
| | |
| | | MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Visits.class); |
| | | queryWrapper.selectAs(Member::getName,Visits::getReceptMemberName); |
| | | queryWrapper.select("TIMESTAMPDIFF( MINUTE, NOW(), t.ENDTIME) AS timeOut"); |
| | | queryWrapper.select("TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) AS timeOut"); |
| | | queryWrapper.selectAs(Member::getType,Visits::getMemberType); |
| | | queryWrapper.selectAs(Company::getName,Visits::getReceptMemberDepartment); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,Visits::getReceptMemberId); |
| | |
| | | |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getLevelStatus()),Visits::getStatus,Constants.VisitStatus.signin); |
| | | |
| | | queryWrapper.apply(Objects.nonNull(pageWrap.getModel().getLevelStatus())," TIMESTAMPDIFF( MINUTE, NOW(), t.ENDTIME) <= "+code+" "); |
| | | queryWrapper.apply(Objects.nonNull(pageWrap.getModel().getLevelStatus())," TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) <= "+code+" "); |
| | | |
| | | queryWrapper.ne("m.type ",Constants.TWO); |
| | | queryWrapper.eq(Visits::getIsdeleted,Constants.ZERO); |
| | |
| | | IPage<Visits> result = visitsJoinMapper.selectJoinPage(page, Visits.class,queryWrapper); |
| | | if(result!=null&&result.getRecords()!=null){ |
| | | result.getRecords().stream().forEach(s ->{ |
| | | if(s.getTimeOut()<=Integer.valueOf(code)&&s.getTimeOut()>=0){ |
| | | s.setOutStatus(Constants.TWO); |
| | | }else if(s.getTimeOut()>Constants.ZERO){ |
| | | s.setOutStatus(Constants.ZERO); |
| | | }else{ |
| | | s.setOutStatus(Constants.ONE); |
| | | if(s.getStatus().equals(Constants.VisitStatus.signin)){ |
| | | if(s.getTimeOut()<=Integer.valueOf(code)&&s.getTimeOut()>=0){ |
| | | s.setOutStatus(Constants.TWO); |
| | | }else if(s.getTimeOut()>Constants.ZERO){ |
| | | s.setOutStatus(Constants.ZERO); |
| | | }else{ |
| | | s.setOutStatus(Constants.ONE); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |