|
|
|
@ -36,7 +36,11 @@ class WorkorderController extends AdminController |
|
|
|
$userList = $msgList = []; |
|
|
|
|
|
|
|
$workorder = \App\Models\Workorder::query() |
|
|
|
->with(['point','publisher']) |
|
|
|
->with(['point' => function($query) { |
|
|
|
$query->withTrashed(); |
|
|
|
},'publisher' => function($query) { |
|
|
|
$query->withTrashed(); |
|
|
|
}]) |
|
|
|
->withCount(['items' => function($query) { |
|
|
|
$query->where('is_read', 0) |
|
|
|
->where('point_id',Admin::user()->id) |
|
|
|
@ -70,7 +74,9 @@ class WorkorderController extends AdminController |
|
|
|
} |
|
|
|
|
|
|
|
$workorderItem = WorkorderItem::query() |
|
|
|
->with(['publisher']) |
|
|
|
->with(['publisher' => function($query) { |
|
|
|
$query->withTrashed(); |
|
|
|
}]) |
|
|
|
->where('workorder_id',$workorderId) |
|
|
|
->get(); |
|
|
|
|
|
|
|
|