|
...
|
...
|
@@ -12,6 +12,7 @@ namespace App\Http\Logic\Aside\Com; |
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Manage\Manage;
|
|
|
|
use App\Models\OaNotice\OaNotice;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
|
|
|
|
class OaNoticeLogic extends BaseLogic
|
|
|
|
{
|
|
...
|
...
|
@@ -34,6 +35,10 @@ class OaNoticeLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function saveOaNotice(){
|
|
|
|
$this->param['operator_id'] = $this->manager['id'];
|
|
|
|
$project_str = trim($this->param['project_str'],',');
|
|
|
|
if($project_str != 'all'){
|
|
|
|
$this->param['project_str'] = ','.$project_str.',';
|
|
|
|
}
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$id = $this->param['id'];
|
|
|
|
$this->model->edit($this->param,['id'=>$id]);
|
|
...
|
...
|
@@ -68,6 +73,13 @@ class OaNoticeLogic extends BaseLogic |
|
|
|
if($info == false){
|
|
|
|
$this->fail('当前数据不存在或已被删除');
|
|
|
|
}
|
|
|
|
$info['project_str'] = trim($info['project_str'],',');
|
|
|
|
if(strtolower($info['project_str']) != 'all'){
|
|
|
|
$projectModel = new Project();
|
|
|
|
$info['project_title'] = $projectModel->formatQuery(['id'=>['in',explode(',',$info['project_str'])]])->pluck('title')->toArray();
|
|
|
|
}else{
|
|
|
|
$info['project_title'] = '所有';
|
|
|
|
}
|
|
|
|
$info['operator_name'] = (new Manage())->getName($info['operator_id']);
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
...
|
...
|
|