Quellcode durchsuchen

代码同步,WinginterfaceLibrary使用Nuget引用,

felix vor 2 Jahren
Ursprung
Commit
e89cc3c72a

+ 0 - 3
FISSDK/FISIMPL/FISIMPL.csproj

@@ -24,9 +24,6 @@
     <Reference Include="Vinno.vCloud.Protocol">
       <HintPath>..\..\packages\Vinno.vCloud.Protocol.dll</HintPath>
     </Reference>
-    <Reference Include="WingInterfaceLibrary">
-      <HintPath>..\..\packages\WingInterfaceLibrary.dll</HintPath>
-    </Reference>
   </ItemGroup>
 
 </Project>

+ 19 - 5
FISSDK/FISIMPL/RemedicalService.cs

@@ -14,7 +14,7 @@ using Vinno.vCloud.Protocol.Infrastructures;
 
 namespace FISIMPL
 {
-    class RemedicalService : IRemedicalService
+    internal class RemedicalService : IRemedicalService
     {
         private IRemedical _remedical;
         private IRemedicalV2 _remedicalV2;
@@ -110,8 +110,15 @@ namespace FISIMPL
                     }
                     Task.Run(() =>
                     {
-                        Thread.Sleep(1000);
-                        _remedical.UploadScanData(scanData);
+                        try
+                        {
+                            Thread.Sleep(1000);
+                            _remedical.UploadScanData(scanData);
+                        }
+                        catch (Exception ex)
+                        {
+                            Logger.WriteLineError($"RemedicalService Task UploadScanData Error:{ex}");
+                        }
                     });
                     return scanData.Id;
                 }
@@ -135,8 +142,15 @@ namespace FISIMPL
                         }
                         Task.Run(() =>
                         {
-                            Thread.Sleep(1000);
-                            _remedicalV2.UploadScanData(scanData);
+                            try
+                            {
+                                Thread.Sleep(1000);
+                                _remedicalV2.UploadScanData(scanData);
+                            }
+                            catch (Exception ex)
+                            {
+                                Logger.WriteLineError($"RemedicalServiceV2 Task UploadScanData Error:{ex}");
+                            }
                         });
                         return scanData.Id;
                     }

+ 1 - 31
Vinno.FIS.Sonopost/Features/Dicom/DicomForwardQueue.cs

@@ -1,24 +1,19 @@
 using Dicom;
 using Dicom.Network;
 using System;
-using System.IO;
-using System.Linq;
-using Vinno.FIS.Sonopost.Common;
 using Vinno.FIS.Sonopost.Features.Config;
 using Vinno.IUS.Common.Log;
 using DicomClient = Dicom.Network.Client.DicomClient;
 
 namespace Vinno.FIS.Sonopost.Features.Dicom
 {
-    class DicomForwardQueue : DicomOperateQueue
+    internal class DicomForwardQueue : DicomOperateQueue
     {
-        private string _workStationPath;
         private static volatile DicomForwardQueue _instance;
         public static DicomForwardQueue Instance => _instance ?? (_instance = new DicomForwardQueue());
 
         private DicomForwardQueue() : base("ForwardDicomQueue")
         {
-            _workStationPath = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.WorkStationFolder);
         }
 
         protected override bool DoWork(DicomFile dicomFile)
@@ -30,9 +25,6 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
                 {
                     var patientId = dicomFile.GetPatientId();
                     var newGuid = Guid.NewGuid().ToString("N").ToUpper();
-                    Logger.WriteLineInfo($"Begin save to workstation dicom,PatientId:{patientId}");
-                    Save(DicomResourceConstant.WorkStationFolder, dicomFile, newGuid);
-                    Logger.WriteLineInfo($"End save to workstation dicom,PatientId:{patientId}");
                     SendToWorkstation(dicomFile, patientId);
                 }
             }
@@ -40,7 +32,6 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
             {
                 Logger.WriteLineError($"Forward dicom Error:{e}");
             }
-
             return true;
         }
 
@@ -63,27 +54,6 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
             {
                 Logger.WriteLineError($"SendToWorkstation error:{ex.Message}");
             }
-            finally
-            {
-                RemoveOldDicomFiles();
-            }
-        }
-
-        protected override void RemoveOldDicomFiles()
-        {
-            try
-            {
-                if (Directory.Exists(_workStationPath))
-                {
-                    var files = Directory.GetFiles(_workStationPath).Select(m => new FileInfo(m))
-                        .Where(t => t.Exists).OrderByDescending(t => t.CreationTime);
-                    DeleteFiles(files);
-                }
-            }
-            catch (Exception e)
-            {
-                Logger.WriteLineError($"Delete workstation dicom files error {e}");
-            }
         }
     }
 }

+ 0 - 2
Vinno.FIS.Sonopost/Features/Dicom/DicomOperateQueue.cs

@@ -29,8 +29,6 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
 
         protected abstract bool DoWork(DicomFile arg);
 
-        protected abstract void RemoveOldDicomFiles();
-
         protected string Save(string folderName, DicomFile file, string newGuid, string dateFolder = null)
         {
             var targetFolder = Path.Combine(SonopostConstants.DataFolder, folderName);

+ 2 - 7
Vinno.FIS.Sonopost/Features/Dicom/DicomResourceConstant.cs

@@ -1,6 +1,6 @@
 namespace Vinno.FIS.Sonopost.Features.Dicom
 {
-    class DicomResourceConstant
+    internal class DicomResourceConstant
     {
         /// <summary>
         /// Original dicom folder.
@@ -12,11 +12,6 @@
         /// </summary>
         public const string UploadVinnoScanDataFolder = "UploadVinnoScanData";
 
-        /// <summary>
-        /// Work station folder.
-        /// </summary>
-        public const string WorkStationFolder = "WorkStation";
-
         /// <summary>
         /// Dicom server name
         /// </summary>
@@ -42,4 +37,4 @@
         /// </summary>
         public const string TempFiles = "TempFiles";
     }
-}
+}

+ 1 - 37
Vinno.FIS.Sonopost/Features/Dicom/DicomUploadQueue.cs

@@ -1,18 +1,13 @@
 using Dicom;
 using System;
-using System.IO;
-using System.Linq;
-using Vinno.FIS.Sonopost.Common;
 using Vinno.FIS.Sonopost.Managers;
 using Vinno.FIS.Sonopost.Managers.Interfaces;
 using Vinno.IUS.Common.Log;
 
 namespace Vinno.FIS.Sonopost.Features.Dicom
 {
-    class DicomUploadQueue : DicomOperateQueue
+    internal class DicomUploadQueue : DicomOperateQueue
     {
-        private string _originalDicomPath;
-
         private static volatile DicomUploadQueue _instance;
 
         private IRemedicalManager _remedicalManager;
@@ -21,7 +16,6 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
 
         private DicomUploadQueue() : base("DicomUploadQueue")
         {
-            _originalDicomPath = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.OriginalDicomFolder);
             _remedicalManager = AppManager.Instance.GetManager<IRemedicalManager>();
         }
 
@@ -59,37 +53,7 @@ namespace Vinno.FIS.Sonopost.Features.Dicom
             {
                 Logger.WriteLineInfo($"Upload dicom file error ,PatientId:{patientId},{e}");
             }
-            finally
-            {
-                RemoveOldDicomFiles();
-            }
-
             return true;
         }
-
-        protected override void RemoveOldDicomFiles()
-        {
-            try
-            {
-                if (Directory.Exists(_originalDicomPath))
-                {
-                    var folders = Directory.GetDirectories(_originalDicomPath).Select(m => new DirectoryInfo(m))
-                        .Where(t => t.Exists).OrderByDescending(t => t.CreationTime);
-                    if (folders.Count() > 1)
-                    {
-                        foreach (var item in folders.Skip(1))
-                        {
-                            item.Delete(true);
-                        }
-                    }
-                    DeleteFiles(folders.FirstOrDefault().GetFiles()
-                        .Where(t => t.Exists).OrderByDescending(t => t.CreationTime));
-                }
-            }
-            catch (Exception e)
-            {
-                Logger.WriteLineError($"Delete old dicom file error {e}");
-            }
-        }
     }
 }

+ 0 - 2
Vinno.FIS.Sonopost/Managers/DicomServerManager.cs

@@ -105,12 +105,10 @@ namespace Vinno.FIS.Sonopost.Managers
                             var originalDicom = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.OriginalDicomFolder);
                             var tempFiles = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.TempFiles);
                             var vinnoDicom = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.VinnoDicomFolder);
-                            var workstationFiles = Path.Combine(SonopostConstants.DataFolder, DicomResourceConstant.WorkStationFolder);
                             Logger.WriteLineInfo($"DicomServerManager Start Delete OverDue Files,TempFileDays:{tempFileDays}");
                             DeleteOverDueFiles(originalDicom, tempFileDays);
                             DeleteOverDueFiles(tempFiles, tempFileDays);
                             DeleteOverDueFiles(vinnoDicom, tempFileDays);
-                            DeleteOverDueFiles(workstationFiles, tempFileDays);
                             DeletetOverDueRecord(tempFileDays);
                             _remedicalManager.DeleteOverDueRecords(tempFileDays);
                             Logger.WriteLineInfo($"DicomServerManager Start Delete OverDue Files");

+ 7 - 3
Vinno.FIS.Sonopost/Managers/RemedicalManager.cs

@@ -111,7 +111,7 @@ namespace Vinno.FIS.Sonopost.Managers
                         if (_deviceStatus != DeviceStatus.Logon)
                         {
                             DicomUploadContextOperator.Instance.UpdateStatus(content.Id, DicomUploadStatus.CreateScanDataFail);
-                            Logger.WriteLineError($"Upload vinno dicom file failed,Because the Remedical is null.PatientId:{patientId}");
+                            Logger.WriteLineError($"Upload vinno dicom file failed,Because the Remedical is null.PatientId:{patientId},OriginalDicomPath:{originalDicomPath}");
                             return;
                         }
                         var scanDataId = _fisRemedicalService.UploadScanData(examId, string.Empty, content.UploadFilePath, content.VidType, "FromSonopost", patientInfo, string.Empty);
@@ -123,7 +123,7 @@ namespace Vinno.FIS.Sonopost.Managers
                         else
                         {
                             DicomUploadContextOperator.Instance.UpdateStatus(content.Id, DicomUploadStatus.CreateScanDataFail);
-                            Logger.WriteLineError($"ScanData is null.PatientId:{patientId}");
+                            Logger.WriteLineError($"ScanData is null.PatientId:{patientId},OriginalDicomPath:{originalDicomPath}");
                             return;
                         }
                     }
@@ -165,10 +165,14 @@ namespace Vinno.FIS.Sonopost.Managers
                     }
                     RemoveByScanDataId(item.ScanId);
                 }
+                if (File.Exists(item.DicomPath))
+                {
+                    File.Delete(item.DicomPath);
+                }
             }
             catch (Exception ex)
             {
-                Logger.WriteLineError($"Delete Error:{ex}");
+                Logger.WriteLineError($"RemedicalManager Delete Error:{ex}");
             }
         }
 

+ 0 - 23
Vinno.vCloud.Common.FIS/AfterSales/AfterSales.cs

@@ -13,7 +13,6 @@ using Vinno.vCloud.Common.Storage.ObjectStorageInfo;
 using Vinno.vCloud.Common.Storage.Upload;
 using Vinno.vCloud.Protocol.Infrastructures;
 using Vinno.vCloud.Protocol.Messages.Client.AfterSales;
-using Vinno.vCloud.Protocol.Messages.Client.Storage;
 using Vinno.vCloud.Protocol.Messages.Terminal.Remedical;
 
 namespace Vinno.vCloud.Common.FIS.AfterSales
@@ -58,7 +57,6 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
             _terminalId = terminalId;
             _leaf = leaf;
             _leaf.MessageArrived += OnMessageArrived;
-            UploadHelper.GetAuthorization = GetAuthorization;
             _terminalStorageInfo = GetAfterSalesStorageInfo();
         }
 
@@ -598,27 +596,6 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
             }
         }
 
-        private string GetAuthorization(string fileName)
-        {
-            try
-            {
-                var authorization = string.Empty;
-                var getAuthorizationRequest = new GetAuthorizationRequest();
-                getAuthorizationRequest.FileName = fileName;
-                var storageResult = _leaf.Send(getAuthorizationRequest);
-                var getAuthorizationResult = GetAuthorizationResult.Convert(storageResult);
-                if (getAuthorizationResult != null)
-                {
-                    authorization = getAuthorizationResult.Authorization;
-                }
-                return authorization;
-            }
-            catch (Exception e)
-            {
-                throw new Exception($"get authentication form server error:{e}");
-            }
-        }
-
         private void OnMasterChanged(MasterInfo e)
         {
             MasterChanged?.Invoke(this, e);

+ 154 - 10
Vinno.vCloud.Common.FIS/AfterSales/AfterSalesV2.cs

@@ -41,6 +41,7 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
         private bool _hasReceivedApiInfo;
         private readonly object _progressLock = new object();
         private string _patchCode;
+        private RemoteMaintenanceType _currentRemoteMaintenanceType;
 
         private MasterInfo _master;
 
@@ -117,9 +118,58 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
                         Logger.WriteLineError($"AfterSalesV2 Handle PushDevicePatchToDeviceNotification Error:{ex}");
                     }
                     break;
