在学生信息和我的学生增加一个导出按钮,导出学生填写的所有基本信息

This commit is contained in:
2026-02-28 17:56:30 +08:00
parent 1fe293610e
commit 7b72d6dbcd
6 changed files with 469 additions and 1 deletions

View File

@@ -16,10 +16,12 @@ import com.srs.common.utils.StringUtils;
import com.srs.comprehensive.domain.Dto.StuDataSelcetDto;
import com.srs.comprehensive.domain.Dto.StuStatusImport;
import com.srs.comprehensive.domain.SrsStudent;
import com.srs.comprehensive.domain.CphStudentDetailExport;
import com.srs.comprehensive.domain.Vo.*;
import com.srs.comprehensive.service.ICascaderDataStudentService;
import com.srs.comprehensive.service.ISrsStudentService;
import com.srs.comprehensive.service.ICphStudentDetailExportService;
import com.srs.system.domain.vo.StuStatus;
import com.srs.system.service.ISysPostService;
import com.srs.web.controller.common.RoleBool;
@@ -52,8 +54,12 @@ import org.springframework.web.multipart.MultipartFile;
public class SrsStudentController extends BaseController {
@Autowired
private ISrsStudentService srsStudentService;
@Resource
@Autowired
private ICascaderDataStudentService cascaderDataStudentService;
@Autowired
private ICphStudentDetailExportService cphStudentDetailExportService;
@Autowired
ISysPostService _postService;
@@ -334,6 +340,31 @@ public class SrsStudentController extends BaseController {
util.exportExcel(response, list, "学生信息数据");
}
/**
* 导出全部学生信息(包含查新详情)
*/
//@PreAuthorize("@ss.hasPermi('system:student:exportAll')")
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
@PostMapping("/exportAll")
public void exportAll(HttpServletResponse response, SrsStudent srsStudent) {
List<CphStudentDetailExport> list = cphStudentDetailExportService.getStudentDetailExportList(srsStudent);
ExcelUtil<CphStudentDetailExport> util = new ExcelUtil<CphStudentDetailExport>(CphStudentDetailExport.class);
util.exportExcel(response, list, "学生查新详情数据");
}
/**
* 在我的学生页面导出学生信息
*/
//@PreAuthorize("@ss.hasPermi('system:student:exportAllOwnStu')")
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
@PostMapping("/exportAllOwnStu")
public void exportAllOwnStu(HttpServletResponse response, SrsStudent srsStudent) {
srsStudent.tNo = getUsername();
List<CphStudentDetailExport> list = cphStudentDetailExportService.getStudentDetailExportList(srsStudent);
ExcelUtil<CphStudentDetailExport> util = new ExcelUtil<CphStudentDetailExport>(CphStudentDetailExport.class);
util.exportExcel(response, list, "学生查新详情数据");
}
/**
* 下载导入模板
*