自动化立体仓库 - WCS系统
zjj
2023-11-21 ee81afd33e786beb38c9074113ccafa997c8c1d0
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -9,6 +9,7 @@
import com.core.common.DateUtils;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.domain.enums.TaskStatusType;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.entity.CommandInfo;
import com.zy.asrs.entity.CommandInfoLog;
@@ -319,8 +320,22 @@
        CommandInfoLogService commandInfoLogService = SpringUtils.getBean(CommandInfoLogService.class);
        CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class);
        CommandInfo commandInfo = commandInfoService.selectById(staProtocol.getCommandId());
        CommandInfoLog commandInfoLog = JSON.parseObject(JSON.toJSONString(commandInfo), CommandInfoLog.class);
        commandInfoLog.setId(null);
        CommandInfoLog commandInfoLog = new CommandInfoLog();
        if (commandInfo != null) {
            commandInfoLog = JSON.parseObject(JSON.toJSONString(commandInfo), CommandInfoLog.class);
            commandInfoLog.setId(null);
        }else {
            Date now = new Date();
            commandInfoLog.setCommand(JSON.toJSONString(staProtocol));
            commandInfoLog.setCommandStatus(3);
            commandInfoLog.setStartTime(now);
            commandInfoLog.setExecuteTime(now);
            commandInfoLog.setCompleteTime(now);
            commandInfoLog.setDevice(SlaveType.Devp.toString());
            commandInfoLog.setWrkNo(9999);
            commandInfoLog.setTaskNo("9999");
            commandInfoLog.setCommandDesc("手动命令");
        }
        OperateResult writeResult;
        //任务下发次数