feat:故障记录导出

dev.breakdown
袁子龙 2024-09-25 22:01:02 +08:00
parent d679edc918
commit 8acb0c68f9
1 changed files with 10 additions and 0 deletions

View File

@ -1,10 +1,13 @@
package com.muyu.breakdown.controller;
import cn.hutool.http.server.HttpServerResponse;
import com.muyu.breakdown.domain.SysCarFaultLog;
import com.muyu.breakdown.service.SysCarFaultLogService;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -59,4 +62,11 @@ public class sysCarFaultLogController extends BaseController {
return toAjax(service.save(sysCarFaultLog));
}
@PostMapping("/export")
public void export(HttpServletResponse response, SysCarFaultLog sysCarFaultLog){
List<SysCarFaultLog> list = service.listStatusSolve(sysCarFaultLog);
ExcelUtil<SysCarFaultLog> util = new ExcelUtil<SysCarFaultLog>(SysCarFaultLog.class);
util.exportExcel(response,list,"车辆故障记录数据");
}
}