refactor: change error report format from table to code blocks

Display error messages as separate sections with code blocks instead of
table rows. This improves readability for long error messages that would
overflow in table cells.

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-27 14:15:29 +08:00
parent f1d42ad708
commit 4a17c8fd11

View File

@@ -597,11 +597,13 @@ class DiscreteMaterialPlanCleaner:
if self.stats["errors"]:
report_lines.append("## 错误明细")
report_lines.append("")
report_lines.append("| 订单号 | 错误信息 |")
report_lines.append("|--------|----------|")
for item in self.stats["errors"]:
report_lines.append(f"| {item['order_id']} | {item['error_message']} |")
report_lines.append("")
report_lines.append(f"### 订单号: `{item['order_id']}`")
report_lines.append("")
report_lines.append("```")
report_lines.append(item['error_message'])
report_lines.append("```")
report_lines.append("")
return "\n".join(report_lines)