vd/app/Domains/Stats/Http/Controllers/CompanyReportController.php
2019-01-16 17:38:06 +08:00

52 lines
1.1 KiB
PHP

<?php
namespace App\Domains\Stats\Http\Controllers;
use App\Core\Controller;
use Illuminate\Http\Request;
use App\Domains\Stats\Services\CompanyReportService;
class CompanyReportController extends Controller
{
protected $request;
protected $companyReportService;
/**
* 构造函数,自动注入.
*/
public function __construct(Request $request, CompanyReportService $companyReportService)
{
$this->request = $request;
$this->companyReportService = $companyReportService;
}
/**
* 列表.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$conditions = $this->request->all();
$conditions['type'] = $this->request->ids('type');
$res = $this->companyReportService->index($conditions);
return res($res, '企业月报表', 201);
}
/**
* 统计明细.
*
* @return \Illuminate\Http\Response
*/
public function detail()
{
$conditions = $this->request->all();
$res = $this->companyReportService->detail($conditions);
return res($res, '统计明细', 201);
}
}