优化采购统计和销售统计的查询逻辑

This commit is contained in:
季圣华
2023-03-09 21:37:13 +08:00
parent 336d818eca
commit bf8d660367
4 changed files with 63 additions and 29 deletions

View File

@@ -376,6 +376,12 @@
</foreach>
)
</if>
<if test="depotList.size()>0">
and di.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="amountApprovalFlag">
and dh.status = '1'
</if>
@@ -417,6 +423,12 @@
</foreach>
)
</if>
<if test="depotList.size()>0">
and di.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="amountApprovalFlag">
and dh.status = '1'
</if>
@@ -438,6 +450,12 @@
</foreach>
)
</if>
<if test="depotList.size()>0">
and di.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag,'0') !='1'
</select>
@@ -456,6 +474,12 @@
</foreach>
)
</if>
<if test="depotList.size()>0">
and di.depot_id in
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag,'0') !='1'
</select>