|
@@ -12,6 +12,7 @@ class ProcessRecordsLogic extends BaseLogic |
|
@@ -12,6 +12,7 @@ class ProcessRecordsLogic extends BaseLogic |
|
12
|
public function __construct()
|
12
|
public function __construct()
|
|
13
|
{
|
13
|
{
|
|
14
|
parent::__construct();
|
14
|
parent::__construct();
|
|
|
|
15
|
+ $this->param = $this->requestAll;
|
|
15
|
$this->model = new ProcessRecords();
|
16
|
$this->model = new ProcessRecords();
|
|
16
|
}
|
17
|
}
|
|
17
|
|
18
|
|
|
@@ -53,13 +54,13 @@ class ProcessRecordsLogic extends BaseLogic |
|
@@ -53,13 +54,13 @@ class ProcessRecordsLogic extends BaseLogic |
|
53
|
return $this->success($data);
|
54
|
return $this->success($data);
|
|
54
|
}
|
55
|
}
|
|
55
|
|
56
|
|
|
56
|
- public function save($param){
|
|
|
|
57
|
- $info = $this->model->read(['project_id'=>$param['project_id']]);
|
57
|
+ public function recordSave(){
|
|
|
|
58
|
+ $info = $this->model->read(['project_id'=>$this->param['project_id']]);
|
|
58
|
$this->param['operator_id'] = $this->manager['id'];
|
59
|
$this->param['operator_id'] = $this->manager['id'];
|
|
59
|
if($info === false){
|
60
|
if($info === false){
|
|
60
|
- $res = $this->model->add($param);
|
61
|
+ $res = $this->model->add($this->param);
|
|
61
|
}else{
|
62
|
}else{
|
|
62
|
- $res = $this->model->edit($param,['id'=>$info['id']]);
|
63
|
+ $res = $this->model->edit($this->param,['id'=>$info['id']]);
|
|
63
|
}
|
64
|
}
|
|
64
|
if($res === false){
|
65
|
if($res === false){
|
|
65
|
$this->fail('保存失败');
|
66
|
$this->fail('保存失败');
|