ruoyi-admin/src/test/java/com/battery/business/service/impl/TDetectionCabinetServiceImplTest.java
@@ -193,6 +193,26 @@
        return mapperXml.substring(start, end);
    }
    /**
     * 通道显示号:来源自己报了叫法就用它(操作员拿它跟厂商软件对上),没报就回退到身份里的「单元-通道」。
     * 显示号只是展示,不参与通道身份。
     */
    @Test
    void channelDisplayNoPrefersTheSourceOwnLabelAndFallsBackToTheIdentity()
    {
        ChannelCandidate declared = new ChannelCandidate(new ChannelIdentity("j22", 0, 0, 1, 26), true,
                DeviceWorkStatus.UNKNOWN, java.time.Instant.now(), null, null, "27");
        assertEquals("27", TDetectionCabinetServiceImpl.channelDisplayNo(declared));
        ChannelCandidate blank = new ChannelCandidate(new ChannelIdentity("j22", 0, 0, 1, 26), true,
                DeviceWorkStatus.UNKNOWN, java.time.Instant.now(), null, null, "   ");
        assertEquals("1-26", TDetectionCabinetServiceImpl.channelDisplayNo(blank));
        ChannelCandidate absent = new ChannelCandidate(new ChannelIdentity("neware76", 21, 3, 1, 4), true,
                DeviceWorkStatus.UNKNOWN, java.time.Instant.now());
        assertEquals("1-4", TDetectionCabinetServiceImpl.channelDisplayNo(absent));
    }
    private CabinetCandidate candidate(String deviceCode, boolean online, DeviceWorkStatus workStatus)
    {
        java.time.Instant observedAt = java.time.Instant.now();