| | |
| | | <if test="param2.status != null"> |
| | | and status = #{param2.status} |
| | | </if> |
| | | <if test="param2.isTrack != null and param2.isTrack == 1"> |
| | | and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0 |
| | | </if> |
| | | <if test="param2.isTrack != null and param2.isTrack == 2"> |
| | | and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0 |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="isTrack != null and isTrack == 1"> |
| | | and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0 |
| | | </if> |
| | | <if test="isTrack != null and isTrack == 2"> |
| | | and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0 |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | WHERE |
| | | d.is_deleted = 0 |
| | | AND t.out_target IS NOT NULL |
| | | <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 1"> |
| | | and d.effective_range_km is not null |
| | | and d.effective_range_km > 0 |
| | | </if> |
| | | <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 2"> |
| | | and (d.effective_range_km is null or d.effective_range_km = 0) |
| | | </if> |
| | | GROUP BY |
| | | t.out_target; |
| | | </select> |