whycxzp
2022-07-21 cf7f2a00eb4e5fbfe90a403f6543d67daf447ff8
src/main/java/com/whyc/controller/ProductBomApprovingController.java
@@ -1,7 +1,6 @@
package com.whyc.controller;
import com.whyc.dto.Response;
import com.whyc.pojo.ProductBom;
import com.whyc.pojo.ProductBomApproving;
import com.whyc.service.ProductBomApprovingService;
import io.swagger.annotations.Api;
@@ -15,7 +14,6 @@
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.nio.channels.MulticastChannel;
import java.util.List;
/**
@@ -23,7 +21,7 @@
 */
@RestController
@RequestMapping("bomApproving")
@Api(tags = "产品bom审批")
@Api(tags = "工作流子表-产品bom审批表")
public class ProductBomApprovingController {
    @Autowired
@@ -37,7 +35,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());