diff --git a/Model/Services/SOCClientService.cs b/Model/Services/SOCClientService.cs index fe1db98..981a532 100644 --- a/Model/Services/SOCClientService.cs +++ b/Model/Services/SOCClientService.cs @@ -253,11 +253,6 @@ namespace SparkClient.Model.Services // 读取图片接口 List imageNames = await RetrieveImageAsync(savePath); - if (imageNames.Count == 0) - { - // 采集状态失败 - return new SocResultEntity { Status = StatusCodes.ImageFileReadFailure, Images = new List() }; - } // 采集状态接口 string acquisitionStatus = await CollectStatusAsync(); // 成功 @@ -266,6 +261,11 @@ namespace SparkClient.Model.Services // 采集状态失败 return new SocResultEntity { Status = acquisitionStatus, Images = new List() }; } + if (imageNames.Count == 0) + { + // 图片文件读取失败 + return new SocResultEntity { Status = StatusCodes.ImageFileReadFailure, Images = new List() }; + } return new SocResultEntity { Status = acquisitionStatus, Images = imageNames, DeviceId = entity.DeviceId}; } catch (Exception e)