其他任务提交接口新增视频列表,详情接口新增审批状态和拒绝原因

This commit is contained in:
chenbo 2023-09-16 10:19:52 +08:00
parent 9b8f288ee1
commit 03af4b59d2

View File

@ -213,6 +213,9 @@ class TaskController extends BaseApiController
public function other_task_detail(){ public function other_task_detail(){
$parmas = $this->request->param(); $parmas = $this->request->param();
$task = TaskLogic::detail($parmas); $task = TaskLogic::detail($parmas);
$approve = Approve::where(['task_id' =>$task['id']])->find();
$task['approve_status'] = $approve['status']; //审核状态
$task['deny_notes'] = $approve['remark']; // 拒绝原因
return $this->success('ok', $task); return $this->success('ok', $task);
} }
@ -222,12 +225,12 @@ class TaskController extends BaseApiController
public function cimmit_other_task() public function cimmit_other_task()
{ {
try { try {
$parmas = $this->request->param(); //id note annex $parmas = $this->request->param(); //id note annex vedio_annex
$task = TaskLogic::detail($parmas); $task = TaskLogic::detail($parmas);
if (empty($task)) { if (empty($task)) {
$this->fail('任务不存在'); $this->fail('任务不存在');
} }
$extend = ['other' => ['is_commit' => 1, 'note' => $parmas['note'], 'annex'=>$parmas['annex']]]; $extend = ['other' => ['is_commit' => 1, 'note' => $parmas['note'], 'annex'=>$parmas['annex'], 'video_annex' => $parmas['video_annex']]];
Db::startTrans(); Db::startTrans();
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time()]); Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time'=>time()]);