<fix>[important]修复少量BUG,优化显示
This commit is contained in:
parent
49aa3223b8
commit
9ea2702e92
|
|
@ -60,7 +60,12 @@ public class StackerService(AppStackerDao stackerDao, StackerOperation stackerOp
|
|||
stackerStatusResponse.Line = stackerInfo.Line;
|
||||
stackerStatusResponse.Layer = stackerInfo.Layer;
|
||||
stackerStatusResponse.Depth = stackerInfo.Depth;
|
||||
stackerStatusResponse.Code = stackerInfo.Code.ToString() + "/" + stackerInfo.DeletePlcId.ToString();
|
||||
stackerStatusResponse.Code = new Func<string>(() =>
|
||||
{
|
||||
string code1 = stackerInfo.Code == 0 ? "-" : $"ASRS{stackerInfo.Code.ToString().PadLeft(6, '0')}";
|
||||
string code2 = stackerInfo.DeletePlcId == 0 ? "-" : $"ASRS{stackerInfo.DeletePlcId.ToString().PadLeft(6, '0')}";
|
||||
return $"{code1} / {code2}";
|
||||
}).Invoke();
|
||||
stackerStatusResponse.ErrCode = stackerInfo.ErrCode;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class CheckAccount(StackerOperation stackerOperation, AppWcsTaskDao wcsTa
|
|||
if (wcsTasks.Count < 1)
|
||||
{
|
||||
ConsoleLog.Warning($"【提示】堆垛机过账区获取任务ID:{taskFeedBackEntity.PlcId},无关联任务");
|
||||
stackerOperation.ClearFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
stackerOperation.ResetFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
continue; // 任务无数据
|
||||
}
|
||||
var wcsTask = wcsTasks[0];
|
||||
|
|
@ -75,8 +75,8 @@ public class CheckAccount(StackerOperation stackerOperation, AppWcsTaskDao wcsTa
|
|||
/// <param name="wcsTask"></param>
|
||||
private void CancelTask(TaskFeedBackEntity taskFeedBackEntity, AppWcsTask wcsTask)
|
||||
{
|
||||
ConsoleLog.Warning($"【提示】过账区反馈:PlcId:{taskFeedBackEntity.PlcId} 已经被取消,后续任务也一并取消,任务号:{wcsTask.TaskId}");
|
||||
string? cleanAccountErr = stackerOperation.ClearFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
ConsoleLog.Warning($"【提示】过账区反馈:PlcId:{taskFeedBackEntity.PlcId} 已经被取消,后续任务也一并取消,任务号:{wcsTask.TaskId},箱号:{wcsTask.VehicleNo}");
|
||||
string? cleanAccountErr = stackerOperation.ResetFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
if (!string.IsNullOrEmpty(cleanAccountErr))
|
||||
{
|
||||
ConsoleLog.Warning($"【警告】取消任务清除过账区发生异常,信息:{cleanAccountErr}");
|
||||
|
|
@ -93,8 +93,8 @@ public class CheckAccount(StackerOperation stackerOperation, AppWcsTaskDao wcsTa
|
|||
/// <param name="wcsTask"></param>
|
||||
private void CompleteTask(TaskFeedBackEntity taskFeedBackEntity, AppWcsTask wcsTask)
|
||||
{
|
||||
ConsoleLog.Tip($"【提示】过账区获取任务ID:{taskFeedBackEntity.PlcId},任务已经完成,任务号:{wcsTask.TaskId}");
|
||||
var cleanAccountErr = stackerOperation.ClearFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
ConsoleLog.Tip($"【提示】过账区获取任务ID:{taskFeedBackEntity.PlcId},任务已经完成,任务号:{wcsTask.TaskId},箱号:{wcsTask.VehicleNo}");
|
||||
var cleanAccountErr = stackerOperation.ResetFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
if (!string.IsNullOrEmpty(cleanAccountErr))
|
||||
{
|
||||
ConsoleLog.Warning($"【警告】完成任务清除过账区发生异常,信息:{cleanAccountErr}");
|
||||
|
|
@ -112,7 +112,7 @@ public class CheckAccount(StackerOperation stackerOperation, AppWcsTaskDao wcsTa
|
|||
/// <param name="wcsTask"></param>
|
||||
private void DoubleInFeedBackType(TaskFeedBackEntity taskFeedBackEntity, AppWcsTask wcsTask)
|
||||
{
|
||||
ConsoleLog.Warning($"[提示]过账区获取任务ID:{taskFeedBackEntity.PlcId},卸货位置有货,任务号:{wcsTask.TaskId}");
|
||||
ConsoleLog.Warning($"[提示]过账区获取任务ID:{taskFeedBackEntity.PlcId},卸货位置有货,任务号:{wcsTask.TaskId},箱号:{wcsTask.VehicleNo}");
|
||||
string? cleanAccountErr = stackerOperation.ResetFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
if (!string.IsNullOrEmpty(cleanAccountErr))
|
||||
{
|
||||
|
|
@ -129,7 +129,7 @@ public class CheckAccount(StackerOperation stackerOperation, AppWcsTaskDao wcsTa
|
|||
/// <param name="wcsTask"></param>
|
||||
private void EmptyOutFeedBackType(TaskFeedBackEntity taskFeedBackEntity, AppWcsTask wcsTask)
|
||||
{
|
||||
ConsoleLog.Warning($"[警告]过账区获取任务ID:{taskFeedBackEntity.PlcId},取货位置无货,任务号:{wcsTask.TaskId}");
|
||||
ConsoleLog.Warning($"[警告]过账区获取任务ID:{taskFeedBackEntity.PlcId},取货位置无货,任务号:{wcsTask.TaskId},箱号:{wcsTask.VehicleNo}");
|
||||
string? cleanAccountErr = stackerOperation.ResetFeedBackData(taskFeedBackEntity); // 清除过账
|
||||
if (!string.IsNullOrEmpty(cleanAccountErr))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ public class ExeTaskDoubleFork(
|
|||
if (isWriteTask)
|
||||
{
|
||||
string confirmResult = stackerOperation.WriteTaskConfirm(stackerId); // 写入任务确认
|
||||
ConsoleLog.Info($"堆垛机入库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
ConsoleLog.Info($"堆垛机:{stackerId} 入库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
return isWriteTask;
|
||||
|
|
@ -253,7 +253,7 @@ public class ExeTaskDoubleFork(
|
|||
if (isWriteTask)
|
||||
{
|
||||
string confirmResult = stackerOperation.WriteTaskConfirm(stackerId); // 写入任务确认
|
||||
ConsoleLog.Info($"堆垛机出库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
ConsoleLog.Info($"堆垛机:{stackerId}出库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
return isWriteTask;
|
||||
|
|
@ -385,7 +385,7 @@ public class ExeTaskDoubleFork(
|
|||
if (isWriteTask)
|
||||
{
|
||||
string confirmResult = stackerOperation.WriteTaskConfirm(stackerId); // 写入任务确认
|
||||
ConsoleLog.Info($"堆垛机移库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
ConsoleLog.Info($"堆垛机:{stackerId}移库任务写任务确认;信息:{(string.IsNullOrEmpty(confirmResult) ? "成功" : confirmResult)}");
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
return isWriteTask;
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
|
|||
/* 校验起点终点是否在点位表 */
|
||||
if (wmsTask.TaskType == (int)WmsTaskTypeEnum.inTask)
|
||||
{
|
||||
wmsTask.Origin ??= "R";
|
||||
wmsTask.Origin = string.IsNullOrEmpty(wmsTask.Origin)? "R" : wmsTask.Origin;
|
||||
}
|
||||
if (wmsTask.TaskType == (int)WmsTaskTypeEnum.outTask)
|
||||
{
|
||||
wmsTask.Destination ??= "C";
|
||||
wmsTask.Destination = string.IsNullOrEmpty(wmsTask.Destination) ? "R" : wmsTask.Destination;
|
||||
}
|
||||
bool checkResult = CommonData.AppLocations.ExistWmsLocation(wmsTask.Origin, wmsTask.Destination);
|
||||
if (!checkResult)
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@ public class LoginGetData(WmsWebApiPost wmsWebApiPost) : IBaseGetData
|
|||
public void ReadSuccess(string? disPlayName, string msg, string? area, AppRouterMethod routerMethodData)
|
||||
{
|
||||
/* 发送 WMS 请求入库 */
|
||||
ApplyInRequest applyInRequest = new(area, msg, msg);
|
||||
var postResult = wmsWebApiPost.HttpPost<ApplyInRequest, WmsResponse>(applyInRequest, CommonData.AppApiBaseInfos.GetAddress("ApplyEnterApiAddress") ?? "");
|
||||
if(!postResult.IsSend || postResult.ResponseEntity == default)
|
||||
{
|
||||
ConsoleLog.Exception($"【异常】注册口:{area} 箱码:{msg} 请求入库发生异常,异常信息:{postResult.RequestException}");
|
||||
return;
|
||||
}
|
||||
if( postResult.ResponseEntity.Code == 0)
|
||||
{
|
||||
ConsoleLog.Success($"注册口:{area} 箱码:{msg} 请求入库成功 {postResult.ResponseEntity.Message}");
|
||||
return;
|
||||
}
|
||||
ConsoleLog.Warning($"【警告】注册口:{area} 箱码:{msg} 请求入库失败,信息:{postResult.ResponseEntity.Message}");
|
||||
return;
|
||||
//ApplyInRequest applyInRequest = new(area, msg, msg);
|
||||
//var postResult = wmsWebApiPost.HttpPost<ApplyInRequest, WmsResponse>(applyInRequest, CommonData.AppApiBaseInfos.GetAddress("ApplyEnterApiAddress") ?? "");
|
||||
//if(!postResult.IsSend || postResult.ResponseEntity == default)
|
||||
//{
|
||||
// ConsoleLog.Exception($"【异常】注册口:{area} 箱码:{msg} 请求入库发生异常,异常信息:{postResult.RequestException}");
|
||||
// return;
|
||||
//}
|
||||
//if( postResult.ResponseEntity.Code == 0)
|
||||
//{
|
||||
// ConsoleLog.Success($"注册口:{area} 箱码:{msg} 请求入库成功 {postResult.ResponseEntity.Message}");
|
||||
// return;
|
||||
//}
|
||||
//ConsoleLog.Warning($"【警告】注册口:{area} 箱码:{msg} 请求入库失败,信息:{postResult.ResponseEntity.Message}");
|
||||
//return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class PickStandGetData(ConveyOperation conveyOperation, DataBaseData data
|
|||
if (string.IsNullOrEmpty(errTextOk))
|
||||
{
|
||||
ConsoleLog.Success($"拣选站台:{area} 箱码:{msg},写入PLC成功,{plcTaskOk}");
|
||||
int updateResult = conveyTaskDao.Update(new AppConveyTask() { TaskId = conveyTask.TaskId, MoveTime = DateTime.Now, TaskStatus = (int)ConveyTaskStatusEnum.moved });
|
||||
int updateResult = conveyTaskDao.Update(new AppConveyTask() { TaskId = conveyTask.TaskId, MoveTime = DateTime.Now });
|
||||
if (updateResult < 1)
|
||||
{
|
||||
ConsoleLog.Warning($"【警告】拣选站台:{area} 箱码:{msg} 更新移栽状态失败");
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class PickStandP5(ConveyOperation conveyOperation, DataBaseData dataBaseD
|
|||
if (string.IsNullOrEmpty(errTextOk))
|
||||
{
|
||||
ConsoleLog.Success($"拣选站台:{area} 箱码:{msg},写入PLC成功,{plcTaskOk}");
|
||||
int updateResult = conveyTaskDao.Update(new AppConveyTask() { TaskId = conveyTask.TaskId, MoveTime = DateTime.Now, TaskStatus = (int)ConveyTaskStatusEnum.moved });
|
||||
int updateResult = conveyTaskDao.Update(new AppConveyTask() { TaskId = conveyTask.TaskId, MoveTime = DateTime.Now });
|
||||
if (updateResult < 1)
|
||||
{
|
||||
ConsoleLog.Warning($"【警告】拣选站台:{area} 箱码:{msg} 更新移栽状态失败");
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ public class AppWcsTaskDao
|
|||
{
|
||||
var sqlFuc = CommonTool.DbServe.Queryable<AppWcsTask>()
|
||||
.Where(x => x.Destination == destination || x.Origin == destination)
|
||||
.Where(x => DataService.EnumData.GetWcsTaskStatusEnumRunningStatus().Contains((int)WcsTaskStatusEnum.running));
|
||||
.Where(x => DataService.EnumData.GetWcsTaskStatusEnumRunningStatus().Contains(x.TaskStatus));
|
||||
result.AddRange(sqlFuc.ToList());
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public static class EnumData
|
|||
/// 返回可以视作正在运行的任务的Wcs任务状态的枚举
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int[] GetWcsTaskStatusEnumRunningStatus()
|
||||
public static int?[] GetWcsTaskStatusEnumRunningStatus()
|
||||
{
|
||||
return [(int)WcsTaskStatusEnum.leaveOrigin, (int)WcsTaskStatusEnum.running];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user