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/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 17 ++-
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs | 2
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs | 5 +
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs | 4
/dev/null | 0
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs | 14 ++
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx | 0
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs | 55 +++++++++++++
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx | 0
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs | 53 ++++++++++++
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 3
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs | 39 +++++++--
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2 | 0
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 3
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx | 0
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx | 0
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo | 0
21 files changed, 168 insertions(+), 27 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx"
deleted file mode 100644
index 87e4b8d..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4b0ec078-98ea-4b55-b93a-79926ca1c474.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx"
similarity index 76%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx"
index 669848e..5fa2d41 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba992fbb-32f0-4374-9143-4d91137d8d09.vsidx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx"
similarity index 78%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx"
index 34cf1a9..459f6b7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c462d495-cadd-42f9-b77c-4e63924b9489.vsidx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/5c28d63e-420d-4593-9231-466799689cce.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx"
similarity index 64%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/5c28d63e-420d-4593-9231-466799689cce.vsidx"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx"
index 8f49b16..5a9a802 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/5c28d63e-420d-4593-9231-466799689cce.vsidx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx"
new file mode 100644
index 0000000..5af81fb
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs"
index bc18a51..7c88d88 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs"
@@ -64,6 +64,11 @@
List<int> taskInboundTypes = type.GetEnumIndexList();
return taskInboundTypes.Where(x => x > currentStatus && x < (int)TaskRelocationStatusEnum.RelocationFinish).OrderBy(x => x).FirstOrDefault();
}
+ else if (type == typeof(CarChargingTaskEnum))
+ {
+ List<int> taskInboundTypes = type.GetEnumIndexList();
+ return taskInboundTypes.Where(x => x > currentStatus && x < (int)CarChargingTaskEnum.RelocationCarFinish).OrderBy(x => x).FirstOrDefault();
+ }
else
{
throw new NotImplementedException();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 6b49947..6b36a68 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -640,11 +640,12 @@
NextAddress = TargetAddress,
CreateDate = DateTime.Now,
Creater = "WCS",
- TaskState = (int)TaskCarStatusEnum.CarNew,
+ TaskState = string.IsNullOrEmpty(remark) ? (int)TaskCarStatusEnum.CarNew : (int)CarChargingTaskEnum.CarNew,
ShuttleCarCode = ShuttleCarCode,
WMSId = 0,
Remark = remark
};
+ if (SourceAddress == TargetAddress) dt_Task.TaskState = (int)CarChargingTaskEnum.SC_CarFinish;
return AddData(dt_Task);
#endregion
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs"
index 06019e8..8de000a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVJob.cs"
@@ -91,7 +91,7 @@
}
}
}
- Thread.Sleep(1000);
+ Thread.Sleep(5000);
}
_taskService.Db.Updateable(Tasks).ExecuteCommand();
#endregion
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs"
index bdba05a..0b9005d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarExtend/PartialTaskService.cs"
@@ -74,9 +74,20 @@
{
lock (_CarTaskObject)
{
+ #region 鑾峰彇鏂板缓绉昏溅鍏呯數浠诲姟
+ Dt_Task dt_Task = GetTask((int)CarChargingTaskEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCarCharging);
+ if (dt_Task != null && dt_Task.ShuttleCarCode == shuttleCar.DeviceCode)
+ {
+ if (!string.IsNullOrEmpty(dt_Task.SourceAddress) && !string.IsNullOrEmpty(dt_Task.TargetAddress) && !string.IsNullOrEmpty(dt_Task.ShuttleCarCode))
+ {
+ SendTask(dt_Task);
+ }
+ }
+ #endregion
+
#region 鑾峰彇鏂板缓绉昏溅浠诲姟
- Dt_Task dt_Task = GetTask((int)TaskCarStatusEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCar);
- if (dt_Task != null)
+ dt_Task = GetTask((int)TaskCarStatusEnum.CarNew, (int)TaskOtherTypeEnum.RelocationCar);
+ if (dt_Task != null && dt_Task.ShuttleCarCode == shuttleCar.DeviceCode)
{
if (string.IsNullOrEmpty(dt_Task.SourceAddress))
{
@@ -89,8 +100,9 @@
else if (string.IsNullOrEmpty(dt_Task.TargetAddress))
{
#region 鍚慦MS鐢宠
+ var ShuttleCar = _shuttleCarService.QueryNoCode(dt_Task.ShuttleCarCode);
WebResponseContent content = new WebResponseContent();
- var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.GetPosition + $"?position={dt_Task.SourceAddress}", "", headers: new Dictionary<string, string>());
+ var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.GetPosition + $"?position={dt_Task.SourceAddress}&&position1={ShuttleCar.ShuttleCarPosition}", "", headers: new Dictionary<string, string>());
if (ResultData.Result != null)
{
content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
@@ -216,7 +228,7 @@
if (shuttleCar != null)
{
ShuttleCarTaskCommandR command = ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar, shuttleCar.DeviceCode);//璇诲彇绌挎杞︿俊鎭�
- if (command != null && command.Status == (short)ShuttleCarStatus.Standby && command.TaskTypeComplete == (short)ShuttleCarTaskComplete.Standby && command.Err_Status == (short)ShuttleCarErr.Normal)
+ if (command != null && command.Status == (short)ShuttleCarStatus.Standby && command.TaskTypeComplete == (short)ShuttleCarTaskComplete.Standby && (command.Err_Status == (short)ShuttleCarErr.Normal || command.Err_Status == (short)ShuttleCarErr.LowBattery))
{
#region 鍒ゆ柇灏忚溅浣嶇疆鏃燗B闈笉涓嬪彂浠诲姟
short Position = 0;
@@ -226,7 +238,10 @@
{
var Message = $"{shuttleCar.DeviceName}鏃燗B闈�";
if (task.ExceptionMessage != Message)
+ {
+ task.ExceptionMessage = Message;
_taskService.UpdateData(task);
+ }
return;
}
#endregion
@@ -252,7 +267,9 @@
}
else if (task.TaskType == (int)TaskOtherTypeEnum.RelocationCarCharging)
{
- shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(ShuttleCarTaskType.Charging.ToString());
+ shuttleCarTaskCommand.TaskType = task.TaskState == CarChargingTaskEnum.CarNew.ObjToInt() ?
+ (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction) :
+ (short)GetCarTaskType(ShuttleCarTaskType.Charging.ToString());
}
else
shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction);
@@ -262,8 +279,9 @@
{
if (shuttleCar.SendCommand(shuttleCarTaskCommand, shuttleCar.DeviceCode))
{
- if (!string.IsNullOrEmpty(task.Remark)) task.Remark = task.Remark + "宸蹭笅鍙�";
- task.TaskState = GetTaskState(task.TaskType);
+ if (!string.IsNullOrEmpty(task.Remark) && task.TaskState == CarChargingTaskEnum.CarNew.ObjToInt())
+ task.Remark = task.Remark + "宸蹭笅鍙�";
+ task.TaskState = GetTaskState(task.TaskType, task.TaskState);
_taskService.UpdateData(task);
}
}
@@ -324,9 +342,8 @@
/// </summary>
/// <param name="TaskType"></param>
/// <returns></returns>
- int GetTaskState(int TaskType)
+ int GetTaskState(int TaskType, int state)
{
- int state = 0;
switch (TaskType)
{
case (int)TaskInboundTypeEnum.Inbound:
@@ -341,7 +358,9 @@
state = (int)TaskCarStatusEnum.ShuttleCar_Executing;
break;
case (int)TaskOtherTypeEnum.RelocationCarCharging:
- state = (int)CarChargingTaskEnum.ShuttleCar_Charging;
+ state = state < (int)CarChargingTaskEnum.SC_CarFinish ?
+ (int)CarChargingTaskEnum.ShuttleCar_Executing :
+ (int)CarChargingTaskEnum.ShuttleCar_Charging;
break;
default:
break;
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 9c8b38c..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,7 +77,7 @@
#region 鍒涘缓绉昏溅鍏呯數浠诲姟
if (command.Err_Status == (short)ShuttleCarErr.LowBattery || command.ElectricQuantity <= (short)ShuttleCarErr.LowBattery)
{
- var ShuttleCar = QueryCode(shuttleCar.DeviceCode);
+ var ShuttleCar = QueryCode(shuttleCar.DeviceCode);//鍦ㄥ厖鐢典綅鐩存帴璁╃┛姊溅鍘诲厖鐢�
//鐢熸垚鍫嗗灈鏈虹Щ杞︿换鍔�&绌挎杞﹀厖鐢典换鍔�,鍒ゆ柇鏄惁鏈夌┛姊溅鍦ㄥ厖鐢�
Dt_Task _Task = _taskRepository.QueryFirst(x => x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt());
if (_Task != null)
@@ -90,7 +90,6 @@
{
if (command1.Status == (short)ShuttleCarStatus.Charging && command1.ElectricQuantity >= 50)
{
- _taskService.AddRelocationCarTask(ShuttleCar.ShuttleCarPosition, "", ShuttleCar.ShuttleCarCode);
shuttleCar1.SetValue(ShuttleCarDBName.TaskType, (short)ShuttleCarStatus.QuitCharging);
}
}
@@ -98,7 +97,16 @@
}
else
{
- _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
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
index 20a859b..7a9f88c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
@@ -65,12 +65,17 @@
#endregion
#region 浠诲姟瀹屾垚
- DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus));
- if (deviceProtocolDetail != null)
+ var completeStatus = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus);
+ if (completeStatus == 2 || completeStatus == 3)
{
- MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
- if (method != null) method.Invoke(this, new object[] { commonStackerCrane });
+ NormalCompleted(commonStackerCrane);
}
+ //DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus));
+ //if (deviceProtocolDetail != null)
+ //{
+ // MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
+ // if (method != null) method.Invoke(this, new object[] { commonStackerCrane });
+ //}
#endregion
#region 浠诲姟閫昏緫澶勭悊
var onlinestate = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.Onlinestate);
@@ -80,11 +85,11 @@
#region 鏌ヨ浠诲姟,閫昏緫澶勭悊
if (Enum.Parse<RunStatus>(commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.RunStatus).ToString()) == RunStatus.Standby)
{
- var Task = _taskService.GetTaskState(TaskType: (int)TaskOtherTypeEnum.RelocationCar);//鑾峰彇绉昏溅浠诲姟
+ var Task = _taskService.GetTaskState((int)TaskCarStatusEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCar);//鑾峰彇绉昏溅浠诲姟
var Task1 = _taskService.GetTaskState((int)CarChargingTaskEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCarCharging);//鑾峰彇绉昏溅鍏呯數浠诲姟
if (Task != null)
{
- if (Task.TaskState == (int)TaskCarStatusEnum.ShuttleCar_Finish) SendTask(commonStackerCrane, Task);
+ SendTask(commonStackerCrane, Task);
}
else if (Task1 != null)
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1b491b5d-708a-47fa-8233-947a9dfe5dae.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1b491b5d-708a-47fa-8233-947a9dfe5dae.vsidx"
deleted file mode 100644
index 758592d..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1b491b5d-708a-47fa-8233-947a9dfe5dae.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx"
new file mode 100644
index 0000000..ada1853
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/602f5cae-8926-4c6a-91e8-770b3f127a3d.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx"
new file mode 100644
index 0000000..b2b4758
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/903d2997-d863-4f7f-ace5-9e0b1935c919.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx"
new file mode 100644
index 0000000..f85fc27
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9c38a34d-18e2-4e47-a9de-0141309ea5a8.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidx"
deleted file mode 100644
index 6f21112..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a9f62c67-e5cb-4109-8694-4cec2518ac56.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidx"
deleted file mode 100644
index bdbf022..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ae00f733-946e-47b3-ba7f-8fd0db44196e.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2"
index 1814280..190f45e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.futdcache.v2"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
index bf02c7c..edf4a70 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin"
index b3d09e8..42f874c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
index 648514e..f68525c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs"
@@ -1,4 +1,5 @@
-锘縰sing Microsoft.AspNetCore.Mvc.RazorPages;
+锘縰sing Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using SqlSugar;
using System;
@@ -207,13 +208,28 @@
return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1));
}
- public WebResponseContent GetPosition(string position)
+ public WebResponseContent GetPosition(string position, string position1)
{
WebResponseContent content = new WebResponseContent();
try
{
+ Dt_LocationInfo? locationInfo = null;
//Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && (x.Row == 1 || x.Row == 3), _emptyAssignOrderBy);
- Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position, _emptyAssignOrderBy);
+ string position2 = string.Empty;
+ string[] Codes = position1.Split("-");
+ var row = Convert.ToInt16(Codes[0]);
+ if (row < 3)
+ {
+ position2 = row == 1 ? "002" + "-" + Codes[1] + "-" + Codes[2] : "001" + "-" + Codes[1] + "-" + Codes[2];
+ }
+ if (string.IsNullOrEmpty(position2))
+ {
+ locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position && x.LocationCode != position1, _emptyAssignOrderBy);
+ }
+ else
+ {
+ locationInfo = BaseDal.QueryFirst(x => x.CurrentQty < x.MaxQty && x.LocationCode != position && x.LocationCode != position1 && x.LocationCode != position2, _emptyAssignOrderBy);
+ }
if (locationInfo != null) content.OK(locationInfo.LocationCode);
}
catch (Exception ex)
@@ -222,5 +238,36 @@
}
return content;
}
+ /// <summary>
+ /// 鑾峰彇璐т綅淇℃伅
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ public WebResponseContent GetLocationInfo(SaveModel model)
+ {
+ WebResponseContent response = new WebResponseContent();
+ try
+ {
+ List<Dt_LocationInfo> locationInfos = BaseDal.QueryData(x => true);
+ var Freelocations = locationInfos.Where(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt()).ToList();
+ var Palletlocations = locationInfos.Where(x => x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()).ToList();
+ var InStocklocations = locationInfos.Where(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.LocationStatus != LocationStatusEnum.Pallet.ObjToInt()).ToList();
+ //Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
+ //keyValuePairs.Add("绌鸿揣浣�", Freelocations.Count);
+ //keyValuePairs.Add("绌烘墭鐩�", Palletlocations.Count);
+ //keyValuePairs.Add("鏈夎揣", InStocklocations.Count);
+ response.OK(data: new
+ {
+ FreeQty = Freelocations.Count,
+ PalletQty = Palletlocations.Count,
+ InStockQty = InStocklocations.Count,
+ });
+ }
+ catch (Exception ex)
+ {
+ response.Error(ex.Message);
+ }
+ return response;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
index 5e5bc46..cfcb0f4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
@@ -29,7 +29,7 @@
WebResponseContent LocationEnableStatus(int key);
WebResponseContent LocationDisableStatus(int key);
- WebResponseContent GetPosition(string position);
+ WebResponseContent GetPosition(string position, string position1);
WebResponseContent UpdateEnableStatus(SaveModel saveModel);
/// <summary>
/// 鑾峰彇绌挎杞﹀厖鐢靛彲鍏ヨ揣浣�
@@ -63,5 +63,6 @@
WebResponseContent UpdateStatus(List<string> locationCodes,int Statu);
WebResponseContent GetLocationCodes();
object GetLocationLayer();
+ WebResponseContent GetLocationInfo(SaveModel model);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs"
new file mode 100644
index 0000000..848802a
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs"
@@ -0,0 +1,55 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using SqlSugar.Extensions;
+using WIDESEA_Common.TaskEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.Enums;
+using WIDESEA_IBasicService;
+using WIDESEA_IInboundRepository;
+using WIDESEA_ITaskInfoRepository;
+using WIDESEA_Model.Models;
+using WIDESEAWCS_DTO.WCSInfo;
+
+namespace WIDESEA_WMSServer.Controllers
+{
+ [Route("api/LargeScreen")]
+ [ApiController, AllowAnonymous]
+ public class LargeScreenController : Controller
+ {
+ private readonly ILocationInfoService _locationInfoService;
+ private readonly ITaskRepository _taskRepository;
+ private readonly ITask_HtyRepository _taskHtyRepository;
+ private readonly IInboundOrderDetailRepository _inboundOrderDetailRepository;
+ public LargeScreenController(ILocationInfoService locationInfoService, ITaskRepository taskRepository, ITask_HtyRepository taskHtyRepository, IInboundOrderDetailRepository inboundOrderDetailRepository)
+ {
+ _locationInfoService = locationInfoService;
+ _taskRepository = taskRepository;
+ _taskHtyRepository = taskHtyRepository;
+ _inboundOrderDetailRepository = inboundOrderDetailRepository;
+ }
+
+ [HttpPost, Route("GetLocationInfo")]
+ public WebResponseContent GetLocationInfo([FromBody] SaveModel model)
+ {
+ return _locationInfoService.GetLocationInfo(model);
+ }
+
+ [HttpPost, Route("GetTask")]
+ public WebResponseContent GetTask([FromBody] SaveModel model)
+ {
+ List<Dt_Task_Hty> task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt()).ToList();
+ var task_htys = task_Hties.Where(x => x.InsertTime.Date == DateTime.Now.Date).ToList();
+ var tasks = _taskRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt()).ToList();
+ List<Dt_InboundOrderDetail> inboundOrderDetails = _inboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus <= OrderDetailStatusEnum.GroupAndInbound.ObjToInt()).ToList();
+ return WebResponseContent.Instance.OK(data: new
+ {
+ task_Htiesqty = task_Hties.Count,
+ task_htysqty = task_htys.Count,
+ tasksqty = tasks.Count,
+ inboundOrderDetailsqty = inboundOrderDetails.Sum(x => x.OrderQuantity - x.OverInQuantity)
+ });
+ }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs"
index d10438b..8662a59 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/WCSInterfaceController.cs"
@@ -25,9 +25,9 @@
/// <param name="position"></param>
/// <returns></returns>
[HttpPost, Route("GetPosition")]
- public WebResponseContent GetPosition(string position)
+ public WebResponseContent GetPosition(string position, string position1)
{
- return _locationInfoService.GetPosition(position);
+ return _locationInfoService.GetPosition(position,position1);
}
/// <summary>
/// 淇敼浠诲姟鐘舵��
--
Gitblit v1.9.3