41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace service\modules\v1\controllers;
|
|
|
|
use common\core\BaseServiceController;
|
|
use common\models\oldDb\PatientVisitRecord;
|
|
|
|
/**
|
|
* @doc-module 首页
|
|
*/
|
|
class HomeController extends BaseServiceController
|
|
{
|
|
/**
|
|
* @doc-name 精选列表
|
|
* @doc-return mixed @PatientVisitRecord{*,@DocInfo{su_id-int-服务端id,name-string-医生}} 问诊记录列表
|
|
*/
|
|
public function actionSelectList()
|
|
{
|
|
return PatientVisitRecord::find()
|
|
->where([
|
|
'su_id'=>\Yii::$app->user->identity->id
|
|
])
|
|
->with(['docInfo'=>function($query){
|
|
$query->select('su_id,name');
|
|
}])
|
|
->asArray()->orderBy(['id'=>SORT_DESC])->all();
|
|
}
|
|
|
|
/**
|
|
* @doc-name 设置精选
|
|
* @doc-return mixed @PatientVisitRecord{*} 问诊记录列表
|
|
*/
|
|
public function actionSetSelect()
|
|
{
|
|
return PatientVisitRecord::find()
|
|
->where([
|
|
'su_id'=>\Yii::$app->user->identity->id
|
|
])
|
|
->all();
|
|
}
|
|
} |