1
This commit is contained in:
@@ -213,4 +213,23 @@ class OrderPrescription extends Model
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条
|
||||
* 处方疾病表
|
||||
* 处方商品表
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @param int|null $page
|
||||
* @param int|null $per_page
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getWithOne(array $params, array $fields = ["*"], int $page = null, ?int $per_page = 10): object|null
|
||||
{
|
||||
return self::with([
|
||||
"UserDoctor:doctor_id,user_name,doctor_title",
|
||||
"OrderPrescriptionIcd:prescription_icd_id,order_prescription_id,icd_name",
|
||||
"OrderPrescriptionProduct:prescription_product_id,order_prescription_id,product_name,product_spec"
|
||||
])
|
||||
->where($params)->first($fields);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user