diff --git a/application/api/model/Tasks.php b/application/api/model/Tasks.php index e73ec198..5d9b2242 100644 --- a/application/api/model/Tasks.php +++ b/application/api/model/Tasks.php @@ -255,6 +255,9 @@ class Tasks extends Model } $quantity_str = ""; if($v['target_quantity']!=1){ + if($progress > $v['target_quantity']){ + $progress = $v['target_quantity']; + } $quantity_str= "({$progress}/{$v['target_quantity']})"; } $v['task_name'] = $v['task_name'].$quantity_str; @@ -323,6 +326,9 @@ class Tasks extends Model } $reslut = Db::name('vs_tasks_student')->where('id',$task_student['id'])->update($task_student_data); }else{ + if($current_progress > $task_info['target_quantity']){ + $current_progress = $task_info['target_quantity']; + } if($task_info['target_quantity']==$current_progress){ $is_completed = 1; }