rabin 3 years ago
parent
commit
10c2bec653
1 changed files with 19 additions and 0 deletions
  1. 19 0
      service/bill/database/goods_stat.php

+ 19 - 0
service/bill/database/goods_stat.php

@@ -206,5 +206,24 @@ return array
             'group' => '(case when type = 2 then concat_ws("_", type, type_id) else concat_ws("_", type, type_id, sku_id) end)',
             'col' => '*,sum(total_num) as total_num, sum(sell_num) as sell_num, sum(cash) as cash',
         ),
+
+        'all' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'type' => 'yes',
+                'type_id' => 'yes',
+                'sku_id' => 'yes',
+                'start_day' => array('yes-day', '>='),
+                'end_day' => array('yes-day', '<='),
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('day' => 'desc', 'cdate' => 'desc'),
+            'page' => array(20, 'list'),
+            'group' => '(case when type = 2 then concat_ws("_", type, type_id) else concat_ws("_", type, type_id, sku_id) end)',
+            'col' => '*,sum(total_num) as total_num, sum(sell_num) as sell_num, sum(cash) as cash',
+        ),
     ),
 );