|
|
|
|
@ -3,6 +3,7 @@ package org.dromara.mes.service.impl;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.dromara.common.constant.DatabaseConstants;
|
|
|
|
|
import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
@ -315,7 +316,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
try {
|
|
|
|
|
// 使用批量查询避免 N+1:一次性查询该工序表下所有订单的工序进度
|
|
|
|
|
// 返回结果中包含 productOrderId 字段,便于在此处进行分组
|
|
|
|
|
List<ProcessProgressVo> batchResults = prodReportMapper.getOrdersProcessProgressBatch(orderIds, tableName);
|
|
|
|
|
String tenantId = LoginHelper.getTenantId();
|
|
|
|
|
List<ProcessProgressVo> batchResults = prodReportMapper.getOrdersProcessProgressBatch(orderIds, tableName, tenantId);
|
|
|
|
|
if (batchResults != null && !batchResults.isEmpty()) {
|
|
|
|
|
for (ProcessProgressVo progress : batchResults) {
|
|
|
|
|
Long orderId = progress.getProductOrderId();
|
|
|
|
|
|