package com.ruoyi.device.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ruoyi.device.dto.LineInspectionDto;
|
import com.ruoyi.device.pojo.LineInspection;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* 线路巡检Mapper接口
|
*/
|
@Mapper
|
public interface LineInspectionMapper extends BaseMapper<LineInspection> {
|
|
/**
|
* 查询线路巡检列表(关联设备信息)
|
*/
|
@Select("<script>" +
|
"SELECT li.*, dl.device_name, dl.device_model " +
|
"FROM line_inspection li " +
|
"LEFT JOIN device_ledger dl ON li.device_id = dl.id " +
|
"WHERE li.deleted = 0 " +
|
"<if test='dto.taskName != null and dto.taskName != \"\"'> " +
|
"AND li.task_name LIKE CONCAT('%', #{dto.taskName}, '%') " +
|
"</if>" +
|
"<if test='dto.routeName != null and dto.routeName != \"\"'> " +
|
"AND li.route_name LIKE CONCAT('%', #{dto.routeName}, '%') " +
|
"</if>" +
|
"<if test='dto.inspector != null and dto.inspector != \"\"'> " +
|
"AND li.inspector LIKE CONCAT('%', #{dto.inspector}, '%') " +
|
"</if>" +
|
"<if test='dto.status != null and dto.status != \"\"'> " +
|
"AND li.status = #{dto.status} " +
|
"</if>" +
|
"ORDER BY li.create_time DESC" +
|
"</script>")
|
List<LineInspectionDto> selectLineInspectionList(@Param("dto") LineInspectionDto dto);
|
}
|