From 5db7d62c7e87e8a74c1f1065055d1b26800c38eb Mon Sep 17 00:00:00 2001 From: weizong song Date: Wed, 3 Dec 2025 10:46:55 +0800 Subject: [PATCH] up --- app/Http/Controllers/Admin/StatisticsController.php | 9 +++++---- resources/views/admin/statistics/salary.blade.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index be425f8..3363608 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -167,6 +167,7 @@ class StatisticsController extends CommonController $start_timestamp = strtotime($month); $end_timestamp = strtotime("+1 month", strtotime($month)); + //根据项目获取相关数据 $prev_month_balance = Balance::whereRaw("UNIX_TIMESTAMP(`created_at`) < " . $start_timestamp) ->whereHas("order", function ($query) use ($project_id) { @@ -246,14 +247,14 @@ class StatisticsController extends CommonController ->where('model_type', 'App\Admin') ->where('model_id', $userId) ->count(); - + // 是否院方管理 $roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id'); $yuanfang = DB::table('model_has_roles')->where('role_id', $roleId) ->where('model_type', 'App\Admin') ->where('model_id', $userId) ->count(); - + // 获取这个护士长病区的订单或院方管理楼栋的订单 $user = auth()->user(); $orderIds = []; @@ -424,13 +425,13 @@ class StatisticsController extends CommonController $hushizhang = DB::table('model_has_roles')->where('role_id', $roleId) ->where('model_type', 'App\Admin') ->where('model_id', $userId)->count(); - + // 是否院方管理 $roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id'); $yuanfang = DB::table('model_has_roles')->where('role_id', $roleId) ->where('model_type', 'App\Admin') ->where('model_id', $userId)->count(); - + $areaId = []; $buildingId = []; if ($hushizhang) { diff --git a/resources/views/admin/statistics/salary.blade.php b/resources/views/admin/statistics/salary.blade.php index dcbb29c..3e55666 100755 --- a/resources/views/admin/statistics/salary.blade.php +++ b/resources/views/admin/statistics/salary.blade.php @@ -105,7 +105,7 @@ {{ $item->order ? $item->order->contact."/".$item->order->mobile : "" }} {{ $item->building->name }} {{ $item->area->name }} - {{ ($item->room ? $item->room->name : "")."-".$item->bed->name }} + {{ ($item->room ? $item->room->name : "")."_".$item->bed->name }} {!! implode("
",$item->factor_texts) !!} {{ $item->total }} {{ $item->paramedic_total }}