Преглед изворни кода

超支文件导出流处理

yuanrf пре 8 месеци
родитељ
комит
c894bfbfe0
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 5 - 0
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -4106,6 +4106,11 @@ Group by PriceType ", dto.diId);
                 workbook.Write(stream, true);
                 stream.Flush();
                 stream.Seek(0, SeekOrigin.Begin);
+                var pathinfo = AppSettingsHelper.Get("ExcelBasePath") + path;
+                if (System.IO.File.Exists(pathinfo))
+                {
+                    System.IO.File.Delete(pathinfo);
+                }
                 stream.SaveToFile(AppSettingsHelper.Get("ExcelBasePath") + path);
             }