|
@@ -8,7 +8,12 @@
|
|
|
package cn.com.qmth.examcloud.core.questions.starter;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.web.support.SpringContextHolder;
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.enums.ExamFileType;
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.enums.ExportWay;
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.ExtractConfigFileService;
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.bean.dto.ExportPaperInfoModel;
|
|
|
import cn.com.qmth.examcloud.core.questions.service.temp.CqdxService;
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.temp.DdExcelService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -16,6 +21,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Controller
|
|
|
@RequestMapping("${api_cqb}/")
|
|
|
public class IndexController {
|
|
@@ -31,7 +39,43 @@ public class IndexController {
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return "ok";
|
|
|
}
|
|
|
|
|
|
+ private void exportExtractExcel() {
|
|
|
+
|
|
|
+ ExtractConfigFileService service = SpringContextHolder.getBean(ExtractConfigFileService.class);
|
|
|
+ ExportPaperInfoModel model = new ExportPaperInfoModel();
|
|
|
+ model.setExamId("429");
|
|
|
+ model.setExportWay(ExportWay.BATCH);
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ list.add(ExamFileType.PAPER_STRUCTURE_OBJECTIVE.name());
|
|
|
+ model.setExportContentList(list);
|
|
|
+ try {
|
|
|
+ service.exportExamPaperInfo(model, null, "feng", null, null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void exportQuestionExcel() {
|
|
|
+
|
|
|
+ DdExcelService ddExcelService = SpringContextHolder.getBean(DdExcelService.class);
|
|
|
+ List<String> codes = new ArrayList<>();
|
|
|
+ codes.add("D00010005");
|
|
|
+ codes.add("D02020001");
|
|
|
+ codes.add("D07020006");
|
|
|
+ codes.add("F00010007");
|
|
|
+ codes.add("F00010018");
|
|
|
+ try {
|
|
|
+ ddExcelService.exportSubQues("1627", 326l, codes);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|