|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ibeetl.jlw.web;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.jlw.Interceptor.SCoreUser;
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
|
import cn.jlw.validate.ValidateConfig;
|
|
|
|
@ -7,6 +8,8 @@ import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.ibeetl.admin.core.annotation.Function;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.file.FileService;
|
|
|
|
|
import com.ibeetl.admin.core.util.BeanCopyUtil;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.util.TimeTool;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseHandsOn;
|
|
|
|
@ -33,9 +36,14 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
|
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.write;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 教师开课-课程实操 教师开课-课程实操 接口
|
|
|
|
|
* 切记不要对非线程安全的静态变量进行写操作
|
|
|
|
@ -315,6 +323,36 @@ public class TeacherOpenCourseHandsOnController{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出实操列表
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(MODEL + "/exportHandsOnList.do")
|
|
|
|
|
public void exportHandsOnList(GetHandsOnListParam param, HttpServletResponse response, @SCoreUser CoreUser coreUser) throws IOException {
|
|
|
|
|
if (null == coreUser) {
|
|
|
|
|
throw new PlatformException("请登录后再操作");
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
/** 构建表头 */
|
|
|
|
|
Map<String, String> header = new LinkedHashMap<>(11);
|
|
|
|
|
header.put("handsOnName", "项目名称");
|
|
|
|
|
header.put("videoAvgScore", "观看视频平均得分");
|
|
|
|
|
header.put("pptAvgScore", "观看PPT平均得分");
|
|
|
|
|
header.put("theoryAvgScore", "理论测评平均得分");
|
|
|
|
|
header.put("stepAvgScore", "实训操作步骤平均得分");
|
|
|
|
|
header.put("reportAvgScore", "报告撰写平均得分");
|
|
|
|
|
|
|
|
|
|
List<TeacherOpenCourseHandsOnList> list = teacherOpenCourseHandsOnService.getHandsOnListNotPage(param);
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> maps = BeanCopyUtil.baseEntity2MapWithParallel(list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String filename = StrUtil.format("实操列表 {}.xlsx", System.currentTimeMillis());
|
|
|
|
|
write(response, filename, "Sheet1", header.values(), convertData(header.keySet(), maps));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
/**
|
|
|
|
|