|
@@ -217,7 +217,7 @@ class Report extends Base
|
|
|
->leftJoin('company_item ci', 'ci.id=du.itemid AND ci.is_del=0')
|
|
|
->where($where)
|
|
|
->order('addtime,itemid')
|
|
|
- ->field('DATE_FORMAT(po.addtime,"%Y-%m-%d") addtime,SUM(po.total_fee) total_fee,SUM(po.good_num) good_num,du.itemid,ci.name,"" wait_total_fee,"" wait_good_num')
|
|
|
+ ->field('DATE_FORMAT(po.addtime,"%Y-%m-%d") addtime,SUM(po.total_fee) total_fee,COUNT(po.id) total_num,du.itemid,ci.name,"" wait_total_fee,"" wait_total_num')
|
|
|
->group('addtime,du.itemid')
|
|
|
->count();
|
|
|
|
|
@@ -227,7 +227,7 @@ class Report extends Base
|
|
|
->leftJoin('company_item ci', 'ci.id=du.itemid AND ci.is_del=0')
|
|
|
->where($where)
|
|
|
->order('addtime,itemid')
|
|
|
- ->field('DATE_FORMAT(po.addtime,"%Y-%m-%d") addtime,SUM(po.total_fee) total_fee,SUM(po.good_num) good_num,po.status,du.itemid,ci.name,"" wait_total_fee,"" wait_good_num')
|
|
|
+ ->field('DATE_FORMAT(po.addtime,"%Y-%m-%d") addtime,SUM(po.total_fee) total_fee,COUNT(po.id) total_num,po.status,du.itemid,ci.name,"" wait_total_fee,"" wait_total_num')
|
|
|
->page($param['page'], $param['size'])
|
|
|
->group('addtime,du.itemid,po.status')
|
|
|
->cursor();
|
|
@@ -241,18 +241,18 @@ class Report extends Base
|
|
|
'itemid' => $value['itemid'],
|
|
|
'name' => $value['name'],
|
|
|
'total_fee' => 0,
|
|
|
- 'good_num' => 0,
|
|
|
+ 'total_num' => 0,
|
|
|
'wait_total_fee' => 0,
|
|
|
- 'wait_good_num' => 0,
|
|
|
+ 'wait_total_num' => 0,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
if ($value['status'] == 0) {
|
|
|
$data[$value['addtime']][$value['itemid']]['wait_total_fee'] += $value['total_fee'];
|
|
|
- $data[$value['addtime']][$value['itemid']]['wait_good_num'] += $value['good_num'];
|
|
|
+ $data[$value['addtime']][$value['itemid']]['wait_total_num'] += $value['total_num'];
|
|
|
} else {
|
|
|
$data[$value['addtime']][$value['itemid']]['total_fee'] += $value['total_fee'];
|
|
|
- $data[$value['addtime']][$value['itemid']]['good_num'] += $value['good_num'];
|
|
|
+ $data[$value['addtime']][$value['itemid']]['total_num'] += $value['total_num'];
|
|
|
}
|
|
|
|
|
|
}
|