From 3e38957e501078500af9746e61313aabda742272 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期一, 07 九月 2026 16:01:14 +0800
Subject: [PATCH] 实现化成循环曲线快照与指定版本打印授权

---
 battery-business/src/main/java/com/battery/business/report/FormationReportRequest.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/battery-business/src/main/java/com/battery/business/report/FormationReportRequest.java b/battery-business/src/main/java/com/battery/business/report/FormationReportRequest.java
index 832badf..67190e8 100644
--- a/battery-business/src/main/java/com/battery/business/report/FormationReportRequest.java
+++ b/battery-business/src/main/java/com/battery/business/report/FormationReportRequest.java
@@ -19,8 +19,14 @@
     /** 值按测试、电池、循环、字段归属,只属于报表展示,不反写测量快照。 */
     public record Settings(@NotNull @Size(min = 1, max = 100) List<@NotNull @Valid FormationField> fields,
             @NotNull Map<String, @NotNull String> values,
-            @NotNull Map<String, @NotNull Integer> chargeStepSelections)
+            @NotNull Map<String, @NotNull Integer> chargeStepSelections,
+            List<@NotNull String> metrics, Map<String, @NotNull String> seriesColors)
     {
+        /** 旧版缺少显隐设置时显示五类指标,不补造测量快照。 */
+        public List<String> metrics() { return metrics == null ? List.of("voltage", "current", "positiveVoltage", "negativeVoltage", "temperature") : metrics; }
+
+        /** 未自定义颜色时由页面使用默认色板。 */
+        public Map<String, String> seriesColors() { return seriesColors == null ? Map.of() : seriesColors; }
         /** 展示设置拒绝来源和测量快照。 */
         @JsonAnySetter
         public void rejectUnknown(String field, Object value) { throw new ServiceException("化成设置不允许提交属性:" + field); }

--
Gitblit v1.7.1