新增 获取检测项目用途列表 接口

This commit is contained in:
2023-07-27 16:34:33 +08:00
parent 33c7cb98c5
commit b3d0576013
5 changed files with 129 additions and 18 deletions
+20
View File
@@ -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());
}
}