| | |
| | | checkOrderQty(order,combMat); |
| | | } |
| | | |
| | | DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType()); |
| | | DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType(),combMat.getProcessSts()); |
| | | //同一货架下相同物料信息和批号转为一个入库通知档 |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),detlDto.getContainerCode()); |
| | |
| | | waitPakin.setDeadTime(detlDto.getIsoseq()); |
| | | |
| | | waitPakin.setLocType(detlDto.getLocType()); |
| | | |
| | | waitPakin.setProcessSts(detlDto.getProcessSts()); |
| | | |
| | | |
| | | waitPakin.setAppeUser(userId); |
| | |
| | | throw new CoolException("当前"+agvLocMast.getBarcode()+"货架码已在工作档中"); |
| | | } |
| | | //检索库位,选择合适的库位 |
| | | AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor,false,true); |
| | | AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor,false,false); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("当前楼层没有空库位"); |
| | | } |
| | |
| | | return "ok"; |
| | | } |
| | | /* |
| | | * 站点回退 |
| | | * 转手动回流 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | |
| | | } |
| | | |
| | | /* |
| | | * 确认加工完成 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public String processed(AgvMobileStartPakin param, Long userId) { |
| | | Date now = new Date(); |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getBarcode()).eq("loc_no", param.getDevNo())); |
| | | if (Cools.isEmpty(agvWrkMast)) { |
| | | throw new CoolException("暂无当前货架的工作档"); |
| | | } |
| | | if (agvWrkMast.getWrkSts() != 205) { |
| | | throw new CoolException("当前任务未完成,请确认"); |
| | | } |
| | | //生成AGV工作历史档 + 生成AGV工作明细历史档 |
| | | agvWrkMastLogService.save(agvWrkMast); |
| | | agvWrkDetlLogService.save(agvWrkMast.getWrkNo()); |
| | | String sourceLocNo = agvWrkMast.getSourceLocNo(); |
| | | AgvLocMast newLocMast = agvCommonService.getLocNo(3, 1,false,false); |
| | | agvWrkMast.setSourceLocNo(agvWrkMast.getLocNo()); |
| | | agvWrkMast.setLocNo(newLocMast.getLocNo()); |
| | | agvWrkMast.setIoType(57); |
| | | agvWrkMast.setWrkSts(201L); |
| | | agvWrkMast.setModiUser(userId); |
| | | agvWrkMast.setModiTime(now); |
| | | |
| | | |
| | | |
| | | if (!agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no",agvWrkMast.getWrkNo()))) { |
| | | throw new CoolException("更新工作档失败"); |
| | | } |
| | | |
| | | // 更新源站点 + 目标库位状态 + 历史源库位 |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"R",param.getBarcode(),agvWrkMast.getWhsType().shortValue()); |
| | | agvLocMastService.updateLocStsByLocNo(newLocMast.getLocNo(),"S",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); |
| | | agvLocMastService.updateLocStsByLocNo(sourceLocNo,"O","",(short)30); |
| | | agvLocDetlService.delete(new EntityWrapper<AgvLocDetl>().eq("loc_no",sourceLocNo)); |
| | | |
| | | List<AgvWrkDetl> agvWrkDetls = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("supp_code",param.getBarcode())); |
| | | agvWrkDetls.forEach(agvWrkDetl -> { |
| | | agvWrkDetl.setProcessSts(2); |
| | | agvWrkDetl.setOrderNo(agvWrkDetl.getOrderNo().substring(2)); |
| | | agvWrkDetl.setModiUser(userId); |
| | | agvWrkDetl.setModiTime(now); |
| | | if (!agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>() |
| | | .eq("matnr",agvWrkDetl.getMatnr()) |
| | | .eq("three_code",agvWrkDetl.getThreeCode()) |
| | | .eq("supp_code",param.getBarcode()))) { |
| | | throw new CoolException("更新工作明细失败"); |
| | | } |
| | | }); |
| | | return "ok"; |
| | | } |
| | | |
| | | |
| | | |
| | | /* |
| | | * 站点回退 |
| | | */ |
| | | @Override |