| | |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | try { |
| | | InputStream inStream =this.getClass().getResourceAsStream("/static/pages/template/机构导入模板.xlsx"); |
| | | InputStream inStream = null; |
| | | ClassPathResource resource = new ClassPathResource(File.separator + "template" + File.separator + "机构导入模板.xlsx"); |
| | | if (resource.exists()) { |
| | | inStream = resource.getInputStream(); |
| | | } |
| | | // 设置输出的格式 |
| | | response.reset(); |
| | | response.setContentType("bin"); |