| | |
| | | |
| | | |
| | | <select id="selectFwDroneFlightRecordPage" resultMap="fwDroneFlightRecordResultMap"> |
| | | select dfr.* from ja_fw_drone_flight_record dfr |
| | | select |
| | | dfr.* |
| | | from |
| | | ja_fw_drone_flight_record dfr |
| | | <where> |
| | | dfr.is_deleted = 0 |
| | | <if test="param2.deviceId != null and param2.deviceId != ''"> |
| | |
| | | and dfr.area_name like CONCAT('%', #{param2.areaName}, '%') |
| | | </if> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and dfr.create_dept in |
| | | and (dfr.create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="param2.currentDeptId != null and param2.currentDeptId != '' "> |
| | | or dfr.device_id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{param2.currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |