Commit da8f1f80 authored by xixinzhao's avatar xixinzhao

修改建筑装备统计不包含批量管理的装备

parent c1ad9392
...@@ -353,7 +353,9 @@ ...@@ -353,7 +353,9 @@
</select> </select>
<select id="getEquipmentCount" resultType="Long"> <select id="getEquipmentCount" resultType="Long">
select select
if(sum(sto.amount) is null,0,sum(sto.amount)) as count from -- IF ( sum( sto.amount ) IS NULL, 0, sum( sto.amount ) ) AS count
count(1)
from
wl_stock_detail as sto wl_stock_detail as sto
left join wl_warehouse_structure as war on sto.warehouse_structure_id = war.id left join wl_warehouse_structure as war on sto.warehouse_structure_id = war.id
where war.source_id in( where war.source_id in(
...@@ -523,11 +525,12 @@ ...@@ -523,11 +525,12 @@
</select> </select>
<select id="getEquipCount" resultType="java.lang.Long"> <select id="getEquipCount" resultType="java.lang.Long">
SELECT SELECT
IF ( -- IF (
sum(sto.amount) IS NULL, -- sum(sto.amount) IS NULL,
0, -- 0,
sum(sto.amount) -- sum(sto.amount)
) AS count -- ) AS count
count( 1 )
FROM FROM
wl_stock_detail AS sto wl_stock_detail AS sto
LEFT JOIN wl_warehouse_structure AS war ON sto.warehouse_structure_id = war.id LEFT JOIN wl_warehouse_structure AS war ON sto.warehouse_structure_id = war.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment