自动化立体仓库 - WMS系统
zhou zhou
1 天以前 6df97fba67b0e0698a02673e65c6eca00879d5be
src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
@@ -34,6 +34,8 @@
    private TaskService taskService;
    @Autowired
    private TaskDetlLogService taskDetlLogService;
    @Autowired
    private BasStationService basStationService;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -154,6 +156,18 @@
                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();
@@ -176,6 +190,18 @@
                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("当前工作状态无法取消");
        }