From 19724b0969eb2f91b38efb262a6ef4de04d6b0c5 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 14 十月 2025 12:07:58 +0800
Subject: [PATCH] 新增“有货状态”显示及数据处理逻辑支持在Home.vue和 LineComponent.vue中新增了“有货状态”显示功能,为 RGV 和堆垛机对象添加了 InStock属性。 修改了 Home.vue 的 created生命周期和 LineComponent.vue的 update 方法,增加了对 inStock数据的处理逻辑。删除了三个旧的二进制文件,新增了六个新的二进制文件,可能与项目构建或依赖更新相关。优化了任务分配和状态判断逻辑,确保任务执行更加准确和高效。
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
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 e39ead0..14f5eda 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"
@@ -113,7 +113,7 @@
Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint);
if (stationManagerStart == null)
{
- return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
+ throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
}
task = new Dt_Task()
{
@@ -140,10 +140,10 @@
if (taskDTOs.EndPoint == "3004")
{
- var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3001" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225);
+ var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3002" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225);
if (newTask != null)
{
- return content.Error("宸插瓨鍦ㄥ叆搴撲换鍔★紝鍑哄簱浠诲姟涓嶅彲涓嬪彂");
+ throw new Exception("宸插瓨鍦ㄥ叆搴撲换鍔★紝鍑哄簱浠诲姟涓嶅彲涓嬪彂");
}
}
@@ -151,7 +151,7 @@
Dt_StationManager stationManagerEnd = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint);
if (stationManagerEnd == null)
{
- return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
+ throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
}
Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == GetScCode(Convert.ToInt32(targetCodes[0])) && x.stationType == 2 && x.stationFloor == stationManagerEnd.stationFloor);
@@ -188,7 +188,7 @@
}
if(taskDTOs.EndPoint == "1004")
{
- return content.Error("璇ョ偣浣嶄笉鏄嚭搴撶偣浣�");
+ throw new Exception("璇ョ偣浣嶄笉鏄嚭搴撶偣浣�");
}
if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && taskDTOs.EndPoint == "1002")
{
@@ -235,7 +235,7 @@
Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.BeginPoint);
if (stationManagerStart == null)
{
- return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
+ throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�");
}
task = new Dt_Task()
{
@@ -290,14 +290,14 @@
task.TargetStation = stationManager.stationRemark;
- if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029"))
+ if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && task.RGVName == "RGV02"))
{
Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026");
task.TargetStation = stationTransfer.stationRemark;
task.Remark = "1026";
}
- if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004"))
+ if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && task.RGVName == "RGV01"))
{
Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026");
task.TargetStation = stationTransfer.stationRemark;
@@ -307,7 +307,7 @@
}
else
{
- return content.Error($"鏈壘鍒拌鎵樼洏銆恵taskDTOs.TPbarcode}銆戜换鍔�");
+ throw new Exception($"鏈壘鍒拌鎵樼洏銆恵taskDTOs.TPbarcode}銆戜换鍔�");
}
}
}
@@ -341,7 +341,7 @@
Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress);
if (stationManager == null)
{
- return content.Error("鏈壘鍒拌捣鐐圭珯鍙�");
+ throw new Exception("鏈壘鍒拌捣鐐圭珯鍙�");
}
if (task != null)
@@ -442,11 +442,11 @@
{
return "SC04";
}
- else if (number >= 15 && number <= 18)
+ else if (number >= 15 && number <= 17)
{
return "SC05";
}
- else if (number >= 19 && number <= 22)
+ else if (number >= 18 && number <= 21)
{
return "SC06";
}
@@ -595,7 +595,7 @@
/// <returns></returns>
public Dt_Task QueryRGVExecutingTask(string deviceNo)
{
- return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo);
+ return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo);
}
/// <summary>
@@ -606,7 +606,7 @@
/// <returns></returns>
public Dt_Task QueryRGVExecutingTask(string deviceNo,int taskNum)
{
- return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum);
+ return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum);
}
/// <summary>
@@ -662,7 +662,7 @@
public List<Dt_Task> QueryRGVTask()
{
- return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish) && x.Floor == "1F"), TaskOrderBy);
+ return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish)) && x.Floor == "1F", TaskOrderBy);
}
/// <summary>
--
Gitblit v1.9.3