|
|
|
@ -80,6 +80,31 @@ public class EamController { |
|
|
|
.doWrite(page.getList()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 核心备件更换记录导出excel |
|
|
|
* @Title coreComponentsExpiortExcel |
|
|
|
* @param data |
|
|
|
* @author zhb |
|
|
|
* @date 2025/11/14 14:11 |
|
|
|
* @return R |
|
|
|
* @throw |
|
|
|
*/ |
|
|
|
@PostMapping(value="/coreComponentsExpiortExcel") |
|
|
|
public void coreComponentsExpiortExcel (@RequestBody EamWorkOrderCoreComponentsData data, HttpServletResponse response) throws IOException { |
|
|
|
// 设置响应头 |
|
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
|
|
|
response.setCharacterEncoding("utf-8"); |
|
|
|
String fileName = URLEncoder.encode("核心备件更换记录", "UTF-8").replaceAll("\\+", "%20"); |
|
|
|
response.setHeader("Content-Disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
|
|
|
|
|
|
|
//获取数据 |
|
|
|
List<ExportCoreComponentsData> list = eamService.getAllCoreComponents(data); |
|
|
|
// 写入Excel |
|
|
|
EasyExcel.write(response.getOutputStream(), ExportCoreComponentsData.class) |
|
|
|
.sheet("核心备件更换记录") |
|
|
|
.doWrite(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description eamFamilySearch |
|
|
|
* @Title eamAdminSearch |
|
|
|
|