优化根据仓库和商品查询单据列表接口

This commit is contained in:
季圣华
2022-06-13 00:04:35 +08:00
parent b164fa3f74
commit 9561741f27
4 changed files with 21 additions and 6 deletions

View File

@@ -165,6 +165,9 @@
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
)
</if>
<if test="sku != null and sku !=''">
and di.sku = #{sku}
</if>
and di.material_id = #{mId}
and ifnull(dh.delete_flag,'0') !='1'
union all
@@ -183,6 +186,9 @@
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
)
</if>
<if test="sku != null and sku !=''">
and di.sku = #{sku}
</if>
and di.material_id = #{mId}
and ifnull(dh.delete_flag,'0') !='1') tb
order by tb.oTime desc
@@ -204,6 +210,9 @@
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
)
</if>
<if test="sku != null and sku !=''">
and di.sku = #{sku}
</if>
and di.material_id =#{mId}
and ifnull(dh.delete_flag,'0') !='1'
union all
@@ -216,6 +225,9 @@
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
)
</if>
<if test="sku != null and sku !=''">
and di.sku = #{sku}
</if>
and di.material_id = #{mId}
and ifnull(dh.delete_flag,'0') !='1') tb
</select>