解决首页重复统计数据的bug

This commit is contained in:
季圣华
2023-03-02 21:10:53 +08:00
parent 683538dadd
commit d70be28df7
2 changed files with 22 additions and 14 deletions

View File

@@ -455,7 +455,9 @@
</select>
<select id="inOrOutPrice" resultType="java.math.BigDecimal">
select ifnull(sum(discount_last_money),0) as allMoney from jsh_depot_head dh
select ifnull(sum(discount_last_money),0) as allMoney from
(select distinct dh.id, dh.discount_last_money
from jsh_depot_head dh
left join jsh_depot_item di on dh.id = di.header_id
where 1=1
and di.id is not null
@@ -470,11 +472,13 @@
)
</if>
and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag, '0') != '1'
and ifnull(di.delete_flag, '0') != '1') tb
</select>
<select id="inOrOutRetailPrice" resultType="java.math.BigDecimal">
select ifnull(sum(total_price),0) as allMoney from jsh_depot_head dh
select ifnull(sum(total_price),0) as allMoney from
(select distinct dh.id, dh.total_price
from jsh_depot_head dh
left join jsh_depot_item di on dh.id = di.header_id
where 1=1
and di.id is not null
@@ -489,7 +493,7 @@
)
</if>
and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag, '0') != '1'
and ifnull(di.delete_flag, '0') != '1') tb
</select>
<select id="getStockCheckSumByDepotList" resultType="java.math.BigDecimal">