From 24de88ebbbb3597bb2043840bc685e3d59363967 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期一, 07 七月 2025 16:48:39 +0800
Subject: [PATCH] 优化轮询ERP信息流程、添加AGV接口报文打印、执行中任务强制取消的功能

---
 device/SnapManager.cs |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/device/SnapManager.cs b/device/SnapManager.cs
index 625a39b..4b48790 100644
--- a/device/SnapManager.cs
+++ b/device/SnapManager.cs
@@ -1,8 +1,11 @@
 锘縰sing System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+
+using NetSDKCS;
 
 namespace HH.WCS.Mobox3.AnGang.device {
     public class SnapManager {
@@ -23,6 +26,21 @@
             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;
 
+            //// 鑾峰彇褰撳墠鏃堕棿
+            //DateTime now = DateTime.Now;
+
+            //// 鏋勫缓鏂囦欢鍚嶏細yyyy-MM-dd-HHmmss.jpg
+            //string fileName = $"{now:yyyy-MM-dd-HHmmss}.jpg";
+
+            //// 鏋勫缓鏂囦欢澶硅矾寰勶細path\yyyy\MM\dd
+            //string directoryPath = Path.Combine(path, now.Year.ToString(), now.Month.ToString("00"), now.Day.ToString("00"));
+
+            //// 濡傛灉鐩綍涓嶅瓨鍦ㄥ垯鍒涘缓
+            //Directory.CreateDirectory(directoryPath);
+
+            //// 瀹屾暣鐨勬枃浠惰矾寰�+            //string filePath = Path.Combine(directoryPath, fileName);
+
             if (_snapDevice.SnapPictureToFileOK(ref filePath)) {
                 return filePath;
             }
@@ -30,5 +48,9 @@
                 return string.Empty;
             }
         }
+
+        public static string GetCapturePictureLocal() {
+            return _snapDevice.GetCapturePictureLocalPath();
+        }
     }
 }

--
Gitblit v1.9.1