解决出入库统计报表计算的bug

This commit is contained in:
jishenghua
2024-04-15 13:52:58 +08:00
parent f2fe0ab84f
commit 1531155c7c
5 changed files with 74 additions and 9 deletions

View File

@@ -417,7 +417,7 @@
</select>
<select id="findInOutDetailStatistic" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select sum(di.oper_number) operNumber, sum(di.all_price) allPrice
select ifnull(sum(di.oper_number),0) operNumber, ifnull(sum(di.all_price),0) allPrice
from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
@@ -610,7 +610,7 @@
</select>
<select id="findInOutMaterialCountStatistic" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select sum(di.basic_number) numSum, sum(di.all_price) priceSum
select ifnull(sum(di.basic_number),0) numSum, ifnull(sum(di.all_price),0) priceSum
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 m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
@@ -780,7 +780,7 @@
</select>
<select id="findAllocationStatistic" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select sum(di.oper_number) operNumber, sum(di.all_price) allPrice
select ifnull(sum(di.oper_number),0) operNumber, ifnull(sum(di.all_price),0) allPrice
from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'