|
@@ -1741,7 +1741,11 @@ class Order
|
|
|
|
|
|
$db = Dever::db('agent/test:old');
|
|
|
|
|
|
- $header = array('姓名', '手机号', '身份证号', '注册日期', '角色', '代理金额', '直推奖励合计', '直推月度奖励');
|
|
|
+ $header = array('姓名', '手机号', '身份证号', '注册日期', '角色', '代理金额', '直推奖励合计');
|
|
|
+
|
|
|
+ $month_config = array('2021-08', '2021-09', '2021-10', '2021-11','2021-12', '2022-01', '2022-02', '2022-03', '2022-04','2022-05','2022-06');
|
|
|
+
|
|
|
+ $header = array_merge($header, $month_config);
|
|
|
|
|
|
$body = array();
|
|
|
foreach($data as $k => $v){
|
|
@@ -1764,7 +1768,7 @@ class Order
|
|
|
$bill = Dever::db('bill/cash')->select(array('mid' => $v['mid'], 'type' => 1));
|
|
|
if ($bill) {
|
|
|
foreach ($bill as $k1 => $v1) {
|
|
|
- $time = date('Y年m月', $v1['cdate']);
|
|
|
+ $time = date('Y-m', $v1['cdate']);
|
|
|
if (!isset($month[$time])) {
|
|
|
$month[$time] = 0;
|
|
|
}
|
|
@@ -1783,7 +1787,7 @@ class Order
|
|
|
}
|
|
|
if (isset($record) && $record) {
|
|
|
foreach ($record as $k1 => $v1) {
|
|
|
- $time = date('Y年m月', $v1['createtime']);
|
|
|
+ $time = date('Y-m', $v1['createtime']);
|
|
|
if (!isset($month[$time])) {
|
|
|
$month[$time] = 0;
|
|
|
}
|
|
@@ -1794,17 +1798,9 @@ class Order
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (isset($month) && $month) {
|
|
|
- foreach ($month as $k2 => $v2) {
|
|
|
- $month_cash[] = $k2 . ':' . $v2;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (!$cash) {
|
|
|
$cash = 0;
|
|
|
}
|
|
|
-
|
|
|
- $month_cash = implode(',', $month_cash);
|
|
|
|
|
|
$d = array
|
|
|
(
|
|
@@ -1815,8 +1811,15 @@ class Order
|
|
|
$role_name,
|
|
|
$v['agent_cash'],
|
|
|
$cash,
|
|
|
- $month_cash,
|
|
|
);
|
|
|
+
|
|
|
+ foreach ($month_config as $k2 => $v2) {
|
|
|
+ if (isset($month[$v2]) && $month[$v2]) {
|
|
|
+ $d[] = $month[$v2];
|
|
|
+ } else {
|
|
|
+ $d[] = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$body[] = $d;
|
|
|
}
|