From 8d558cb173873004cd8a0d6c12f37865f03d7a4f Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期三, 22 十月 2025 10:32:15 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 51 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 36 insertions(+), 15 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 889f1ac..c388408 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -257,18 +257,28 @@
{
return BaseDal.QueryFirst(x => x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly && x.TaskState == (int)TaskOutStatusEnum.OutNew && x.NextAddress == Nextaderr, TaskOrderBy);
}
+
+ /// <summary>
+ /// 鑾峰彇姣嶈溅鏄惁鏈変换鍔★紝杩涜鍒ゆ柇
+ /// </summary>
public Dt_Task ObtainMuChetaskbool(AGVStation ZicheinnerSide)
{
- Dt_Task dt_Task = BaseDal.QueryFirst(x => (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskState == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting) && x.NextAddress == ZicheinnerSide.MotherCarDeviceCode.ToString(), TaskOrderBy);
- if (dt_Task != null) return dt_Task;
- Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ZicheinnerSide.ChildPosiDeviceCode, TaskOrderBy);
- if (dt_Task2 != null) return dt_Task2;
- return null;
+ return BaseDal.QueryFirst(x => x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly && (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskType == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting), TaskOrderBy);
}
public Dt_Task GetChariotTaskBool(string ChildPosiDeviceCode)
{
Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ChildPosiDeviceCode, TaskOrderBy);
+ if (dt_Task2 != null) return dt_Task2;
+ return null;
+ }
+
+ /// <summary>
+ /// 鑾峰彇HCJ绔欏彴鏄惁鏈変换鍔�
+ /// </summary>
+ public Dt_Task GetHCJTaskBool(string ChildPosiDeviceCode,int HCJaddres)
+ {
+ Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ChildPosiDeviceCode && x.CurrentAddress== HCJaddres.ToString(), TaskOrderBy);
if (dt_Task2 != null) return dt_Task2;
return null;
}
@@ -339,13 +349,22 @@
}
/// <summary>
- /// 鑾峰彇姣嶈溅绉诲姩浠诲姟鍜岀Щ鍔ㄤ腑鐨勪换鍔�
+ /// 鑾峰彇姣嶈溅绉诲姩浠诲姟鍜岀Щ鍔ㄤ腑鐨勪换鍔★紙鍏ュ簱锛�
/// </summary>
/// <param name="DeviceCode"></param>
/// <returns></returns>
public Dt_Task MothermachinemovementTask2(string DeviceCode)
{
- return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish && x.TaskState == (int)TaskInStatusEnum.RGV_InMothercarExecuting && x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly, TaskOrderBy);
+ return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InMothercarExecuting || x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly), TaskOrderBy);
+ }
+
+ /// <summary>
+ /// 鑾峰彇姣嶈溅绉诲姩浠诲姟鍜岀Щ鍔ㄤ腑鐨勪换鍔★紙鍑哄簱锛�
+ /// </summary>
+ /// <param name="DeviceCode"></param>
+ public Dt_Task OutMothermaTask(string DeviceCode)
+ {
+ return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskState == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting || x.RGVTaskType == (int)TaskOutStatusEnum.RGV_OutMothercarFinish), TaskOrderBy);
}
@@ -386,6 +405,8 @@
{
return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskInStatusEnum.RGV_InReleaseFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheExecuting || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseExecuting || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish) && x.RGVTaskType == (int)RGVTaskTypeEnum.PickingUp, TaskOrderBy);
}
+
+
@@ -944,6 +965,8 @@
task.TaskState = (int)TaskOutStatusEnum.RGV_OutZicheReleaseFinish;
task.RGVTaskType = (int)RGVTaskTypeEnum.PickingUp;
task.Roadway = "RGV118";
+ task.CurrentAddress = "1171";
+ task.NextAddress = "";
}
else
{
@@ -992,7 +1015,6 @@
rGVstatus.msg = "鏄庡拰WCS鎺ユ敹鍒癛GV缂栧彿涓虹┖锛岃妫�鏌�";
return rGVstatus;
}
-
IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == item.rgvTag);
if (device == null)
{
@@ -1000,11 +1022,10 @@
rGVstatus.msg = "鏌ヨ鐨凴GV宸叉柇绾�";
return rGVstatus;
}
- CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
+ SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
//褰撳墠浣嶇疆
- DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RGVCurrentlocation" && x.DeviceProParamType == "RGVCurrentlocation");
-
+ DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RGVCurrentlocation" && x.DeviceProParamType == "RGVCurrentlocation");
if (item.type == "pick") //鍙栬揣
{
@@ -1018,7 +1039,7 @@
return rGVstatus;
}
- int Currentlocation = conveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
+ int Currentlocation = Commonstacker.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
if (Currentlocation == aGVStation.Motherinlaw) //鏄惁鍦ㄥ彇璐т綅
{
rGVstatus.code = 0;
@@ -1039,10 +1060,10 @@
else if (item.type == "put") //鏀捐揣
{
AGVStation aGVStation = _gvStationService.Corridorequipment(item.rgvTag);
- int Currentlocation = conveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
+ int Currentlocation = Commonstacker.Communicator.Read<short>(deviceProDTO.DeviceProAddress);
- DeviceProDTO? deviceProFh = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RgvEquipmentStatus" && x.DeviceProParamType == "RgvEquipmentStatus");
- int Itstock = conveyorLine.Communicator.Read<short>(deviceProFh.DeviceProAddress);
+ DeviceProDTO? deviceProFh = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RgvEquipmentStatus" && x.DeviceProParamType == "RgvEquipmentStatus");
+ int Itstock = Commonstacker.Communicator.Read<short>(deviceProFh.DeviceProAddress);
if (aGVStation.Motherinlaw== Currentlocation && Itstock==0)
{
--
Gitblit v1.9.3