| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getDevpNo(), true); |
| | | // 检索库位 |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("source_sta_no", param.getDevpNo())); |
| | | if (!wrkMasts.isEmpty()) { |
| | | throw new CoolException("已有任务"); |
| | | } |
| | | List<String> matnrs = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatnr).distinct().collect(Collectors.toList()); |
| | | StartupDto dto = commonService.getLocNo(2, 1, param.getDevpNo(), null,null,null,0, locTypeDto,0); |
| | | // 生成工作号 |
| | |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()!=199) { |
| | | wrkMast.setWrkSts(14L); |
| | | }else if (wrkMast.getIoType() == 199) { |
| | | wrkMast.setWrkSts(15L); |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |
| | |
| | | locMast.setModiUser(userId); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } else if (wrkMast.getIoType() == 199) { |
| | | |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |