From d93440432c13c75f798427be327cde02cfe7f301 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期日, 20 七月 2025 17:00:29 +0800 Subject: [PATCH] 增加无称重的指定货位入库流程,添加指定卸货位解绑接口备用 --- device/SnapManager.cs | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/device/SnapManager.cs b/device/SnapManager.cs index 4b48790..5dee262 100644 --- a/device/SnapManager.cs +++ b/device/SnapManager.cs @@ -22,10 +22,11 @@ // SNAP DateTime now = DateTime.Now; - string path = Settings.CaptureUrl; - string fileName = string.Format("{0}{1}{2}{3}{4}{5}", now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second) + ".jpg"; + //string path = Settings.CaptureUrl; + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"StaticStorage/image/{now.Year}/{now.Month}/{now.Day}"); + string fileName = string.Format("{0}-{1}-{2}-{3}{4}{5}", now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second) + ".jpg"; string filePath = path + "\\" + fileName; - + string url = Path.Combine(Settings.WebApiUrl, $"static/image/{now.Year}/{now.Month}/{now.Day}", fileName); //// 鑾峰彇褰撳墠鏃堕棿 //DateTime now = DateTime.Now; @@ -42,13 +43,16 @@ //string filePath = Path.Combine(directoryPath, fileName); if (_snapDevice.SnapPictureToFileOK(ref filePath)) { - return filePath; + //return filePath; + return url; } else { return string.Empty; } } + // 澶ф鐜囩敤涓嶅埌锛屽簲璇ヤ笉鏄湰鍦版姄鍥撅紝鍙彲鑳芥槸缃戠粶鎶撳浘锛屽浘鐗囦繚瀛樺埌鍚庡彴 + public static string GetCapturePictureLocal() { return _snapDevice.GetCapturePictureLocalPath(); } -- Gitblit v1.9.1