zhonghui hace 3 años
padre
commit
c7118af69c

+ 6 - 6
boman-web-core/src/main/java/com/boman/web/core/controller/VaccineInfoController.java

@@ -1,5 +1,6 @@
 package com.boman.web.core.controller;
 
+import java.io.IOException;
 import java.util.List;
 
 import com.boman.common.core.utils.poi.ExcelUtil;
@@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import com.boman.web.core.domain.VaccineInfo;
 
+import javax.servlet.http.HttpServletResponse;
+
 /**
  * 疫苗信息Controller
  * 
@@ -51,12 +54,10 @@ public class VaccineInfoController extends BaseController {
     @PreAuthorize(hasPermi ="@ss.hasPermi('core:info:export')")
     @Log(title = "疫苗信息", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(VaccineInfo vaccineInfo)
-    {
+    public void export(HttpServletResponse response, VaccineInfo vaccineInfo)  throws IOException {
         List<VaccineInfo> list = vaccineInfoService.selectVaccineInfoList(vaccineInfo);
         ExcelUtil<VaccineInfo> util = new ExcelUtil<VaccineInfo>(VaccineInfo.class);
-//        return util.exportExcel(list, "info");
-        return null;
+        util.exportExcel(response, list, "info");
     }
 
     /**
@@ -75,8 +76,7 @@ public class VaccineInfoController extends BaseController {
     @PreAuthorize(hasPermi ="@ss.hasPermi('core:info:add')")
     @Log(title = "疫苗信息", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody VaccineInfo vaccineInfo)
-    {
+    public AjaxResult add(@RequestBody VaccineInfo vaccineInfo)  {
         return toAjax(vaccineInfoService.insertVaccineInfo(vaccineInfo));
     }