|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Aside\Com; |
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Com\OaNoticeLogic;
|
|
|
|
use App\Models\OaNotice\OaNotice;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -64,6 +65,7 @@ class OaNoticeController extends BaseController |
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->map['status'] = 0;
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -74,8 +76,21 @@ class OaNoticeController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2024/6/20 10:49
|
|
|
|
*/
|
|
|
|
public function save(){
|
|
|
|
$data = [];
|
|
|
|
public function save(OaNoticeLogic $oaNoticeLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_str'=>'required',
|
|
|
|
'title'=>'required',
|
|
|
|
'remark'=>'required',
|
|
|
|
'start_time'=>'required',
|
|
|
|
'end_time'=>'required',
|
|
|
|
],[
|
|
|
|
'project_str.required' => 'project_str不能为空',
|
|
|
|
'title.required' => 'title不能为空',
|
|
|
|
'remark.required' => 'remark不能为空',
|
|
|
|
'start_time.required' => 'start_time不能为空',
|
|
|
|
'end_time.required' => 'end_time不能为空',
|
|
|
|
]);
|
|
|
|
$data = $oaNoticeLogic->saveOaNotice();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -86,19 +101,15 @@ class OaNoticeController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2024/6/20 10:50
|
|
|
|
*/
|
|
|
|
public function status(){
|
|
|
|
$data = [];
|
|
|
|
public function status(OaNoticeLogic $oaNoticeLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>'required',
|
|
|
|
'status'=>'required'
|
|
|
|
],[
|
|
|
|
'id.required' => 'ID不能为空',
|
|
|
|
'status.required' => 'status不能为空'
|
|
|
|
]);
|
|
|
|
$data = $oaNoticeLogic->statusOaNotice();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除数据
|
|
|
|
* @name :del
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/6/20 10:50
|
|
|
|
*/
|
|
|
|
public function del(){
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|