1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| package com.battery.business.test.dto;
|
| import java.util.List;
|
| /** 单个测试电池及检测柜、采集器通道绑定请求。 */
| public record TestBatteryBindingDto(
| Long testBatteryId,
| Long relationId,
| Long groupId,
| String batteryNo,
| Long collectorId,
| CabinetChannelDto cabinetChannel,
| CabinetChannelDto binding,
| List<CollectorChannelDto> collectorChannels) {
| public TestBatteryBindingDto(Long testBatteryId, Long groupId, String batteryNo, Long collectorId,
| CabinetChannelDto cabinetChannel, List<CollectorChannelDto> collectorChannels) {
| this(testBatteryId, null, groupId, batteryNo, collectorId, cabinetChannel, null, collectorChannels);
| }
| /** 测试电池主键;兼容只传旧页面入参别名 relationId 的调用方。 */
| public Long resolvedTestBatteryId() { return testBatteryId != null ? testBatteryId : relationId; }
| /** 检测柜通道绑定;兼容只传旧页面入参别名 binding 的调用方。 */
| public CabinetChannelDto resolvedCabinetChannel() { return cabinetChannel != null ? cabinetChannel : binding; }
| public record CabinetChannelDto(Long channelId, String expectedBarcode) { }
| public record CollectorChannelDto(String measurementCode, String measurementName, String channelCode) { }
| }
|
|