+
+                case NotificationTypeEnum.GetRemoteLogToDeviceNotification:
+                    try
+                    {
+                        if (e.Params is GetRemoteLogToDeviceNotification getRemoteLogToDeviceNotification)
+                        {
+                            HandleGetRemoteLogToDeviceNotification(getRemoteLogToDeviceNotification);
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        Logger.WriteLineError($"AfterSalesV2 Handle GetRemoteLogToDeviceNotification Error:{ex}");
+                    }
+                    break;
+
+                case NotificationTypeEnum.DevicePrinterRequestNotification:
+                    try
+                    {
+                        if (e.Params is DevicePrinterRequestNotification devicePrinterRequestNotification)
+                        {
+                            HandleDevicePrinterRequestNotification(devicePrinterRequestNotification);
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        Logger.WriteLineError($"AfterSalesV2 Handle DevicePrinterRequestNotification Error:{ex}");
+                    }
+                    break;
             }
         }
 
+        private void HandleDevicePrinterRequestNotification(DevicePrinterRequestNotification devicePrinterRequestNotification)
+        {
+        }
+
+        private void HandleGetRemoteLogToDeviceNotification(GetRemoteLogToDeviceNotification getRemoteLogToDeviceNotification)
+        {
+            Logger.WriteLineInfo($"AfterSalesV2 GetRemoteLogToDeviceNotification Receive");
+            if (_master == null)
+            {
+                Logger.WriteLineError("HandleGetRemoteLogToDeviceNotification Error,Current Master is Null");
+                return;
+            }
+            var parameters = new List<AdditionParameter>
+            {
+                new AdditionParameter("BeginTime","DateTime",getRemoteLogToDeviceNotification.StartTime.ToString()),
+                new AdditionParameter("EndTime","DateTime",getRemoteLogToDeviceNotification.EndTime.ToString()),
+            };
+            var remoteMaintenanceInfo = new RemoteMaintenanceInfo(RemoteMaintenanceType.GetLog, _master?.UserId, parameters);
+            OnRemoteMaintenanceEvent(remoteMaintenanceInfo);
+        }
+
         private void HandlePushDevicePatchToDeviceNotification(PushDevicePatchToDeviceNotification pushDevicePatchToDeviceNotification)
         {
             Logger.WriteLineInfo($"AfterSalesV2 PushDevicePatchToDeviceNotification Receive");
@@ -184,8 +234,9 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
         }
 
         private void HandleConnectStatusToDeviceNotification(ConnectStatusToDeviceNotification connectStatusToDeviceNotification)
