| | |
| | | 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, |
| | | List<@NotNull String> metrics, Map<String, @NotNull String> seriesColors) |
| | | List<@NotNull String> metrics, Map<String, @NotNull String> seriesColors, |
| | | Map<String, List<@NotNull Integer>> manualChargeSteps, |
| | | Map<String, @Valid StepSelection> curveStepSelections, |
| | | List<@NotNull String> hiddenSeriesKeys, Integer activeCycle, |
| | | Map<String, @Valid ReportSourceDetail> sourceDetailOverrides) |
| | | { |
| | | /** 旧版缺少显隐设置时显示五类指标,不补造测量快照。 */ |
| | | public List<String> metrics() { return metrics == null ? List.of("voltage", "current", "positiveVoltage", "negativeVoltage", "temperature") : metrics; } |
| | |
| | | public void rejectUnknown(String field, Object value) { throw new ServiceException("化成设置不允许提交属性:" + field); } |
| | | } |
| | | |
| | | /** 两组选择分别按来源循环归属;每个工步独立成线,不合并测量。 */ |
| | | public record StepSelection(@NotNull List<@NotNull Integer> charge, @NotNull List<@NotNull Integer> discharge) { } |
| | | |
| | | /** 编辑保持后端冻结来源范围,不接收替代来源或测量。 */ |
| | | public record Edit(@Positive int baseVersionNo, @NotBlank @Size(max = 100) String name, |
| | | @Size(max = 2000) String description, @NotNull @Valid Settings settings, |