1.初版差异提交

This commit is contained in:
龚记林
2026-08-19 17:02:08 +08:00
parent 6f8dae2d02
commit 92c0d2e8d5
24 changed files with 507 additions and 27 deletions
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AGVSystem.A17168;
namespace AGVSystem.Cls
{
@@ -16,6 +17,7 @@ namespace AGVSystem.Cls
int[] num = new int[2];
num[0] = Convert.ToInt16(((System.Windows.Forms.Label)sender).Tag.ToString().Split('-')[0]);
num[1] = Convert.ToInt16(((System.Windows.Forms.Label)sender).Tag.ToString().Split('-')[1]);
ClearOtherLand(num[1]);
for (int i = 0; i < mainfrm.ds_CrossInfo.Tables[0].Rows.Count; i++)
{
string s = mainfrm.ds_CrossInfo.Tables[0].Rows[i]["当前地标编号"].ToString();
@@ -29,5 +31,37 @@ namespace AGVSystem.Cls
}
}
}
/// <summary>
/// 复位路口时向第三方交管手动归还路权
/// </summary>
private static void ClearOtherLand(int land)
{
try
{
foreach (TrafficModel item in Frm_A17168.autoLeavedDic)
{
if (item.agvId == 0)
{
continue;
}
if (item.areaCode != land.ToString())
{
continue;
}
bool flag = Frm_A17168.businessCtrl.ByLeaved(item.agvId.ToString(), land.ToString(), item.areaCode.ToString());
WriteTxt.SaveLog1(item.areaCode.ToString() + "手动释放,返回的值" + flag, "放行日志" + item.agvId, "插件日志");
if (flag)
{
Frm_A17168.leavedDic[item.agvId] = 0;
item.agvId = 0;
WriteTxt.SaveLog1(item.areaCode.ToString() + "路口已手动归还", "放行日志" + item.agvId, "插件日志");
}
}
}
catch (Exception)
{
}
}
}
}