|
...
|
...
|
@@ -12,6 +12,7 @@ class ProcessRecordsLogic extends BaseLogic |
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
$this->model = new ProcessRecords();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -53,13 +54,13 @@ class ProcessRecordsLogic extends BaseLogic |
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function save($param){
|
|
|
|
$info = $this->model->read(['project_id'=>$param['project_id']]);
|
|
|
|
public function recordSave(){
|
|
|
|
$info = $this->model->read(['project_id'=>$this->param['project_id']]);
|
|
|
|
$this->param['operator_id'] = $this->manager['id'];
|
|
|
|
if($info === false){
|
|
|
|
$res = $this->model->add($param);
|
|
|
|
$res = $this->model->add($this->param);
|
|
|
|
}else{
|
|
|
|
$res = $this->model->edit($param,['id'=>$info['id']]);
|
|
|
|
$res = $this->model->edit($this->param,['id'=>$info['id']]);
|
|
|
|
}
|
|
|
|
if($res === false){
|
|
|
|
$this->fail('保存失败');
|
...
|
...
|
|