| | |
| | | using Quartz; |
| | | using System; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_WCS.Jobs; |
| | | using WIDESEA_WCS.SchedulerExecute.AGV; |
| | |
| | | /// </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) |
| | |
| | | } |
| | | public string Run(IJobExecutionContext context) |
| | | { |
| | | try |
| | | if (lockObj1 == 0) |
| | | { |
| | | AGVSchedulerExecute.AgvAndEquiWorkFJ();//负极设备与AGV交互 |
| | | |
| | | try |
| | | { |
| | | lockObj1 = 1; |
| | | AGVSchedulerExecute.AgvAndEquiWorkFJ();//负极设备与AGV交互 |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | lockObj1 = 0; |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | catch (Exception) { } |
| | | |
| | | return ""; |
| | | return string.Empty; |
| | | } |
| | | } |
| | | } |