|
@@ -4,6 +4,7 @@ import com.mooctest.data.BugDTO;
|
|
import com.mooctest.data.TaskDTO;
|
|
import com.mooctest.data.TaskDTO;
|
|
import com.mooctest.model.MasterReport;
|
|
import com.mooctest.model.MasterReport;
|
|
import com.mooctest.service.BugReportService;
|
|
import com.mooctest.service.BugReportService;
|
|
|
|
+import com.mooctest.service.HistoryService;
|
|
import com.mooctest.service.MasterReportService;
|
|
import com.mooctest.service.MasterReportService;
|
|
import com.mooctest.service.TaskService;
|
|
import com.mooctest.service.TaskService;
|
|
import com.mooctest.util.ReportUtil;
|
|
import com.mooctest.util.ReportUtil;
|
|
@@ -30,6 +31,9 @@ public class TaskController {
|
|
BugReportService bugReportService;
|
|
BugReportService bugReportService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ HistoryService historyService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
MasterReportService masterReportService;
|
|
MasterReportService masterReportService;
|
|
@GetMapping("/home")
|
|
@GetMapping("/home")
|
|
public String home(Model model) {
|
|
public String home(Model model) {
|
|
@@ -51,6 +55,7 @@ public class TaskController {
|
|
|
|
|
|
boolean aggregated = masterReportService.isAggregated(examId, caseId);
|
|
boolean aggregated = masterReportService.isAggregated(examId, caseId);
|
|
List<BugDTO> allReports = bugReportService.getAllBugs(examId, caseId);
|
|
List<BugDTO> allReports = bugReportService.getAllBugs(examId, caseId);
|
|
|
|
+ Map<String,String> single2rootMap = historyService.getSingle2Root(caseId, examId);
|
|
if (aggregated) {
|
|
if (aggregated) {
|
|
List<String> bugIds = allReports.stream().map(BugDTO::getId).collect(Collectors.toList());
|
|
List<String> bugIds = allReports.stream().map(BugDTO::getId).collect(Collectors.toList());
|
|
List<MasterReport> mrs = masterReportService.getByBugIds(bugIds);
|
|
List<MasterReport> mrs = masterReportService.getByBugIds(bugIds);
|
|
@@ -60,6 +65,8 @@ public class TaskController {
|
|
bug.setStatus(mr.getStatus());
|
|
bug.setStatus(mr.getStatus());
|
|
bug.setReviewerId(mr.getReviewerId());
|
|
bug.setReviewerId(mr.getReviewerId());
|
|
bug.setMasterId(mr.getMasterId());
|
|
bug.setMasterId(mr.getMasterId());
|
|
|
|
+ String te = single2rootMap.get(bug.getId());
|
|
|
|
+ bug.setTreeId(te==null?"null":te);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
TaskDTO task = taskService.getByExamIdAndCaseId(examId, caseId);
|
|
TaskDTO task = taskService.getByExamIdAndCaseId(examId, caseId);
|