|
@@ -197,7 +197,7 @@ public class ExamController extends ControllerSupport {
|
|
private static final String[] EXAM_ORG_SETTINGS_EXCEL_HEADER = new String[]{"学习中心ID", "学习中心代码",
|
|
private static final String[] EXAM_ORG_SETTINGS_EXCEL_HEADER = new String[]{"学习中心ID", "学习中心代码",
|
|
"学习中心名称", "是否可以考试(是/否)", "开始考试时间 yyyy-MM-dd hh:mm:ss", "结束考试时间 yyyy-MM-dd hh:mm:ss"};
|
|
"学习中心名称", "是否可以考试(是/否)", "开始考试时间 yyyy-MM-dd hh:mm:ss", "结束考试时间 yyyy-MM-dd hh:mm:ss"};
|
|
|
|
|
|
- private static final String[] EXCEL_IP_LIMIT_HEADER = new String[]{"IP地址", "限制类型"};
|
|
|
|
|
|
+ private static final String[] EXCEL_IP_LIMIT_HEADER = new String[]{"IP地址", "限制类型", "备注"};
|
|
|
|
|
|
@ApiOperation(value = "查询考试课程的试卷类型集合")
|
|
@ApiOperation(value = "查询考试课程的试卷类型集合")
|
|
@GetMapping("queryExamCoursePaperTypeList")
|
|
@GetMapping("queryExamCoursePaperTypeList")
|
|
@@ -1407,9 +1407,11 @@ public class ExamController extends ControllerSupport {
|
|
@RequestParam CommonsMultipartFile file) {
|
|
@RequestParam CommonsMultipartFile file) {
|
|
DiskFileItem item = (DiskFileItem) file.getFileItem();
|
|
DiskFileItem item = (DiskFileItem) file.getFileItem();
|
|
File storeLocation = item.getStoreLocation();
|
|
File storeLocation = item.getStoreLocation();
|
|
|
|
+
|
|
|
|
+ int columnCount = 3;
|
|
List<String[]> lineList;
|
|
List<String[]> lineList;
|
|
try {
|
|
try {
|
|
- lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(storeLocation), 1, 2);
|
|
|
|
|
|
+ lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(storeLocation), 1, columnCount);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new StatusException("100110", "Excel 解析失败");
|
|
throw new StatusException("100110", "Excel 解析失败");
|
|
}
|
|
}
|
|
@@ -1463,6 +1465,11 @@ public class ExamController extends ControllerSupport {
|
|
}
|
|
}
|
|
entity.setLimitType(ipLimitType);
|
|
entity.setLimitType(ipLimitType);
|
|
|
|
|
|
|
|
+ // 备注
|
|
|
|
+ if(line.length == columnCount && line[2] != null){
|
|
|
|
+ entity.setRemark(line[2]);
|
|
|
|
+ }
|
|
|
|
+
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
entity.setCreationTime(date);
|
|
entity.setCreationTime(date);
|
|
entity.setUpdateTime(date);
|
|
entity.setUpdateTime(date);
|
|
@@ -1500,14 +1507,14 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
for (ExamIpLimitEntity cur : list) {
|
|
for (ExamIpLimitEntity cur : list) {
|
|
String type = cur.getLimitType() == null ? "" : cur.getLimitType().getTitle();
|
|
String type = cur.getLimitType() == null ? "" : cur.getLimitType().getTitle();
|
|
- datas.add(new Object[]{cur.getIp(), type});
|
|
|
|
|
|
+ datas.add(new Object[]{cur.getIp(), type, cur.getRemark()});
|
|
}
|
|
}
|
|
|
|
|
|
String filePath = systemConfig.getTempDataDir() + File.separator
|
|
String filePath = systemConfig.getTempDataDir() + File.separator
|
|
+ System.currentTimeMillis() + ".xlsx";
|
|
+ System.currentTimeMillis() + ".xlsx";
|
|
File file = new File(filePath);
|
|
File file = new File(filePath);
|
|
|
|
|
|
- ExcelWriter.write(EXCEL_IP_LIMIT_HEADER, new Class[]{String.class, String.class}, datas,
|
|
|
|
|
|
+ ExcelWriter.write(EXCEL_IP_LIMIT_HEADER, new Class[]{String.class, String.class, String.class}, datas,
|
|
new File(filePath));
|
|
new File(filePath));
|
|
|
|
|
|
exportFile("Ip访问限制列表-" + getRootOrgId() + ".xlsx", file);
|
|
exportFile("Ip访问限制列表-" + getRootOrgId() + ".xlsx", file);
|