Browse Source

删除设备删除对应的巡检任务

2 years ago
parent
commit
f1bed236d6
1 changed files with 9 additions and 3 deletions
  1. 9 3
      platform-dao/src/main/resources/mapper/sb/SbInfoMapper.xml

+ 9 - 3
platform-dao/src/main/resources/mapper/sb/SbInfoMapper.xml

@@ -853,9 +853,15 @@ sb.scrap_user_name,sb.repair_dept_id,sb.sort_num
     <select id="selectCountMap" parameterType="com.platform.dao.dto.sb.SbInfoDTO"
             resultType="java.util.Map">
         select count(*) as num, type_id as typeId from t_sb_info
-        <if test="useType != null">
-            where use_type = #{useType}
-        </if>
+        <where>
+            <if test="useType != null">
+                and use_type = #{useType}
+            </if>
+            <if test="typeId!=null">
+                and type_id = #{typeId}
+            </if>
+        </where>
+
         GROUP BY type_id
     </select>