public ActionResult CheckTaskDetail(int taskId)
        {
            var model = new CheckTaskDetailModel {
                TaskId = taskId
            };
            var booktask  = _bookWorkTaskService.GetBookWorkTask(taskId);
            var taskItems = booktask.BookWorkTaskItems.ToList(); //任务包含的Item

            model.TaskRelatedChapter = taskItems.Select(d => d.BookChapter).ToList();
            IList <BookChapter> bookChapterList = new List <BookChapter>();

            foreach (var titem in taskItems)
            {
                var itemchapter = titem.BookChapter;
                while (itemchapter.BookChapterParent != null)
                {
                    itemchapter = itemchapter.BookChapterParent;
                }
                if (!bookChapterList.Contains(itemchapter))
                {
                    bookChapterList.Add(itemchapter);
                }
            }
            bookChapterList      = bookChapterList.OrderBy(p => p.Id).ToList();
            model.RelateChapters = bookChapterList;
            return(View(model));
        }
        /// <summary>
        /// 提交
        /// </summary>
        /// <returns></returns>
        public ActionResult SubmitResult(int taskId, TaskStatus status)
        {
            var booktask = _bookWorkTaskService.GetBookWorkTask(taskId);

            booktask.Status = status;
            _bookWorkTaskService.SubmitTask(booktask);
            return(RedirectToAction("Index"));
        }
        public ActionResult EditTask(int id)
        {
            var task = _bookWorkTaskService.GetBookWorkTask(id);

            if (task == null)
            {
                return(RedirectToAction("Index"));
            }

            var model = new EditTaskModel();

            SetEditTaskParam(model, task);
            return(View(model));
        }