| | |
| | | .eq(pageWrap.getModel().getPlatformGroupId() != null, PlatformJob::getPlatformGroupId, pageWrap.getModel().getPlatformGroupId()) |
| | | |
| | | .apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')") |
| | | .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart())) |
| | | .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd())) |
| | | .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart())) |
| | | .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd())) |
| | | .eq(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | .ne(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | ; |
| | |
| | | }else{ |
| | | platformJob.setWaitTime("等待叫号"); |
| | | } |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | | || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | | //查询最后开始任务的月台记录 日志表 因为存在异常挂起 转移 等问题 |
| | | PlatformLog platformLog = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda() |
| | | .eq(PlatformLog::getJobId,platformJob.getId()) |
| | |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile()) |
| | | .like(PlatformJob::getArriveDate,DateUtil.getCurrDate()) |
| | | // .like(PlatformJob::getArriveDate,DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformJob::getId) |
| | | ); |
| | | for (PlatformJob platformJob:platformJobList) { |
| | |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | platformJob.setConfirmTaskDate(new Date()); |
| | | platformJob.setArriveDate(confirmTaskDTO.getArriveDate()); |
| | | platformJob.setCarCodeBack(confirmTaskDTO.getCarCodeBack()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey()); |
| | | platformJob.setEditDate(new Date()); |
| | | platformJobMapper.updateById(platformJob); |
| | |
| | | if(Objects.isNull(platformJob)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"业务状态已流转,请刷新查看"); |
| | | } |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ZERO)){ |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"业务状态已流转,请刷新查看"); |
| | | } |
| | | this.distanceSignIn(signInDTO,platformJob); |
| | | }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ONE)){ |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"业务状态已流转,请刷新查看"); |
| | | } |
| | | this.sceneSignIn(signInDTO); |
| | | }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.TWO)){ |
| | | if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())|| |
| | | Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"业务状态已流转,请刷新查看"); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"签到类型错误"); |
| | | } |
| | | platformJob.setSignDate(new Date()); |
| | | platformJob.setSingType(Constants.ZERO); |
| | | platformJob.setSingType(signInDTO.getSignType()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey()); |
| | | platformJobMapper.updateById(platformJob); |
| | | //存储操作日志 |
| | |
| | | Constants.PlatformJobLogType.SIGN.getInfo()); |
| | | } |
| | | |
| | | |
| | | public void distanceSignIn(SignInDTO signInDTO , PlatformJob platformJob){ |
| | | if(Objects.isNull(signInDTO.getLat()) |
| | | || Objects.isNull(signInDTO.getLnt())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"经纬度信息异常"); |
| | | } |
| | | |
| | | //获取签到点的经纬度 |
| | | Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode()); |
| | | Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode()); |
| | |
| | | } |
| | | |
| | | public void sceneSignIn(SignInDTO signInDTO){ |
| | | |
| | | if( StringUtils.isNotBlank(signInDTO.getQrCodeKey())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){ |
| | | //TODO 下发入园权限 |
| | | |
| | | |
| | | } |
| | | //存储操作日志 |
| | | savePlatformLog(Constants.PlatformJobLogType.IN_WAIT.getKey(),oldPlatformJob,platformJob, |