fixed 任务提交

This commit is contained in:
chenbo 2023-10-19 09:45:59 +08:00
parent 8fb9aeddbe
commit 170bf379ae

View File

@ -403,23 +403,24 @@ class TaskController extends BaseApiController
$this->fail('任务不存在');
}
$extend = [];
$remark = '';
$stage = $parmas['stage']; // 当前做的是任务第几阶段
$extend['stage'] = $stage;
if ($stage == 1) {
$extend['stage1']['file'] = $parmas['stage1'];
$extend['stage1']['remark'] = $parmas['remark'];
$remark = $extend['stage1']['remark'];
}
if ($stage == 2) {
$extend['stage2']['file'] = $parmas['stage2'];
$extend['stage2']['remark'] = $parmas['remark'];
$remark = $extend['stage2']['remark'];
}
if ($stage == 3) {
$extend['stage3']['file'] = $parmas['stage3'];
$extend['stage3']['remark'] = $parmas['remark'];
$remark = $extend['stage3']['remark'];
}
if ($stage == 4) {
$extend['stage4']['file'] = $parmas['stage4'];
$extend['stage4']['remark'] = $parmas['remark'];
$remark = $extend['stage4']['remark'];
}
// Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time(), 'director_uid'=>$this->userId]); // director_uid 指派人
@ -442,7 +443,7 @@ class TaskController extends BaseApiController
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
$approveModel->other_type = 6;
$approveModel->extend = json_encode($extend);
$approveModel->remark = $parmas['remark'];
$approveModel->remark = $remark;
$approveModel->create_time = time();
$approveModel->update_time = time();
$re = $approveModel->save();