|
@@ -72,7 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="returnFormCode != null and returnFormCode != ''"> AND t3.form_code like concat('%', #{returnFormCode}, '%')</if>
|
|
|
<if test="productDescription != null "> AND t1.product_description like concat('%', #{productDescription}, '%')</if>
|
|
|
<if test="supplierName != null and supplierName != ''"> AND t1.supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
- <if test="newCarrierName != null and newCarrierName != ''"> AND t1.new_carrier_name like concat('%', #{newCarrierName}, '%')</if>
|
|
|
+ <if test="newCarrierName != null and newCarrierName != '' ">
|
|
|
+ AND case when t1.production_dept_id = 0 then t1.new_carrier_name like concat('%', #{newCarrierName}, '%') else t1.production_carrier like concat('%', #{newCarrierName}, '%') END
|
|
|
+ </if>
|
|
|
<if test="lotCode != null and lotCode != ''"> AND t1.lot_code like concat('%', #{lotCode}, '%')</if>
|
|
|
<if test="formCode != null"> AND t3.form_code like concat('%', #{formCode}, '%')</if>
|
|
|
<if test="startTime != null ">AND t3.form_date >= #{startTime}</if>
|