| | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void visitLevelForCarOut(Visits visits){ |
| | | visitLevelBiz(visits); |
| | | visits.setRemark("跟随访客车辆离园自动签离"); |
| | | visitLevelBiz(visits); |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | request.setOrderId(visits.getHkId()); |
| | | //调用海康强制签离 |
| | | BaseResponse response = HKService.iccmSignoff(request); |
| | | // BaseResponse response = HKService.outVisitAppiontment(request); |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda() |
| | | .set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .set(Visits::getRemark,visits.getRemark()) |
| | | .eq(Visits::getId,visits.getId())); |
| | | if(response!=null &&StringUtils.isNotBlank(response.getCode()) && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda() |
| | | .set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .set(Visits::getRemark,visits.getRemark()) |
| | | .eq(Visits::getId,visits.getId())); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"访客签离失败,请刷新重试"); |
| | | } |
| | | } |
| | | |
| | | @Override |