weiwenhai 6 rokov pred
rodič
commit
deaddb5a03

+ 9 - 0
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/impl/PaperServiceImpl.java

@@ -52,11 +52,14 @@ import cn.com.qmth.examcloud.core.print.api.request.SyncCoursePaperReq;
 import cn.com.qmth.examcloud.core.print.api.response.SyncCoursePaperResp;
 import cn.com.qmth.examcloud.core.questions.base.question.enums.QuesStructType;
 import cn.com.qmth.examcloud.core.questions.base.word.DocxProcessUtil;
+import cn.com.qmth.examcloud.commons.base.logging.ExamCloudLog;
+import cn.com.qmth.examcloud.commons.base.logging.ExamCloudLogFactory;
 import cn.com.qmth.examcloud.commons.base.util.JsonUtil;
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.commons.web.security.bean.User;
 
 import com.google.gson.Gson;
+import com.mysql.jdbc.log.Log;
 
 import cn.com.qmth.examcloud.core.questions.dao.ExamPaperRepo;
 import cn.com.qmth.examcloud.core.questions.dao.ExportServiceManageRepo;
@@ -107,6 +110,8 @@ import cn.com.qmth.examcloud.core.questions.base.exception.PaperException;
  */
 @Service("paperService")
 public class PaperServiceImpl implements PaperService{
+	
+	protected ExamCloudLog log = ExamCloudLogFactory.getLog(this.getClass());
 
     @Autowired
     PaperRepo paperRepo;
@@ -1389,6 +1394,7 @@ public class PaperServiceImpl implements PaperService{
 		ExportServiceManage esm = exportServiceManageRepo.findByOrgName("陕西师范大学");
     	ExportPaperAbstractService exportPaperAbstractService = (ExportPaperAbstractService) SpringContextUtils.getBeanById(esm.getExportServiceName());
     	PaperExp paperExp = exportPaperAbstractService.initPaperExp(paperId);
+    	log.info("已经获取试卷");
     	//得到试卷中的客观大题
     	List<PaperDetailExp> objectiveDetails = exportPaperAbstractService.getAllObjectiveDetails(paperExp);
     	//客观题中如果有套题,要拆开
@@ -1400,6 +1406,7 @@ public class PaperServiceImpl implements PaperService{
     			objectiveQuestionStructureList.add(new ObjectiveQuestionStructure(paperExp,paperDetailExp,unit,null));
     		}
     	}
+    	log.info("生成客观题数集合");
     	//得到试卷中的主观大题
     	List<PaperDetailExp> subjectiveDetails = exportPaperAbstractService.getAllSubjectiveDetails(paperExp);
     	//生成主观题数集合
@@ -1409,10 +1416,12 @@ public class PaperServiceImpl implements PaperService{
     			subjectiveQuestionStructureList.add(new SubjectiveQuestionStructure(paperExp,paperDetailExp,unit,null));
     		}
     	}
+    	log.info("生成主观题数集合");
     	PaperQuestionStructureInfo info = new PaperQuestionStructureInfo();
     	info.setObjectives(objectiveQuestionStructureList);
     	info.setSubjectives(subjectiveQuestionStructureList);
     	String jsonResp = JsonUtil.toJson(info);
+    	log.info("jsonResp:"+jsonResp);
     	return jsonResp;
 	}