Browse Source

查询统计》按年归档统计查询bug修复

hanzhen 3 years ago
parent
commit
ebcebe7197
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/main/resources/mapper/selectStatisticsMapper.xml

+ 6 - 3
src/main/resources/mapper/selectStatisticsMapper.xml

@@ -48,6 +48,9 @@
                 #{item}
                 #{item}
             </foreach>
             </foreach>
         </if>
         </if>
+        <if test="bgqx != null and bgqx != ''">
+            and a.bgqx=#{bgqx}
+        </if>
         ) AS archive_count
         ) AS archive_count
              , (
              , (
             SELECT count(af.id)
             SELECT count(af.id)
@@ -62,15 +65,15 @@
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
             </if>
             </if>
+            <if test="bgqx != null and bgqx != ''">
+                and a.bgqx=#{bgqx}
+            </if>
         ) AS file_count
         ) AS file_count
         FROM tab_archives a1
         FROM tab_archives a1
         <where>
         <where>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 AND a1.gdnd BETWEEN #{startTime} AND #{endTime}
                 AND a1.gdnd BETWEEN #{startTime} AND #{endTime}
             </if>
             </if>
-            <if test="bgqx != null and bgqx != ''">
-                and a1.bgqx=#{bgqx}
-            </if>
         </where>
         </where>
         GROUP BY a1.gdnd
         GROUP BY a1.gdnd
     </select>
     </select>