|
@@ -243,7 +243,7 @@ class OaService extends Service
|
|
$id = $oa->id;
|
|
$id = $oa->id;
|
|
$insert = [];
|
|
$insert = [];
|
|
|
|
|
|
- $oa_sub_id = OaSub::where('oa_id', $id)->pluck('id')->toArray();
|
|
|
|
|
|
+ $oa_sub_id = OaSub::where('oa_id', $id)->where('del_time',0)->pluck('id')->toArray();
|
|
OaSub::where('oa_id', $id)->update([
|
|
OaSub::where('oa_id', $id)->update([
|
|
'del_time' => time()
|
|
'del_time' => time()
|
|
]);
|
|
]);
|
|
@@ -339,8 +339,8 @@ class OaService extends Service
|
|
$n++;
|
|
$n++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- OaSubRule::where('oa_sub_id', $oa_sub_id)->delete();
|
|
|
|
- OaSubEmployee::where('oa_sub_id', $oa_sub_id)->delete();
|
|
|
|
|
|
+ OaSubRule::wherein('oa_sub_id', $oa_sub_id)->delete();
|
|
|
|
+ OaSubEmployee::wherein('oa_sub_id', $oa_sub_id)->delete();
|
|
OaSubRule::insert($set_list);
|
|
OaSubRule::insert($set_list);
|
|
OaSubEmployee::insert($employee_list);
|
|
OaSubEmployee::insert($employee_list);
|
|
if (!empty($report_list)) OaSubReportEmployee::insert($report_list);
|
|
if (!empty($report_list)) OaSubReportEmployee::insert($report_list);
|
|
@@ -598,7 +598,7 @@ class OaService extends Service
|
|
'state' => $state,
|
|
'state' => $state,
|
|
'remark' => $remark,
|
|
'remark' => $remark,
|
|
]);
|
|
]);
|
|
- $this->report($oaOrder, $detail['oa_sub_id']);
|
|
|
|
|
|
+ $this->report($oaOrder, $detail['oa_sub_id'],$user_id);
|
|
DB::commit();
|
|
DB::commit();
|
|
return [true, '操作成功!'];
|
|
return [true, '操作成功!'];
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
@@ -832,4 +832,9 @@ class OaService extends Service
|
|
->select('oo.*','o.id as sid','o.check')->get()->toArray();
|
|
->select('oo.*','o.id as sid','o.check')->get()->toArray();
|
|
return [true,['total'=>count($list),'list'=>$list]];
|
|
return [true,['total'=>count($list),'list'=>$list]];
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function reportTime($data){
|
|
|
|
+
|
|
|
|
+ return [true,['time'=>'20小时10分钟']];
|
|
|
|
+ }
|
|
}
|
|
}
|