You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.7 KiB
65 lines
1.7 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
// +----------------------------------------------------------------------
|
|
// | 官方网址:https://www.niucloud.com
|
|
// +----------------------------------------------------------------------
|
|
// | niucloud团队 版权所有 开源版本可自由商用
|
|
// +----------------------------------------------------------------------
|
|
// | Author: Niucloud Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\api\controller\apiController;
|
|
|
|
use app\Request;
|
|
use app\service\api\apiService\ChatService;
|
|
use app\service\api\apiService\PhysicalTestService;
|
|
use core\base\BaseApiService;
|
|
|
|
/**
|
|
* 体测报告-控制器相关接口
|
|
* Class Personnel
|
|
* @package app\api\controller\apiController
|
|
*/
|
|
class PhysicalTest extends BaseApiService
|
|
{
|
|
|
|
//列表
|
|
public function index(Request $request)
|
|
{
|
|
$resource_id = $request->param('resource_id', '');//学生资源表id
|
|
if (empty($resource_id)) {
|
|
return fail('缺少参数');
|
|
}
|
|
|
|
$where = [
|
|
'resource_id' => $resource_id,
|
|
];
|
|
|
|
$res = (new PhysicalTestService())->getList($where);
|
|
|
|
return success($res);
|
|
}
|
|
|
|
//详情
|
|
public function info(Request $request)
|
|
{
|
|
$id = $request->param('id', '');//体测报告的id
|
|
|
|
if (empty($id)) {
|
|
return fail('缺少参数');
|
|
}
|
|
|
|
$where = [
|
|
'id' => $id,
|
|
];
|
|
|
|
$res = (new PhysicalTestService())->getInfo($where);
|
|
|
|
if(!$res['code']){
|
|
return fail($res['msg']);
|
|
}
|
|
|
|
return success($res['data']);
|
|
}
|
|
}
|
|
|