更新任务审批
This commit is contained in:
parent
3485c47561
commit
0c6c098c45
@ -71,6 +71,9 @@ class TaskTemplateController extends BaseLikeAdminController
|
||||
{
|
||||
$params = (new TaskTemplateValidate())->post()->goCheck('add');
|
||||
$params['admin_id'] = 1;
|
||||
if (empty($params['extend'])) {
|
||||
$params['extend'] = '{}';
|
||||
}
|
||||
$company = Company::find($params['company_id']);
|
||||
if ($company->company_type == 41) {
|
||||
// 创建 镇农科公司 任务模板
|
||||
@ -80,11 +83,7 @@ class TaskTemplateController extends BaseLikeAdminController
|
||||
} else {
|
||||
$result = TaskTemplateLogic::add($params);
|
||||
}
|
||||
|
||||
if (true === $result) {
|
||||
/**
|
||||
* 如果是公司第一次创建安排任务,则初始化公司的提现周期截止时间
|
||||
*/
|
||||
TaskTemplateLogic::initCompanyWithdrawDeadline($params['company_id']);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
@ -101,6 +100,10 @@ class TaskTemplateController extends BaseLikeAdminController
|
||||
public function edit()
|
||||
{
|
||||
$params = (new TaskTemplateValidate())->post()->goCheck('edit');
|
||||
if (empty($params['extend'])) {
|
||||
$params['extend'] = '{}';
|
||||
}
|
||||
$params['admin_id'] = 1;
|
||||
$result = TaskTemplateLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user