| | |
| | | // } |
| | | movLoc(wrkMast); |
| | | break; |
| | | case 2: |
| | | WrkMast wrkMast1 = wrkMastService.selectOne( |
| | | new EntityWrapper<WrkMast>() |
| | | .eq("barcode", wrkMast.getBarcode()) |
| | | .eq("io_type", 101) |
| | | ); |
| | | |
| | | if (Cools.isEmpty(wrkMast1)) { |
| | | break; |
| | | } |
| | | |
| | | if ("Y".equals(wrkMast1.getLogMk().trim())) { |
| | | wrkMast1.setOveMk("Y"); |
| | | if(!wrkMastService.updateById(wrkMast1)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("更新退库跨区域完成状态失败; [workNo=" + wrkMast1.getWrkNo()); |
| | | } |
| | | break; |
| | | } |
| | | if (Objects.isNull(wrkMast1.getIsSuplus())) { |
| | | break; |
| | | } |
| | | |
| | | wrkMast1.setOveMk("Y"); |
| | | if(!wrkMastService.updateById(wrkMast1)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("更新退库跨区域完成状态失败; [workNo=" + wrkMast1.getWrkNo()); |
| | | }break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | |
| | | public void movLoc(WrkMast wrkMast) { |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | |
| | | if (Objects.isNull(locMast)) { |
| | | throw new CoolException("目标库位不存在!!"); |
| | | } |
| | |
| | | throw new CoolException("工位状态修改失败!!"); |
| | | } |
| | | } else { |
| | | if(!Objects.isNull(wrkMast.getPacked())){ //不是本巷道的出库至1070,之前的跨巷道出库进行完结操作 |
| | | WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no",wrkMast.getPacked())); |
| | | if(!Objects.isNull(wrkMast1)) { |
| | | wrkMast1.setOveMk("Y"); |
| | | wrkMastService.updateById(wrkMast1); |
| | | if(!Objects.isNull(wrkMast.getPacked()) || !Objects.isNull(wrkMast.getExitMk())){ //标记 |
| | | if(!Objects.isNull(wrkMast.getPacked())){ |
| | | WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no",wrkMast.getPacked())); |
| | | if(!Objects.isNull(wrkMast1)) { |
| | | wrkMast1.setOveMk("Y"); |
| | | wrkMastService.updateById(wrkMast1); |
| | | } |
| | | } |
| | | if(!Objects.isNull(wrkMast.getLocNo())){ |
| | | movLoc(wrkMast); |
| | | LocMast locMastTarget = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",wrkMast.getLocNo())); |
| | | // 修改库位状态 S ====>> F |
| | | if (locMastTarget.getLocSts().equals("S")) { |
| | | locMastTarget.setLocSts("F"); |
| | | locMastTarget.setBarcode(wrkMast.getBarcode()); |
| | | locMastTarget.setIoTime(now); |
| | | locMastTarget.setModiTime(now); |
| | | if (!locMastService.updateById(locMastTarget)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("退库跨区域入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(!Objects.isNull(wrkMast.getPacked())){ |
| | | LocAroundBind bLocNo = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>().eq("b_loc_no", wrkMast.getSourceLocNo())); |
| | | if (Objects.isNull(bLocNo)) { |
| | | throw new CoolException("数据错误, 目标工位不存在!!"); |
| | | } |
| | | bLocNo.setLocType(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!locAroundBindService.updateById(bLocNo)) { |
| | | throw new CoolException("工位状态修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | | // // 出库确认信号位 |