| | |
| | | <select id="selectExportList" resultType="com.ruoyi.device.dto.DeviceRecordDto"> |
| | | select dr.* |
| | | from device_record dr |
| | | left join device d on d.id = dr.device_id |
| | | where dr.use_start_date is not null |
| | | <if test="deviceId != null"> |
| | | and dr.device_id = #{deviceId} |
| | | </if> |
| | | <if test="sampleCode != '' and sampleCode != null"> |
| | | and dr.sample_code like concat('%', #{sampleCode}, '%') |
| | | </if> |
| | | <if test="managementNumber != '' and managementNumber != null"> |
| | | and d.management_number like concat('%', #{managementNumber}, '%') |
| | | </if> |
| | | <if test="exportDate != '' and exportDate != null"> |
| | | and DATE_FORMAT(dr.use_start_date, '%Y-%m') = #{exportDate} |
| | | </if> |