教学大纲,模板下载,添加填写说明
This commit is contained in:
+16
-11
@@ -245,40 +245,45 @@ public class ZYJXJHBServiceImpl implements ZYJXJHBService {
|
||||
|
||||
// 填写说明 sheet
|
||||
String[][] instructions = {
|
||||
{"专业代号", "必填", "专业表中的专业代号(非专业名称),导入时下拉选择项对应的代号"},
|
||||
{"课编号", "必填", "课表中的课编号(非课程名称)"},
|
||||
{"学期第次", "必填", "数字,1-20,表示该课程安排在第几个学期"},
|
||||
{"课类型", "必填", "课类型字典值,如:必修、选修等(以系统字典 course_type 为准)"},
|
||||
{"专业代号", "必填", "学科专业信息表中的专业代号(非专业名称),必须已存在,否则该行导入失败"},
|
||||
{"课编号", "必填", "课表中的课编号(非课程名称),必须已存在,否则该行导入失败"},
|
||||
{"学期第次", "必填", "数字,表示该课程安排在第几个学期"},
|
||||
{"课类型", "必填", "非空即可,建议填字典 course_type 的值(如:必修、选修)"},
|
||||
{"学时", "必填", "数字,总学时"},
|
||||
{"停用", "选填", "是/否,默认否(导入后立即停用才填是)"},
|
||||
{"停用", "选填", "是/否(也支持 1/0、Y/N、true/false),默认否"},
|
||||
{"简称", "选填", "课程简称"},
|
||||
{"学分", "选填", "数字,可带一位小数"},
|
||||
{"课程定位", "选填", "文本"},
|
||||
{"模块", "选填", "文本"},
|
||||
{"成绩分制", "选填", "文本,如:百分制、五级制"},
|
||||
{"教研室代号", "选填", "教研室表中的教研室代号,填了必须存在"},
|
||||
{"教研室代号", "选填", "教研室表中的教研室代号,可留空;填了必须已存在,否则该行导入失败"},
|
||||
{"考试课时", "选填", "数字"},
|
||||
{"理论学时", "选填", "数字"},
|
||||
{"实践学时", "选填", "数字"},
|
||||
{"周课时", "选填", "数字"},
|
||||
{"不计入平均分", "选填", "是/否,默认否"},
|
||||
{"考试课时不显示", "选填", "是/否,默认否"},
|
||||
{"大纲课程", "选填", "是/否,默认否"}
|
||||
{"不计入平均分", "选填", "是/否(也支持 1/0、Y/N、true/false),默认否"},
|
||||
{"考试课时不显示", "选填", "是/否(也支持 1/0、Y/N、true/false),默认否"},
|
||||
{"大纲课程", "选填", "是/否(也支持 1/0、Y/N、true/false),默认否"}
|
||||
};
|
||||
org.apache.poi.ss.usermodel.Sheet helpSheet = workbook.createSheet("填写说明");
|
||||
org.apache.poi.ss.usermodel.Row titleRow = helpSheet.createRow(0);
|
||||
org.apache.poi.ss.usermodel.Cell titleCell = titleRow.createCell(0);
|
||||
titleCell.setCellValue("教学大纲导入填写说明(红色表头列为必填;专业代号+课编号+学期第次 相同的行视为重复,将跳过不导入)");
|
||||
titleCell.setCellStyle(headerStyle);
|
||||
org.apache.poi.ss.usermodel.Row ruleRow = helpSheet.createRow(1);
|
||||
org.apache.poi.ss.usermodel.Cell ruleCell = ruleRow.createCell(0);
|
||||
ruleCell.setCellValue("校验规则:必填列=专业代号、课编号、学期第次、课类型、学时;"
|
||||
+ "专业代号/课编号/教研室代号 填的值必须在对应表中已存在,否则该行失败;任一必填项为空或非数字该行也失败");
|
||||
ruleCell.setCellStyle(headerStyle);
|
||||
String[] helpHeaders = {"列名", "是否必填", "填写说明"};
|
||||
org.apache.poi.ss.usermodel.Row helpHeaderRow = helpSheet.createRow(1);
|
||||
org.apache.poi.ss.usermodel.Row helpHeaderRow = helpSheet.createRow(2);
|
||||
for (int i = 0; i < helpHeaders.length; i++) {
|
||||
org.apache.poi.ss.usermodel.Cell cell = helpHeaderRow.createCell(i);
|
||||
cell.setCellValue(helpHeaders[i]);
|
||||
cell.setCellStyle(headerStyle);
|
||||
}
|
||||
for (int i = 0; i < instructions.length; i++) {
|
||||
org.apache.poi.ss.usermodel.Row row = helpSheet.createRow(i + 2);
|
||||
org.apache.poi.ss.usermodel.Row row = helpSheet.createRow(i + 3);
|
||||
for (int j = 0; j < 3; j++) {
|
||||
row.createCell(j).setCellValue(instructions[i][j]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user