<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="iot.lidee.iot.mapper.bygz.ByManagementJlMapper">

    <select id="selectBygdByType"  resultType="iot.lidee.iot.model.bygz.ByManagementJl">
        SELECT
            w.id,
            w.order_id,
            s.dev_name AS order_name,
            w.equipment_info,
            w.priority,
            w.upkeep_level,
            w.upkeep_time,
            w.state,
            w.executor,
            w.ys_time,
            w.tenant_id,
            w.create_user,
            w.create_time,
            w.create_dept,
            w.update_user,
            w.update_time,
            w.is_deleted,
            w.equipment_code,
            w.leader_user_id,
            w.wbcjzr_user_id,
            w.leader_ys_zt,
            w.wbcjzr_ys_zt,
            w.leader_ys_yj,
            w.wbcjzr_ys_yj,
            w.maintainer,
            w.scheme_info
        FROM
            by_management_jl w
                LEFT JOIN sys_device s ON s.id = w.equipment_info
        WHERE
            s.dev_type = #{devtype}
          AND w.is_deleted = 0;
    </select>

</mapper>
