diff --git a/PDA/PDA/components/TaskCard.vue b/PDA/PDA/components/TaskCard.vue
index 7b4897e..80f7787 100644
--- a/PDA/PDA/components/TaskCard.vue
+++ b/PDA/PDA/components/TaskCard.vue
@@ -26,7 +26,7 @@
终点:
- {{item.startLocationCode}}
+ {{item.endLocationCode}}
diff --git a/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue b/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue
index 9b74c5d..65b857a 100644
--- a/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue
+++ b/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue
@@ -163,7 +163,7 @@
left: 50%;
transform: translate(-50%, -50%);
width: 650rpx;
- max-height: 600rpx;
+ height: 600rpx;
background-color: white;
z-index: 2;
overflow: auto;
diff --git a/PDA/PDA/pages/stockTaking/stockTaking.vue b/PDA/PDA/pages/stockTaking/stockTaking.vue
index 5266516..2153d18 100644
--- a/PDA/PDA/pages/stockTaking/stockTaking.vue
+++ b/PDA/PDA/pages/stockTaking/stockTaking.vue
@@ -472,7 +472,7 @@
}
.scroll-view {
- height: 75vh;
+ height: 81vh;
}
.popup-content {
diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
index 9f5ee52..f5bd62b 100644
--- a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
+++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
@@ -5519,7 +5519,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode(
"text",
null,
- vue.toDisplayString($props.item.startLocationCode),
+ vue.toDisplayString($props.item.endLocationCode),
1
/* TEXT */
)
diff --git a/WCS.BLL/DbModels/STZL/ShelfInfo.cs b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
index 4ce3558..546200b 100644
--- a/WCS.BLL/DbModels/STZL/ShelfInfo.cs
+++ b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
@@ -84,6 +84,10 @@ namespace WCS.DAL.DbModels
[SugarColumn(ColumnName = "destination_location_code", Length = 64, IsNullable = false, ColumnDescription = "当前位置编码")]
public string DestinationLocaiotnCode { get; set; } = string.Empty;
+
+ [SugarColumn(ColumnName = "current_task_code", Length = 100, IsNullable = true, ColumnDescription = "当前执行的任务码")]
+ public string CurrentTaskCode { get; set; } = string.Empty;
+
///
/// 货架运输状态
///
diff --git a/WCS.BLL/Manager/AGVManager.cs b/WCS.BLL/Manager/AGVManager.cs
index 55c872f..a03bace 100644
--- a/WCS.BLL/Manager/AGVManager.cs
+++ b/WCS.BLL/Manager/AGVManager.cs
@@ -75,6 +75,7 @@ namespace WCS.BLL.Manager
shelf.DestinationLocationId = 0;
shelf.DestinationLocaiotnCode = string.Empty;
shelf.TransStatus = TransStatusEnum.静止;
+ shelf.CurrentTaskCode = string.Empty;
DbHelp.db.Updateable(shelf).ExecuteCommand();
}
}
diff --git a/WCS.BLL/Services/Service/PDAMatBindService.cs b/WCS.BLL/Services/Service/PDAMatBindService.cs
index 17cfb9e..8a1a948 100644
--- a/WCS.BLL/Services/Service/PDAMatBindService.cs
+++ b/WCS.BLL/Services/Service/PDAMatBindService.cs
@@ -105,6 +105,7 @@ namespace WCS.BLL.Services.Service
{
//更新货架位置信息
shelf.TransStatus = TransStatusEnum.运输中;
+ shelf.CurrentTaskCode = response.data;
shelf.DestinationLocationId = endLocation.Id;
shelf.DestinationLocaiotnCode = endLocation.LocationCode;
DbHelp.db.Updateable(shelf).ExecuteCommand();
@@ -201,6 +202,7 @@ namespace WCS.BLL.Services.Service
.LeftJoin((li,si) => (li.Id == si.CurrentLocationId && si.TransStatus == TransStatusEnum.静止) || (li.Id == si.DestinationLocationId && si.TransStatus == TransStatusEnum.运输中))
.Where((li, si) => li.LocationAreaId == request.SendBackLocationAreaId)
.Where((li, si) => li.IsEnable == true)
+ .Where((li, si) => li.Id != shelf.CurrentLocationId)
.Select((li, si) => li)
.FirstAsync();
if (endLocation == null)
@@ -218,6 +220,7 @@ namespace WCS.BLL.Services.Service
{
//更新货架位置信息
shelf.TransStatus = TransStatusEnum.运输中;
+ shelf.CurrentTaskCode = response.data;
shelf.DestinationLocationId = endLocation.Id;
shelf.DestinationLocaiotnCode = endLocation.LocationCode;
DbHelp.db.Updateable(shelf).ExecuteCommand();
@@ -375,6 +378,7 @@ namespace WCS.BLL.Services.Service
{
//更新货架位置信息
shelf.TransStatus = TransStatusEnum.运输中;
+ shelf.CurrentTaskCode = response.data;
shelf.DestinationLocationId = endLocation.Id;
shelf.DestinationLocaiotnCode = endLocation.LocationCode;
DbHelp.db.Updateable(shelf).ExecuteCommand();
diff --git a/WCS.BLL/Services/Service/PDAShelfLocationBindUnbindService.cs b/WCS.BLL/Services/Service/PDAShelfLocationBindUnbindService.cs
index d557e58..9c1aee4 100644
--- a/WCS.BLL/Services/Service/PDAShelfLocationBindUnbindService.cs
+++ b/WCS.BLL/Services/Service/PDAShelfLocationBindUnbindService.cs
@@ -156,6 +156,7 @@ namespace WCS.BLL.Services.Service
shelfInfo.CurrentLocationId = locationInfo.Id;
shelfInfo.DestinationLocationId = 0;
shelfInfo.DestinationLocaiotnCode = string.Empty;
+ shelfInfo.CurrentTaskCode = string.Empty;
shelfInfo.TransStatus = TransStatusEnum.静止;
DbHelp.db.Updateable(shelfInfo).ExecuteCommand();
@@ -224,6 +225,7 @@ namespace WCS.BLL.Services.Service
shelfInfo.CurrentLocaiotnCode = string.Empty;
shelfInfo.DestinationLocationId = 0;
shelfInfo.DestinationLocaiotnCode = string.Empty;
+ shelfInfo.CurrentTaskCode = string.Empty;
shelfInfo.TransStatus = TransStatusEnum.静止;
DbHelp.db.Updateable(shelfInfo).ExecuteCommand();
diff --git a/WCS.WebApi/Controllers/AgvCallbackServiceController.cs b/WCS.WebApi/Controllers/AgvCallbackServiceController.cs
index 2bc1134..cf4637a 100644
--- a/WCS.WebApi/Controllers/AgvCallbackServiceController.cs
+++ b/WCS.WebApi/Controllers/AgvCallbackServiceController.cs
@@ -47,6 +47,7 @@ namespace WCS.WebApi.Controllers
.FirstAsync();
if (task == null)
{
+ Logs.Write("不是我们系统发出的任务!!!!");
return new
{
Code = 0,
@@ -54,18 +55,41 @@ namespace WCS.WebApi.Controllers
reqCode = "123",
};
}
+ //if (task.TaskStatus == TaskStatusEnum.已结束)
+ //{
+ // return new
+ // {
+ // Code = 0,
+ // Message = "成功",
+ // reqCode = "123",
+ // };
+ //}
+ //RCS先调用结束再调用出库时会遇到先更新为对应位置 然后又将对应位置更新为0的情况 所以加运输中状态限制
//判断并更新数据
var shelf = await DbHelp.db.Queryable().Where(t => t.ShelfCode == request.podCode || t.ShelfCode == task.ShelfCode)
.FirstAsync();
- if (shelf != null && request.method == "outbin")
+ //调用的接口不是当前货架正在执行的任务
+ if (task.TaskCode != shelf.CurrentTaskCode)
{
+ Logs.Write($"AGV回调的任务[{task.TaskCode}],货架当前任务为【{shelf.CurrentTaskCode}】,不是同一个任务 不进行货架状态更新!");
+ return new
+ {
+ Code = 0,
+ Message = "成功",
+ reqCode = "123",
+ };
+ }
+ Logs.Write($"AGV回调的任务[{task.TaskCode}],{request.method}!");
+ if (shelf != null && request.method == "outbin" && shelf.TransStatus == TransStatusEnum.运输中)
+ {
+
shelf.CurrentLocationId = 0;
shelf.CurrentLocaiotnCode = string.Empty;
DbHelp.db.Updateable(shelf).ExecuteCommand();
}
- if (shelf != null && request.method == "end")
+ if (shelf != null && request.method == "end" && shelf.TransStatus == TransStatusEnum.运输中)
{
task.TaskStatus = TaskStatusEnum.已结束;
DbHelp.db.Updateable(task).ExecuteCommand();
@@ -75,6 +99,7 @@ namespace WCS.WebApi.Controllers
shelf.DestinationLocationId = 0;
shelf.DestinationLocaiotnCode = string.Empty;
shelf.TransStatus = TransStatusEnum.静止;
+ shelf.CurrentTaskCode = string.Empty;
DbHelp.db.Updateable(shelf).ExecuteCommand();
}
diff --git a/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs b/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs
index f2f9da7..5927b30 100644
--- a/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs
+++ b/WCS.WebApi/Controllers/PDAProductionLineCallInController.cs
@@ -370,6 +370,7 @@ namespace WCS.WebApi.Controllers
{
//更新货架位置信息
shelfInfo.TransStatus = TransStatusEnum.运输中;
+ shelfInfo.CurrentTaskCode = response.data;
shelfInfo.DestinationLocationId = endLocation.Id;
shelfInfo.DestinationLocaiotnCode = endLocation.LocationCode;
DbHelp.db.Updateable(shelfInfo).ExecuteCommand();
diff --git a/WCS.WebApi/Controllers/PDAProductionLineCallOutController.cs b/WCS.WebApi/Controllers/PDAProductionLineCallOutController.cs
index 107447f..aabafc6 100644
--- a/WCS.WebApi/Controllers/PDAProductionLineCallOutController.cs
+++ b/WCS.WebApi/Controllers/PDAProductionLineCallOutController.cs
@@ -394,6 +394,7 @@ namespace WCS.WebApi.Controllers
{
//更新货架位置信息
shelfInfo.TransStatus = TransStatusEnum.运输中;
+ shelfInfo.CurrentTaskCode = response.data;
shelfInfo.DestinationLocationId = endLocation.Id;
shelfInfo.DestinationLocaiotnCode = endLocation.LocationCode;
DbHelp.db.Updateable(shelfInfo).ExecuteCommand();