add:其他任务详情接口,提交任务接口
This commit is contained in:
parent
d131e34663
commit
de38de7138
@ -202,4 +202,29 @@ class TaskController extends BaseApiController
|
|||||||
}
|
}
|
||||||
return $this->success('ok', $list);
|
return $this->success('ok', $list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他任务详情
|
||||||
|
*/
|
||||||
|
public function other_task_detail(){
|
||||||
|
$parmas = $this->request->param();
|
||||||
|
$task = TaskLogic::detail($parmas);
|
||||||
|
return $this->success('ok', $task);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他任务 -提交
|
||||||
|
*/
|
||||||
|
public function cimmit_other_tast()
|
||||||
|
{
|
||||||
|
$parmas = $this->request->param(); //id note annex
|
||||||
|
$task = TaskLogic::detail($parmas);
|
||||||
|
if (empty($task)) {
|
||||||
|
$this->fail('任务不存在');
|
||||||
|
}
|
||||||
|
$extend = ['other' => ['is_commit' => 1, 'note' => $parmas['note'], 'annex'=>$parmas['annex']]];
|
||||||
|
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend)]);
|
||||||
|
return $this->success('ok', []);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -174,6 +174,18 @@ class TaskLogic extends BaseLogic
|
|||||||
];
|
];
|
||||||
$data['extend'] = json_encode($extend);
|
$data['extend'] = json_encode($extend);
|
||||||
}
|
}
|
||||||
|
// 其他任务
|
||||||
|
if ($v['type'] == 34) {
|
||||||
|
// is_commit 是否提交 note 详情描述 annex 附件
|
||||||
|
$extend = [
|
||||||
|
'other'=> [
|
||||||
|
'is_commit' => 0,
|
||||||
|
'note' => '',
|
||||||
|
'annex' => ''
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$data['extend'] = json_encode($extend);
|
||||||
|
}
|
||||||
$task_id = (new Task())->insertGetId($data);
|
$task_id = (new Task())->insertGetId($data);
|
||||||
TaskSchedulingPlan::where('id', $TaskSchedulingPlan['id'])->update(['task_id' => $task_id, 'is_execute' => 1]);
|
TaskSchedulingPlan::where('id', $TaskSchedulingPlan['id'])->update(['task_id' => $task_id, 'is_execute' => 1]);
|
||||||
TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
|
TaskTemplate::where('id', $v['id'])->inc('day_count')->update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user