add 小组服务团队-入股任务提交
This commit is contained in:
parent
047deaa6a4
commit
7761d9f08f
@ -713,4 +713,37 @@ class TaskController extends BaseApiController
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function commit_service_group_task()
|
||||
{
|
||||
try {
|
||||
$parmas = $this->request->param(); // id annex
|
||||
$task = TaskLogic::detail($parmas);
|
||||
if (empty($task)) {
|
||||
$this->fail('任务不存在');
|
||||
}
|
||||
$extend = ['is_commit'=>1, 'annex'=>$parmas['annex']];
|
||||
|
||||
Task::where(['id' => $parmas['id']])->update(['extend' => json_encode($extend), 'update_time' => time(), 'director_uid' => $this->userId]); // director_uid 指派人
|
||||
|
||||
// 创建审批任务
|
||||
$approveModel = new Approve();
|
||||
$approveModel->type = Approve::APPROVE_TYPE_10;
|
||||
$approveModel->flow_id = 1;
|
||||
$approveModel->name = $task['title'];
|
||||
$approveModel->admin_id = 0; // 后台发起人id 暂时为0
|
||||
$approveModel->user_id = $this->userId; // 前台发起人用户id
|
||||
$approveModel->task_id = $task['id']; // 任务id
|
||||
$approveModel->department_id = '0';
|
||||
$approveModel->check_status = 1; // 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
|
||||
$approveModel->other_type = 6;
|
||||
$approveModel->extend = json_encode($extend);
|
||||
$approveModel->create_time = time();
|
||||
$approveModel->update_time = time();
|
||||
$re = $approveModel->save();
|
||||
return $this->success('ok', []);
|
||||
} catch (Exception $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ class Approve extends BaseModel
|
||||
|
||||
const APPROVE_TYPE_8 = 8; // 镇农科负责人任务-政策补贴申请
|
||||
const APPROVE_TYPE_9 = 9; // 镇农科负责人任务-日常管理及其他临时任务
|
||||
const APPROVE_TYPE_10 = 10; // 小组团队任务-入股任务
|
||||
|
||||
public function task()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user