| | |
| | | import com.ycl.jxkg.utils.DateTimeUtil; |
| | | import com.ycl.jxkg.utils.JsonUtil; |
| | | import com.ycl.jxkg.vo.student.dashboard.*; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @RequiredArgsConstructor |
| | | @Controller("WXStudentDashboardController") |
| | | @RequestMapping(value = "/api/wx/student/dashboard") |
| | | @ResponseBody |
| | |
| | | private final TextContentService textContentService; |
| | | private final TaskExamService taskExamService; |
| | | private final TaskExamCustomerAnswerService taskExamCustomerAnswerService; |
| | | |
| | | @Autowired |
| | | public DashboardController(ExamPaperService examPaperService, TextContentService textContentService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService) { |
| | | this.examPaperService = examPaperService; |
| | | this.textContentService = textContentService; |
| | | this.taskExamService = taskExamService; |
| | | this.taskExamCustomerAnswerService = taskExamCustomerAnswerService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/index", method = RequestMethod.POST) |
| | | public Result<IndexVO> index() { |
| | |
| | | |
| | | |
| | | private List<TaskItemPaperVO> getTaskItemPaperVm(Integer tFrameId, TaskExamCustomerAnswer taskExamCustomerAnswers) { |
| | | TextContent textContent = textContentService.selectById(tFrameId); |
| | | TextContent textContent = textContentService.getById(tFrameId); |
| | | List<TaskItemObject> paperItems = JsonUtil.toJsonListObject(textContent.getContent(), TaskItemObject.class); |
| | | |
| | | List<TaskItemAnswerObject> answerPaperItems = null; |
| | | if (null != taskExamCustomerAnswers) { |
| | | TextContent answerTextContent = textContentService.selectById(taskExamCustomerAnswers.getTextContentId()); |
| | | TextContent answerTextContent = textContentService.getById(taskExamCustomerAnswers.getTextContentId()); |
| | | answerPaperItems = JsonUtil.toJsonListObject(answerTextContent.getContent(), TaskItemAnswerObject.class); |
| | | } |
| | | |