|
|
|
|
@ -26,12 +26,12 @@ class OrdersController extends CommonController
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
* path="/customer/get-projects",
|
|
|
|
|
* summary="获取项目/医院列表",
|
|
|
|
|
* description="获取项目/医院列表",
|
|
|
|
|
* summary="V2-获取医院列表",
|
|
|
|
|
* description="获取医院列表",
|
|
|
|
|
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
|
|
|
|
|
* @OA\Response(
|
|
|
|
|
* response="200",
|
|
|
|
|
* description="获取项目/医院列表",
|
|
|
|
|
* description="获取医院列表",
|
|
|
|
|
|
|
|
|
|
* )
|
|
|
|
|
* )
|
|
|
|
|
@ -39,8 +39,7 @@ class OrdersController extends CommonController
|
|
|
|
|
|
|
|
|
|
public function getProjects()
|
|
|
|
|
{
|
|
|
|
|
//todo:排序,根据客户常用、距离等因素
|
|
|
|
|
$projects = (new Project())->with(["products", "defaultProduct", "managers"])->get();
|
|
|
|
|
$projects = Project::select("id","name","address")->get();
|
|
|
|
|
return response()->json($projects->toArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -73,6 +72,28 @@ class OrdersController extends CommonController
|
|
|
|
|
return response()->json($product->toArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
* path="/customer/get-areas-by-project/{id}",
|
|
|
|
|
* summary="V2-获取医院病区",
|
|
|
|
|
* description="获取医院病区",
|
|
|
|
|
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
|
|
|
|
|
* @OA\Parameter(name="id", in="path", @OA\Schema(type="integer"), required=true, description="project id"),
|
|
|
|
|
* @OA\Response(
|
|
|
|
|
* response="200",
|
|
|
|
|
* description="获取医院床位"
|
|
|
|
|
* )
|
|
|
|
|
* )
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public function getAreasByProject($id)
|
|
|
|
|
{
|
|
|
|
|
$buildings = (new Building())->where("project_id", $id)->with(["areas" => function ($query) {
|
|
|
|
|
$query->select("id","building_id","name","myindex")->orderBy("myindex");
|
|
|
|
|
}])->select("id","name","myindex")->orderBy("myindex")->get();
|
|
|
|
|
return response()->json($buildings->toArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
* path="/customer/get-beds-by-project/{id}",
|
|
|
|
|
|