自动化立体仓库 - WMS系统
skyouc
2 天以前 90aea4830974e3687222aa266952923d59aa088f
bug修复
3个文件已修改
37 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1741,7 +1741,7 @@
                    throw new CoolException("数据错误,站点不存在!!");
                }
                station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
                station.setBarcode(null);
                station.setBarcode("");
                if (!basStationService.updateById(station)) {
                    throw new CoolException("站点状态更新失败!!");
                }
@@ -1786,7 +1786,7 @@
        }
        station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
        station.setBarcode(null);
        station.setBarcode("");
        if (!basStationService.updateById(station)) {
            throw new CoolException("站点状态修改失败!");
        }
@@ -2381,11 +2381,6 @@
     */
    @Transactional(rollbackFor = Exception.class)
    public void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId) {
        List<WaitPakin> pakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode));
        if (Objects.isNull(pakins) || pakins.isEmpty()) {
            throw new CoolException("组托信息不存在!!");
        }
        List<Task> tasks = taskService.selectList(new EntityWrapper<Task>().eq("barcode", barcode));
        if (!tasks.isEmpty()) {
            throw new CoolException("托盘已在任务执行中..");
@@ -2416,6 +2411,12 @@
            throw new CoolException("保存工作档失败");
        }
        if (!type.equals("agv_back")) {
            List<WaitPakin> pakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode));
            if (Objects.isNull(pakins) || pakins.isEmpty()) {
                throw new CoolException("组托信息不存在!!");
            }
        for (WaitPakin pakin : pakins) {
            TaskDetl wrkDetl = new TaskDetl();
            BeanUtils.copyProperties(pakin, wrkDetl);
@@ -2444,6 +2445,7 @@
                throw new CoolException("更新组托信息失败");
            }
        }
        }
        // 修改目标库位状态
        if (loc.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) {
@@ -2463,9 +2465,9 @@
            throw new CoolException("站点不存在!!");
        }
        if (station.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) {
        if (station.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type) || station.getLocSts().equals(LocStsType.LOC_STS_TYPE_D.type)) {
            station.setLocSts("R"); // S.入库预约
//            station.setBarcode(barcode);
            station.setBarcode(barcode);
            station.setModiTime(new Date());
            station.setModiUser(userId);
            if (!basStationService.updateById(station)) {
@@ -2531,7 +2533,7 @@
    }
    /**
     * 呼叫AGV返回
     * 呼叫AGV空台车返回
     * @author Ryan
     * @date 2025/9/24
     * @param callAgvBackParam
@@ -2551,8 +2553,15 @@
            return R.error("未查询到可用库位");
        }
        
        // 修改目标站点信息
        BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", callAgvBackParam.getOrgSite()));
        if (Objects.isNull(station)) {
            throw new CoolException("站点不存在!!");
        }
        try {
            generateAgvTask("agv", locCache, callAgvBackParam.getOrgSite(), callAgvBackParam.getBarcode(), userId);
            //空台车回库
            generateAgvTask("agv_back", locCache, callAgvBackParam.getOrgSite(), station.getBarcode(), userId);
        } catch (Exception e) {
            e.printStackTrace();
            return R.error(e.getMessage());
src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
@@ -59,7 +59,7 @@
            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(null);
                station.setBarcode("");
                if (!basStationService.updateById(station)) {
                    throw new CoolException("站点状态修改失败!!");
                }
@@ -214,7 +214,7 @@
            BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getStaNo()));
            if (station.getLocSts().equals("S")) {
                station.setLocSts("O");
                station.setBarcode(null);
                station.setBarcode("");
                station.setModiTime(new Date());
                station.setModiUser(userId);
                if (!basStationService.updateById(station)) {
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -886,7 +886,7 @@
                if (!list.contains(station.getLocSts())) {
                    station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
                }
                station.setBarcode(null);
                station.setBarcode("");
                basStationService.updateById(station);
            }
        }