|
@@ -79,10 +79,10 @@ class MonitoringServiceImplTest {
|
|
|
ReflectionTestUtils.setField(service, "noiseInfoMapper", noiseMapper);
|
|
ReflectionTestUtils.setField(service, "noiseInfoMapper", noiseMapper);
|
|
|
|
|
|
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- type("water-root", "water_root", "供水", "0"),
|
|
|
|
|
- type("flow-type", "flow-type", "流量监测", "water-root"),
|
|
|
|
|
- type("pressure-type", "pressure-type", "压力监测", "water-root"),
|
|
|
|
|
- type("leakage-type", "leakage-type", "漏失监测", "water-root")
|
|
|
|
|
|
|
+ type("1", "water_supply", "供水", "0"),
|
|
|
|
|
+ type("11", "ws_flow", "供水流量计", "1"),
|
|
|
|
|
+ type("12", "ws_pressure", "供水压力计", "1"),
|
|
|
|
|
+ type("13", "ws_leak", "供水漏失监测器", "1")
|
|
|
));
|
|
));
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.emptyList());
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.emptyList());
|
|
|
when(telemetryDataMapper.selectList(any())).thenReturn(Collections.emptyList());
|
|
when(telemetryDataMapper.selectList(any())).thenReturn(Collections.emptyList());
|
|
@@ -93,8 +93,8 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void flowPaginationTotalsFollowMeasurementFilteringAndKeepDeviceFields() {
|
|
void flowPaginationTotalsFollowMeasurementFilteringAndKeepDeviceFields() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME),
|
|
|
|
|
- device("flow-2", "WS-FLOW-2", "流量监测点2", "flow-type", BASE_TIME.minusMinutes(1))
|
|
|
|
|
|
|
+ device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME),
|
|
|
|
|
+ device("flow-2", "WS-FLOW-2", "流量监测点2", "11", BASE_TIME.minusMinutes(1))
|
|
|
));
|
|
));
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
radar("WS-FLOW-1", "100", BASE_TIME),
|
|
radar("WS-FLOW-1", "100", BASE_TIME),
|
|
@@ -111,7 +111,7 @@ class MonitoringServiceImplTest {
|
|
|
assertEquals("flow-1", row.getEquipmentId());
|
|
assertEquals("flow-1", row.getEquipmentId());
|
|
|
assertEquals("WS-FLOW-1", row.getEquipmentCode());
|
|
assertEquals("WS-FLOW-1", row.getEquipmentCode());
|
|
|
assertEquals("流量监测点1", row.getEquipmentName());
|
|
assertEquals("流量监测点1", row.getEquipmentName());
|
|
|
- assertEquals("流量监测", row.getEquipmentTypeName());
|
|
|
|
|
|
|
+ assertEquals("供水流量计", row.getEquipmentTypeName());
|
|
|
assertEquals("30", row.getInstantFlow());
|
|
assertEquals("30", row.getInstantFlow());
|
|
|
assertEquals(BASE_TIME.minusHours(1), row.getMonitorTime());
|
|
assertEquals(BASE_TIME.minusHours(1), row.getMonitorTime());
|
|
|
}
|
|
}
|
|
@@ -119,7 +119,7 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void flowPaginationUsesTheNewestQualifyingMeasurementAcrossDataSources() {
|
|
void flowPaginationUsesTheNewestQualifyingMeasurementAcrossDataSources() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
- device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME)
|
|
|
|
|
|
|
+ device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME)
|
|
|
));
|
|
));
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
radar("WS-FLOW-1", "30", BASE_TIME.minusHours(2))
|
|
radar("WS-FLOW-1", "30", BASE_TIME.minusHours(2))
|
|
@@ -141,9 +141,9 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void pressurePaginationTotalsFollowMeasurementFiltering() {
|
|
void pressurePaginationTotalsFollowMeasurementFiltering() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- device("pressure-1", "WS-PR-1", "压力监测点1", "pressure-type", BASE_TIME),
|
|
|
|
|
- device("pressure-2", "WS-PR-2", "压力监测点2", "pressure-type", BASE_TIME.minusMinutes(1)),
|
|
|
|
|
- device("pressure-3", "WS-PR-3", "压力监测点3", "pressure-type", BASE_TIME.minusMinutes(2))
|
|
|
|
|
|
|
+ device("pressure-1", "WS-PR-1", "压力监测点1", "12", BASE_TIME),
|
|
|
|
|
+ device("pressure-2", "WS-PR-2", "压力监测点2", "12", BASE_TIME.minusMinutes(1)),
|
|
|
|
|
+ device("pressure-3", "WS-PR-3", "压力监测点3", "12", BASE_TIME.minusMinutes(2))
|
|
|
));
|
|
));
|
|
|
when(pressureMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(pressureMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
pressure("WS-PR-1", 0.4D, BASE_TIME),
|
|
pressure("WS-PR-1", 0.4D, BASE_TIME),
|
|
@@ -163,8 +163,8 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void leakagePaginationExcludesDevicesWithoutQualifyingMeasurements() {
|
|
void leakagePaginationExcludesDevicesWithoutQualifyingMeasurements() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- device("leakage-1", "WS-LK-1", "漏失监测点1", "leakage-type", BASE_TIME),
|
|
|
|
|
- device("leakage-2", "WS-LK-2", "漏失监测点2", "leakage-type", BASE_TIME.minusMinutes(1))
|
|
|
|
|
|
|
+ device("leakage-1", "WS-LK-1", "漏失监测点1", "13", BASE_TIME),
|
|
|
|
|
+ device("leakage-2", "WS-LK-2", "漏失监测点2", "13", BASE_TIME.minusMinutes(1))
|
|
|
));
|
|
));
|
|
|
when(noiseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(noiseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
noise("WS-LK-1", 12D, BASE_TIME)
|
|
noise("WS-LK-1", 12D, BASE_TIME)
|
|
@@ -183,7 +183,7 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void monitoringPagesReturnAnEmptyPageWhenThereIsNoMeasurementData() {
|
|
void monitoringPagesReturnAnEmptyPageWhenThereIsNoMeasurementData() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
- device("flow-empty", "WS-FLOW-EMPTY", "无数据监测点", "flow-type", BASE_TIME)
|
|
|
|
|
|
|
+ device("flow-empty", "WS-FLOW-EMPTY", "无数据监测点", "11", BASE_TIME)
|
|
|
));
|
|
));
|
|
|
|
|
|
|
|
Page<FlowMonitoringVO> flow = service.getFlowMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
Page<FlowMonitoringVO> flow = service.getFlowMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
@@ -191,14 +191,14 @@ class MonitoringServiceImplTest {
|
|
|
assertTrue(flow.getRecords().isEmpty());
|
|
assertTrue(flow.getRecords().isEmpty());
|
|
|
|
|
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
- device("pressure-empty", "WS-PR-EMPTY", "无数据监测点", "pressure-type", BASE_TIME)
|
|
|
|
|
|
|
+ device("pressure-empty", "WS-PR-EMPTY", "无数据监测点", "12", BASE_TIME)
|
|
|
));
|
|
));
|
|
|
Page<PressureMonitoringVO> pressure = service.getPressureMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
Page<PressureMonitoringVO> pressure = service.getPressureMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
|
assertEquals(0, pressure.getTotal());
|
|
assertEquals(0, pressure.getTotal());
|
|
|
assertTrue(pressure.getRecords().isEmpty());
|
|
assertTrue(pressure.getRecords().isEmpty());
|
|
|
|
|
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
- device("leakage-empty", "WS-LK-EMPTY", "无数据监测点", "leakage-type", BASE_TIME)
|
|
|
|
|
|
|
+ device("leakage-empty", "WS-LK-EMPTY", "无数据监测点", "13", BASE_TIME)
|
|
|
));
|
|
));
|
|
|
Page<LeakageMonitoringVO> leakage = service.getLeakageMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
Page<LeakageMonitoringVO> leakage = service.getLeakageMonitorPage(1, 10, null, null, null, null, null, null, null);
|
|
|
assertEquals(0, leakage.getTotal());
|
|
assertEquals(0, leakage.getTotal());
|
|
@@ -208,8 +208,11 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void flowMonitoringOnlyIncludesDevicesInsideTheWaterTypeTree() {
|
|
void flowMonitoringOnlyIncludesDevicesInsideTheWaterTypeTree() {
|
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- type("water-root", "water_root", "供水", "0"),
|
|
|
|
|
- type("water-flow", "water_flow", "流量监测", "water-root"),
|
|
|
|
|
|
|
+ type("1", "water_supply", "供水", "0"),
|
|
|
|
|
+ type("11", "ws_flow", "供水流量计", "1"),
|
|
|
|
|
+ type("99", "legacy_flow", "流量监测(旧编码)", "1"),
|
|
|
|
|
+ type("98", "ws_flow", "错误名称但真实流量编码", "1"),
|
|
|
|
|
+ type("97", "ws_flow", "供水流量计但父级错误", "other-root"),
|
|
|
type("other-root", "other_root", "其他系统", "0"),
|
|
type("other-root", "other_root", "其他系统", "0"),
|
|
|
type("other-flow", "other_flow", "流量监测", "other-root")
|
|
type("other-flow", "other_flow", "流量监测", "other-root")
|
|
|
));
|
|
));
|
|
@@ -217,7 +220,10 @@ class MonitoringServiceImplTest {
|
|
|
LambdaQueryWrapper<EquipmentBase> wrapper = invocation.getArgument(0);
|
|
LambdaQueryWrapper<EquipmentBase> wrapper = invocation.getArgument(0);
|
|
|
Set<Object> allowedTypeIds = flattenWrapperValues(wrapper);
|
|
Set<Object> allowedTypeIds = flattenWrapperValues(wrapper);
|
|
|
return Arrays.asList(
|
|
return Arrays.asList(
|
|
|
- device("water-flow-device", "WS-FLOW", "供水流量监测点", "water-flow", BASE_TIME),
|
|
|
|
|
|
|
+ device("water-flow-device", "WS-FLOW", "供水流量监测点", "11", BASE_TIME),
|
|
|
|
|
+ device("legacy-flow-device", "WS-LEGACY-FLOW", "旧编码流量监测点", "99", BASE_TIME),
|
|
|
|
|
+ device("real-id-wrong-name-device", "WS-FLOW-WRONG-NAME", "真实编码流量监测点", "98", BASE_TIME),
|
|
|
|
|
+ device("wrong-parent-flow-device", "WS-FLOW-WRONG-PARENT", "错误父级流量监测点", "97", BASE_TIME),
|
|
|
device("other-flow-device", "OTHER-FLOW", "其他系统流量监测点", "other-flow", BASE_TIME),
|
|
device("other-flow-device", "OTHER-FLOW", "其他系统流量监测点", "other-flow", BASE_TIME),
|
|
|
device("unknown-type-device", "UNKNOWN-FLOW", "未归属流量监测点", "unknown-type", BASE_TIME)
|
|
device("unknown-type-device", "UNKNOWN-FLOW", "未归属流量监测点", "unknown-type", BASE_TIME)
|
|
|
).stream()
|
|
).stream()
|
|
@@ -226,6 +232,9 @@ class MonitoringServiceImplTest {
|
|
|
});
|
|
});
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
radar("WS-FLOW", "10", BASE_TIME),
|
|
radar("WS-FLOW", "10", BASE_TIME),
|
|
|
|
|
+ radar("WS-LEGACY-FLOW", "20", BASE_TIME),
|
|
|
|
|
+ radar("WS-FLOW-WRONG-NAME", "30", BASE_TIME),
|
|
|
|
|
+ radar("WS-FLOW-WRONG-PARENT", "40", BASE_TIME),
|
|
|
radar("OTHER-FLOW", "20", BASE_TIME),
|
|
radar("OTHER-FLOW", "20", BASE_TIME),
|
|
|
radar("UNKNOWN-FLOW", "30", BASE_TIME)
|
|
radar("UNKNOWN-FLOW", "30", BASE_TIME)
|
|
|
));
|
|
));
|
|
@@ -233,15 +242,17 @@ class MonitoringServiceImplTest {
|
|
|
Page<FlowMonitoringVO> page = service.getFlowMonitorPage(
|
|
Page<FlowMonitoringVO> page = service.getFlowMonitorPage(
|
|
|
1, 10, null, null, null, null, null, null, null);
|
|
1, 10, null, null, null, null, null, null, null);
|
|
|
|
|
|
|
|
- assertEquals(1, page.getTotal());
|
|
|
|
|
- assertEquals("water-flow-device", page.getRecords().get(0).getEquipmentId());
|
|
|
|
|
|
|
+ assertEquals(2, page.getTotal());
|
|
|
|
|
+ assertEquals(
|
|
|
|
|
+ Set.of("water-flow-device", "real-id-wrong-name-device"),
|
|
|
|
|
+ page.getRecords().stream().map(FlowMonitoringVO::getEquipmentId).collect(Collectors.toSet()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void trendEndpointsRejectDevicesOutsideTheWaterTypeTree() {
|
|
void trendEndpointsRejectDevicesOutsideTheWaterTypeTree() {
|
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(equipmentTypeMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
- type("water-root", "water_root", "供水", "0"),
|
|
|
|
|
- type("water-flow", "water_flow", "流量监测", "water-root"),
|
|
|
|
|
|
|
+ type("1", "water_supply", "供水", "0"),
|
|
|
|
|
+ type("11", "ws_flow", "供水流量计", "1"),
|
|
|
type("other-root", "other_root", "其他系统", "0"),
|
|
type("other-root", "other_root", "其他系统", "0"),
|
|
|
type("other-flow", "other_flow", "流量监测", "other-root")
|
|
type("other-flow", "other_flow", "流量监测", "other-root")
|
|
|
));
|
|
));
|
|
@@ -261,7 +272,7 @@ class MonitoringServiceImplTest {
|
|
|
LocalDateTime start = BASE_TIME.minusHours(2);
|
|
LocalDateTime start = BASE_TIME.minusHours(2);
|
|
|
LocalDateTime end = BASE_TIME;
|
|
LocalDateTime end = BASE_TIME;
|
|
|
|
|
|
|
|
- EquipmentBase flowDevice = device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME);
|
|
|
|
|
|
|
+ EquipmentBase flowDevice = device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME);
|
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(flowDevice);
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(flowDevice);
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
radar("WS-FLOW-1", "10", BASE_TIME.minusHours(3)),
|
|
radar("WS-FLOW-1", "10", BASE_TIME.minusHours(3)),
|
|
@@ -274,7 +285,7 @@ class MonitoringServiceImplTest {
|
|
|
assertEquals(BASE_TIME.minusHours(1), flow.get(0).get("time"));
|
|
assertEquals(BASE_TIME.minusHours(1), flow.get(0).get("time"));
|
|
|
assertEquals("WS-FLOW-1", flow.get(0).get("equipmentCode"));
|
|
assertEquals("WS-FLOW-1", flow.get(0).get("equipmentCode"));
|
|
|
|
|
|
|
|
- EquipmentBase pressureDevice = device("pressure-1", "WS-PR-1", "压力监测点1", "pressure-type", BASE_TIME);
|
|
|
|
|
|
|
+ EquipmentBase pressureDevice = device("pressure-1", "WS-PR-1", "压力监测点1", "12", BASE_TIME);
|
|
|
when(equipmentBaseMapper.selectById("pressure-1")).thenReturn(pressureDevice);
|
|
when(equipmentBaseMapper.selectById("pressure-1")).thenReturn(pressureDevice);
|
|
|
when(pressureMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(pressureMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
pressure("WS-PR-1", 0.1D, BASE_TIME.minusHours(3)),
|
|
pressure("WS-PR-1", 0.1D, BASE_TIME.minusHours(3)),
|
|
@@ -286,7 +297,7 @@ class MonitoringServiceImplTest {
|
|
|
assertEquals(0.2D, pressure.get(0).get("pressureValue"));
|
|
assertEquals(0.2D, pressure.get(0).get("pressureValue"));
|
|
|
assertEquals("WS-PR-1", pressure.get(0).get("equipmentCode"));
|
|
assertEquals("WS-PR-1", pressure.get(0).get("equipmentCode"));
|
|
|
|
|
|
|
|
- EquipmentBase leakageDevice = device("leakage-1", "WS-LK-1", "漏失监测点1", "leakage-type", BASE_TIME);
|
|
|
|
|
|
|
+ EquipmentBase leakageDevice = device("leakage-1", "WS-LK-1", "漏失监测点1", "13", BASE_TIME);
|
|
|
when(equipmentBaseMapper.selectById("leakage-1")).thenReturn(leakageDevice);
|
|
when(equipmentBaseMapper.selectById("leakage-1")).thenReturn(leakageDevice);
|
|
|
when(noiseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(noiseMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
noise("WS-LK-1", 1D, BASE_TIME.minusHours(3)),
|
|
noise("WS-LK-1", 1D, BASE_TIME.minusHours(3)),
|
|
@@ -301,7 +312,7 @@ class MonitoringServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void trendEndpointWithOnlyAnEndTimeDoesNotApplyTheDefault24HourStart() {
|
|
void trendEndpointWithOnlyAnEndTimeDoesNotApplyTheDefault24HourStart() {
|
|
|
- EquipmentBase device = device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME);
|
|
|
|
|
|
|
+ EquipmentBase device = device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME);
|
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(device);
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(device);
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Arrays.asList(
|
|
|
radar("WS-FLOW-1", "10", BASE_TIME.minusDays(3)),
|
|
radar("WS-FLOW-1", "10", BASE_TIME.minusDays(3)),
|
|
@@ -317,9 +328,9 @@ class MonitoringServiceImplTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void trendQueriesWithOnlyAnEndTimeDoNotBindNullStartTime() {
|
|
void trendQueriesWithOnlyAnEndTimeDoNotBindNullStartTime() {
|
|
|
- EquipmentBase flowDevice = device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME);
|
|
|
|
|
- EquipmentBase pressureDevice = device("pressure-1", "WS-PR-1", "压力监测点1", "pressure-type", BASE_TIME);
|
|
|
|
|
- EquipmentBase leakageDevice = device("leakage-1", "WS-LK-1", "漏失监测点1", "leakage-type", BASE_TIME);
|
|
|
|
|
|
|
+ EquipmentBase flowDevice = device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME);
|
|
|
|
|
+ EquipmentBase pressureDevice = device("pressure-1", "WS-PR-1", "压力监测点1", "12", BASE_TIME);
|
|
|
|
|
+ EquipmentBase leakageDevice = device("leakage-1", "WS-LK-1", "漏失监测点1", "13", BASE_TIME);
|
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(flowDevice);
|
|
when(equipmentBaseMapper.selectById("flow-1")).thenReturn(flowDevice);
|
|
|
when(equipmentBaseMapper.selectById("pressure-1")).thenReturn(pressureDevice);
|
|
when(equipmentBaseMapper.selectById("pressure-1")).thenReturn(pressureDevice);
|
|
|
when(equipmentBaseMapper.selectById("leakage-1")).thenReturn(leakageDevice);
|
|
when(equipmentBaseMapper.selectById("leakage-1")).thenReturn(leakageDevice);
|
|
@@ -339,7 +350,7 @@ class MonitoringServiceImplTest {
|
|
|
@Test
|
|
@Test
|
|
|
void requestedPageBeyondMeasurementResultsKeepsTheFilteredTotal() {
|
|
void requestedPageBeyondMeasurementResultsKeepsTheFilteredTotal() {
|
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(equipmentBaseMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
- device("flow-1", "WS-FLOW-1", "流量监测点1", "flow-type", BASE_TIME)
|
|
|
|
|
|
|
+ device("flow-1", "WS-FLOW-1", "流量监测点1", "11", BASE_TIME)
|
|
|
));
|
|
));
|
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
when(radarDataMapper.selectList(any())).thenReturn(Collections.singletonList(
|
|
|
radar("WS-FLOW-1", "10", BASE_TIME)
|
|
radar("WS-FLOW-1", "10", BASE_TIME)
|
|
@@ -352,7 +363,7 @@ class MonitoringServiceImplTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static EquipmentType type(String id, String typeId, String name) {
|
|
private static EquipmentType type(String id, String typeId, String name) {
|
|
|
- return type(id, typeId, name, "water-root");
|
|
|
|
|
|
|
+ return type(id, typeId, name, "1");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static Set<Object> flattenWrapperValues(
|
|
private static Set<Object> flattenWrapperValues(
|