package com.xinda.scada.mapper; import java.util.Collection; import java.util.List; import com.xinda.iot.domain.EventLog; import com.xinda.iot.domain.FunctionLog; import com.xinda.iot.model.DeviceStatistic; import com.xinda.scada.domain.Scada; import com.xinda.scada.vo.ScadaHistoryModelVO; import com.xinda.scada.vo.ScadaStatisticVO; import org.apache.ibatis.annotations.Param; /** * 组态中心Mapper接口 * * @author kerwincui * @date 2023-11-10 */ public interface ScadaMapper { /** * 查询组态中心 * * @param id 组态中心主键 * @return 组态中心 */ public Scada selectScadaById(Long id); /** * 查询组态中心列表 * * @param scada 组态中心 * @return 组态中心集合 */ public List selectScadaList(Scada scada); /** * 新增组态中心 * * @param scada 组态中心 * @return 结果 */ public int insertScada(Scada scada); /** * 修改组态中心 * * @param scada 组态中心 * @return 结果 */ public int updateScada(Scada scada); /** * 删除组态中心 * * @param id 组态中心主键 * @return 结果 */ public int deleteScadaById(Long id); public int deleteScadaByGuid(String guid); /** * 批量删除组态中心 * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteScadaByIds(Long[] ids); /** * 根据guid获取组态详情 * @param guid 组态id * @return */ Scada selectScadaByGuid(String guid); /** * 查询设备运行状态 * @param serialNumber 设备编号 * @return java.lang.String */ Integer getStatusBySerialNumber(String serialNumber); ScadaStatisticVO selectDeviceProductAlertCount(@Param("tenantId") Long tenantId, @Param("userId") Long userId); /** * 查询功能物模型历史数据 * @param functionLog 功能物模型日志 * @return java.util.List */ List listFunctionLogHistory(FunctionLog functionLog); /** * 查询时间物模型历史数据 * @param eventLog 事件物模型日志 * @return java.util.List */ List listEventLogHistory(EventLog eventLog); String selectGuidBySceneModelId(Long sceneModelId); String selectGuidByProductId(Long productId); void updateProductGuid(@Param("productId") Long productId, @Param("guid") String guid); void updateSceneModelGuid( @Param("sceneModelId") Long sceneModelId, @Param("guid") String guid); void updateDeviceGuid( @Param("serialNumber") String serialNumber, @Param("guid") String guid); void deleteProductByGuids(List guids); void deleteSceneModelByGuids(List guids); Long selectProductByGuid(String guid); Long selectSceneModelByGuid(String guid); }