完善商品查询参数,增加助记码等查询条件
This commit is contained in:
@@ -357,13 +357,13 @@
|
||||
</select>
|
||||
|
||||
<select id="getMaterialByParam" resultType="com.jsh.erp.datasource.vo.MaterialVoSearch">
|
||||
select me.bar_code, m.name, m.standard, m.model, m.color, me.commodity_unit unit
|
||||
select me.bar_code, m.name, m.mnemonic, m.standard, m.model, m.color, me.commodity_unit unit
|
||||
from jsh_material m
|
||||
left join jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
where m.enabled=1 and me.id is not null
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey})
|
||||
</if>
|
||||
and ifnull(m.delete_flag,'0') !='1'
|
||||
order by m.id desc, me.default_flag desc, me.id asc
|
||||
@@ -378,7 +378,23 @@
|
||||
where m.enabled=1 and me.id is not null
|
||||
<if test="q != null and q !=''">
|
||||
<bind name="bindKey" value="'%'+q+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or m.color like #{bindKey})
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey})
|
||||
</if>
|
||||
<if test="standardOrModel != null and standardOrModel !=''">
|
||||
<bind name="bindStandardOrModel" value="'%'+standardOrModel+'%'"/>
|
||||
and (m.standard like #{bindStandardOrModel} or m.model like #{bindStandardOrModel})
|
||||
</if>
|
||||
<if test="color != null and color !=''">
|
||||
<bind name="bindColor" value="'%'+color+'%'"/>
|
||||
and m.color like #{bindColor}
|
||||
</if>
|
||||
<if test="brand != null and brand !=''">
|
||||
<bind name="bindBrand" value="'%'+brand+'%'"/>
|
||||
and m.brand like #{bindBrand}
|
||||
</if>
|
||||
<if test="mfrs != null and mfrs !=''">
|
||||
<bind name="bindMfrs" value="'%'+mfrs+'%'"/>
|
||||
and m.mfrs like #{bindMfrs}
|
||||
</if>
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
@@ -404,9 +420,25 @@
|
||||
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
where m.enabled=1 and me.id is not null
|
||||
<if test="q != null">
|
||||
<if test="q != null and q !=''">
|
||||
<bind name="bindKey" value="'%'+q+'%'"/>
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey})
|
||||
</if>
|
||||
<if test="standardOrModel != null and standardOrModel !=''">
|
||||
<bind name="bindStandardOrModel" value="'%'+standardOrModel+'%'"/>
|
||||
and (m.standard like #{bindStandardOrModel} or m.model like #{bindStandardOrModel})
|
||||
</if>
|
||||
<if test="color != null and color !=''">
|
||||
<bind name="bindColor" value="'%'+color+'%'"/>
|
||||
and m.color like #{bindColor}
|
||||
</if>
|
||||
<if test="brand != null and brand !=''">
|
||||
<bind name="bindBrand" value="'%'+brand+'%'"/>
|
||||
and m.brand like #{bindBrand}
|
||||
</if>
|
||||
<if test="mfrs != null and mfrs !=''">
|
||||
<bind name="bindMfrs" value="'%'+mfrs+'%'"/>
|
||||
and m.mfrs like #{bindMfrs}
|
||||
</if>
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
|
||||
Reference in New Issue
Block a user