+
         {
-            Logger.WriteLineInfo($"AfterSalesV2 ConnectStatusToDeviceNotification Receive");
+            Logger.WriteLineInfo($"AfterSalesV2 ConnectStatusToDeviceNotification Receive,ControlType:{connectStatusToDeviceNotification.ControlType},TransactionType:{connectStatusToDeviceNotification.TransactionType}");
             var isConsultationLiveService = connectStatusToDeviceNotification.TransactionType == TransactionTypeEnum.Consultion;
             switch (connectStatusToDeviceNotification.ControlType)
             {
@@ -334,6 +385,7 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
 
         private void OnRemoteMaintenanceEvent(RemoteMaintenanceInfo remoteMaintenanceInfo)
         {
+            _currentRemoteMaintenanceType = remoteMaintenanceInfo.RemoteMaintenanceType;
             RemoteMaintenanceEvent?.Invoke(this, remoteMaintenanceInfo);
         }
 
@@ -406,26 +458,61 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
             }
             else if (message is ProcessReslut processResult)
             {
-                switch (processResult.RunTaskType)
+                switch (_currentRemoteMaintenanceType)
                 {
-                    case TaskType.PushPatch:
+                    case RemoteMaintenanceType.PushPatch:
                         try
                         {
+                            UploadDeviceDownloadPatchProgressToUserRequest uploadDeviceDownloadPatchProgressToUserRequest;
+                            var progress = processResult.Percent;
                             if (processResult.RunTaskStatus == TaskStatus.Progressing)
                             {
-                                var progress = processResult.Percent;
-                                var uploadDeviceDownloadPatchProgressToUserRequest = new UploadDeviceDownloadPatchProgressToUserRequest
+                                uploadDeviceDownloadPatchProgressToUserRequest = new UploadDeviceDownloadPatchProgressToUserRequest
                                 {
                                     Token = _token,
-                                    Progress = (int)progress,
+                                    Progress = (int)(progress * 100),
                                     UserCode = _master?.UserId,
                                     PatchCode = _patchCode,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.Success
                                 };
-                                var result = JsonRpcHelper.UploadDeviceDownloadPatchProgressToUser(_deviceService, uploadDeviceDownloadPatchProgressToUserRequest);
-                                if (!result)
+                            }
+                            else if (processResult.RunTaskStatus == TaskStatus.Finished)
+                            {
+                                uploadDeviceDownloadPatchProgressToUserRequest = new UploadDeviceDownloadPatchProgressToUserRequest
                                 {
-                                    Logger.WriteLineError($"AfterSalesV2 UploadDeviceDownloadPatchProgressToUser Failed");
-                                }
+                                    Token = _token,
+                                    Progress = 100,
+                                    UserCode = _master?.UserId,
+                                    PatchCode = _patchCode,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.Success
+                                };
+                            }
+                            else if (processResult.Detail == DetailType.PushPatchCancel)
+                            {
+                                uploadDeviceDownloadPatchProgressToUserRequest = new UploadDeviceDownloadPatchProgressToUserRequest
+                                {
+                                    Token = _token,
+                                    Progress = 0,
+                                    UserCode = _master?.UserId,
+                                    PatchCode = _patchCode,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.CancelDownloadPatch,
+                                };
+                            }
+                            else
+                            {
+                                uploadDeviceDownloadPatchProgressToUserRequest = new UploadDeviceDownloadPatchProgressToUserRequest
+                                {
+                                    Token = _token,
+                                    Progress = 0,
+                                    UserCode = _master?.UserId,
+                                    PatchCode = _patchCode,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.DownloadPatchFail,
+                                };
+                            }
+                            var result = JsonRpcHelper.UploadDeviceDownloadPatchProgressToUser(_deviceService, uploadDeviceDownloadPatchProgressToUserRequest);
+                            if (!result)
+                            {
+                                Logger.WriteLineError($"AfterSalesV2 UploadDeviceDownloadPatchProgressToUser Failed");
                             }
                         }
                         catch (Exception ex)
@@ -433,6 +520,63 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
                             Logger.WriteLineError($"AfterSalesV2 UploadDeviceDownloadPatchProgressToUser error:{ex}");
                         }
                         break;
+
+                    case RemoteMaintenanceType.GetLog:
+                        try
+                        {
+                            RemoteLogResponseRequest remoteLogResponseRequest;
+                            var progress = processResult.Percent;
+                            if (processResult.RunTaskStatus == TaskStatus.Progressing)
+                            {
+                                remoteLogResponseRequest = new RemoteLogResponseRequest
+                                {
+                                    Token = _token,
+                                    Rate = (int)(progress * 100),
+                                    UserCode = _master?.UserId,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.Success
+                                };
+                            }
+                            else if (processResult.RunTaskStatus == TaskStatus.Finished)
+                            {
+                                remoteLogResponseRequest = new RemoteLogResponseRequest
+                                {
+                                    Token = _token,
+                                    Rate = 100,
+                                    UserCode = _master?.UserId,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.Success
+                                };
+                            }
+                            else if (processResult.Detail == DetailType.GetLogCancel)
+                            {
+                                remoteLogResponseRequest = new RemoteLogResponseRequest
+                                {
+                                    Token = _token,
+                                    Rate = 0,
+                                    UserCode = _master?.UserId,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.DeviceCancelLogDownload
+                                };
+                            }
+                            else
+                            {
+                                remoteLogResponseRequest = new RemoteLogResponseRequest
+                                {
+                                    Token = _token,
+                                    Rate = 0,
+                                    UserCode = _master?.UserId,
+                                    RemoteDeviceState = RemoteDeviceStateEnum.LogDownloaddFail,
+                                };
+                            }
+                            var result = JsonRpcHelper.ResponseRemoteLog(_deviceService, remoteLogResponseRequest);
+                            if (!result)
+                            {
+                                Logger.WriteLineError($"AfterSalesV2 ResponseRemoteLog Failed");
+                            }
+                        }
+                        catch (Exception ex)
+                        {
+                            Logger.WriteLineError($"AfterSalesV2 ResponseRemoteLog error:{ex}");
+                        }
+                        break;
                 }
             }
         }

