Junjie
2023-07-27 fed17b9162273d70043f7d5e9061bc7afd17c6ef
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -384,6 +384,7 @@
    /**
     * 拣料、并板、盘点再入库
     */
    @Transactional
    public synchronized void stnToCrnStnPick(){
        for (DevpSlave devp : slaveProperties.getDevp()) {
            // 遍历拣料入库口
@@ -452,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;
@@ -506,8 +508,7 @@
                            wrkMast.setSourceStaNo(pickSta.getStaNo()); // 源站
                            wrkMast.setStaNo(dto.getStaNo()); // 目标站
                            wrkMast.setCrnNo(dto.getCrnNo());
                            wrkMast.setLocNo(dto.getLocNo()); // 目标库位 = 出库时的源库位
                            wrkMast.setSourceLocNo(""); // 源库位清空
                            wrkMast.setLocNo(sourceLocNo); // 目标库位 = 出库时的源库位
                            wrkMast.setShuttleNo(null); // 穿梭车清空
                            wrkMast.setModiTime(new Date());
                            if (wrkMastMapper.updateById(wrkMast) == 0) {
@@ -518,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)) {
@@ -571,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);
@@ -908,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)));
@@ -978,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<>();