Junjie
2023-05-24 a539c6f79d0c49c44932731aefe9f4b61600cd80
src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -363,15 +363,6 @@
            command.setTaskNo((short) 9999);
        }
        CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
        CommandInfo commandInfo = new CommandInfo();
        commandInfo.setWrkNo(command.getTaskNo().intValue());
        commandInfo.setCommandStatus(1);
        commandInfo.setStartTime(new Date());
        commandInfo.setDevice("crn");
        commandInfo.setCommand(JSON.toJSONString(command));
        commandInfoService.insert(commandInfo);
        command.setCrnNo(slave.getId());
        short[] array = new short[9];
        if (command.getAckFinish() == 0) {
@@ -470,6 +461,12 @@
        } catch (Exception ignore) {}
        if (result.IsSuccess && result1.IsSuccess) {
            //更新指令状态
            CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
            CommandInfo commandInfo = command.getCommandInfo();
            commandInfo.setCommandStatus(2);
            commandInfoService.updateById(commandInfo);
            log.warn("堆垛机命令下发[id:{},时间:{}] >>>>> {}", slave.getId(), DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F), JSON.toJSON(command));
            OutputQueue.CRN.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 命令下发: {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));
            return true;