|
@@ -77,9 +77,21 @@
|
|
|
select info.*
|
|
|
from t_spare_part_info info
|
|
|
<if test="storeId != null and storeId != ''">
|
|
|
- LEFT JOIN t_spare_store spare on spare.spare_id = info.id
|
|
|
+ LEFT JOIN t_spare_store spare on spare.spare_id = info.id
|
|
|
+ </if>
|
|
|
+ <if test="producerName != null and producerName != ''">
|
|
|
+ LEFT JOIN t_firm_producer producer on producer.id = info.producer_id
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null and supplierName != ''">
|
|
|
+ LEFT JOIN t_supplier supplier on supplier.id = info.supplier_id
|
|
|
</if>
|
|
|
<where>
|
|
|
+ <if test="producerName != null and producerName != ''">
|
|
|
+ AND producer.name like concat('%',#{producerName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null and supplierName != ''">
|
|
|
+ AND supplier.name like concat('%',#{supplierName},'%')
|
|
|
+ </if>
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
AND ( info.name like concat('%',#{keyword},'%') or
|
|
|
info.no like concat('%',#{keyword},'%'))
|
|
@@ -96,7 +108,6 @@
|
|
|
<if test="yt != null">
|
|
|
AND info.yt=#{yt}
|
|
|
</if>
|
|
|
-
|
|
|
<if test="storeId != null and storeId != ''">
|
|
|
AND spare.store_id=#{storeId}
|
|
|
</if>
|