作者 lyh

gx

@@ -15,6 +15,7 @@ use App\Models\Project\Project; @@ -15,6 +15,7 @@ use App\Models\Project\Project;
15 use App\Services\ProjectServer; 15 use App\Services\ProjectServer;
16 use Illuminate\Console\Command; 16 use Illuminate\Console\Command;
17 use Illuminate\Support\Facades\DB; 17 use Illuminate\Support\Facades\DB;
  18 +use App\Models\HomeCount\MonthCount AS MonthCountModel;
18 19
19 class MonthCount extends Command 20 class MonthCount extends Command
20 { 21 {
@@ -102,7 +103,7 @@ class MonthCount extends Command @@ -102,7 +103,7 @@ class MonthCount extends Command
102 ->groupBy('month')->get()->toArray(); 103 ->groupBy('month')->get()->toArray();
103 foreach ($list as $k=>$v){ 104 foreach ($list as $k=>$v){
104 $v = (array)$v; 105 $v = (array)$v;
105 - $monthCountModel = new MonthCount(); 106 + $monthCountModel = new MonthCountModel();
106 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); 107 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
107 // 获取当月开始时间 108 // 获取当月开始时间
108 $start = date('Y-m-01', strtotime($v['month'])); 109 $start = date('Y-m-01', strtotime($v['month']));