lxw
2022-07-19 c52b51ba6024573ead2a7cd50c591dde44281ccd
src/main/java/com/whyc/controller/ProductBomApprovingController.java
@@ -37,7 +37,7 @@
    public Response excelParse(@RequestParam("file") MultipartFile file) throws IOException, InvalidFormatException {
        Response<Object> response = new Response<>();
        String name=file.getOriginalFilename();
        if(!name.substring(name.length()-4).equals(".xls") || !name.substring(name.length()-5).equals(".xlsx")){
        if(!name.substring(name.length()-4).equals(".xls") && !name.substring(name.length()-5).equals(".xlsx")){
            response.set(1,false,"文件解析错误");
        }else{
            List<ProductBomApproving> list = service.excelParse(file.getInputStream());