Browse Source

查询统计》按年归档统计查询逻辑调整修复

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

+ 14 - 1
src/main/resources/mapper/selectStatisticsMapper.xml

@@ -49,7 +49,20 @@
             </foreach>
         </if>
         <if test="bgqx != null and bgqx != ''">
-            and t1.bgqx=#{bgqx}
+            <choose>
+                <when test="bgqx == 'D10' or bgqx == '005'">
+                    AND t1.bgqx in ('D10','005')
+                </when>
+                <when test="bgqx == 'D30' or bgqx == '004'">
+                    AND t1.bgqx in ('D30','004')
+                </when>
+                <when test="bgqx == 'Y'.toString() or bgqx == '001'">
+                    AND t1.bgqx in ('Y','001')
+                </when>
+                <otherwise>
+                    AND t1.bgqx = #{bgqx}
+                </otherwise>
+            </choose>
         </if>
         group by t1.gdnd
     </select>