给单据增加条码查询条件
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1'
|
||||
left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1'
|
||||
left join jsh_material_extend me on di.material_extend_id = me.id and ifnull(me.delete_flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="type != null">
|
||||
and dh.type=#{type}
|
||||
@@ -72,7 +73,7 @@
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (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.standard like #{bindKey} or m.model like #{bindKey})
|
||||
</if>
|
||||
<if test="organId != null">
|
||||
and dh.organ_id=#{organId}
|
||||
@@ -109,6 +110,7 @@
|
||||
(select distinct dh.* FROM jsh_depot_head dh
|
||||
left join jsh_depot_item di on dh.Id = di.header_id and ifnull(di.delete_flag,'0') !='1'
|
||||
left join jsh_material m on di.material_id = m.Id and ifnull(m.delete_Flag,'0') !='1'
|
||||
left join jsh_material_extend me on di.material_extend_id = me.id and ifnull(me.delete_flag,'0') !='1'
|
||||
WHERE 1=1
|
||||
<if test="type != null">
|
||||
and dh.type=#{type}
|
||||
@@ -131,7 +133,7 @@
|
||||
</if>
|
||||
<if test="materialParam != null and materialParam !=''">
|
||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||
and (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.standard like #{bindKey} or m.model like #{bindKey})
|
||||
</if>
|
||||
<if test="organId != null">
|
||||
and dh.organ_id=#{organId}
|
||||
|
||||
Reference in New Issue
Block a user