任务限制优化
This commit is contained in:
@@ -174,6 +174,20 @@ namespace WPFWCSDemo.Schedules.CircleRGV
|
||||
CreateTime = DateTime.Now,
|
||||
};
|
||||
|
||||
|
||||
var count = context.Tasks
|
||||
.Where(t => t.SourceLocation == sourceLocation.ToString() &&
|
||||
(t.ScheduleState == ScheduleStateCode.Trans_CircleRGV_Ready ||
|
||||
t.ScheduleState == ScheduleStateCode.Trans_CircleRGV_Picking ||
|
||||
t.ScheduleState == ScheduleStateCode.Trans_CircleRGV_PickOnTheWay))
|
||||
.Count();
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
Log.Warning($"【提示】任务号:{taskNumber},取货站点:{sourceLocation}(该条可忽略)");
|
||||
return;
|
||||
}
|
||||
|
||||
context.Tasks.Add(taskRT);
|
||||
|
||||
if (sourceLocation == RGVStation.LineGH_Pallets_In)
|
||||
|
||||
Reference in New Issue
Block a user