From 34de141a574a430527a210394359c1199ccde7a3 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 11 九月 2025 16:46:49 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu
---
.gitignore | 4 ++
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs | 5 ++
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL2ndFloor.cs | 8 +++
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs | 35 +++++------------
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | 12 +++---
5 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/.gitignore b/.gitignore
index e2c2e91..90c6879 100644
--- a/.gitignore
+++ b/.gitignore
@@ -267,3 +267,7 @@
/椤圭洰浠g爜/WMS/WMSServices/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.441.19478/SemanticSymbols.db
/椤圭洰浠g爜/WCS/WCSServices/.vs/WIDESEAWCS_Server/CopilotIndices/17.13.441.19478/CodeChunks.db
/椤圭洰浠g爜/WCS/WCSServices/WIDESEAWCS_TaskInfoService/FakesAssemblies/WIDESEAWCS_PackInfoService.Fakes.dll
+/椤圭洰浠g爜/WMS/WMSServices/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.441.19478/CodeChunks.db-shm
+/椤圭洰浠g爜/WMS/WMSServices/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.441.19478/CodeChunks.db-wal
+/椤圭洰浠g爜/WMS/WMSServices/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.441.19478/SemanticSymbols.db-shm
+/椤圭洰浠g爜/WMS/WMSServices/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.441.19478/SemanticSymbols.db-wal
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 933b3d6..7088e2c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -926,8 +926,8 @@
if (task.TaskState == (int)TaskStatusEnum.Line_Executing)
{
#region 鍏ュ簱璋冪敤鎺ュ彛鑾峰彇璐т綅鍦板潃
- //string? local = RequestAssignLocation(task.TaskNum, task.Roadway);
- string? local = "SC05_YLDual-002-090-009-01";
+ string? local = RequestAssignLocation(task.TaskNum, task.Roadway);
+ //string? local = "SC05_YLDual-002-090-009-01";
if (!string.IsNullOrEmpty(local))
{
task.CurrentAddress = stationManger.StackerCraneStationCode;
@@ -946,8 +946,8 @@
}
else if (task.TaskState == (int)TaskStatusEnum.AGV_Finish)
{
- //content = AssignYLRoadwayNo(task.PalletCode);
- content.OK(data: "SC05_YLDual");
+ content = AssignYLRoadwayNo(task.PalletCode);
+ //content.OK(data: "SC05_YLDual");
if (!content.Status)
{
return content.Error($"璇锋眰鍏ュ簱澶辫触锛歿content.Message}");
@@ -983,8 +983,8 @@
}
task.ModifyDate = DateTime.Now;
task.Modifier = "System";
- BaseDal.UpdateData(task);
- //UpdateTask(task, nextStatus);
+ //BaseDal.UpdateData(task);
+ UpdateTask(task, nextStatus);
content = WebResponseContent.Instance.OK();
}
catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs"
index e4637f4..9745ab6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs"
@@ -112,6 +112,11 @@
public short WorkType { get; set; }
/// <summary>
+ /// 瀹屾垚淇″彿
+ /// </summary>
+ public short WriteFinish { get; set; }
+
+ /// <summary>
/// 鎵樼洏绫诲瀷
/// </summary>
public short PalletType { get; set; }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL2ndFloor.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL2ndFloor.cs"
index 688759c..fcaa52a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL2ndFloor.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL2ndFloor.cs"
@@ -155,6 +155,7 @@
conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskCommand.TargetAddress, childDeviceCode);
conveyorLine.SetValue(ConveyorLineDBName.Weight, taskCommand.Weight, childDeviceCode);
+ conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, childDeviceCode);
for (int i = 0; i < 6; i++)
@@ -162,7 +163,7 @@
ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
if (command != null)
{
- if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight)
+ if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight && command.Barcode == taskCommand.Barcode)
{
WriteInfo(conveyorLine.DeviceName, $"鏃堕棿锛氥�恵DateTime.Now}銆戝啓鍏ヤ换鍔℃垚鍔熷啓鍏ユ鏁皗i}鍐欏叆浠诲姟銆恵JsonConvert.SerializeObject(taskCommand)}銆�");
return true;
@@ -172,6 +173,11 @@
conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
Thread.Sleep(100);
}
+ if (command.Barcode != taskCommand.Barcode)
+ {
+ conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
+ Thread.Sleep(100);
+ }
if (command.TaskNum != taskCommand.TaskNum)
{
conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
index 7d04c5c..d32a03c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
@@ -76,8 +76,8 @@
commonStackerCrane.LastTaskType = task.TaskType;
task.Dispatchertime = DateTime.Now;
task.ExceptionMessage = "";
- //_taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
- _taskService.UpdateTaskStatusToNext(task);
+ _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+ //_taskService.UpdateTaskStatusToNext(task);
commonStackerCrane.Communicator.Write("DB1000.20.0", true);
//寤舵椂1s
Thread.Sleep(1000);
@@ -141,33 +141,20 @@
//鍘熸枡涓�妤煎嚭搴撲笅鍙戠嚎浣撻�昏緫
if (stationManger.StationDeviceCode == "CL1_YL")
{
- IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
- if (device != null)
- {
- OtherDevice conveyorLine = (OtherDevice)device;
- conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode);
- conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode);
- conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode);
-
- // 鍫嗗灈鏈哄畬鎴�
- _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi);
- }
- else
- {
- WriteInfo(deviceCode, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞彂閫佽緭閫佺嚎鍑哄簱淇″彿");
- _taskService.UpdateTaskExceptionMessage(taskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞彂閫佽緭閫佺嚎鍑哄簱淇″彿");
- return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞彂閫佽緭閫佺嚎鍑哄簱淇″彿");
- }
- }//鍘熸枡浜屾ゼ鍑哄簱涓嬪彂绾夸綋閫昏緫
- else
+ // 鍫嗗灈鏈哄畬鎴�
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi);
+ }
+ else//鍘熸枡浜屾ゼ鍑哄簱涓嬪彂绾夸綋閫昏緫
{
IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
if (device != null)
{
CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
- conveyorLine.SetValue(WR_CLineYLDB.WR_Task, taskNum, stationManger.StationCode);
- conveyorLine.SetValue(WR_CLineYLDB.WR_ToHode, router.NextPosi, stationManger.StationCode);
- conveyorLine.SetValue(WR_CLineYLDB.WR_Reresult, 86, stationManger.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.Width, task.TaskLength, stationManger.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.Barcode, task.PalletCode, stationManger.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode);
_taskService.UpdateTaskStatusToNext(task);
}
else
--
Gitblit v1.9.3