RatingLogic.php
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @remark :
* @name :RatingLogic.php
* @author :lyh
* @method :post
* @time :2024/1/20 14:15
*/
namespace App\Http\Logic\Bside\Scoring;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Scoring\RatingQuestion;
use App\Models\Scoring\ScoringSystem;
class RatingLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new RatingQuestion();
$this->scoringModel = new ScoringSystem();
$this->param = $this->requestAll;
}
/**
* @remark :获取详情
* @name :getRatingRead
* @author :lyh
* @method :post
* @time :2024/1/20 14:27
*/
public function getRatingRead(){
$data = [
'company'=>$this->project['company'],
'mobile'=>$this->project['mobile'],
'uptime'=>$this->project['uptime'],
'domain'=>$this->user['domain'],
'question'=>$this->model->list(),
];
return $this->success($data);
}
/**
* @remark :提交统计
* @name :ratingSave
* @author :lyh
* @method :post
* @time :2024/1/20 14:46
*/
public function ratingSave(){
$param = [
'data'=>$this->param['data'],
'mobile'=>$this->param['mobile'],
'project_id'=>$this->user['project_id'],
];
return $this->scoringModel->add($param);
}
}