自动化立体仓库 - WCS系统
Junjie
2023-05-23 75b207b2b53a89286dfb1515d47da25c3415fc9b
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -250,15 +250,6 @@
        array[1] = staProtocol.getStaNo();
//        OperateResult write = siemensS7Net.Write("DB100." + index*4, array);
        CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
        CommandInfo commandInfo = new CommandInfo();
        commandInfo.setWrkNo(staProtocol.getWorkNo().intValue());
        commandInfo.setCommandStatus(1);
        commandInfo.setStartTime(new Date());
        commandInfo.setDevice("devp");
        commandInfo.setCommand(JSON.toJSONString(staProtocol));
        commandInfoService.insert(commandInfo);
        OperateResult writeResult;
        //任务下发次数
        int writeCount = 0;
@@ -320,6 +311,12 @@
            if ((siteId == 101 || siteId == 201)&&(staProtocol.getWorkNo() == 0 && staProtocol.getStaNo() ==0)) {
                staProtocol.setPakMk(true);
            }
            //更新指令状态
            CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
            CommandInfo commandInfo = staProtocol.getCommandInfo();
            commandInfo.setCommandStatus(2);
            commandInfoService.updateById(commandInfo);
        }
    }