|
@@ -27,13 +27,8 @@
|
|
<select id="equipmentOutboundTotal" resultType="java.util.Map">
|
|
<select id="equipmentOutboundTotal" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
IFNULL(sum(case when io.status = 'NORMAL' then 1 else 0 end),0) deviceSum,
|
|
IFNULL(sum(case when io.status = 'NORMAL' then 1 else 0 end),0) deviceSum,
|
|
- IFNULL(sum(case when io.type = 'OUT' then 1 else 0 end),0) outs
|
|
|
|
|
|
+ IFNULL(sum(case when io.type = 'OUT' and io.service_id = #{serviceUnitId} then 1 else 0 end),0) outs
|
|
from t_b_device_in_out io
|
|
from t_b_device_in_out io
|
|
- <where>
|
|
|
|
- <if test="serviceUnitId != null and serviceUnitId != ''">
|
|
|
|
- and io.service_id = #{serviceUnitId}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="projectProgress" resultType="java.util.Map">
|
|
<select id="projectProgress" resultType="java.util.Map">
|