Browse Source

[CODE]: 优化图表查询sql

maxianghua 4 years ago
parent
commit
4e05fce278

+ 3 - 3
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -341,7 +341,7 @@
             GROUP BY
                 f_goodsid
             ORDER BY
-                f_qtyblc DESC
+                sum( f_qtyblc ) DESC
             LIMIT 5
             ) t ON g.f_id = t.f_goodsid
     </select>
@@ -362,7 +362,7 @@
             GROUP BY
                 f_warehouseid
             ORDER BY
-            f_qtyblc DESC
+                sum( f_qtyblc ) DESC
             ) t ON w.f_id = t.f_warehouseid
     </select>
 
@@ -382,7 +382,7 @@
             GROUP BY
                 f_corpid
             ORDER BY
-                f_qtyblc DESC
+                sum( f_qtyblc ) DESC
             LIMIT 7
             ) t ON c.f_id = t.f_corpid
     </select>