|
...
|
...
|
@@ -66,12 +66,12 @@ class UpgradeProjectCount extends Command |
|
|
|
$res = $this->inquiry($url,$v['month']);
|
|
|
|
$arr['month_total'] = 0;
|
|
|
|
if(isset($res['data']['count'])){
|
|
|
|
$arr['month_total'] = $res['data']['count'];
|
|
|
|
//获取上一个的count
|
|
|
|
$previousMonth = date('Y-m', strtotime($v['month'] . ' -1 month'));
|
|
|
|
$previousInfo = $monthCountModel->read(['month'=>$previousMonth,'project_id'=>$project_id]);
|
|
|
|
if($previousInfo === false){
|
|
|
|
$arr['total'] = $res['data']['count'];
|
|
|
|
$arr['month_total'] = $res['data']['count'];
|
|
|
|
$arr['total'] = $arr['month_total'];
|
|
|
|
}else{
|
|
|
|
$arr['total'] = $res['data']['count'] + $previousInfo['month_total'] ?? 0;
|
|
|
|
}
|
...
|
...
|
|