解决库存预警接口的查询bug

This commit is contained in:
季圣华
2021-12-05 22:52:31 +08:00
parent 82297eb257
commit 703a416709

View File

@@ -437,7 +437,8 @@
and me.default_flag=1 and me.default_flag=1
and ifnull(m.delete_flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
and mis.depot_id=mcs.depot_id and mis.depot_id=mcs.depot_id
and (mcs.current_number < ifnull(mis.low_safe_stock,0) or mcs.current_number > ifnull(mis.high_safe_stock,0)) and ((ifnull(mis.low_safe_stock,0)!=0 and mcs.current_number < ifnull(mis.low_safe_stock,0))
or (ifnull(mis.low_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+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.standard like #{bindKey} or m.model like #{bindKey})
@@ -464,7 +465,8 @@
and me.default_flag=1 and me.default_flag=1
and ifnull(m.delete_flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
and mis.depot_id=mcs.depot_id and mis.depot_id=mcs.depot_id
and (mcs.current_number &lt; ifnull(mis.low_safe_stock,0) or mcs.current_number > ifnull(mis.high_safe_stock,0)) and ((ifnull(mis.low_safe_stock,0)!=0 and mcs.current_number &lt; ifnull(mis.low_safe_stock,0))
or (ifnull(mis.low_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+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.standard like #{bindKey} or m.model like #{bindKey})