|
|
@ -66,7 +66,7 @@ public class IcVaccineController implements ResultDataResolver { |
|
|
|
**/ |
|
|
|
@NoRepeatSubmit |
|
|
|
@PostMapping("vaccine-list") |
|
|
|
public Result<PageData<IcVaccineListResultDTO>> natList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) { |
|
|
|
public Result<PageData<IcVaccineListResultDTO>> vaccineList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) { |
|
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
|
return new Result<PageData<IcVaccineListResultDTO>>().ok(icVaccineService.icVaccineList(formDTO)); |
|
|
@ -130,7 +130,7 @@ public class IcVaccineController implements ResultDataResolver { |
|
|
|
os = new FileOutputStream(fileSavePath.toString()); |
|
|
|
IOUtils.copy(is, os); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("importExcel exception", e); |
|
|
|
} finally { |
|
|
|
org.apache.poi.util.IOUtils.closeQuietly(is); |
|
|
|
org.apache.poi.util.IOUtils.closeQuietly(os); |
|
|
@ -163,7 +163,7 @@ public class IcVaccineController implements ResultDataResolver { |
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("社区自组织导入模板", "UTF-8") + ".xlsx"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("疫苗接种导入模板", "UTF-8") + ".xlsx"); |
|
|
|
|
|
|
|
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_vaccine.xlsx"); |
|
|
|
try { |
|
|
|