From 2950220f98f891a64cc452478e2a2ae61b82a8cd Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期日, 13 四月 2025 16:21:52 +0800
Subject: [PATCH] 优化代码、添加大屏
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
index 4d04f61..dfe8b78 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
@@ -77,6 +77,7 @@
#region 鍒涘缓绉昏溅鍏呯數浠诲姟
if (command.Err_Status == (short)ShuttleCarErr.LowBattery || command.ElectricQuantity <= (short)ShuttleCarErr.LowBattery)
{
+ var ShuttleCar = QueryCode(shuttleCar.DeviceCode);//鍦ㄥ厖鐢典綅鐩存帴璁╃┛姊溅鍘诲厖鐢�
//鐢熸垚鍫嗗灈鏈虹Щ杞︿换鍔�&绌挎杞﹀厖鐢典换鍔�,鍒ゆ柇鏄惁鏈夌┛姊溅鍦ㄥ厖鐢�
Dt_Task _Task = _taskRepository.QueryFirst(x => x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt());
if (_Task != null)
@@ -89,8 +90,6 @@
{
if (command1.Status == (short)ShuttleCarStatus.Charging && command1.ElectricQuantity >= 50)
{
- var ShuttleCar = QueryCode(shuttleCar1.DeviceCode);
- _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "", ShuttleCar.ShuttleCarCode);
shuttleCar1.SetValue(ShuttleCarDBName.TaskType, (short)ShuttleCarStatus.QuitCharging);
}
}
@@ -98,8 +97,16 @@
}
else
{
- var ShuttleCar = QueryCode(shuttleCar.DeviceCode);
- _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "003-002-001", ShuttleCar.ShuttleCarCode, ShuttleCarTaskType.Charging.ToString());
+ //鍒ゆ柇鍏呯數浣嶆槸鍚︽湁杞�
+ var ShuttleCar1 = _shuttleCarService.QueryShuttleCar("003-002-001");
+ if (ShuttleCar1 != null && ShuttleCar1.ShuttleCarCode != shuttleCar.DeviceCode)
+ {
+ _taskService.AddRelocationCarTask(ShuttleCar1.ShuttleCarPosition, "", ShuttleCar1.ShuttleCarCode);
+ }
+ else
+ {
+ _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "003-002-001", ShuttleCar.ShuttleCarCode, ShuttleCarTaskType.Charging.ToString());
+ }
}
}
#endregion
--
Gitblit v1.9.3