| | |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | @Autowired |
| | | private BasStationService basStationService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | locMast.setModiUser(userId); |
| | | locCacheService.updateById(locMast); |
| | | } |
| | | |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo())); |
| | | if (station.getLocSts().equals("R")) { |
| | | station.setLocSts(wrkMast.getIoType().equals(1)?"F":"D"); |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("更新源站点状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("更新源站点状态失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | |
| | | locMast.setModiUser(userId); |
| | | locCacheService.updateById(locMast); |
| | | } |
| | | |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getStaNo())); |
| | | if (station.getLocSts().equals("S")) { |
| | | station.setLocSts("O"); |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("更新源站点状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("更新源站点状态失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |