| | |
| | | * 库位移转 |
| | | */ |
| | | public void locToLoc(CrnSlave slave, CrnProtocol crnProtocol){ |
| | | //获取所有移库任务 |
| | | List<WrkMast> wrkMasts=wrkMastMapper.selectLocMoves(slave.getId()); |
| | | // 获取工作档信息 |
| | | WrkMast wrkMast = wrkMastMapper.selectLocMove(slave.getId()); |
| | | if(Cools.isEmpty(wrkMasts)){ |
| | | return; |
| | | } |
| | | if (null == wrkMast) { |
| | | return; |
| | | } |
| | | for (WrkMast wm: wrkMasts) { |
| | | if(wm.getMk().equals('Y')){ |
| | | wrkMast=wm; |
| | | break; |
| | | } |
| | | } |
| | | // 获取源库位信息 |
| | | LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | |
| | | locMastService.update(locMast1,new EntityWrapper<LocMast>().eq("loc_no",wrkMast.getLocNo())); |
| | | } |
| | | wrkMastMapper.delete(new EntityWrapper<WrkMast>() |
| | | .eq("wrk_sts",11) |
| | | .eq("source_loc_no",locMast.getLocNo())); |
| | | .eq("wrk_no",wrkMast.getWrkNo())); |
| | | locMast.setLocSts("F"); |
| | | wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("zpallet",wrkMast.getBarcode())); |
| | | wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no",wrkMast.getWrkNo())); |
| | | if(!locMastService.update(locMast,new EntityWrapper<LocMast>() |
| | | .eq("channel",i+1))){ |
| | | log.error("修改测试库位状态失败"+locMast.getLocNo(),locMast); |