yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/task/schedule/MesProBatchScheduleService.java
@@ -22,6 +22,7 @@
import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderProcessService;
import cn.iocoder.yudao.module.mes.service.pro.task.MesProTaskService;
import cn.iocoder.yudao.module.mes.service.cal.holiday.MesCalHolidayService;
import cn.iocoder.yudao.module.mes.util.MesOutputItemUtils;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@@ -252,9 +253,9 @@
                    }
                    Long itemId = order.getProductId();
                    if (process.getOutputItemId() != null && !process.getOutputItemId().isBlank()) {
                        String[] output = process.getOutputItemId().split(",");
                        if (output.length != 1) throw new IllegalArgumentException("多产出工序请使用手工排产确认各产出数量");
                        itemId = Long.valueOf(output[0].trim());
                        List<Long> outputIds = MesOutputItemUtils.parseItemIds(process.getOutputItemId());
                        if (outputIds.size() != 1) throw new IllegalArgumentException("多产出工序请使用手工排产确认各产出数量");
                        itemId = outputIds.get(0);
                    }
                    var item = itemService.validateItemExists(itemId);
                    if (!Objects.equals(item.getStatus(), 0)) throw new IllegalArgumentException("工序产出产品已停用");