+ 31 - 0
Vinno.vCloud.Common.FIS/Helper/JsonRpcHelper.cs

@@ -667,5 +667,36 @@ namespace Vinno.vCloud.Common.FIS.Helper
             }
             return false;
         }
+
+        internal static bool ResponseRemoteLog(IDeviceService deviceService, RemoteLogResponseRequest remoteLogResponseRequest)
+        {
+            try
+            {
+                return deviceService.ResponseRemoteLogAsync(remoteLogResponseRequest).Result;
+            }
+            catch (AggregateException e)
+            {
+                foreach (var ex in e.InnerExceptions)
+                {
+                    if (ex is RpcException rpcExcetpion)
+                    {
+                        Logger.WriteLineError($"ResponseRemoteLog Error,ErrorCode:{rpcExcetpion.ErrorCode},ErrorMsg:{rpcExcetpion.InternalMessage} ");
+                    }
+                    else if (ex is HttpRequestException httpRequestException)
+                    {
+                        Logger.WriteLineError($"ResponseRemoteLogAsync Error,ErrorMsg: HttpRequestException");
+                    }
+                    else
+                    {
+                        Logger.WriteLineError($"ResponseRemoteLogAsync Error,ErrorMsg:{ex}");
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Logger.WriteLineError($"ResponseRemoteLogAsync Error,ErrorMsg:{ex}");
+            }
+            return false;
+        }
     }
 }

+ 10 - 0
Vinno.vCloud.Common.FIS/Notification/FISWebSocket.cs

@@ -107,6 +107,16 @@ namespace Vinno.vCloud.Common.FIS.Notification
                                 noitificationArgs.Params = pushDevicePatchToDeviceNotification;
                                 break;
 
+                            case NotificationTypeEnum.GetRemoteLogToDeviceNotification:
+                                var getRemoteLogToDeviceNotification = JsonConvert.DeserializeObject<GetRemoteLogToDeviceNotification>(result);
+                                noitificationArgs.Params = getRemoteLogToDeviceNotification;
+                                break;
+
+                            case NotificationTypeEnum.DevicePrinterRequestNotification:
+                                var devicePrinterRequestNotification = JsonConvert.DeserializeObject<DevicePrinterRequestNotification>(result);
+                                noitificationArgs.Params = devicePrinterRequestNotification;
+                                break;
+
                             default:
                                 noitificationArgs.Params = result;
                                 break;

+ 2 - 4
Vinno.vCloud.Common.FIS/Vinno.vCloud.Common.FIS.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
@@ -7,6 +7,7 @@
   <ItemGroup>
     <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
     <PackageReference Include="SkiaSharp" Version="1.68.2.1" />
+    <PackageReference Include="WingInterfaceLibrary" Version="1.1.4.1" />
   </ItemGroup>
 
   <ItemGroup>
@@ -39,9 +40,6 @@
     <Reference Include="WebSocket4Net">
       <HintPath>..\packages\WebSocket4Net.dll</HintPath>
     </Reference>
-    <Reference Include="WingInterfaceLibrary">
-      <HintPath>..\packages\WingInterfaceLibrary.dll</HintPath>
-    </Reference>
   </ItemGroup>
 
 </Project>

+ 1 - 1
Vinno.vCloud.Common.FIS/vCloudTerminal.cs

@@ -481,7 +481,7 @@ namespace Vinno.vCloud.Common.FIS
             }
             catch (Exception e)
             {
-                throw new Exception("get authentication form server error");
+                throw new Exception($"get authentication form server error:{e}");
             }
         }
 

BIN
packages/WingInterfaceLibrary.dll