|
@@ -29,36 +29,26 @@ import java.util.*;
|
|
public class DdExcelService {
|
|
public class DdExcelService {
|
|
private final String exportExcelPath = "D:/exportExcel.xlsx";
|
|
private final String exportExcelPath = "D:/exportExcel.xlsx";
|
|
private final String xianExcelPath = "D:/xianExcelNew.xlsx";
|
|
private final String xianExcelPath = "D:/xianExcelNew.xlsx";
|
|
-
|
|
|
|
private final String paperExcelPath = "D:/paperExcel.xlsx";
|
|
private final String paperExcelPath = "D:/paperExcel.xlsx";
|
|
private final String paperExcelPathNew = "D:/paperExcelNew.xlsx";
|
|
private final String paperExcelPathNew = "D:/paperExcelNew.xlsx";
|
|
-
|
|
|
|
private final String quesExcelPath = "D:/quesExcel.xlsx";
|
|
private final String quesExcelPath = "D:/quesExcel.xlsx";
|
|
private final String quesExcelPathNew = "D:/quesExcelNew.xlsx";
|
|
private final String quesExcelPathNew = "D:/quesExcelNew.xlsx";
|
|
-
|
|
|
|
private final String paperStructExcelPath = "D:/paperStructExcel.xlsx";
|
|
private final String paperStructExcelPath = "D:/paperStructExcel.xlsx";
|
|
private final String paperStructExcelPathNew = "D:/paperStructExcelNew.xlsx";
|
|
private final String paperStructExcelPathNew = "D:/paperStructExcelNew.xlsx";
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private QuesRepo quesRepo;
|
|
private QuesRepo quesRepo;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- PaperDetailUnitService paperDetailUnitService;
|
|
|
|
-
|
|
|
|
|
|
+ private PaperDetailUnitService paperDetailUnitService;
|
|
@Autowired
|
|
@Autowired
|
|
- PaperDetailUnitRepo paperDetailUnitRepo;
|
|
|
|
-
|
|
|
|
|
|
+ private PaperDetailUnitRepo paperDetailUnitRepo;
|
|
@Autowired
|
|
@Autowired
|
|
- PaperRepo paperRepo;
|
|
|
|
-
|
|
|
|
|
|
+ private PaperRepo paperRepo;
|
|
@Autowired
|
|
@Autowired
|
|
private QuesTypeNameRepo quesTypeRepo;
|
|
private QuesTypeNameRepo quesTypeRepo;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- MongoTemplate mongoTemplate;
|
|
|
|
-
|
|
|
|
|
|
+ private MongoTemplate mongoTemplate;
|
|
@Autowired
|
|
@Autowired
|
|
- PaperDetailRepo paperDetailRepo;
|
|
|
|
|
|
+ private PaperDetailRepo paperDetailRepo;
|
|
|
|
|
|
public void insertQueryName(String orgId) {
|
|
public void insertQueryName(String orgId) {
|
|
//查询所有课程
|
|
//查询所有课程
|
|
@@ -140,6 +130,9 @@ public class DdExcelService {
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 导出按大题名称统计分布
|
|
|
|
+ */
|
|
@SuppressWarnings("resource")
|
|
@SuppressWarnings("resource")
|
|
public void exporExcel(String orgId) throws Exception {
|
|
public void exporExcel(String orgId) throws Exception {
|
|
//导出Excel集合
|
|
//导出Excel集合
|
|
@@ -386,9 +379,6 @@ public class DdExcelService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 导出试卷详情
|
|
* 导出试卷详情
|
|
- *
|
|
|
|
- * @param orgId
|
|
|
|
- * @throws Exception
|
|
|
|
*/
|
|
*/
|
|
@SuppressWarnings("resource")
|
|
@SuppressWarnings("resource")
|
|
public void exportPaperExcel(String orgId) throws Exception {
|
|
public void exportPaperExcel(String orgId) throws Exception {
|
|
@@ -484,10 +474,7 @@ public class DdExcelService {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 导出试卷结构
|
|
|
|
- *
|
|
|
|
- * @param orgId
|
|
|
|
- * @throws Exception
|
|
|
|
|
|
+ * 导出课程下的精确试卷结构
|
|
*/
|
|
*/
|
|
@SuppressWarnings("resource")
|
|
@SuppressWarnings("resource")
|
|
public void exportPaperStructExcel(String orgId) throws Exception {
|
|
public void exportPaperStructExcel(String orgId) throws Exception {
|
|
@@ -563,11 +550,6 @@ public class DdExcelService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 给定考试和课程集合,查询所有试卷中的主观题,导出一个Excel(课程名称,课程代码,试卷名称,试卷id,试题题干)
|
|
* 给定考试和课程集合,查询所有试卷中的主观题,导出一个Excel(课程名称,课程代码,试卷名称,试卷id,试题题干)
|
|
- *
|
|
|
|
- * @param orgId
|
|
|
|
- * @param examId
|
|
|
|
- * @param codes
|
|
|
|
- * @throws Exception
|
|
|
|
*/
|
|
*/
|
|
@SuppressWarnings("resource")
|
|
@SuppressWarnings("resource")
|
|
public void exportSubQues(String orgId, Long examId, List<String> codes) throws Exception {
|
|
public void exportSubQues(String orgId, Long examId, List<String> codes) throws Exception {
|
|
@@ -672,15 +654,4 @@ public class DdExcelService {
|
|
System.out.println("结束...");
|
|
System.out.println("结束...");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- public static void main(String[] args) {
|
|
|
|
-// File ddExcelFile = new File(exportExcelPath);
|
|
|
|
- List<String> ss = new ArrayList<String>();
|
|
|
|
- ss.add("单选");
|
|
|
|
- ss.add("单选题");
|
|
|
|
- ss.add("选择题");
|
|
|
|
- System.out.println(ss);
|
|
|
|
- System.out.println(ss.toString());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+}
|