自动化立体仓库 - WCS系统
#
Junjie
2023-10-19 e75603cc12fb0e066474f73623192a1bb27065e8
#
2个文件已修改
20 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -528,6 +528,7 @@
                            wrkMast.setStaNo(liftStaProtocol.getStaNo());//目标站
                            wrkMast.setLocNo(sourceLocNo); // 目标库位 = 出库时的源库位
                            wrkMast.setShuttleNo(null); // 穿梭车清空
                            wrkMast.setLiftNo(null);// 提升机清空
                            wrkMast.setModiTime(new Date());
                            if (wrkMastMapper.updateById(wrkMast) == 0) {
                                throw new CoolException(wrkMast.getWrkNo() + "更新工作档数据状态失败");
@@ -1501,7 +1502,7 @@
            }
            //获取穿梭车最近且空闲的提升机输送站点
            LiftStaProtocol liftSta = shuttleDispatchUtils.getRecentLiftSta(shuttleThread.getSlave().getId());
            LiftStaProtocol liftSta = shuttleDispatchUtils.getRecentLiftSta(shuttleThread.getSlave().getId(), Utils.getLev(wrkMast.getLocNo()));
            if (liftSta == null) {
                return false;//没有可用且空闲的输送站点
            }
@@ -2223,7 +2224,7 @@
                    continue;
                }
                if (wrkMast.getWrkSts() != 25) {//25.提升机搬运完成
                if (wrkMast.getWrkSts() != 29) {//29.出库完成
                    continue;
                }
@@ -2233,6 +2234,7 @@
                    //覆盖工作档目标站
                    wrkMast.setStaNo(sourceStaNo);
                    wrkMast.setSourceStaNo(staNo);
                    wrkMast.setMk("N");
                    if (wrkMastMapper.updateById(wrkMast) > 0) {
                        //向300站写入目标站
                        staProtocol = staProtocol.clone();
src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java
@@ -236,7 +236,7 @@
        if (Utils.getLev(locNo) != shuttleProtocol.getPoint().getZ()) {
            //目标库位和小车库位处于不同一楼层,需要通过提升机调度
            //获取穿梭车最近且空闲的提升机输送站点
            LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo);
            LiftStaProtocol liftSta = this.getRecentLiftSta(shuttleNo, Utils.getLev(locNo));
            if (liftSta == null) {
                return false;//没有可用且空闲的输送站点
            }
@@ -344,7 +344,7 @@
    /**
     * 获取穿梭车最近且空闲的提升机输送站点
     */
    public LiftStaProtocol getRecentLiftSta(Integer shuttleNo) {
    public LiftStaProtocol getRecentLiftSta(Integer shuttleNo, Integer targetLev) {
        //获取四向穿梭车线程
        NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo);
        if (shuttleThread == null) {
@@ -376,6 +376,16 @@
                continue;
            }
            //判断目标楼层站点是否无托盘
            LiftStaProtocol targetLiftStaProtocol = NyLiftUtils.getLiftStaByLev(slave.getId(), targetLev);
            if (targetLiftStaProtocol == null) {
                continue;
            }
            if (targetLiftStaProtocol.getHasTray()) {
                continue;//有托盘跳过
            }
            list.add(liftStaProtocol);
        }