Merge branch 'master' of /mnt/git/v2.tiantianxinye.365care

master
songweizong 4 months ago
commit 7282a85561

@ -167,6 +167,7 @@ class StatisticsController extends CommonController
$start_timestamp = strtotime($month); $start_timestamp = strtotime($month);
$end_timestamp = strtotime("+1 month", strtotime($month)); $end_timestamp = strtotime("+1 month", strtotime($month));
//根据项目获取相关数据 //根据项目获取相关数据
$prev_month_balance = Balance::whereRaw("UNIX_TIMESTAMP(`created_at`) < " . $start_timestamp) $prev_month_balance = Balance::whereRaw("UNIX_TIMESTAMP(`created_at`) < " . $start_timestamp)
->whereHas("order", function ($query) use ($project_id) { ->whereHas("order", function ($query) use ($project_id) {
@ -246,14 +247,14 @@ class StatisticsController extends CommonController
->where('model_type', 'App\Admin') ->where('model_type', 'App\Admin')
->where('model_id', $userId) ->where('model_id', $userId)
->count(); ->count();
// 是否院方管理 // 是否院方管理
$roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id'); $roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id');
$yuanfang = DB::table('model_has_roles')->where('role_id', $roleId) $yuanfang = DB::table('model_has_roles')->where('role_id', $roleId)
->where('model_type', 'App\Admin') ->where('model_type', 'App\Admin')
->where('model_id', $userId) ->where('model_id', $userId)
->count(); ->count();
// 获取这个护士长病区的订单或院方管理楼栋的订单 // 获取这个护士长病区的订单或院方管理楼栋的订单
$user = auth()->user(); $user = auth()->user();
$orderIds = []; $orderIds = [];
@ -424,13 +425,13 @@ class StatisticsController extends CommonController
$hushizhang = DB::table('model_has_roles')->where('role_id', $roleId) $hushizhang = DB::table('model_has_roles')->where('role_id', $roleId)
->where('model_type', 'App\Admin') ->where('model_type', 'App\Admin')
->where('model_id', $userId)->count(); ->where('model_id', $userId)->count();
// 是否院方管理 // 是否院方管理
$roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id'); $roleId = Role::where('name', 'like', '%院方管理%')->where('guard_name', 'admin')->value('id');
$yuanfang = DB::table('model_has_roles')->where('role_id', $roleId) $yuanfang = DB::table('model_has_roles')->where('role_id', $roleId)
->where('model_type', 'App\Admin') ->where('model_type', 'App\Admin')
->where('model_id', $userId)->count(); ->where('model_id', $userId)->count();
$areaId = []; $areaId = [];
$buildingId = []; $buildingId = [];
if ($hushizhang) { if ($hushizhang) {

@ -105,7 +105,7 @@
<td class="p-1">{{ $item->order ? $item->order->contact."/".$item->order->mobile : "" }}</td> <td class="p-1">{{ $item->order ? $item->order->contact."/".$item->order->mobile : "" }}</td>
<td class="p-1">{{ $item->building->name }}</td> <td class="p-1">{{ $item->building->name }}</td>
<td class="p-1">{{ $item->area->name }}</td> <td class="p-1">{{ $item->area->name }}</td>
<td class="p-1">{{ ($item->room ? $item->room->name : "")."-".$item->bed->name }}</td> <td class="p-1">{{ ($item->room ? $item->room->name : "")."_".$item->bed->name }}</td>
<td class="p-1">{!! implode("<br>",$item->factor_texts) !!}</td> <td class="p-1">{!! implode("<br>",$item->factor_texts) !!}</td>
<td class="p-1">{{ $item->total }}</td> <td class="p-1">{{ $item->total }}</td>
<td class="p-1">{{ $item->paramedic_total }}</td> <td class="p-1">{{ $item->paramedic_total }}</td>

Loading…
Cancel
Save