| | |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo())); |
| | | if (!Objects.isNull(station)) { |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | station.setBarcode(""); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态修改失败!!"); |
| | | } |
| | |
| | | return this.baseMapper.selectToBeCompleteData(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | String locNo = ""; // 待修改目标库位 |
| | | String locSts = ""; // 待修改目标库位状态 |
| | | // 入库取消(修改目标库位) |
| | | if (wrkMast.getWrkSts() < 4) { |
| | | if (wrkMast.getIoType() == 1 && wrkMast.getWrkSts() < 204) { |
| | | locNo = wrkMast.getLocNo(); |
| | | locSts = "O"; |
| | | |
| | |
| | | throw new CoolException("更新源站点状态失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() < 14) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getStaNo())); |
| | | if (station.getLocSts().equals("S")) { |
| | | station.setLocSts("O"); |
| | | station.setBarcode(""); |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | |
| | | } else { |
| | | throw new CoolException("更新源站点状态失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |
| | | |
| | | //取消入库工作档时,查询组托表,如果有将状态改为待处理 |
| | | if (wrkMast.getIoType() == 1) { |
| | | } else if (wrkMast.getIoType() == 1) { |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | for (WaitPakin waitPakin : waitPakins) { |
| | | if (!Cools.isEmpty(waitPakin)) { |
| | |
| | | .eq("batch", waitPakin.getBatch())); |
| | | } |
| | | } |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo())); |
| | | if (station.getLocSts().equals("R")) { |
| | | station.setLocSts("O"); |
| | | station.setBarcode(""); |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("更新源站点状态失败"); |
| | | } |
| | | } |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |
| | | |
| | | //取消入库工作档时,查询组托表,如果有将状态改为待处理 |
| | | |
| | | |
| | | //取消出库工作档时,查询单据管理表,回滚作业中数量 |
| | | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) { |
| | | List<TaskDetl> wrkDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | for (TaskDetl wrkDetl : wrkDetls) { |
| | | if (Cools.isEmpty(wrkDetl.getOrderNo())){ |
| | | continue; |
| | | } |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | OrderInAndOutUtil.decrease(Boolean.FALSE, wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | |
| | | boolean flag = true; |
| | | OrderPakin order = orderService.selectByNo(wrkDetl.getOrderNo()); //OrderInAndOutUtil.selectByNo(Boolean.FALSE, wrkDetl.getOrderNo()); |
| | | if (Objects.isNull(order)) { |
| | | throw new CoolException("单据信息不存在!!"); |
| | | continue; |
| | | } |
| | | List<OrderDetlPakin> orderDetls = orderDetlService.selectByOrderId(order.getId()); //OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId()); |
| | | for (OrderDetlPakin orderDetl : orderDetls) { |