正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
| @@ -11,6 +11,7 @@ namespace App\Http\Controllers\Aside\Optimize; | @@ -11,6 +11,7 @@ namespace App\Http\Controllers\Aside\Optimize; | ||
| 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\Models\Project\OptimizeCheckList; | ||
| 14 | use App\Models\Project\OptimizeCheckLog; | 15 | use App\Models\Project\OptimizeCheckLog; |
| 15 | use Illuminate\Http\Request; | 16 | use Illuminate\Http\Request; |
| 16 | 17 | ||
| @@ -44,6 +45,7 @@ class CheckLogController extends BaseController | @@ -44,6 +45,7 @@ class CheckLogController extends BaseController | ||
| 44 | ]); | 45 | ]); |
| 45 | $field = ['id','check_id','date','status','images','result','created_at']; | 46 | $field = ['id','check_id','date','status','images','result','created_at']; |
| 46 | $this->map['status'] = 1; | 47 | $this->map['status'] = 1; |
| 48 | + $this->map['type'] = $this->map['type'] ?? 1; | ||
| 47 | $lists = $this->model->lists($this->map,$this->page,$this->row,'id',$field); | 49 | $lists = $this->model->lists($this->map,$this->page,$this->row,'id',$field); |
| 48 | $this->response('success',Code::SUCCESS,$lists); | 50 | $this->response('success',Code::SUCCESS,$lists); |
| 49 | } | 51 | } |
| @@ -80,6 +82,11 @@ class CheckLogController extends BaseController | @@ -80,6 +82,11 @@ class CheckLogController extends BaseController | ||
| 80 | 'project_id.required' => 'project_id不能为空', 'check_id.required' => '问题id不能为空', | 82 | 'project_id.required' => 'project_id不能为空', 'check_id.required' => '问题id不能为空', |
| 81 | 'date.required' => '时间不能为空', 'result.required' => '检查结果不能为空', | 83 | 'date.required' => '时间不能为空', 'result.required' => '检查结果不能为空', |
| 82 | ]); | 84 | ]); |
| 85 | + $checkListModel = new OptimizeCheckList(); | ||
| 86 | + $listInfo = $checkListModel->read(['id'=>$this->param['check_id']],['id','type']); | ||
| 87 | + if($listInfo !== false){ | ||
| 88 | + $this->map['type'] = $listInfo['type']; | ||
| 89 | + } | ||
| 83 | $this->param = $this->model->saveHandleParam($this->param,$this->manage['id']); | 90 | $this->param = $this->model->saveHandleParam($this->param,$this->manage['id']); |
| 84 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 91 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 85 | $id = $this->param['id']; | 92 | $id = $this->param['id']; |
-
请 注册 或 登录 后发表评论