This commit is contained in:
mkm 2024-01-08 13:43:36 +08:00
parent 682392fdc2
commit 3f49569d8d

View File

@ -470,7 +470,7 @@ class Task extends CommonModel
// 'content' => $comment,
// 'type' => 'comment'
// ];
$comment='comment';
$comments='comment';
if($type==1){
$data['status']=2;
if($task['exchange_list']){
@ -478,18 +478,21 @@ class Task extends CommonModel
$task['assign_to']=$task['exchange_list'][0];
unset($task['exchange_list'][0]);
Db::name('task')->where('id',$task['id'])->update($data);
}else{
$data['status']=1;
Db::name('task')->where('id',$task['id'])->update($data);
}
$comment='pass';
$comments='pass';
}elseif($type==2){
$comment='reject';
$comments='reject';
$data['status']=2;
Db::name('task')->where('id',$task['id'])->update($data);
}elseif($type==3){
$comment='add';
$comments='add';
$data['status']=4;
Db::name('task')->where('id',$task['id'])->update($data);
}
self::taskHook(getCurrentMember()['code'], $taskCode, 'comment', '', 1, '', $comment, '', $mentions);
self::taskHook(getCurrentMember()['code'], $taskCode, $comments, '', 1, '', $comment, '', $mentions);
return true;
// return ProjectLog::create($data);