自动化立体仓库 - WMS系统
pang.jiabao
2 天以前 ddc6cd417d5e912d5cba297bb7849a1dcf7367be
src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java
@@ -28,8 +28,8 @@
    }
    @Override
    public List<Integer> getAvailableOutSite() {
        return this.baseMapper.getAvailableOutSite(101);
    public List<Integer> getAvailableOutSite(Integer typeNo) {
        return this.baseMapper.getAvailableOutSite(typeNo);
    }
    @Override
@@ -43,23 +43,52 @@
    }
    @Override
    public BasDevp checkSiteStatus(Integer devpNo, boolean put) {
    public BasDevp checkSiteStatus(Integer devpNo, boolean pakin) {
        BasDevp station = selectById(devpNo);
        if (station == null){
            throw new CoolException("站点不存在");
            throw new CoolException(devpNo+"站点不存在");
        }
        if (put) {
        if (pakin) {
            if(station.getAutoing()==null || !station.getAutoing().equals("Y")) {
                throw new CoolException("站点不是自动状态");
                throw new CoolException(devpNo+"站点不是自动状态");
            }
            if(station.getLoading()==null || !station.getLoading().equals("Y")) {
                throw new CoolException("站点无物");
                throw new CoolException(devpNo+"站点无物");
            }
            if(station.getWrkNo()!=null && station.getWrkNo()>0) {
                throw new CoolException("站点已有工作号");
            if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) {
                throw new CoolException(devpNo+"站点已有工作号");
            }
//            if(!station.getInEnable().equals("Y")) {
//                throw new CoolException(devpNo+"站点不是可入状态");
//            }
            if(wrkMastService.getWorkingMast(devpNo)>0){
                throw new CoolException("同一站点不能同时生成两笔入库工作档");
                throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档");
            }
        }
        return station;
    }
    @Override
    public BasDevp checkSiteStatusEmpty(Integer devpNo, boolean pakin) {
        BasDevp station = selectById(devpNo);
        if (station == null){
            throw new CoolException(devpNo+"站点不存在");
        }
        if (pakin) {
//            if(station.getAutoing()==null || !station.getAutoing().equals("Y")) {
//                throw new CoolException(devpNo+"站点不是自动状态");
//            }
//            if(station.getLoading()==null || !station.getLoading().equals("Y")) {
//                throw new CoolException(devpNo+"站点无物");
//            }
//            if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) {
//                throw new CoolException(devpNo+"站点已有工作号");
//            }
//            if(!station.getInEnable().equals("Y")) {
//                throw new CoolException(devpNo+"站点不是可入状态");
//            }
            if(wrkMastService.getWorkingMast(devpNo)>0){
                throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档");
            }
        }
        return station;