|
@@ -48,6 +48,7 @@ namespace fis.Win.Dev.Managers
|
|
|
{
|
|
|
NotifyTheProgress(progress, _exportStatus);
|
|
|
DoPackaging();
|
|
|
+ return;
|
|
|
}
|
|
|
if (_exportStatus == ExportStatus.Finished)
|
|
|
{
|
|
@@ -102,8 +103,7 @@ namespace fis.Win.Dev.Managers
|
|
|
_fileCount = accessFileCount;
|
|
|
fileName = String.Join("+",dataObj.SubFolders.ToArray())+DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss");
|
|
|
_destnationName =Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop),fileName+".zip");
|
|
|
- _downloadFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,fileName);
|
|
|
-
|
|
|
+ _downloadFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,fileName);
|
|
|
if (!Directory.Exists(_downloadFolder))
|
|
|
{
|
|
|
Directory.CreateDirectory(_downloadFolder);
|
|
@@ -149,6 +149,12 @@ namespace fis.Win.Dev.Managers
|
|
|
{
|
|
|
patientPath = patientPath.Replace("*", "");
|
|
|
Directory.CreateDirectory(patientPath);
|
|
|
+ if (c.ReportItemList.Count == 0)
|
|
|
+ {
|
|
|
+ var fileName = Path.Combine(patientPath, "nodata.txt");
|
|
|
+ File.WriteAllText(fileName, "nodata");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
foreach (var d in c.ReportItemList)
|
|
@@ -201,6 +207,12 @@ namespace fis.Win.Dev.Managers
|
|
|
{
|
|
|
patientPath = patientPath.Replace("*", "");
|
|
|
Directory.CreateDirectory(patientPath);
|
|
|
+ if (c.RemedicalItemList.Count == 0)
|
|
|
+ {
|
|
|
+ var fileName = Path.Combine(patientPath, "nodata.txt");
|
|
|
+ File.WriteAllText(fileName, "nodata");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
foreach (var d in c.RemedicalItemList)
|
|
@@ -228,10 +240,6 @@ namespace fis.Win.Dev.Managers
|
|
|
finally
|
|
|
{
|
|
|
_fileFinishCount++;
|
|
|
- if (_fileFinishCount == 41)
|
|
|
- {
|
|
|
- ;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -244,12 +252,18 @@ namespace fis.Win.Dev.Managers
|
|
|
//刷新进度条
|
|
|
Task.Run(() =>
|
|
|
{
|
|
|
- while (ExportStatus!=ExportStatus.Finished)
|
|
|
+ if (_fileCount > 0)
|
|
|
{
|
|
|
- Thread.Sleep(1000);
|
|
|
- ExportStatus=_fileFinishCount==_fileCount? ExportStatus.Packaging:ExportStatus.Downloading;
|
|
|
+ while (ExportStatus != ExportStatus.Finished)
|
|
|
+ {
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ ExportStatus = _fileFinishCount == _fileCount ? ExportStatus.Packaging : ExportStatus.Downloading;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Thread.Sleep(2000);
|
|
|
+ ExportStatus = ExportStatus.Packaging;
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
|