public async Task <IActionResult> ImportStockCheck(IFormFile excelFile)
        {
            var msg = "";

            if (excelFile == null || excelFile.Length <= 0)
            {
                msg = "请选择导入文件!";
                return(Ok(msg));
            }
            if (!Path.GetExtension(excelFile.FileName).Equals(".xlsx", StringComparison.OrdinalIgnoreCase))
            {
                msg = "请选择导入文件为.xlsx的后缀名!";
                return(Ok(msg));
            }

            try
            {
                using (var stream = new MemoryStream())
                {
                    await excelFile.CopyToAsync(stream);

                    using (var package = new ExcelPackage(stream))
                    {
                        StringBuilder  sb         = new StringBuilder();
                        ExcelWorksheet worksheet  = package.Workbook.Worksheets[0];
                        int            rowCount   = worksheet.Dimension.Rows;
                        int            ColCount   = worksheet.Dimension.Columns;
                        bool           bHeaderRow = true;

                        for (int row = 2; row <= rowCount; row++)
                        {
                            BaseCore.Domain.StockCheck model = new BaseCore.Domain.StockCheck()
                            {
                                id = Guid.NewGuid().ToString()
                            };
                            for (int col = 1; col <= ColCount; col++)
                            {
                                if (bHeaderRow)
                                {
                                    switch (col)
                                    {
                                    case 1:
                                        model.code = worksheet.Cells[row, col].Value.ToString();
                                        break;

                                    case 2:
                                        model.type = GetUtf8(worksheet.Cells[row, col].Value.ToString());
                                        break;

                                    case 3:
                                        model.price = worksheet.Cells[row, col].Value.ToString();
                                        break;

                                    case 4:
                                        model.styleNo = worksheet.Cells[row, col].Value.ToString();
                                        break;

                                    case 5:
                                        model.name = GetUtf8(worksheet.Cells[row, col].Value.ToString());
                                        break;

                                    case 6:
                                        model.color = worksheet.Cells[row, col].Value.ToString();
                                        break;

                                    case 7:
                                        model.size = GetUtf8(worksheet.Cells[row, col].Value.ToString());
                                        break;

                                    case 8:
                                        model.num = int.Parse(worksheet.Cells[row, col].Value.ToString());
                                        break;

                                    //case 9:
                                    //    model.stockNum = worksheet.Cells[row, col].Value.ToString();
                                    //    break;
                                    case 9:
                                        model.goodsNo = worksheet.Cells[row, col].Value.ToString();
                                        break;

                                    case 10:
                                        model.asi = worksheet.Cells[row, col].Value.ToString();
                                        break;
                                    }
                                }
                            }

                            //插入model即可
                            _stockService.AddStockCheck(model);
                        }
                    }
                }
                msg = "导入成功!";
                return(Ok(msg));
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                return(Ok(msg));
            }
        }