| | |
| | | import com.mes.interaction.workstation.config.WorkstationLogicConfig; |
| | | import com.mes.plc.client.PlcClient; |
| | | import com.mes.plc.factory.PlcClientFactory; |
| | | import com.mes.task.model.TaskExecutionContext; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | |
| | | try { |
| | | if (params != null) { |
| | | Object ctxObj = params.get("_taskContext"); |
| | | if (ctxObj instanceof com.mes.task.model.TaskExecutionContext) { |
| | | com.mes.task.model.TaskExecutionContext ctx = |
| | | (com.mes.task.model.TaskExecutionContext) ctxObj; |
| | | if (ctxObj instanceof TaskExecutionContext) { |
| | | TaskExecutionContext ctx = (TaskExecutionContext) ctxObj; |
| | | List<String> batchGlassIds = batch.stream() |
| | | .map(GlassInfo::getGlassId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | if (!batchGlassIds.isEmpty()) { |
| | | ctx.getSharedData().put("transferReadyGlassIds", |
| | | new java.util.ArrayList<>(batchGlassIds)); |
| | | new ArrayList<>(batchGlassIds)); |
| | | log.info("卧转立已输出批次玻璃到任务上下文: deviceId={}, glassIds={}", |
| | | deviceConfig.getId(), batchGlassIds); |
| | | } |