|
@@ -55,9 +55,33 @@ class BimController extends Controller
|
|
|
return BimCombineResource::collection($bimCombines);
|
|
|
}
|
|
|
|
|
|
- // 碰撞检测
|
|
|
- public function initiateCollision()
|
|
|
+ //删除合模
|
|
|
+ public function combineDelete(int $combineId)
|
|
|
{
|
|
|
+ $bimCombine = BimCombine::query()->allowed()->where('id', $combineId)->firstOrFail();
|
|
|
+ $bimCombine->delete();
|
|
|
|
|
|
+ return $this->noContent();
|
|
|
}
|
|
|
+
|
|
|
+ //修改合模
|
|
|
+ public function combineUpdate(Request $request, int $combineId)
|
|
|
+ {
|
|
|
+ $inputArr = $this->validate($request, [
|
|
|
+ 'name' => 'required',
|
|
|
+ 'data' => 'required|array',
|
|
|
+ 'data.*.bim_file_id' => 'required',
|
|
|
+ ]);
|
|
|
+ $bimCombine = BimCombine::query()->allowed()->where('id', $combineId)->firstOrFail();
|
|
|
+
|
|
|
+ $bimCombine->update([
|
|
|
+ 'name' => $inputArr['name'],
|
|
|
+ 'data' => $inputArr['data']
|
|
|
+ ]);
|
|
|
+
|
|
|
+ return new BimCombineResource($bimCombine);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 碰撞检测
|
|
|
+ public function initiateCollision() {}
|
|
|
}
|