<iftest="reportDamageCode != null and reportDamageCode != ''"> and report_damage_code = #{reportDamageCode}</if>
<iftest="reportDamageCode != null and reportDamageCode != ''"> and report_damage_code like concat('%', #{reportDamageCode}, '%')</if>
<iftest="warehousScrapType != null and warehousScrapType != ''"> and warehous_scrap_type = #{warehousScrapType}</if>
<iftest="makeNo != null and makeNo != ''"> and make_no = #{makeNo}</if>
<iftest="makeNo != null and makeNo != ''"> and make_no like concat('%', #{makeNo}, '%')</if>
<iftest="whetherMakeNo != null and whetherMakeNo != ''"> and whether_make_no = #{whetherMakeNo}</if>
<iftest="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
<iftest="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
<iftest="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<!-- <if test="materialNo != null and materialNo != ''"> and material_no like concat('%', #{materialNo}, '%')</if>-->
<!-- <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>-->
<iftest="materialNo != null and materialNo != ''">
and report_damage_code in ( select report_damage_code from warehouse_inventory_report_damage_child where material_no like concat('%', #{materialNo}, '%') )
</if>
<iftest="materialName != null and materialName != ''">
and report_damage_code in ( select report_damage_code from warehouse_inventory_report_damage_child where material_name like concat('%', #{materialName}, '%') )
</if>
<iftest="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>