package com.moral.mapper; import java.util.Date; import java.util.List; import java.util.Map; import com.moral.common.mapper.BaseMapper; import com.moral.entity.Device; import com.moral.entity.DeviceAndWind; import org.apache.ibatis.annotations.Param; import tk.mybatis.mapper.entity.Example; public interface DeviceMapper extends BaseMapper { List> getDeviceStatesByAccount(Map parameters); List selectWithRelationData(Example example); List> getSensorsByDevice(@Param("mac") String mac); List getDeviceMacByMonitorPointAndDeviceVersion(@Param("monitorPointId") Integer monitorPointId, @Param("deviceVersionId") Integer deviceVersionId); List> getDeviceVersionIdByMonitorPoint(Integer monitorPointId); List selectByOrgIdAndDevName(@Param("orgId") Integer orgId, @Param("orgIds") List orgIds, @Param("devState") String state, @Param("name") String name); /** * @param orgId * @param mpId * @return 返回未删除结果 */ List selectByOrgIdAndMpId(@Param("orgId") Integer orgId, @Param("orgIds") List orgIds, @Param("mpId") Integer mpId); List selectByMap(Map params); Device selectWithOrgIdsByMac(String mac); List getDeviceVersionIdByAreaCode(Map parameters); Integer getDeviceCountByRegion(Map parameters); List countByTimes(@Param("start") Date start, @Param("end") Date end, @Param("format") String format); List getDevicesByProfession(Map parameters); List getDevicesByOrganizationId(Map parameters); List> getDevicesStateByRegion(Map parameters); List getDeviceList(Example example); String getLimitDataByDevice(Map parameters); List getMacsByOrganizationId(@Param("organizationIdList") List organizationIdList); List getDeviceById1(@Param("id") int id); //获取厂界设备 List getDeviceById2(@Param("id") int id); List getDeviceById3(@Param("id") int id); List getHasWindDirAndWindSpeedDeviceVersion(); List selectDevicesAll(Map params); List getAllDevice(); List getAllMac(); Device byMacGetDevice(@Param("mac") String mac); DeviceAndWind getDeviceAndWindByMac(@Param("mac") String mac, @Param("time") String time, @Param("table") String table); List byMonitorIdGetDeviceAndWind(@Param("id") int id, @Param("time") String time, @Param("table") String table); DeviceAndWind byMacGetDeviceAndWind(@Param("mac") String mac, @Param("time") String time, @Param("table") String table); List getMacsByMonitorPointIds(List list); Map selectAllFieldByMac(Map params); List getDeviceByCode(Map params); List getDeviceByCodeAndId(@Param("code") String code, @Param("id") String id); List> getDevicesByMpId(int mpId); String byMacGetOrgId(String mac); }