1.BUG修复 任务信息显示都为起点

2.界面优化
3.RCS回调限制优化
This commit is contained in:
hehaibing-1996
2025-02-28 13:00:36 +08:00
parent 1d9c68d659
commit 018c11430f
11 changed files with 44 additions and 6 deletions

View File

@ -26,7 +26,7 @@
</view>
<view class="content-item" style="font-weight: 600;color: firebrick;">
<text>终点:</text>
<text>{{item.startLocationCode}}</text>
<text>{{item.endLocationCode}}</text>
</view>
<view class="content-combined">
<view class="content-item" style="font-weight: 600;color: violet;">

View File

@ -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;

View File

@ -472,7 +472,7 @@
}
.scroll-view {
height: 75vh;
height: 81vh;
}
.popup-content {

View File

@ -5519,7 +5519,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode(
"text",
null,
vue.toDisplayString($props.item.startLocationCode),
vue.toDisplayString($props.item.endLocationCode),
1
/* TEXT */
)

View File

@ -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;
/// <summary>
/// 货架运输状态
/// </summary>

View File

@ -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();
}
}

View File

@ -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<ShelfInfo>((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();

View File

@ -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();

View File

@ -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<ShelfInfo>().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();
}

View File

@ -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();

View File

@ -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();