1.初始化项目。保险起见bin目录完整提交 2.基于现场代码为调整过的初始项目(此次提交还未解决代码差异问题)

This commit is contained in:
龚记林
2026-08-19 11:14:30 +08:00
parent b820c71956
commit 2b30644d28
382 changed files with 140652 additions and 1 deletions
@@ -0,0 +1,74 @@
using System;
using System.Threading;
using HxBusiness;
namespace AGVSystem.A17168
{
// Token: 0x02000030 RID: 48
public class TrafficCtrl
{
// Token: 0x06000291 RID: 657 RVA: 0x000537C0 File Offset: 0x000519C0
private static int Agv_Land(int agvid)
{
byte b = 0;
while ((int)b < Func.AgvInfo.Length)
{
bool flag = Func.AgvInfo[(int)b].Agv_ID == agvid;
if (flag)
{
return Func.AgvInfo[(int)b].Location_Display;
}
b += 1;
}
return 0;
}
// Token: 0x06000292 RID: 658 RVA: 0x00053810 File Offset: 0x00051A10
public static void Listen()
{
for (;;)
{
try
{
BusinessManage businessCtrl = Frm_A17168.businessCtrl;
bool flag = ((businessCtrl != null) ? businessCtrl.apiModel : null) == null;
if (flag)
{
continue;
}
int autoTime = Frm_A17168.businessCtrl.apiModel.AutoTime;
bool flag2 = autoTime == 0 || string.IsNullOrEmpty(Frm_A17168.businessCtrl.apiModel.waitRfidList) || Frm_A17168.autoLeavedDic == null || Frm_A17168.autoLeavedDic.Count <= 0;
if (flag2)
{
continue;
}
foreach (TrafficModel trafficModel in Frm_A17168.autoLeavedDic)
{
bool flag3 = trafficModel.agvId == 0;
if (!flag3)
{
bool flag4 = (DateTime.Now - trafficModel.InArea).TotalSeconds > (double)autoTime;
if (flag4)
{
bool flag5 = Frm_A17168.businessCtrl.ByLeaved(trafficModel.agvId.ToString(), TrafficCtrl.Agv_Land(trafficModel.agvId).ToString(), trafficModel.areaCode.ToString());
WriteTxt.SaveLog1(trafficModel.areaCode.ToString() + "自动释放,返回的值" + flag5.ToString(), "放行日志" + trafficModel.agvId.ToString(), "插件日志");
bool flag6 = flag5;
if (flag6)
{
Frm_A17168.leavedDic[trafficModel.agvId] = 0;
trafficModel.agvId = 0;
WriteTxt.SaveLog1(trafficModel.areaCode.ToString() + "路口已自动归还", "放行日志" + trafficModel.agvId.ToString(), "插件日志");
}
}
}
}
}
catch (Exception ex)
{
WriteTxt.SaveLog1("第三方交管监听线程异常!" + ex.ToString(), "异常日志", "插件日志");
}
Thread.Sleep(1000);
}
}
}
}