gongchunyi
2 天以前 29141ff7a136e62bea280fcf5cdbf7f174b53453
src/main/java/com/ruoyi/production/controller/ProductBomController.java
@@ -16,7 +16,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -91,4 +93,18 @@
        return AjaxResult.success(productBoms);
    }
    @PostMapping("uploadBom")
    @Log(title = "根据Excel导入BOM", businessType = BusinessType.IMPORT)
    @ApiOperation("根据Excel导入BOM")
    public AjaxResult uploadBom(@RequestParam("file") MultipartFile file) {
        return productBomService.uploadBom(file);
    }
    @PostMapping("exportBom")
    @Log(title = "导出BOM文件", businessType = BusinessType.EXPORT)
    @ApiOperation("导出BOM文件")
    public void exportBom(HttpServletResponse response, @RequestParam Integer bomId) {
        productBomService.exportBom(response, bomId);
    }
}