#
LSH
2023-12-22 7381c3f093f3b98d169f5f75b05bb8f01a9e799a
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -155,12 +155,14 @@
                        if (workNo == 0 && stano == 0){
                            continue;
                        }
                        if (!staProtocol.isPakMk()){
                            continue;
                        }
//                        News.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg);
                        staProtocol.setWorkNo(workNo);
                        staProtocol.setStaNo(inSta.getBackSta().shortValue());
                        devpThread.setPakMk(staProtocol.getSiteId(), false);
                        MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
                        TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo));
                        if (taskWrk != null) {
                            taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示
@@ -208,7 +210,7 @@
                            staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue());
                            staProtocol.setStaNo(staDesc.getCrnStn().shortValue());
                            MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
                            Thread.sleep(200);
                            Thread.sleep(500);
                        }else {
                            //TaskWrk taskWrk = taskWrkService.selectByTaskNo(param.getTaskNo());
                            toWmsDTO.setWarehouseId("1688469798893297665");
@@ -577,6 +579,13 @@
                        if (commandInfos.isEmpty()) {
                            continue;//命令空
                        }
                        //判断末端命令是否执行
                        CommandInfo commandInfo2 = commandInfos.get(commandInfos.size() - 1);
                        if (commandInfo2.getCommandStatus() != CommandStatusType.CREATE.id) {
                            continue;//指令已执行
                        }
                        CommandInfo commandInfo = commandInfos.get(commandStep);
                        CommandPackage commandPackage = JSON.parseObject(commandInfo.getCommand(), CommandPackage.class);//取出命令报文
                        CrnCommand crnCommand = JSON.parseObject(commandPackage.getCommand().toString(), CrnCommand.class);
@@ -619,6 +628,24 @@
                    .eq("wrk_sts",11)
                    .eq("io_type",3));
            for (TaskWrk taskWrk : taskWrks){
                // 双深库位且浅库位有货,则需先对浅库位进行库位移转
                if (Utils.isDeepLoc(slaveProperties, taskWrk.getStartPoint())) {
                    String shallowLocNo = Utils.getShallowLoc(slaveProperties, taskWrk.getStartPoint());
                    TaskWrk hallowLocNoTask = taskWrkMapper.selectByStartPoint(shallowLocNo);
                    if (!Cools.isEmpty(hallowLocNoTask)){
                        continue;
                    }
                }
                // 堆垛机控制过滤
                if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) {
                    continue;
                }
                // 已经存在吊车执行任务时,则过滤
                if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) {
                    continue;
                }
                if (Cools.isEmpty(taskWrk.getTargetPoint())){
                    List<Integer> list = openServiceImpl.getInEnableRoadway();
                    Map<String, Object> map = new HashMap<>();
@@ -656,7 +683,7 @@
                        continue;
                    }
                 }
                }
                if (taskWrk == null || Cools.isEmpty(taskWrk.getTargetPoint()) || taskWrk.getTargetPoint().equals("") || taskWrk.getWrkNo() == null) {
                    continue;
                }
@@ -668,15 +695,7 @@
                // 命令下发区 --------------------------------------------------------------------------
                // 堆垛机控制过滤
                if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) {
                    continue;
                }
                // 已经存在吊车执行任务时,则过滤
                if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) {
                    continue;
                }
                // 1.堆垛机开始移动