|
|
@@ -18,6 +18,12 @@ class ObligationService
|
|
|
{
|
|
|
return Obligation::query()->select($column)->get();
|
|
|
}
|
|
|
+ public function getDepartmentIds($owner_id): array
|
|
|
+ {
|
|
|
+ return DepartmentObligationOwner::query()
|
|
|
+ ->where('owner_id',$owner_id)
|
|
|
+ ->whereNull('failure_time')->pluck('department_id')->toArray();
|
|
|
+ }
|
|
|
public function recombineCodeIdArr(){
|
|
|
$obligations=$this->getSelection()->toArray();
|
|
|
return array_combine(array_column($obligations, 'code'), array_column($obligations, 'id'));
|