新增 获取检测项目用途列表 接口
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Services;
|
||||
use App\Model\Area;
|
||||
use App\Model\BasicCompany;
|
||||
use App\Model\DetectionProject;
|
||||
use App\Model\DetectionProjectPurpose;
|
||||
use App\Model\UserDoctor;
|
||||
use App\Model\UserLocation;
|
||||
|
||||
@@ -237,4 +238,23 @@ class DetectionService extends BaseService
|
||||
|
||||
return success($response_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测项目用途列表
|
||||
* @return array
|
||||
*/
|
||||
public function getDetectionProjectPurposeList(): array
|
||||
{
|
||||
$detection_project_id = $this->request->input("detection_project_id",1);
|
||||
|
||||
// 获取项目数据
|
||||
$params = array();
|
||||
$params['detection_project_id'] = $detection_project_id;
|
||||
$detection_project_purpose = DetectionProjectPurpose::getList($params);
|
||||
if (empty($detection_project_purpose)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
return success($detection_project_purpose->toArray());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user