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