Your Name пре 3 година
родитељ
комит
088cf26439
3 измењених фајлова са 29 додато и 1 уклоњено
  1. 15 0
      service/agent/database/dh_order.php
  2. 11 0
      service/bill/database/goods_stat.php
  3. 3 1
      service/bill/lib/Cron.php

+ 15 - 0
service/agent/database/dh_order.php

@@ -613,6 +613,21 @@ return array
             'type' => 'count',
             'col' => '*',
         ),
+
+        'getDhNum' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'start' => array('yes-cdate', '>='),
+                'end' => array('yes-cdate', '<='),
+                'status' => array('yes', 'in'),
+                'state' => 1,
+            ),
+            'type' => 'count',
+            'col' => '*',
+        ),
+
         'getExcelAll' => array
         (
             # 匹配的正则或函数 选填项

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

@@ -132,6 +132,17 @@ return array
             'list_order' => 8,
         ),
 
+        'sell_nonum'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '已兑换未发货数量',
+            'default'   => '0',
+            'desc'      => '已兑换未发货数量',
+            'match'     => 'option',
+            'list'      => true,
+            'list_order' => 8,
+        ),
+
         'cash'      => array
         (
             'type'      => 'decimal-11,2',

+ 3 - 1
service/bill/lib/Cron.php

@@ -86,7 +86,8 @@ class Cron
             $where['start'] = $start + 86400*$i;
             $where['end'] = $start + 86400*$i + 86399;
             $goods = Dever::db('agent/member_goods')->findAll($where);
-
+            $dh_order = Dever::db('agent/dh_order')->getDhNum(array('status'=>3,'start'=>$where['start'],'end'=>$where['end'],'state'=>1));
+            // print_R($dh_order);die;
             if ($goods) {
                 foreach ($goods as $k => $v) {
                     $data = array();
@@ -101,6 +102,7 @@ class Cron
                     $data['cash'] = $v['cash'];
                     $data['price'] = $v['price'];
                     $data['name'] = $v['name'];
+                    $data['sell_nonum'] = $dh_order;
 
                     if ($info) {
                         $data['where_id'] = $info['id'];