| | |
| | | dfr.is_deleted = 0 |
| | | and d.track_status = 1 |
| | | and d.is_enabled = 1 |
| | | <if test="param2.regionName != null and param2.regionName != ''"> |
| | | and (d.final_outbound_area = #{param2.regionName} |
| | | <if test="param2.regionCode != null and param2.regionCode != ''"> |
| | | and (d.final_outbound_area_code like CONCAT(#{param2.regionCode}, '%') |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="param2.currentDeptId != null and param2.currentDeptId != '' "> |
| | | or dfr.device_id in ( |
| | |
| | | <if test="param2.areaName != null and param2.areaName != ''"> |
| | | and dfr.area_name like CONCAT('%', #{param2.areaName}, '%') |
| | | </if> |
| | | <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> --> |
| | | <!-- and (dfr.create_dept in --> |
| | | <!-- <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> --> |
| | | <!-- #{deptId} --> |
| | | <!-- </foreach> --> |
| | | <!-- ) --> |
| | | <!-- </if> --> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | ja_fw_drone_flight_record dfr |
| | | left join |
| | | ja_fw_device d on dfr.device_id = d.id |
| | | left join |
| | | ja_fw_drone_flight_record_detail dfrd on dfr.id = dfrd.flight_record_id |
| | | <where> |
| | | dfr.is_deleted = 0 |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="regionCode != null and regionCode != ''"> |
| | | and (d.final_outbound_area_code like CONCAT(#{regionCode}, '%') |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or dfr.device_id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |