吴羡
12 小时以前 2f07589b54d56085af77b50d580890cd4130b444
cnas-device/src/main/resources/mapper/InsOrderDeviceRecordMapper.xml
@@ -39,10 +39,17 @@
    <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>