|
@@ -332,6 +332,47 @@ public class ClassGradeController extends BaseController {
|
|
return AjaxResult.success(map);
|
|
return AjaxResult.success(map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation("导出学员学时列表")
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:profile:export')")
|
|
|
|
+ @Log(title = "导出学员学时列表", businessType = BusinessType.EXPORT)
|
|
|
|
+ @GetMapping("/exportWeek")
|
|
|
|
+ public AjaxResult<Map<String,Object>> exportWeek(ClassGradeUserQueryBo bo) {
|
|
|
|
+ String fileName = "";
|
|
|
|
+ if(Validator.isEmpty(bo.getStudyStatus())){
|
|
|
|
+ bo.setStudyStatus(0);
|
|
|
|
+ fileName="全部";
|
|
|
|
+ }else{
|
|
|
|
+ if(bo.getStudyStatus()==0){
|
|
|
|
+ fileName="全部";
|
|
|
|
+ }
|
|
|
|
+ if(bo.getStudyStatus()==1){
|
|
|
|
+ fileName="未完成学习";
|
|
|
|
+ }
|
|
|
|
+ if(bo.getStudyStatus()==2){
|
|
|
|
+ fileName="完成学习";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ bo.setUserPhoto(1);
|
|
|
|
+ Map<String,Object> map = iClassGradeUserService.exportPo(bo);
|
|
|
|
+ List<ClassPeriodStudentExportAllVo> list = (List<ClassPeriodStudentExportAllVo>)map.get("list");
|
|
|
|
+ ExcelUtil<ClassPeriodStudentExportAllVo> util = new ExcelUtil<ClassPeriodStudentExportAllVo>(ClassPeriodStudentExportAllVo.class);
|
|
|
|
+ ExportParams deptExportParams = new ExportParams();
|
|
|
|
+ // 设置sheet得名称
|
|
|
|
+ deptExportParams.setSheetName("表1");
|
|
|
|
+ String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
+ Map<String, Object> deptExportMap = new HashMap<>();
|
|
|
|
+ deptExportMap.put("title", deptExportParams);
|
|
|
|
+ deptExportMap.put("entity", ClassPeriodStudentExportAllVo.class);
|
|
|
|
+ // sheet中要填充得数据
|
|
|
|
+ deptExportMap.put("data", list);
|
|
|
|
+ List<Map<String, Object>> sheetsList = new ArrayList<>();
|
|
|
|
+ sheetsList.add(deptExportMap);
|
|
|
|
+ String businessName = Validator.isNotEmpty(bo.getBusinessName())?bo.getBusinessName():"";
|
|
|
|
+ map.put("excel",util.exportEasyExcel(sheetsList, businessName+"-"+fileName+"-学员学习记录-"+timeStr));
|
|
|
|
+ map.remove("list");
|
|
|
|
+ return AjaxResult.success(map);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询学员学时信息列表
|
|
* 查询学员学时信息列表
|
|
*/
|
|
*/
|