<fix>[important]修改一部分显示,修改任务解析添加出入库默认起点终点

This commit is contained in:
葛林强 2024-07-26 08:43:43 +08:00
parent 9e88464064
commit 5350baa820
11 changed files with 31 additions and 18 deletions

View File

@ -47,7 +47,7 @@ public class UploadBoxArrive(AppConveyStandDao conveyStandDao, ConveyOperation c
{
return;
}
ConsoleLog.Info($"【提示】料箱:{code} 已经到达拣选站台:{stand.Area}");
ConsoleLog.Info($"【提示】料箱:{code} 已经到达拣选站台:{stand.StandId}");
conveyOperation.ClearStandCodeStatus(stand.StandId!);
// 查询 条码 对应的任务
@ -55,12 +55,12 @@ public class UploadBoxArrive(AppConveyStandDao conveyStandDao, ConveyOperation c
{
VehicleNo = code,
TaskType = (int)ConveyTaskTypeEnum.pick,
Location = stand.Area
Location = stand.StandId,
//TaskStatus = (int)ConveyTaskStatusEnum.moved
});
if (pickTasks == default || pickTasks.Count < 1)
{
ConsoleLog.Error($"【异常】拣选站台{stand.Area} 料箱:{code} 找不到对应任务");
conveyOperation.ClearStandCodeStatus(stand.StandId!);
ConsoleLog.Error($"【异常】拣选站台{stand.StandId} 料箱:{code} 找不到对应任务");
return;
}
var pickTask = pickTasks[0]; // 拣选任务
@ -75,7 +75,7 @@ public class UploadBoxArrive(AppConveyStandDao conveyStandDao, ConveyOperation c
// 发送wms料箱到达
UploadPickStandRequest request = new()
{
PickStand = stand.Area,
PickStand = stand.StandId,
VehicleNo = pickTask.VehicleNo,
Remark = ""
};
@ -94,7 +94,7 @@ public class UploadBoxArrive(AppConveyStandDao conveyStandDao, ConveyOperation c
task.Start();
tasks.Add(task);
}
Task.WaitAll(tasks.ToArray());
Task.WaitAll([.. tasks]);
return true;
}

View File

@ -45,6 +45,14 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
private void ResolveTask(AppWmsTask wmsTask)
{
/* 校验起点终点是否在点位表 */
if (wmsTask.TaskType == (int)WmsTaskTypeEnum.inTask)
{
wmsTask.Origin ??= "R";
}
if (wmsTask.TaskType == (int)WmsTaskTypeEnum.outTask)
{
wmsTask.Destination ??= "C";
}
bool checkResult = CommonData.AppLocations.ExistWmsLocation(wmsTask.Origin, wmsTask.Destination);
if (!checkResult)
{
@ -268,7 +276,7 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
/// </summary>
/// <param name="wmsTask"></param>
/// <returns></returns>
private List<AppWcsTask>? TransOtherTaskToWcsTask(AppWmsTask wmsTask)
private List<AppWcsTask>? TransOtherTaskToWcsTask(AppWmsTask _)
{
return default;
}

View File

@ -32,7 +32,7 @@ public class Pick1StandOutC3(ConveyOperation conveyOperation, DataBaseData dataB
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"一区出口:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"一区出口:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】一区出口:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -33,7 +33,7 @@ public class Pick2StandOutC4(ConveyOperation conveyOperation, DataBaseData dataB
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"二区出口:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"二区出口:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】二区出口:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -34,7 +34,7 @@ public class PickStandGetData(ConveyOperation conveyOperation, DataBaseData data
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"拣选站台:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"拣选站台:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】拣选站台:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -32,7 +32,7 @@ public class PickStandP5(ConveyOperation conveyOperation, DataBaseData dataBaseD
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"拣选站台:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"拣选站台:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】拣选站台:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -14,6 +14,9 @@ namespace WcsMain.Business.Convey.HistoryDataHandler.HisGetData;
/// <summary>
/// 入库异常异常口判定 ---- 卡特专用 ---- 苏州卡特
/// </summary>
/// <remarks>
/// R3
/// </remarks>
public class StackerInErr(ConveyOperation conveyOperation, DataBaseData dataBaseData, AppWcsTaskDao wcsTaskDao) : IBaseGetData
{
/// <summary>
@ -30,7 +33,7 @@ public class StackerInErr(ConveyOperation conveyOperation, DataBaseData dataBase
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"入库异常口:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"入库异常口:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】入库异常口:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -15,7 +15,7 @@ namespace WcsMain.Business.Convey.HistoryDataHandler.HisGetData;
/// 入库分流 ---- 卡特专用 ---- 苏州卡特
/// </summary>
/// <remarks>
/// R2
/// R2,R4
/// </remarks>
public class StackerInSpliter(ConveyOperation conveyOperation, DataBaseData dataBaseData, AppWcsTaskDao wcsTaskDao) : IBaseGetData
{
@ -34,7 +34,7 @@ public class StackerInSpliter(ConveyOperation conveyOperation, DataBaseData data
string errText = conveyOperation.WriteTask(area, plcTask);
if(string.IsNullOrEmpty(errText) )
{
ConsoleLog.Success($"入库分流:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"入库分流:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】入库分流:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -32,7 +32,7 @@ public class StackerOutC1(ConveyOperation conveyOperation, DataBaseData dataBase
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"出库分流:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"出库分流:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】出库分流:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -25,7 +25,7 @@ public class StackerOutErrC2(ConveyOperation conveyOperation, DataBaseData dataB
string errText = conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
ConsoleLog.Success($"出库异常口:{area} 读码失败写入PLC成功{plcTask}");
ConsoleLog.Warning($"出库异常口:{area} 读码失败写入PLC成功{plcTask}");
return;
}
ConsoleLog.Warning($"【警告】出库异常口:{area} 读码失败写入PLC失败{plcTask},信息:{errText}");

View File

@ -55,7 +55,9 @@ public class AppConveyTaskDao
.WhereIF(conveyTask.Location != default, w => w.Location == conveyTask.Location)
.WhereIF(conveyTask.ArriveLocation != default, w => w.ArriveLocation == conveyTask.ArriveLocation)
.WhereIF(conveyTask.CreatePerson != default, w => w.CreatePerson == conveyTask.CreatePerson)
.WhereIF(conveyTask.Remark != default, w => w.Remark == conveyTask.Remark);
.WhereIF(conveyTask.Remark != default, w => w.Remark == conveyTask.Remark)
.OrderBy(o => o.CreateTime);
return sqlFuc.ToList();
}
catch(Exception ex)