| | |
| | | List<PlatformWmsDetail> platformWmsDetailList = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformWmsDetail::getJobId,platformJob.getId())); |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformWmsDetailList)){ |
| | | platformJob.setTotalNum( |
| | | platformWmsDetailList.stream().map(m->m.getIoQty()).reduce(BigDecimal.ZERO,BigDecimal::add) |
| | | ); |
| | | platformWmsJob.setPlatformWmsDetailList(platformWmsDetailList); |
| | | platformJob.setPlatformWmsJob(platformWmsJob); |
| | | |
| | | if(Constants.equalsInteger(platformJob.getType(),Constants.platformJobType.zyczh) |
| | | || Constants.equalsInteger(platformJob.getType(),Constants.platformJobType.wxczh)){ |
| | | |
| | | Integer unLockCount = platformWmsDetailList.stream().filter(i->Constants.equalsInteger(i.getLockStatus(),Constants.ZERO)).collect(Collectors.toList()).size(); |
| | | if(Constants.equalsInteger(unLockCount,Constants.ZERO)){ |
| | | platformJob.setLockStatus(Constants.TWO); //全部上锁 |
| | | }else if(Constants.equalsInteger(unLockCount,platformWmsDetailList.size())){ |
| | | platformJob.setLockStatus(Constants.ZERO); //未上锁 |
| | | }else{ |
| | | platformJob.setLockStatus(Constants.ONE); //部分上锁 |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | platformJob.setWaitTime(waitTime); |
| | | } |
| | | }else{ |
| | | platformJob.setWaitTime("等待叫号"); |
| | | platformJob.setWaitTime("预计等待:-小时-分钟"); |
| | | } |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | | || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | |
| | | .ne(PlatformLog::getParam3,Constants.ZERO+"") |
| | | .orderByDesc(PlatformLog::getCreateDate)); |
| | | platformJob.setWorkTime(platformLogList.stream().map(m->Long.valueOf(m.getParam3())).reduce(Long.valueOf(0),Long::sum)); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | //查询前方排队数量 |
| | | this.queryWaitNum(platformJob); |
| | | } |
| | | |
| | | |
| | | driverHomeVO.setPlatformJobList(platformJobList); |
| | | |