新增 获取家庭成员病情记录分组

This commit is contained in:
2023-11-22 12:03:36 +08:00
parent 45e4fa886b
commit 8207d73fea
5 changed files with 71 additions and 10 deletions
+9
View File
@@ -7,6 +7,7 @@ namespace App\Model;
use Hyperf\Database\Model\Collection;
use Hyperf\DbConnection\Db;
use Hyperf\Snowflake\Concern\Snowflake;
/**
@@ -144,4 +145,12 @@ class PatientPathography extends Model
return $data;
}
// 获取信息-分组
public static function getFamilyPathographyGroup(array $params, array $fields = ['*']): object|null
{
return self::where($params)
->groupBy(["family_id"])
->get($fields);
}
}