| | |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Autowired |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private PlatformWarnEventServiceImpl platformWarnEventService; |
| | |
| | | } |
| | | |
| | | public void sceneSignIn(SignInDTO signInDTO){ |
| | | |
| | | if( StringUtils.isNotBlank(signInDTO.getQrCodeKey())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(!signInDTO.getQrCodeKey().equals(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode())){ |
| | | if(!signInDTO.getQrCodeKey().equals( |
| | | systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE_PREFIX).getCode() + systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"二维码已过期,请刷新重试"); |
| | | } |
| | | } |
| | |
| | | return platformJob; |
| | | } |
| | | |
| | | public PlatformJob getLastWaitJob(String uuid, LoginUserInfo loginUser){ |
| | | String u = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.BIGSCREEN_UUID); |
| | | if(!StringUtils.equals(u,uuid)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,二维码已失效!"); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getDrivierPhone,loginUser.getMobile()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WART_SIGN_IN.getKey()) |
| | | .orderByDesc(PlatformJob::getCreateDate) |
| | | .last(" limit 1 ") ); |
| | | return platformJob; |
| | | } |
| | | |
| | | /** |
| | | * 完成作业 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public PlatformJob finishWork(JobOperateDTO jobOperateDTO){ |
| | |
| | | List<PlatformJob> calledList = platformJobList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())).collect(Collectors.toList()); |
| | | largeScreenDataVO.setWaitWorkList(calledList); |
| | | } |
| | | String u = UUID.randomUUID().toString(); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.BIGSCREEN_UUID,u,3, TimeUnit.MINUTES); |
| | | largeScreenDataVO.setQrCode(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode()); |
| | | return largeScreenDataVO; |
| | | |