Junjie
2023-07-27 fed17b9162273d70043f7d5e9061bc7afd17c6ef
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -453,6 +453,7 @@
//                            News.error("{}条码错误,暂无拣料任务!", barcode);
//                        }
//                    }
                    if ((wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107)
                        || Cools.isEmpty(wrkMast.getStaNo()) || Cools.isEmpty(wrkMast.getSourceStaNo()) ) {
                        continue;
@@ -500,13 +501,14 @@
                                throw new CoolException(wrkMast.getWrkNo() + "保存工作主档历史档失败");
                            }
                            String sourceLocNo = wrkMast.getSourceLocNo().trim();
                            // 更新工作档数据状态
                            wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57
                            wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走
                            wrkMast.setSourceStaNo(pickSta.getStaNo()); // 源站
                            wrkMast.setStaNo(dto.getStaNo()); // 目标站
                            wrkMast.setCrnNo(dto.getCrnNo());
                            wrkMast.setLocNo(dto.getLocNo()); // 目标库位 = 出库时的源库位
                            wrkMast.setLocNo(sourceLocNo); // 目标库位 = 出库时的源库位
                            wrkMast.setShuttleNo(null); // 穿梭车清空
                            wrkMast.setModiTime(new Date());
                            if (wrkMastMapper.updateById(wrkMast) == 0) {
@@ -517,7 +519,7 @@
                            }
                            // 修改库位状态 Q.拣料/盘点/并板再入库
                            LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
                            LocMast locMast = locMastService.selectById(sourceLocNo);
                            locMast.setLocSts("Q");
                            locMast.setModiTime(new Date());
                            if (!locMastService.updateById(locMast)) {
@@ -570,7 +572,7 @@
     * 初始化实时地图
     */
    public synchronized void initRealtimeBasMap() {
        for (int i = 1; i <= 4; i++) {//总共四层楼
        for (int i = 1; i <= 10; i++) {//总共四层楼
            Object data = redisUtil.get("realtimeBasMap_" + i);
            if (data == null) {//redis地图数据为空,从数据库中获取
                BasMap basMap = basMapService.selectLatestMap(i);
@@ -907,12 +909,12 @@
        //获取小车移动速度
        BasShuttle basShuttle = basShuttleService.selectById(assignCommand.getShuttleNo());
        Integer runSpeed = 1000;
        if (basShuttle != null) {
            Integer runSpeed1 = basShuttle.getRunSpeed();
            if (runSpeed1 != null) {
                runSpeed = runSpeed1;
            }
        }
//        if (basShuttle != null) {
//            Integer runSpeed1 = basShuttle.getRunSpeed();
//            if (runSpeed1 != null) {
//                runSpeed = runSpeed1;
//            }
//        }
        //计算小车起点到中点所需命令
        List<NavigateNode> calc = NavigateUtils.calc(startLocNo, locNo, mapType, Utils.getShuttlePoints(shuttleThread.getSlave().getId(), Utils.getLev(startLocNo)));
@@ -977,12 +979,12 @@
        //获取小车移动速度
        BasShuttle basShuttle = basShuttleService.selectById(assignCommand.getShuttleNo());
        Integer runSpeed = 1000;
        if (basShuttle != null) {
            Integer runSpeed1 = basShuttle.getRunSpeed();
            if (runSpeed1 != null) {
                runSpeed = runSpeed1;
            }
        }
//        if (basShuttle != null) {
//            Integer runSpeed1 = basShuttle.getRunSpeed();
//            if (runSpeed1 != null) {
//                runSpeed = runSpeed1;
//            }
//        }
        List<NavigateNode> allNode = new ArrayList<>();