| | |
| | | and device_type::text = #{param2.deviceType}::text |
| | | </if> |
| | | <if test="param2.deviceModel != null and param2.deviceModel != ''"> |
| | | and device_model = #{param2.deviceModel} |
| | | and device_model::text = #{param2.deviceModel}::text |
| | | </if> |
| | | <if test="param2.deviceSpecification != null and param2.deviceSpecification != ''"> |
| | | and device_specification = #{param2.deviceSpecification} |
| | | and device_specification::text = #{param2.deviceSpecification}::text |
| | | </if> |
| | | <if test="param2.effectiveRangeKmIsNotNull != null and param2.effectiveRangeKmIsNotNull == 1"> |
| | | and effective_range_km is not null |
| | |
| | | and (effective_range_km is null or effective_range_km = 0) |
| | | </if> |
| | | <if test="param2.manufacturer != null and param2.manufacturer != ''"> |
| | | and manufacturer = #{param2.manufacturer} |
| | | and manufacturer::text = #{param2.manufacturer}::text |
| | | </if> |
| | | <if test="param2.source != null and param2.source != ''"> |
| | | and source = #{param2.source} |
| | | and source::text = #{param2.source}::text |
| | | </if> |
| | | <if test="param2.belongDept != null and param2.belongDept != ''"> |
| | | and belong_dept = #{param2.belongDept} |
| | | and belong_dept::text = #{param2.belongDept}::text |
| | | </if> |
| | | <if test="param2.deviceStatusList != null and param2.deviceStatusList != ''"> |
| | | and status::text in |
| | |
| | | #{deptId}::text |
| | | </foreach> |
| | | <if test="param2.currentDeptId != null and param2.currentDeptId != '' "> |
| | | or id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE |
| | | loan_to_dept_id = #{param2.currentDeptId}::bigint |
| | | or id::text in ( |
| | | SELECT device_id::text FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{param2.currentDeptId}::bigint |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | |
| | | d.final_outbound_area |
| | | </select> |
| | | |
| | | <!-- 批量更新设备启用状态 --> |
| | | <update id="batchUpdateIsEnabled"> |
| | | UPDATE ja_fw_device |
| | | SET is_enabled = #{isEnabled} |
| | | WHERE id IN |
| | | <foreach collection="deviceIds" item="id" open="(" separator="," close=")"> |
| | | #{id}::bigint |
| | | </foreach> |
| | | AND is_deleted = 0 |
| | | </update> |
| | | |
| | | </mapper> |