|
@@ -1,7 +1,9 @@
|
|
|
package com.qmth.distributed.print.api;
|
|
|
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
+import com.qmth.distributed.print.business.bean.excel.ExcelField;
|
|
|
import com.qmth.distributed.print.business.bean.result.EditResult;
|
|
|
+import com.qmth.distributed.print.business.service.TCScoreNormalService;
|
|
|
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
|
|
@@ -10,9 +12,12 @@ import io.swagger.annotations.*;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.validation.constraints.Max;
|
|
|
import javax.validation.constraints.Min;
|
|
|
import java.io.IOException;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -27,6 +32,9 @@ import java.io.IOException;
|
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_COURSE_DEGREE)
|
|
|
public class TCScoreEndExamController {
|
|
|
|
|
|
+ @Resource
|
|
|
+ TCScoreNormalService tcScoreNormalService;
|
|
|
+
|
|
|
@ApiOperation(value = "导入期末成绩-模板下载")
|
|
|
@RequestMapping(value = "/score/end_exam/template_download", method = RequestMethod.POST)
|
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.EXPORT)
|
|
@@ -35,8 +43,16 @@ public class TCScoreEndExamController {
|
|
|
@ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
|
|
|
@ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) throws IOException {
|
|
|
-// Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
-// examDetailService.downLoadExaminationTemplate(schoolId, ServletUtil.getResponse());
|
|
|
+ List<ExcelField> excelFieldList = new ArrayList<>();
|
|
|
+ excelFieldList.add(new ExcelField("examNumber", "学号", true));
|
|
|
+ excelFieldList.add(new ExcelField("name", "姓名", true));
|
|
|
+ excelFieldList.add(new ExcelField("score", "成绩", true));
|
|
|
+ excelFieldList.add(new ExcelField("key1", "1-1", true));
|
|
|
+ excelFieldList.add(new ExcelField("key2", "1-2", false));
|
|
|
+ tcScoreNormalService.downLoadExaminationTemplate("1、所有字段均为必填字段;\n" +
|
|
|
+ "2、期末成绩按总分,和小题分录入,题号按大题号-小题号方式录入,如下,1-1表示第一大题第一小题,2-1表示第二大题第一小题;\n" +
|
|
|
+ "3、请不要删除此行,也不要删除模板中的任何列;\n" +
|
|
|
+ "4、使用前请先删除样例数据。", "sheet1", "期末成绩导入模版", excelFieldList);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "导入期末成绩")
|