|  |  | 
 |  |  |         String[] params = new String[3]; | 
 |  |  |         params[0] = user.getRealname(); | 
 |  |  |         params[1]=DateUtil.getPlusTime2(date); | 
 |  |  |         params[2]=job.getBillCode()+"-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; | 
 |  |  |         params[2]="【运单号:"+job.getBillCode()+"】-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; | 
 |  |  |         //记录删除日志 | 
 |  |  |         UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_JOB_DEL,userActionMapper,date,params,JSONObject.toJSONString(job)); | 
 |  |  |     } | 
 |  |  | 
 |  |  |                 .isNull(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getContractNum) | 
 |  |  |                 .exists(StringUtils.isNotBlank(pageWrap.getModel().getWmsContractNum()), | 
 |  |  |                         "select tt.id from platform_wms_detail tt where tt.isdeleted=0 and tt.contract_num='"+pageWrap.getModel().getWmsContractNum()+"' and  tt.job_id=t.id"); | 
 |  |  |  | 
 |  |  |         for(PageWrap.SortData sortData: pageWrap.getSorts()) { | 
 |  |  |         queryWrapper.orderByDesc(PlatformJob::getCreateDate); | 
 |  |  |         /*for(PageWrap.SortData sortData: pageWrap.getSorts()) { | 
 |  |  |             if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { | 
 |  |  |                 queryWrapper.orderByDesc(sortData.getProperty()); | 
 |  |  |             } else { | 
 |  |  |                 queryWrapper.orderByAsc(sortData.getProperty()); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         }*/ | 
 |  |  |        IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper); | 
 |  |  |         platformJobIPage.getRecords().forEach(i->{ | 
 |  |  |             i.dealTime(); | 
 |  |  | 
 |  |  |                 ) | 
 |  |  | //                .like(PlatformJob::getArriveDate,DateUtil.dateTypeToString(new Date(),"yyyy-MM-dd")) | 
 |  |  |                 .orderByDesc(PlatformJob::getStatus) | 
 |  |  |                 .orderByAsc(PlatformJob::getSignDate) | 
 |  |  |         ; | 
 |  |  |         IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper); | 
 |  |  |         platformJobIPage.getRecords().forEach(i->{ | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(confirmTaskDTO.getId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformJob.getStatus(),Constants.ZERO)){ | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(signInDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |         } | 
 |  |  |         //查询今日最大的签到数 | 
 |  |  |         List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() | 
 |  |  |                 .eq(PlatformJob::getIsdeleted,Constants.ZERO) | 
 |  |  |                 .apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null  ")); | 
 |  |  |         if(CollectionUtils.isEmpty(signList)){ | 
 |  |  |             platformJob.setSignNum(Constants.ONE); | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob  = platformJobMapper.selectById(jobDetailDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){ | 
 |  |  | 
 |  |  |                             .eq(PlatformJob::getId,platformJob.getId()) | 
 |  |  |                             .last(" limit 1") | 
 |  |  |             ); | 
 |  |  |  | 
 |  |  |             WxPlatNotice wxPlatNotice = new WxPlatNotice(); | 
 |  |  |             wxPlatNotice.sendPlatformJobTemplateNotice(systemDictDataBiz, | 
 |  |  |                     wxNoticeConfigMapper, p, | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) | 
 |  |  | 
 |  |  |         //查询月台任务等待作业数量 | 
 |  |  |         if(platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() | 
 |  |  |                 .eq(PlatformJob::getPlatformId,platform.getId()) | 
 |  |  |                 .eq(PlatformJob::getIsdeleted,Constants.ZERO) | 
 |  |  |                 .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),Constants.PlatformJobStatus.WORKING.getKey()) | 
 |  |  |         )>=platform.getWorkingNum()){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"超出月台可同时作业数量["+platform.getWorkingNum()+"辆]"); | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if( !( Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(! (Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) | 
 |  |  | 
 |  |  |            if(jobIds.size()>0){ | 
 |  |  |                List<PlatformJob> list = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() | 
 |  |  |                        .selectAll(PlatformJob.class) | 
 |  |  |                        .eq(PlatformJob::getIsdeleted,Constants.ZERO) | 
 |  |  |                        .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) | 
 |  |  |                        .in(PlatformJob::getId,jobIds) | 
 |  |  |                ); | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); | 
 |  |  |         if(Objects.isNull(platformJob)){ | 
 |  |  |         if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ | 
 |  |  | 
 |  |  |         PlatformJob platformJob =  platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() | 
 |  |  |                 .eq(PlatformJob::getPlatformId,platformDevice.getPlatformId()) | 
 |  |  |                 .eq(PlatformJob::getCarCodeBack,jobOperateDTO.getCarCodeBack()) | 
 |  |  |                 .eq(PlatformJob::getIsdeleted,Constants.ZERO) | 
 |  |  |                 .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) | 
 |  |  |                 .last(" limit 1 ") | 
 |  |  |         ); |