|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Aside\Com; |
|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Aside\Com; |
|
11
|
|
11
|
|
|
12
|
use App\Enums\Common\Code;
|
12
|
use App\Enums\Common\Code;
|
|
13
|
use App\Http\Controllers\Aside\BaseController;
|
13
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
14
|
+use App\Http\Logic\Aside\Com\OaNoticeLogic;
|
|
14
|
use App\Models\OaNotice\OaNotice;
|
15
|
use App\Models\OaNotice\OaNotice;
|
|
15
|
use App\Models\Project\Project;
|
16
|
use App\Models\Project\Project;
|
|
16
|
use Illuminate\Support\Facades\DB;
|
17
|
use Illuminate\Support\Facades\DB;
|
|
@@ -64,6 +65,7 @@ class OaNoticeController extends BaseController |
|
@@ -64,6 +65,7 @@ class OaNoticeController extends BaseController |
|
64
|
});
|
65
|
});
|
|
65
|
}
|
66
|
}
|
|
66
|
}
|
67
|
}
|
|
|
|
68
|
+ $this->map['status'] = 0;
|
|
67
|
return $query;
|
69
|
return $query;
|
|
68
|
}
|
70
|
}
|
|
69
|
|
71
|
|
|
@@ -74,8 +76,21 @@ class OaNoticeController extends BaseController |
|
@@ -74,8 +76,21 @@ class OaNoticeController extends BaseController |
|
74
|
* @method :post
|
76
|
* @method :post
|
|
75
|
* @time :2024/6/20 10:49
|
77
|
* @time :2024/6/20 10:49
|
|
76
|
*/
|
78
|
*/
|
|
77
|
- public function save(){
|
|
|
|
78
|
- $data = [];
|
79
|
+ public function save(OaNoticeLogic $oaNoticeLogic){
|
|
|
|
80
|
+ $this->request->validate([
|
|
|
|
81
|
+ 'project_str'=>'required',
|
|
|
|
82
|
+ 'title'=>'required',
|
|
|
|
83
|
+ 'remark'=>'required',
|
|
|
|
84
|
+ 'start_time'=>'required',
|
|
|
|
85
|
+ 'end_time'=>'required',
|
|
|
|
86
|
+ ],[
|
|
|
|
87
|
+ 'project_str.required' => 'project_str不能为空',
|
|
|
|
88
|
+ 'title.required' => 'title不能为空',
|
|
|
|
89
|
+ 'remark.required' => 'remark不能为空',
|
|
|
|
90
|
+ 'start_time.required' => 'start_time不能为空',
|
|
|
|
91
|
+ 'end_time.required' => 'end_time不能为空',
|
|
|
|
92
|
+ ]);
|
|
|
|
93
|
+ $data = $oaNoticeLogic->saveOaNotice();
|
|
79
|
$this->response('success',Code::SUCCESS,$data);
|
94
|
$this->response('success',Code::SUCCESS,$data);
|
|
80
|
}
|
95
|
}
|
|
81
|
|
96
|
|
|
@@ -86,19 +101,15 @@ class OaNoticeController extends BaseController |
|
@@ -86,19 +101,15 @@ class OaNoticeController extends BaseController |
|
86
|
* @method :post
|
101
|
* @method :post
|
|
87
|
* @time :2024/6/20 10:50
|
102
|
* @time :2024/6/20 10:50
|
|
88
|
*/
|
103
|
*/
|
|
89
|
- public function status(){
|
|
|
|
90
|
- $data = [];
|
104
|
+ public function status(OaNoticeLogic $oaNoticeLogic){
|
|
|
|
105
|
+ $this->request->validate([
|
|
|
|
106
|
+ 'id'=>'required',
|
|
|
|
107
|
+ 'status'=>'required'
|
|
|
|
108
|
+ ],[
|
|
|
|
109
|
+ 'id.required' => 'ID不能为空',
|
|
|
|
110
|
+ 'status.required' => 'status不能为空'
|
|
|
|
111
|
+ ]);
|
|
|
|
112
|
+ $data = $oaNoticeLogic->statusOaNotice();
|
|
91
|
$this->response('success',Code::SUCCESS,$data);
|
113
|
$this->response('success',Code::SUCCESS,$data);
|
|
92
|
}
|
114
|
}
|
|
93
|
-
|
|
|
|
94
|
- /**
|
|
|
|
95
|
- * @remark :删除数据
|
|
|
|
96
|
- * @name :del
|
|
|
|
97
|
- * @author :lyh
|
|
|
|
98
|
- * @method :post
|
|
|
|
99
|
- * @time :2024/6/20 10:50
|
|
|
|
100
|
- */
|
|
|
|
101
|
- public function del(){
|
|
|
|
102
|
- $this->response('success');
|
|
|
|
103
|
- }
|
|
|
|
104
|
} |
115
|
} |