From 42a51b0fc2041b872691637db0ec01391a67e026 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 18 八月 2025 15:56:35 +0800
Subject: [PATCH] 1
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 4
项目代码/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue | 2
项目代码/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_hty.js | 2
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs | 151 +++++++++++++++++++++++++++++++++++++++++++------
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user | 2
项目代码/WCS/WIDESEAWCS_Client/src/views/taskinfo/task_hty.vue | 2
6 files changed, 137 insertions(+), 26 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_hty.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_hty.js"
index 310b615..04b5dbd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_hty.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_hty.js"
@@ -67,7 +67,7 @@
},
rowClick({ row, column, event }) {
//鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
- this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+ //this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
},
modelOpenAfter(row) {
//鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
index 84e1cf2..9b01fbf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
@@ -45,7 +45,7 @@
{ title: "涓嬩竴浣嶇疆", field: "nextAddress", type: "like" },
],
[
- { title: "宸烽亾鍙�", field: "roadway", type: "like" },
+ { title: "宸烽亾鍙�", field: "roadway", type: "select" ,dataKey: "Stacker", data: [],},
{ title: "鍒涘缓浜�", field: "creater", type: "like" },
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task_hty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task_hty.vue"
index ca8b5fa..22ef20a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task_hty.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/taskinfo/task_hty.vue"
@@ -53,7 +53,7 @@
{ title: "涓嬩竴浣嶇疆", field: "nextAddress", type: "like" },
],
[
- { title: "宸烽亾鍙�", field: "roadway", type: "like" },
+ { title: "宸烽亾鍙�", field: "roadway", type: "select" ,dataKey: "Stacker", data: [],},
{ title: "鍒涘缓浜�", field: "creater", type: "like" },
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user"
index 19c1b99..8983b31 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user"
@@ -3,7 +3,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>E:\GET\AoTanSiWCS\椤圭洰浠g爜\WCS\WIDESEAWCS_Server\WIDESEAWCS_Server\bin\Release\net6.0\publish\</_PublishTargetUrl>
- <History>True|2025-08-16T08:33:07.2265013Z||;True|2025-08-16T16:08:02.5366587+08:00||;True|2025-08-16T16:04:57.6117051+08:00||;True|2025-08-16T15:48:46.1045456+08:00||;True|2025-08-16T15:30:17.3989863+08:00||;True|2025-08-16T14:46:36.5094682+08:00||;True|2025-08-16T14:14:17.0500765+08:00||;True|2025-08-16T13:31:48.8727652+08:00||;True|2025-08-16T13:24:29.8307713+08:00||;True|2025-08-16T13:16:29.9622111+08:00||;True|2025-08-16T11:23:35.5640992+08:00||;True|2025-08-16T11:02:59.2985083+08:00||;True|2025-08-16T10:27:02.8633285+08:00||;True|2025-08-16T10:10:08.1477861+08:00||;True|2025-08-15T16:44:40.1716233+08:00||;True|2025-08-15T16:37:15.4095592+08:00||;True|2025-08-15T16:10:23.4132871+08:00||;True|2025-08-15T15:39:23.4095856+08:00||;True|2025-08-15T15:28:40.1757665+08:00||;True|2025-08-15T15:17:03.4120137+08:00||;True|2025-08-14T14:56:07.9836766+08:00||;True|2025-08-14T13:46:14.8376860+08:00||;True|2025-08-14T13:40:06.1474672+08:00||;True|2025-08-14T13:35:01.0314827+08:00||;True|2025-08-14T13:30:22.4451955+08:00||;True|2025-08-14T13:01:53.0152050+08:00||;True|2025-08-14T09:25:26.2041015+08:00||;True|2025-08-14T08:52:03.5944496+08:00||;True|2025-08-13T16:03:14.7435997+08:00||;True|2025-08-13T15:45:41.5991008+08:00||;True|2025-08-13T15:16:36.2021682+08:00||;True|2025-08-13T09:09:27.8499524+08:00||;True|2025-08-13T09:06:29.1371955+08:00||;True|2025-08-12T16:20:01.1810979+08:00||;True|2025-08-12T15:15:58.7445192+08:00||;True|2025-08-12T14:56:43.1314180+08:00||;True|2025-08-07T16:09:37.4325511+08:00||;True|2025-08-07T15:03:02.4443822+08:00||;True|2025-08-07T14:51:02.2746340+08:00||;True|2025-08-07T14:50:52.4634781+08:00||;True|2025-08-07T14:44:25.7952161+08:00||;True|2025-08-06T16:05:13.6764446+08:00||;True|2025-08-06T15:48:26.9347397+08:00||;True|2025-08-06T15:24:30.4982821+08:00||;True|2025-08-06T15:23:27.4513567+08:00||;True|2025-08-06T14:57:04.0476264+08:00||;True|2025-08-06T14:43:06.1306795+08:00||;True|2025-08-06T14:30:32.8125962+08:00||;True|2025-08-06T14:22:42.8305756+08:00||;True|2025-08-06T14:08:24.3056726+08:00||;True|2025-08-06T12:49:07.0122619+08:00||;True|2025-08-06T09:53:47.1995016+08:00||;True|2025-08-06T09:23:43.4599118+08:00||;True|2025-08-06T09:17:41.5263742+08:00||;True|2025-08-01T13:15:58.0733845+08:00||;</History>
+ <History>True|2025-08-18T05:08:36.7873753Z||;True|2025-08-18T11:46:56.4805705+08:00||;True|2025-08-18T11:22:02.9054606+08:00||;True|2025-08-18T11:07:33.4630780+08:00||;True|2025-08-18T10:50:48.4350473+08:00||;True|2025-08-16T16:33:07.2265013+08:00||;True|2025-08-16T16:08:02.5366587+08:00||;True|2025-08-16T16:04:57.6117051+08:00||;True|2025-08-16T15:48:46.1045456+08:00||;True|2025-08-16T15:30:17.3989863+08:00||;True|2025-08-16T14:46:36.5094682+08:00||;True|2025-08-16T14:14:17.0500765+08:00||;True|2025-08-16T13:31:48.8727652+08:00||;True|2025-08-16T13:24:29.8307713+08:00||;True|2025-08-16T13:16:29.9622111+08:00||;True|2025-08-16T11:23:35.5640992+08:00||;True|2025-08-16T11:02:59.2985083+08:00||;True|2025-08-16T10:27:02.8633285+08:00||;True|2025-08-16T10:10:08.1477861+08:00||;True|2025-08-15T16:44:40.1716233+08:00||;True|2025-08-15T16:37:15.4095592+08:00||;True|2025-08-15T16:10:23.4132871+08:00||;True|2025-08-15T15:39:23.4095856+08:00||;True|2025-08-15T15:28:40.1757665+08:00||;True|2025-08-15T15:17:03.4120137+08:00||;True|2025-08-14T14:56:07.9836766+08:00||;True|2025-08-14T13:46:14.8376860+08:00||;True|2025-08-14T13:40:06.1474672+08:00||;True|2025-08-14T13:35:01.0314827+08:00||;True|2025-08-14T13:30:22.4451955+08:00||;True|2025-08-14T13:01:53.0152050+08:00||;True|2025-08-14T09:25:26.2041015+08:00||;True|2025-08-14T08:52:03.5944496+08:00||;True|2025-08-13T16:03:14.7435997+08:00||;True|2025-08-13T15:45:41.5991008+08:00||;True|2025-08-13T15:16:36.2021682+08:00||;True|2025-08-13T09:09:27.8499524+08:00||;True|2025-08-13T09:06:29.1371955+08:00||;True|2025-08-12T16:20:01.1810979+08:00||;True|2025-08-12T15:15:58.7445192+08:00||;True|2025-08-12T14:56:43.1314180+08:00||;True|2025-08-07T16:09:37.4325511+08:00||;True|2025-08-07T15:03:02.4443822+08:00||;True|2025-08-07T14:51:02.2746340+08:00||;True|2025-08-07T14:50:52.4634781+08:00||;True|2025-08-07T14:44:25.7952161+08:00||;True|2025-08-06T16:05:13.6764446+08:00||;True|2025-08-06T15:48:26.9347397+08:00||;True|2025-08-06T15:24:30.4982821+08:00||;True|2025-08-06T15:23:27.4513567+08:00||;True|2025-08-06T14:57:04.0476264+08:00||;True|2025-08-06T14:43:06.1306795+08:00||;True|2025-08-06T14:30:32.8125962+08:00||;True|2025-08-06T14:22:42.8305756+08:00||;True|2025-08-06T14:08:24.3056726+08:00||;True|2025-08-06T12:49:07.0122619+08:00||;True|2025-08-06T09:53:47.1995016+08:00||;True|2025-08-06T09:23:43.4599118+08:00||;True|2025-08-06T09:17:41.5263742+08:00||;True|2025-08-01T13:15:58.0733845+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
index 0941042..45ffc8b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
@@ -11,8 +11,8 @@
"ConnectionStringsEncryption": false,
"MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
//杩炴帴瀛楃涓�
- //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "ConnectionString": "Data Source=192.168.32.240;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"ConnectionString": "Data Source=192.168.32.240;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//璺ㄥ煙
"Cors": {
"PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs"
index 1fb6714..2584b75 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs"
@@ -433,7 +433,6 @@
{
if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault))
{
-
var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && (x.TaskState < 230||x.TaskState == (int)TaskInStatusEnum.RGV_TransFer|| x.TaskState == (int)TaskInStatusEnum.RGV_TransFerFInish)) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound)));
if (taskSecond != null)
{
@@ -449,7 +448,26 @@
if (task.Remark != null)
{
- return GetDispatchExecutingTask(task);
+ return GetDispatchExecutingTask(task, taskSecond);
+ }
+
+ return task;
+ }
+ }
+ }
+ else if ((taskSecond.CurrentAddress == "1025" || taskSecond.CurrentAddress == "1026") && (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_InExecuting))
+ {
+ if (task.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || task.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish)
+ {
+ if (task.TargetStation - taskSecond.SourceStation > 1 && task.TargetStation - taskSecond.TargetStation > 1)
+ {
+ LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��");
+
+ Thread.Sleep(1000);
+
+ if (task.Remark != null)
+ {
+ return GetDispatchExecutingTask(task, taskSecond);
}
return task;
@@ -466,7 +484,7 @@
Thread.Sleep(1000);
if (task.Remark != null)
{
- return GetDispatchExecutingTask(task);
+ return GetDispatchExecutingTask(task, taskSecond);
}
return task;
}
@@ -482,6 +500,10 @@
}
if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000)
{
+ if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(15),
@@ -523,7 +545,24 @@
if (task.Remark != null)
{
- return GetDispatchExecutingTask(task);
+ return GetDispatchExecutingTask(task, taskSecond);
+ }
+ return task;
+ }
+ }
+ }
+ else if ((taskSecond.CurrentAddress == "1025" || taskSecond.CurrentAddress == "1026") && (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_InExecuting))
+ {
+ if (task.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || task.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish)
+ {
+ if (taskSecond.SourceStation - task.TargetStation > 1 && taskSecond.TargetStation - task.TargetStation > 1)
+ {
+ LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��");
+ Thread.Sleep(1000);
+
+ if (task.Remark != null)
+ {
+ return GetDispatchExecutingTask(task, taskSecond);
}
return task;
}
@@ -540,7 +579,7 @@
if (task.Remark != null)
{
- return GetDispatchExecutingTask(task);
+ return GetDispatchExecutingTask(task, taskSecond);
}
return task;
}
@@ -556,6 +595,10 @@
}
if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000)
{
+ if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(26),
@@ -623,6 +666,10 @@
}
if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000)
{
+ if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(15),
@@ -679,7 +726,7 @@
{
task = GetDispatchTask(tasks, taskFirst);
- LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��");
+ LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��");
Thread.Sleep(1000);
return task;
@@ -696,6 +743,10 @@
}
if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000)
{
+ if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(26),
@@ -799,6 +850,10 @@
}
if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000)
{
+ if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(15),
@@ -856,7 +911,7 @@
if (taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskFirst.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish)
{
- task = tasks.FirstOrDefault(x => ((x.SourceStation - taskFirst.TargetStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskFirst.TargetStation > 1 && x.TargetStation - taskFirst.SourceStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TargetStation - taskFirst.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)) && x.RGVName == "RGV02");
+ task = tasks.FirstOrDefault(x => ((taskFirst.TargetStation-x.SourceStation > 1 &&taskFirst.SourceStation - x.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || ( taskFirst.TargetStation- x.SourceStation > 1 && taskFirst.SourceStation- x.TargetStation > 1 && taskFirst.SourceStation- x.SourceStation > 1 && taskFirst.TargetStation - x.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)) && x.RGVName == "RGV02");
LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��");
@@ -882,6 +937,10 @@
}
if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000)
{
+ if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running))
+ {
+ return null;
+ }
RGVTaskCommand command = new RGVTaskCommand()
{
PickupLocation = (byte)Convert.ToSByte(26),
@@ -1034,19 +1093,44 @@
Dt_Task y = tasks.Where(x => x.Remark != null&& ((x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound))).FirstOrDefault();
if (y == null)
{
- LogAndWarn("鏌ヨ浠诲姟", $" 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(oldtask)}銆戙��");
+ WriteInfo("鏌ヨ浠诲姟", $" 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(oldtask)}銆戙��");
if (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || oldtask.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish)
{
-
- return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+ if (oldtask.RGVName == "RGV01")
+ {
+ return tasks.FirstOrDefault(x => (oldtask.TargetStation - x.SourceStation > 1 && oldtask.SourceStation - x.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (oldtask.TargetStation - x.SourceStation > 1 && oldtask.SourceStation - x.TargetStation > 1 && oldtask.SourceStation - x.SourceStation > 1 && oldtask.TargetStation - x.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+ }
+ else
+ {
+ return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+
+ }
}
else if ((oldtask.CurrentAddress == "1025" || oldtask.CurrentAddress == "1026") && (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || oldtask.TaskState == (int)TaskInStatusEnum.RGV_InExecuting))
{
- return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+ if (oldtask.RGVName == "RGV01")
+ {
+ return tasks.FirstOrDefault(x => (oldtask.TargetStation - x.SourceStation > 1 && oldtask.SourceStation - x.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (oldtask.TargetStation - x.SourceStation > 1 && oldtask.SourceStation - x.TargetStation > 1 && oldtask.SourceStation - x.SourceStation > 1 && oldtask.TargetStation - x.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+ }
+ else
+ {
+ return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+
+ }
+
}
else if (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || oldtask.TaskState == (int)TaskInStatusEnum.RGV_InExecuting)
{
- return tasks.FirstOrDefault(x => x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.TargetStation > 1);
+ if (oldtask.RGVName == "RGV01")
+ {
+ return tasks.FirstOrDefault(x => oldtask.TargetStation - x.SourceStation > 1 && oldtask.TargetStation - x.TargetStation > 1);
+
+ }
+ else
+ {
+ return tasks.FirstOrDefault(x => x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.TargetStation > 1);
+ }
+
}
return null;
@@ -1079,6 +1163,10 @@
return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
}
+ else if ((oldtask.CurrentAddress == "1025" || oldtask.CurrentAddress == "1026") && (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || oldtask.TaskState == (int)TaskInStatusEnum.RGV_InExecuting))
+ {
+ return tasks.FirstOrDefault(x => (x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound));
+ }
else if (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || oldtask.TaskState == (int)TaskInStatusEnum.RGV_InExecuting)
{
return tasks.FirstOrDefault(x => x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.TargetStation > 1);
@@ -1087,13 +1175,13 @@
}
}
- public Dt_Task? GetDispatchExecutingTask(Dt_Task oldtask)
+ public Dt_Task? GetDispatchExecutingTask(Dt_Task oldtask,Dt_Task task)
{
- var stationManager = _stationManagerRepository.QueryData(x => x.stationType == 15);
- if (stationManager.Count() > 0)
+ var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 15);
+ if (stationManagers.Count() > 0)
{
string next = null;
- foreach (var item in stationManager)
+ foreach (var item in stationManagers)
{
var x = _taskRepository.QueryFirst(x => x.NextAddress == item.stationChildCode || x.CurrentAddress == item.stationChildCode);
if (x == null)
@@ -1104,13 +1192,36 @@
}
if (next != null)
{
+ var stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == next);
oldtask.Remark = next;
- _taskRepository.UpdateData(oldtask);
- LogAndWarn("涓浆浠诲姟GetDispatchExecutingTask", $" 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(oldtask)}銆戙��");
- return oldtask;
+ if (task.RGVName == "RGV01")
+ {
+ if (task.TargetStation - stationManager.stationRemark > 1 && task.SourceStation - stationManager.stationRemark > 1 && task.SourceStation - oldtask.SourceStation > 1 && task.TargetStation - oldtask.SourceStation > 1)
+ {
+ _taskRepository.UpdateData(oldtask);
+ LogAndWarn("涓浆浠诲姟GetDispatchExecutingTask", $" 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(oldtask)}銆戙��");
+ return oldtask;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ else
+ {
+ if (stationManager.stationRemark - task.TargetStation > 1 && stationManager.stationRemark - task.SourceStation > 1 && oldtask.SourceStation - task.SourceStation > 1 && oldtask.SourceStation - task.TargetStation > 1)
+ {
+ _taskRepository.UpdateData(oldtask);
+ LogAndWarn("涓浆浠诲姟GetDispatchExecutingTask", $" 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(oldtask)}銆戙��");
+ return oldtask;
+ }
+ else
+ {
+ return null;
+ }
+ }
}
}
-
return null;
}
--
Gitblit v1.9.3