Browse Source

报表计算

xiatian 6 years ago
parent
commit
275b9fa9eb

+ 14 - 6
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/impl/ReportsComputeServiceImpl.java

@@ -41,6 +41,7 @@ import cn.com.qmth.examcloud.core.reports.api.request.DeleteExamOrgReportByProje
 import cn.com.qmth.examcloud.core.reports.api.request.GetProjectInfoBeanReq;
 import cn.com.qmth.examcloud.core.reports.api.request.SaveExamCourseDataReportListReq;
 import cn.com.qmth.examcloud.core.reports.api.request.SaveExamOrgReportListReq;
+import cn.com.qmth.examcloud.core.reports.api.request.UpdateProjectCourseOrgCountReq;
 import cn.com.qmth.examcloud.core.reports.api.request.UpdateProjectStatusReq;
 import cn.com.qmth.examcloud.core.reports.api.response.GetProjectInfoBeanResp;
 import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
@@ -154,11 +155,11 @@ public class ReportsComputeServiceImpl implements ReportsComputeService {
 				.collect(Collectors.toList());
 		Map<String, Object> result = new HashMap<String, Object>();
 
-		// 学习中心id集合
+		// 学习中心id集合-记录中心数量
 		Set<Long> ordIds = new HashSet<Long>();
 		result.put("ordIds", ordIds);
 
-		// 课程id集合
+		// 课程id集合-记录课程数量
 		Set<Long> courseIds = new HashSet<Long>();
 		result.put("courseIds", courseIds);
 
@@ -168,19 +169,19 @@ public class ReportsComputeServiceImpl implements ReportsComputeService {
 		// 课程数值分析结果
 		Map<String, ExamCourseDataReportBean> examCourseDataReport = new HashMap<String, ExamCourseDataReportBean>();
 		result.put("examCourseDataReport", examCourseDataReport);
-		// 分数结果集合
+		// 分数结果集合-计算标准差
 		Map<String, List<Double>> scores = new HashMap<String, List<Double>>();
 		result.put("scores", scores);
 
-		// 考试课程对应的basePaperId集合
+		// 考试课程对应的basePaperId集合-计算难度
 		Map<String, Set<String>> basePapers = new HashMap<String, Set<String>>();
 		result.put("basePapers", basePapers);
 
-		// basePaperId对应的难度系数
+		// basePaperId对应的难度系数-计算难度
 		Map<String, Double> basePapersDegree = new HashMap<String, Double>();
 		result.put("basePapersDegree", basePapersDegree);
 
-		// basePaperId对应的小题平均分和满分
+		// basePaperId对应的小题平均分和满分-计算难度
 		Map<String, Map<String, TopicScoreDto>> basePapersTopicScore = new HashMap<String, Map<String, TopicScoreDto>>();
 		result.put("basePapersTopicScore", basePapersTopicScore);
 
@@ -243,6 +244,13 @@ public class ReportsComputeServiceImpl implements ReportsComputeService {
 		SaveExamCourseDataReportListReq req2 = new SaveExamCourseDataReportListReq();
 		req2.setBeans(new ArrayList<ExamCourseDataReportBean>(examCourseDataReport.values()));
 		examCourseDataReportCloudService.saveExamCourseDataReportList(req2);
+		
+		//保存项目课程数量、中心数量
+		UpdateProjectCourseOrgCountReq req=new UpdateProjectCourseOrgCountReq();
+		req.setProjectId(pro.getId());
+		req.setOrgCount(ordIds.size());
+		req.setCourseCount(courseIds.size());
+		projectCloudService.updateProjectCourseOrgCount(req);
 	}
 
 	private void fillOrgNameCode(Map<String, ExamOrgReportBean> examOrgReport) {