于紫祥_1901
2020-12-14 782e84d68779471c0640584678d4c4df3afa80a2
src/main/java/com/moral/mapper/DeviceMapper.java
@@ -4,28 +4,96 @@
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
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<Device>{
public interface DeviceMapper extends BaseMapper<Device> {
   List<Map<String, Object>> getDeviceStatesByAccount(Map<String, Object> parameters);
    List<Device>  selectWithRelationData(Example example);
   List<Map<String, Object>> getSensorsByDevice(@Param("mac")String mac);
   List<String> getDeviceMacByMonitorPointAndDeviceVersion(@Param("monitorPointId")Integer monitorPointId,@Param("deviceVersionId")Integer deviceVersionId);
    List<Map<String, Object>> getDeviceStatesByAccount(Map<String, Object> parameters);
   List<Map<String, Object>> getDeviceVersionIdByMonitorPoint(Integer monitorPointId);
    List<Device> selectWithRelationData(Example example);
   List<Device> selectByOrgIdAndDevName(@Param("orgId")Integer orgId,@Param("devName")String devName);
   List<Device> selectByOrgIdAndMpId(@Param("orgId")Integer orgId,@Param("mpId")Integer mpId);
   List<Device> selectByMap(Map<String, Object> params);
   Device selectWithOrgIdsByMac(String mac);
   List<Integer> getDeviceVersionIdByAreaCode(Map<String, Object> parameters);
   Integer getDeviceCountByRegion(Map<String, Object> parameters);
   List<Map> countByTimes(@Param("start")Date start,@Param("end")Date end,@Param("format")String format);
    List<Map<String, Object>> getSensorsByDevice(@Param("mac") String mac);
   List<Device> getDevicesByProfession(Map<String, Object> parameters);
    List<String> getDeviceMacByMonitorPointAndDeviceVersion(@Param("monitorPointId") Integer monitorPointId, @Param("deviceVersionId") Integer deviceVersionId);
    List<Map<String, Object>> getDeviceVersionIdByMonitorPoint(Integer monitorPointId);
    List<Device> selectByOrgIdAndDevName(@Param("orgId") Integer orgId, @Param("orgIds") List<Integer> orgIds, @Param("devState") String state, @Param("name") String name);
    /**
     * @param orgId
     * @param mpId
     * @return 返回未删除结果
     */
    List<Device> selectByOrgIdAndMpId(@Param("orgId") Integer orgId, @Param("orgIds") List<Integer> orgIds, @Param("mpId") Integer mpId);
    List<Device> selectByMap(Map<String, Object> params);
    Device selectWithOrgIdsByMac(String mac);
    List<Integer> getDeviceVersionIdByAreaCode(Map<String, Object> parameters);
    Integer getDeviceCountByRegion(Map<String, Object> parameters);
    List<Map> countByTimes(@Param("start") Date start, @Param("end") Date end, @Param("format") String format);
    List<Device> getDevicesByProfession(Map<String, Object> parameters);
    List<Device> getDevicesByOrganizationId(Map<String, Object> parameters);
    List<Map<String, Object>> getDevicesStateByRegion(Map<String, Object> parameters);
    List<Device> getDeviceList(Example example);
    String getLimitDataByDevice(Map<String, Object> parameters);
    List<String> getMacsByOrganizationId(@Param("organizationIdList") List<Object> organizationIdList);
    List<Device> getDeviceById1(@Param("id") int id);
    //获取厂界设备
    List<Device> getDeviceById2(@Param("id") int id);
    List<Device> getDeviceById3(@Param("id") int id);
    List<Integer> getHasWindDirAndWindSpeedDeviceVersion();
    List<Device> selectDevicesAll(Map<String, Object> params);
    List<DeviceAndWind> getAllDevice();
    List<String> getAllMac();
    Device byMacGetDevice(@Param("mac") String mac);
    DeviceAndWind getDeviceAndWindByMac(@Param("mac") String mac,
                                        @Param("table") String table);
    List<DeviceAndWind> byMonitorIdGetDeviceAndWind(@Param("id") int id, @Param("table") String table);
    DeviceAndWind byMacGetDeviceAndWind(@Param("mac") String mac, @Param("table") String table);
    List<String> getMacsByMonitorPointIds(List<Integer> list);
    Map<String, Object> selectAllFieldByMac(Map<String, Object> params);
    List getDeviceByCode(Map<String, Object> params);
    List<Device> getDeviceByCodeAndId(@Param("code") String code, @Param("id") String id);
    List<Map<String, Object>> getDevicesByMpId(int mpId);
    String byMacGetOrgId(String mac);
    List<Device> getDevice(String macOrName);
    List<Device> getDeviceByCityCode();
    List<Device> getDevicesByAccountId(String id);
}