yeg
2026-09-02 96144b97e1761db230c0dc61a837ec55d76210df
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.ruoyi.system.mapper;
 
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.TDetectionCabinet;
 
/**
 * 检测柜 Mapper 接口
 *
 * @author ruoyi
 */
public interface TDetectionCabinetMapper
{
    /**
     * 查询指定的未删除检测柜。
     *
     * @param cabinetId 检测柜主键
     * @return 检测柜信息
     */
    TDetectionCabinet selectDetectionCabinetById(Long cabinetId);
 
    /**
     * 按设备综合条件、创建时间及状态条件查询检测柜。
     *
     * @param detectionCabinet 查询条件
     * @return 检测柜列表
     */
    List<TDetectionCabinet> selectDetectionCabinetList(TDetectionCabinet detectionCabinet);
 
    /**
     * 查询设备选择弹窗需要的已发现检测柜事实。
     *
     * @return 已发现、在线且未登记的检测柜
     */
    List<String> selectRegisteredCabinetCodes();
 
    /**
     * 根据设备编码查询未删除检测柜。
     *
     * @param cabinetCode 设备编码
     * @return 检测柜信息
     */
    TDetectionCabinet selectByCabinetCode(String cabinetCode);
 
    /**
     * 根据规范化后的 MAC 地址查询未删除检测柜。
     *
     * @param macAddress MAC 地址
     * @return 检测柜信息
     */
    TDetectionCabinet selectByMacAddress(String macAddress);
 
    /**
     * 将发现候选设备登记为正式检测柜。
     *
     * @param detectionCabinet 候选主键及操作员填写的信息
     * @return 影响行数
     */
    int insertDetectionCabinet(TDetectionCabinet detectionCabinet);
 
    /** 写入正式登记检测柜的稳定通道身份。 */
    int insertDetectionChannel(com.ruoyi.system.domain.TDetectionChannel channel);
 
    /** 同步正式检测柜的最近发现事实,不触碰软删除记录。 */
    int updateRegisteredCabinetObservation(@Param("adapterCode") String adapterCode,
            @Param("devtype") int devtype, @Param("devid") int devid,
            @Param("onlineStatus") String onlineStatus, @Param("lastSeenAtUtc") java.time.Instant lastSeenAtUtc,
            @Param("updateLastSeen") boolean updateLastSeen);
 
    /** 按检测柜通道复合身份同步最近发现事实,不触碰软删除记录。 */
    int updateRegisteredChannelObservation(@Param("adapterCode") String adapterCode,
            @Param("devtype") int devtype, @Param("devid") int devid,
            @Param("subdevid") int subdevid, @Param("chlid") int chlid,
            @Param("onlineStatus") String onlineStatus, @Param("workStatus") String workStatus,
            @Param("lastSeenAtUtc") java.time.Instant lastSeenAtUtc, @Param("updateLastSeen") boolean updateLastSeen);
 
    /** 软删除正式检测柜对应的通道拓扑。 */
    int deleteDetectionChannelsByCabinetId(@Param("cabinetId") Long cabinetId);
 
    /**
     * 修改检测柜基础信息。
     *
     * @param detectionCabinet 检测柜信息
     * @return 影响行数
     */
    int updateDetectionCabinet(TDetectionCabinet detectionCabinet);
 
    /**
     * 修改检测柜启禁用状态。
     *
     * @param detectionCabinet 检测柜主键、目标状态及更新人
     * @return 影响行数
     */
    int updateDetectionCabinetStatus(TDetectionCabinet detectionCabinet);
 
    /**
     * 取消检测柜登记,使仍在线的设备重新进入发现候选列表。
     *
     * @param cabinetId 检测柜主键
     * @param updateBy 更新人
     * @return 影响行数
     */
    int deleteDetectionCabinetById(@Param("cabinetId") Long cabinetId, @Param("updateBy") String updateBy);
}