From febcd0c73b51b17f484ff9a9a189b1f85130c2f7 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 17 三月 2026 13:52:06 +0800
Subject: [PATCH] 更新自动门,新增切卷卷绕缓存架
---
wcs-server-hbf/WIDESEA_WCS/Jobs/RGV/AgvAndEquiWorkFJJob.cs | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/wcs-server-hbf/WIDESEA_WCS/Jobs/RGV/AgvAndEquiWorkFJJob.cs b/wcs-server-hbf/WIDESEA_WCS/Jobs/RGV/AgvAndEquiWorkFJJob.cs
index 7a56743..8b541d6 100644
--- a/wcs-server-hbf/WIDESEA_WCS/Jobs/RGV/AgvAndEquiWorkFJJob.cs
+++ b/wcs-server-hbf/WIDESEA_WCS/Jobs/RGV/AgvAndEquiWorkFJJob.cs
@@ -1,5 +1,6 @@
锘縰sing Quartz;
using System;
+using System.Threading;
using System.Threading.Tasks;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.SchedulerExecute.AGV;
@@ -12,11 +13,12 @@
/// </summary>
public class AgvAndEquiWorkFJJob : JobBase, IJob
{
+ private static int lockObj1 = 0;
public Task Execute(IJobExecutionContext context)
{
try
{
-
+
var executeLog = ExecuteJob(context, () => Run(context));
}
catch (Exception)
@@ -27,14 +29,21 @@
}
public string Run(IJobExecutionContext context)
{
- try
+ if (lockObj1 == 0)
{
- AGVSchedulerExecute.AgvAndEquiWorkFJ();//璐熸瀬璁惧涓嶢GV浜や簰
-
+ try
+ {
+ lockObj1 = 1;
+ AGVSchedulerExecute.AgvAndEquiWorkFJ();//璐熸瀬璁惧涓嶢GV浜や簰
+ }
+ catch (Exception ex)
+ {
+ lockObj1 = 0;
+ throw new Exception(ex.Message);
+ }
}
- catch (Exception) { }
- return "";
+ return string.Empty;
}
}
}
--
Gitblit v1.9.3