From 2131a09f811c1d6d685c9d7a9b705740673ef677 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 21 二月 2025 16:56:52 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
/dev/null | 0
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs | 198 ++++++++++++------------
.gitignore | 1
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9db99863-dd5d-4ea4-9436-cf86369c513c.vsidx | 0
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/TSJConveyorLineJob_PP.cs | 221 +++++++++++++++++++++++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 21 +
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/736d9a07-7f63-4075-b18a-3910cc852c4c.vsidx | 0
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/StackerCraneJob_PP.cs | 23 +-
8 files changed, 350 insertions(+), 114 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0dfb828..7f1a8e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -265,3 +265,4 @@
*.bin
/WIDESEAWCS_Server/.vs/ProjectEvaluation
/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/DesignTimeBuild
+/椤圭洰璧勬枡/鎺ュ彛鏂囨。/~$鐗瑰垱ERP&WMS鎺ュ彛娓呭崟072520241126.xlsx
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/145d245b-2e74-4251-bcdf-c6982c88217d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/145d245b-2e74-4251-bcdf-c6982c88217d.vsidx"
deleted file mode 100644
index e7283ce..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/145d245b-2e74-4251-bcdf-c6982c88217d.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4d0021aa-b015-4f6b-8102-5f3a9a94a5f7.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4d0021aa-b015-4f6b-8102-5f3a9a94a5f7.vsidx"
deleted file mode 100644
index a254680..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4d0021aa-b015-4f6b-8102-5f3a9a94a5f7.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8342b990-a0d5-45ef-af12-e7e147559e6d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8342b990-a0d5-45ef-af12-e7e147559e6d.vsidx"
deleted file mode 100644
index a2602ff..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8342b990-a0d5-45ef-af12-e7e147559e6d.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9db99863-dd5d-4ea4-9436-cf86369c513c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9db99863-dd5d-4ea4-9436-cf86369c513c.vsidx"
new file mode 100644
index 0000000..fbb4364
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9db99863-dd5d-4ea4-9436-cf86369c513c.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/a5bb43ef-78f9-4006-a74a-ce5ce08b8517.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/a5bb43ef-78f9-4006-a74a-ce5ce08b8517.vsidx"
deleted file mode 100644
index 927bf08..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/a5bb43ef-78f9-4006-a74a-ce5ce08b8517.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e3aa52f0-6a1f-441b-907d-66672a2f2bad.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e3aa52f0-6a1f-441b-907d-66672a2f2bad.vsidx"
deleted file mode 100644
index d39a3b2..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e3aa52f0-6a1f-441b-907d-66672a2f2bad.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ff19d789-38c1-4e53-b4eb-d58b776bf74a.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ff19d789-38c1-4e53-b4eb-d58b776bf74a.vsidx"
deleted file mode 100644
index 49bce04..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ff19d789-38c1-4e53-b4eb-d58b776bf74a.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock"
deleted file mode 100644
index e69de29..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock"
+++ /dev/null
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
index dc2122b..df75641 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
@@ -94,110 +94,112 @@
}
}
- else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
- {
- if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
- {
- Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && !string.IsNullOrEmpty(x.NextAddress));
- if (task != null)
- {
- _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StationCode, deviceCode: item.StackerCraneCode, targetAddress: item.StationCode);
- }
- }
+ #region
+ //else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
+ //{
+ // if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
+ // {
+ // Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && !string.IsNullOrEmpty(x.NextAddress));
+ // if (task != null)
+ // {
+ // _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StationCode, deviceCode: item.StackerCraneCode, targetAddress: item.StationCode);
+ // }
+ // }
- if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)//鍏ュ簱
- {
- Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode);
- if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
- {
- Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
- if (stationManger == null)
- {
- WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
- continue;
- }
- string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
- if (string.IsNullOrEmpty(locationCode))
- {
- WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
- continue;
- }
- _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: stationManger.StackerCraneStationCode, targetAddress: locationCode, nextAddress: locationCode, deviceCode: stationManger.StackerCraneCode);
+ // if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)//鍏ュ簱
+ // {
+ // Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode);
+ // if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+ // {
+ // Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ // if (stationManger == null)
+ // {
+ // WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ // continue;
+ // }
+ // string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
+ // if (string.IsNullOrEmpty(locationCode))
+ // {
+ // WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ // continue;
+ // }
+ // _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: stationManger.StackerCraneStationCode, targetAddress: locationCode, nextAddress: locationCode, deviceCode: stationManger.StackerCraneCode);
- device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
- device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
- }
- }
- else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
- {
- device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
- }
- else
- {
- if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
- {
- Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode);
- if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
- {
- Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
- if (stationManger == null)
- {
- WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
- continue;
- }
+ // device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ // }
+ // }
+ // else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
+ // {
+ // device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ // }
+ // else
+ // {
+ // if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ // {
+ // Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode);
+ // if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ // {
+ // Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ // if (stationManger == null)
+ // {
+ // WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ // continue;
+ // }
- Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi));
- if (router == null)
- {
- WriteError(item.StationName, $"鏈壘鍒拌矾鐢遍厤缃俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
- continue;
- }
+ // Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi));
+ // if (router == null)
+ // {
+ // WriteError(item.StationName, $"鏈壘鍒拌矾鐢遍厤缃俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ // continue;
+ // }
- _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
+ // _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
- device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
- device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
- device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
- }
- }
- else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
- {
- _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
- device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
- }
- }
- }
- else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
- {
- if (!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
- {
- Dt_Task outTask = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState != TaskStatusEnum.New.ObjToInt() && x.TaskState != TaskStatusEnum.SC_Execute.ObjToInt() && x.TargetAddress == item.StationCode);
- if (outTask == null)
- {
- Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
- if (task != null)
- {
- //todo 杈撻�佺嚎宸ヤ綔妯″紡闇�瑕佸垽鏂�
- _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute);
+ // device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ // }
+ // }
+ // else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ // {
+ // //_taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
+ // device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ // }
+ // }
+ //}
+ //else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
+ //{
+ // if (!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
+ // {
+ // Dt_Task outTask = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState != TaskStatusEnum.New.ObjToInt() && x.TaskState != TaskStatusEnum.SC_Execute.ObjToInt() && x.TargetAddress == item.StationCode);
+ // if (outTask == null)
+ // {
+ // Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
+ // if (task != null)
+ // {
+ // //todo 杈撻�佺嚎宸ヤ綔妯″紡闇�瑕佸垽鏂�
+ // _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute);
- device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
- device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
- device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
- }
- }
- }
- else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm)
- {
- device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
- }
- else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
- {
- device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
- }
- }
+ // device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ // device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ // }
+ // }
+ // }
+ // else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm)
+ // {
+ // device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ // }
+ // else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
+ // {
+ // device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ // }
+ //}
+ #endregion
}
else
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
index 0bca298..3d4c6dc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
@@ -22,6 +22,7 @@
using WIDESEAWCS_Tasks;
using WIDESEAWCS_Core;
using SqlSugar.Extensions;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
namespace WIDESEAWCS_Tasks
{
@@ -229,20 +230,22 @@
if (device != null)
{
OtherDevice client = (OtherDevice)device;
- if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//鍑哄簱绔欏彴鏈鍗犵敤
+ if (!client.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods, stationManger.StationCode))//鍑哄簱绔欏彴鏈鍗犵敤
{
- task.TargetAddress = stationManger.StackerCraneStationCode;
+ task.NextAddress = stationManger.StackerCraneStationCode;
_taskRepository.UpdateData(task);
return task;
}
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
}
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
}
return null;
@@ -323,11 +326,11 @@
else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
{
string[] targetCodes = task.NextAddress.Split("-");
- if (targetCodes.Length == 3)
+ if (targetCodes.Length == 5)
{
- stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
- stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
- stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
+ stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
+ stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
+ stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
}
else
{
@@ -336,11 +339,11 @@
return null;
}
string[] sourceCodes = task.CurrentAddress.Split("-");
- if (sourceCodes.Length == 3)
+ if (sourceCodes.Length == 5)
{
- stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
- stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
- stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
+ stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
+ stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
+ stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
}
else
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs"
new file mode 100644
index 0000000..3230c14
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs"
@@ -0,0 +1,221 @@
+锘縰sing Quartz;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Common;
+using WIDESEAWCS_Common.Helper;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_IBasicInfoRepository;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.Models;
+using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
+
+namespace WIDESEAWCS_Tasks
+{
+ [DisallowConcurrentExecution]
+ public class TSJConveyorLineJob_PP : JobBase, IJob
+ {
+
+ private readonly ITaskService _taskService;
+ private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+ private readonly ITaskRepository _taskRepository;
+ private readonly IStationMangerRepository _stationMangerRepository;
+ private readonly IRouterRepository _routerRepository;
+
+ public TSJConveyorLineJob_PP(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
+ {
+ _taskService = taskService;
+ _taskExecuteDetailService = taskExecuteDetailService;
+ _taskRepository = taskRepository;
+ _stationMangerRepository = stationMangerRepository;
+ _routerRepository = routerRepository;
+ }
+
+ public Task Execute(IJobExecutionContext context)
+ {
+ bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
+ if (flag && value != null)
+ {
+ OtherDevice device = (OtherDevice)value;
+ List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
+ List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
+ foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
+ {
+ DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+
+ DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+
+ if (deviceProRead != null && deviceProWrite != null)
+ {
+ R_ConveyorLineInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
+
+ W_ConveyorLineInfo conveyorLineInfoWrite = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
+ if (conveyorLineInfoRead == null || conveyorLineInfoWrite == null)
+ {
+ continue;
+ }
+
+ R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfoRead.Status.ByteToBoolObject<R_ConveyorLineStatus>();
+
+ ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>();
+
+ ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
+ {
+ if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
+ {
+ if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
+ {
+ WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
+ if (content.Status)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ }
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
+ if (task != null)
+ {
+ _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress);
+ }
+
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+
+ }
+ else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt())
+ {
+ if (conveyorLineSignalRead.STB)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ Thread.Sleep(500);
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+ else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
+ {
+ if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && !string.IsNullOrEmpty(x.NextAddress));
+ if (task != null)
+ {
+ _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StationCode, deviceCode: item.StackerCraneCode, targetAddress: item.StationCode);
+ }
+ }
+
+ if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)//鍏ュ簱
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode);
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+ {
+ Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ if (stationManger == null)
+ {
+ WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
+ if (string.IsNullOrEmpty(locationCode))
+ {
+ WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: stationManger.StackerCraneStationCode, targetAddress: locationCode, nextAddress: locationCode, deviceCode: stationManger.StackerCraneCode);
+
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+ else
+ {
+ if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode);
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ if (stationManger == null)
+ {
+ WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+
+ Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi));
+ if (router == null)
+ {
+ WriteError(item.StationName, $"鏈壘鍒拌矾鐢遍厤缃俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
+ }
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ {
+ _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ }
+ }
+ }
+ else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
+ {
+ if (!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
+ {
+ Dt_Task outTask = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState != TaskStatusEnum.New.ObjToInt() && x.TaskState != TaskStatusEnum.SC_Execute.ObjToInt() && x.TargetAddress == item.StationCode);
+ if (outTask == null)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
+ if (task != null)
+ {
+ //todo 杈撻�佺嚎宸ヤ綔妯″紡闇�瑕佸垽鏂�
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute);
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
+ }
+ }
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+ }
+ }
+ else
+ {
+ WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
+ }
+ }
+ }
+
+ return Task.CompletedTask;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/425c481c-3bf7-4e1f-b3ee-4e284770981e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/425c481c-3bf7-4e1f-b3ee-4e284770981e.vsidx"
deleted file mode 100644
index 0d7827e..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/425c481c-3bf7-4e1f-b3ee-4e284770981e.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/736d9a07-7f63-4075-b18a-3910cc852c4c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/736d9a07-7f63-4075-b18a-3910cc852c4c.vsidx"
new file mode 100644
index 0000000..fae6d33
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/736d9a07-7f63-4075-b18a-3910cc852c4c.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d9d071a5-d4c7-4ac6-8365-fb73d8cfa365.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d9d071a5-d4c7-4ac6-8365-fb73d8cfa365.vsidx"
deleted file mode 100644
index c47db0e..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d9d071a5-d4c7-4ac6-8365-fb73d8cfa365.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
deleted file mode 100644
index e69de29..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
+++ /dev/null
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index f86d61e..2c3fbab 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -333,7 +333,16 @@
{
try
{
- Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString());
+ string line = string.Empty;
+ if (!model.Line.Contains("SCUTL"))
+ {
+ line = WarehouseEnum.HA58.ToString();
+ }
+ else
+ {
+ line = WarehouseEnum.HA57.ToString();
+ }
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == line);
if (warehouse == null)
{
return MesResponseContent.Instance.Error($"浠撳簱鍩虹淇℃伅鏈厤缃�");
@@ -435,11 +444,11 @@
return MesResponseContent.Instance.Error($"鏈瘑鍒鎵樼洏绫诲瀷锛岃纭鎵樼洏鍙�");
}
- Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode == WarehouseEnum.HA57.ToString());
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == palletTypeInfo.WarehouseId);
-
- Dt_StockInfo_Hty stockInfo_Hty = _stockRepository.StockInfo_HtyRepository.QueryData(x=>x.PalletCode== model.CarrierCode).OrderByDescending(x=>x.SourceId).First();
- Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.StockId==stockInfo_Hty.SourceId);
+
+ Dt_StockInfo_Hty stockInfo_Hty = _stockRepository.StockInfo_HtyRepository.QueryData(x => x.PalletCode == model.CarrierCode).OrderByDescending(x => x.SourceId).First();
+ Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.StockId == stockInfo_Hty.SourceId);
Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
{
@@ -462,7 +471,7 @@
PalletType = palletTypeInfo.PalletType,
WarehouseId = warehouse.WarehouseId,
StockStatus = StockStatusEmun.MES閫�搴�.ObjToInt(),
- Details=new List<Dt_StockInfoDetail> { stockInfoDetail }
+ Details = new List<Dt_StockInfoDetail> { stockInfoDetail }
};
//Dt_Task task = new Dt_Task()
//{
--
Gitblit v1.9.3