Sfoglia il codice sorgente

服务单元概览报表修改

wangliang 1 anno fa
parent
commit
90a94fc817

+ 1 - 6
sop-business/src/main/resources/mapper/ServiceAnalyseMapper.xml

@@ -27,13 +27,8 @@
     <select id="equipmentOutboundTotal" resultType="java.util.Map">
         SELECT
             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
-        <where>
-            <if test="serviceUnitId != null and serviceUnitId != ''">
-                and io.service_id = #{serviceUnitId}
-            </if>
-        </where>
     </select>
 
     <select id="projectProgress" resultType="java.util.Map">