change - 修改细节

master
SoulStar 3 months ago
parent dc11ee71bc
commit 215837df5d

@ -55,14 +55,13 @@ namespace SlnMesnac.Business.@base
_Taskservice = Taskservice; _Taskservice = Taskservice;
_AGVStateService = agvService; _AGVStateService = agvService;
_airpttpClient = airPorthttpClient; _airpttpClient = airPorthttpClient;
InitClearTimer();
//doWhileGetAGVTaskInfo(); //doWhileGetAGVTaskInfo();
_baseAGVBusiness = baseAGVBusiness; _baseAGVBusiness = baseAGVBusiness;
_AGVMapPointService = aGVMapPointService; _AGVMapPointService = aGVMapPointService;
_AGVJobService = agvJobService; _AGVJobService = agvJobService;
//新建Timer
RefreshTimer = new System.Timers.Timer(1000); RefreshTimer = new System.Timers.Timer(1000);
RefreshTimer.Elapsed += (sender, e) => RefreshTimer.Elapsed += (sender, e) =>
{ {
@ -346,6 +345,7 @@ namespace SlnMesnac.Business.@base
//入库代码 //入库代码
_baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(record.agvno, _baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(record.agvno,
_AGVJobService.GetAGVJobListByTypeAndConveyorNo("800入库", "0").JobName); _AGVJobService.GetAGVJobListByTypeAndConveyorNo("800入库", "0").JobName);
_AGVStateService.ResetAGVStackCount(record.agvno);
_logger.LogInformation($"Deliver [{record.agvno}] 入库"); _logger.LogInformation($"Deliver [{record.agvno}] 入库");
} }
} }
@ -357,6 +357,7 @@ namespace SlnMesnac.Business.@base
//入库代码 //入库代码
_baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(record.agvno, _baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(record.agvno,
_AGVJobService.GetAGVJobListByTypeAndConveyorNo("1000入库", "0").JobName); _AGVJobService.GetAGVJobListByTypeAndConveyorNo("1000入库", "0").JobName);
_AGVStateService.ResetAGVStackCount(record.agvno);
_logger.LogInformation($"AMR [{record.agvno}] 入库"); _logger.LogInformation($"AMR [{record.agvno}] 入库");
} }
} }
@ -366,310 +367,5 @@ namespace SlnMesnac.Business.@base
_logger.LogError($"清理满载AGV时发生错误Error: [{ex.Message}]"); _logger.LogError($"清理满载AGV时发生错误Error: [{ex.Message}]");
} }
} }
/// <summary>
/// 获取任务列表向待执行任务派发AGV (定期执行)
/// </summary>
private void GetAGVTaskInfo(object source, ElapsedEventArgs e)
{
try
{
//获取任务列表
List<AirportTask> Task = _Taskservice.GetAGVTaskInfos();
if (Task != null && Task.Count > 0)
{
//更新前端
_RefreshLogMessageAction?.Invoke("任务数量:" + Task.Count);
foreach (AirportTask taskItem in Task)
{
//判断任务是否未完成
if (taskItem.totalcount < taskItem.loadcount && taskItem.finishtime == null && taskItem.taskstate != "已完成")
{
//判断任务是否有小车正在执行
if (!string.IsNullOrEmpty(taskItem.deliveragvno) && !string.IsNullOrEmpty(taskItem.amragvno))
{
continue;
}
else
{
//Deliver未派发AMR未派发
if (string.IsNullOrEmpty(taskItem.deliveragvno) && string.IsNullOrEmpty(taskItem.amragvno))
{
_RefreshLogMessageAction?.Invoke($"正在为AGVAMR分配任务...");
_logger.LogInformation($"正在为AGVAMR分配任务");
//查询AGV设备状态及AMR设备状态
//这里要看AGV是否会立刻更新状态
CreateAGVTask(taskItem);
//查询机械臂状态
}
//Deliver已派发AMR未派发
if (!string.IsNullOrEmpty(taskItem.deliveragvno) && string.IsNullOrEmpty(taskItem.amragvno))
{
_RefreshLogMessageAction?.Invoke($"正在为AMR分配任务...");
_logger.LogInformation($"正在为AMR分配任务");
//查询AMR状态
CreateAMRTask(taskItem);
}
//Deliver未派发AMR已派发
if (string.IsNullOrEmpty(taskItem.deliveragvno) && !string.IsNullOrEmpty(taskItem.amragvno))
{
_RefreshLogMessageAction?.Invoke($"正在为AGV分配任务...");
_logger.LogInformation($"正在为AGV分配任务");
}
}
_Taskaction?.Invoke(taskItem);
}
}
}
}
catch (Exception ex)
{
}
}
/// <summary>
/// 调用接口更新指定的任务状态
/// </summary>
/// <param name="request"></param>
public void RefreshTaskStateForResopnse(AGVRequestTaskStateDetailEntity request)
{
AGVResponseEntity<ResponseTaskStateDetailDataEntity> response = _airpttpClient.AGVGetTaskStateDetailRequest(request);
if (response.code == 1)
{
_logger.LogError("返回错误:" + response.message);
return;
}
if (response.code == 0)
{
AirportTask record = new AirportTask();
List<AirportTask> list = _Taskservice.GetTaskInfos();
//list.Where(x => x.taskno == response.Data
}
}
/// <summary>
/// 持续读取AGV状态信息
/// </summary>
private void doWhileGetAGVTaskInfo()
{
try
{
Task.Run(() =>
{
while (true)
{
GetAGVTaskInfo(null, null);
Task.Delay(1000);
}
});
}
catch (Exception ex)
{
}
}
/// <summary>
/// 清理Timer
/// </summary>
private void InitClearTimer()
{
System.Timers.Timer timer = new System.Timers.Timer
{
Interval = 1000, // 每天执行一次
AutoReset = true,
};
timer.Elapsed += GetAGVTaskInfo;
timer.Start();
}
/// <summary>
/// 向AMR派发任务
/// </summary>
/// <param name="AirportTask"></param>
/// <returns></returns>
private bool CreateAMRTask(AirportTask AirportTask)
{
bool iflag = false;
try
{
iflag = true;
//获取AMR设备状态
List<AGVState> State = _AGVStateService.GetAgvState(AgvType.AMR);
foreach (var AgvItem in State)
{
//根据规则筛选最优AGV
if (AgvItem.agvworkstate == "任务空闲")
{
_logger.LogInformation($"获取空闲AMR列表");
_RefreshLogMessageAction?.Invoke("执行站台[" + AirportTask.conveyorno + "],下发" + "[" + AirportTask.taskno + "]任务");
//调用派发任务接口,向任务状态为任务空闲的AGV派发任务
bool iTaskflag = true;
if (iTaskflag)
{
_RefreshLogMessageAction?.Invoke("[" + AgvItem.agvno + "]AMR执行任务[" + AirportTask.taskno + "]");
AgvItem.taskno = AirportTask.taskno;
AgvItem.agvworkstate = "任务执行中";
AgvItem.refreshtime = DateTime.Now;
_AGVStateService.UpdateAsync(AgvItem);
//更新任务信息表状态为执行中
AirportTask.amragvno = AgvItem.agvno;
AirportTask.taskstate = "执行中";
_Taskservice.UpdateTaskAsync(AirportTask);
break;
}
}
}
return iflag;
}
catch (Exception ex)
{
return iflag;
}
}
/// <summary>
/// 向DeliverAGV派发任务
/// </summary>
/// <returns></returns>
private bool CreateAGVTask(AirportTask AirportTask)
{
bool iflag = false;
try
{
iflag = true;
//获取DeliverAGV设备状态
List<AGVState> State = _AGVStateService.GetAgvState(AgvType.Deliver);
foreach (var AgvItem in State)
{
//根据规则筛选最优AGV
if (AgvItem.agvworkstate == "任务空闲")
{
_logger.LogInformation($"获取空闲AGV列表");
_RefreshLogMessageAction?.Invoke("执行站台[" + AirportTask.conveyorno + "],下发" + "[" + AirportTask.taskno + "]任务");
//调用派发任务接口,向任务状态为任务空闲的AGV派发任务
bool iTaskflag = true;
if (iTaskflag)
{
_RefreshLogMessageAction?.Invoke("[" + AgvItem.agvno + "]AGV执行任务[" + AirportTask.taskno + "]");
AgvItem.taskno = AirportTask.taskno;
AgvItem.agvworkstate = "任务执行中";
AgvItem.refreshtime = DateTime.Now;
_AGVStateService.UpdateAsync(AgvItem);
//更新任务信息表状态为执行中
AirportTask.deliveragvno = AgvItem.agvno;
AirportTask.taskstate = "执行中";
_Taskservice.UpdateTaskAsync(AirportTask);
break;
}
}
}
return iflag;
}
catch (Exception ex)
{
return iflag;
}
}
/// <summary>
/// 获取任务状态详情
/// </summary>
private void GetTaskStateDetail()
{
try
{
Task.Run(() =>
{
List<AirportTask> Task = _Taskservice.GetAGVTaskInfos();
if (Task.Count > 0)
{
// 设置计时器
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
//通过任务编号查询agv任务
// 检查是否超过两秒
if (stopwatch.ElapsedMilliseconds > 2000)
{
_logger.LogError("超时");
}
Thread.Sleep(100);
}
});
}
catch (Exception ex)
{
}
}
} }
} }

@ -280,6 +280,7 @@ namespace SlnMesnac.Business.@base
_baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(airportTask.deliveragvno, _baseAGVBusiness.EndTaskAndClearErrorAndDownloadTask(airportTask.deliveragvno,
_AGVJobService.GetAGVJobListByTypeAndConveyorNo("800入库", airportTask.conveyorno).JobName); _AGVJobService.GetAGVJobListByTypeAndConveyorNo("800入库", airportTask.conveyorno).JobName);
_logger.LogInformation($"任务 [{airportTask.taskno}] Deliver [{airportTask.deliveragvno}] 入库"); _logger.LogInformation($"任务 [{airportTask.taskno}] Deliver [{airportTask.deliveragvno}] 入库");
_aGVStateService.ResetAGVStackCount(airportTask.deliveragvno);
airportTask.deliveragvno = null; airportTask.deliveragvno = null;
airportTask.deliveragvisarrive = null; airportTask.deliveragvisarrive = null;
_airportTaskService.UpdateTaskAsync(airportTask); _airportTaskService.UpdateTaskAsync(airportTask);
@ -429,6 +430,12 @@ namespace SlnMesnac.Business.@base
} }
} }
/// <summary>
/// 码垛计数
/// </summary>
/// <param name="airportTask"></param>
/// <param name="lastCount"></param>
/// <exception cref="Exception"></exception>
public void StackCount(AirportTask airportTask, byte lastCount) public void StackCount(AirportTask airportTask, byte lastCount)
{ {
//AMR码垛计数 //AMR码垛计数

@ -51,5 +51,12 @@ namespace SlnMesnac.Repository.service
/// <returns></returns> /// <returns></returns>
AGVState GetSingleAGVState(string AGVguid); AGVState GetSingleAGVState(string AGVguid);
/// <summary>
/// 重置AGV计数
/// </summary>
/// <param name="AGVguid"></param>
/// <returns></returns>
bool ResetAGVStackCount(string AGVguid);
} }
} }

@ -31,14 +31,8 @@ namespace SlnMesnac.Repository.service.Impl
List<AGVState> agvStateInfoList = null; List<AGVState> agvStateInfoList = null;
try try
{ {
Expression<Func<AGVState, bool>> exp = x => true; var a = ((int)AgvType).ToString();
exp = exp.And(x => agvStateInfoList = base._rep.GetList(x => x.agvtype == a);
(x.agvno != null || x.agvno != "")
&& (x.taskno == null || x.taskno == "")
&& x.agvworkstate == "空闲"
&& x.agvalarmstate == "正常"
&& x.agvtype == _AgvType);
agvStateInfoList = base._rep.GetList(exp);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -146,5 +140,23 @@ namespace SlnMesnac.Repository.service.Impl
return null; return null;
} }
} }
/// <summary>
/// 重置AGV计数
/// </summary>
/// <param name="AGVguid"></param>
/// <returns></returns>
public bool ResetAGVStackCount(string AGVguid)
{
try
{
return _rep.Update(x => new AGVState() { stackcount = 0 }, x => x.agvno == AGVguid);
}
catch (Exception ex)
{
_logger.LogError($"重置计数更新发生错误{ex.Message}");
return false;
}
}
} }
} }

@ -5,24 +5,25 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.ControlPage" xmlns:local="clr-namespace:SlnMesnac.WPF.Page.ControlPage"
mc:Ignorable="d" d:DesignWidth="800" Background="Transparent" Height="590"> mc:Ignorable="d" d:DesignWidth="800" Background="Transparent" Height="590">
<Grid HorizontalAlignment="Center" Width="800" Height="590" VerticalAlignment="Center"> <Grid HorizontalAlignment="Center" Width="800" Height="590" VerticalAlignment="Top">
<Button Content="发送开始抓取" x:Name="DeliverNeedPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DeliverNeedPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="615,70,85,396" Click="Button_Click_1"/> <Button Content="D定位抓取" x:Name="DeliverNeedPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DeliverNeedPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="466,51,234,509" Click="Button_Click_1"/>
<Button Content="D无定抓取" x:Name="DeilverNoPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DeilverNoPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="353,70,347,396" Click="Button_Click_1"/> <Button Content="A定位抓取" x:Name="AMRNeedPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=AMRNeedPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="466,121,234,439" Click="Button_Click_1"/>
<Button Content="A无定抓取" x:Name="AMRNoPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=AMRNoPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="353,140,347,326" Click="Button_Click_1"/> <Button Content="D无定抓取" x:Name="DeilverNoPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=DeilverNoPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="324,51,376,509" Click="Button_Click_1"/>
<Button Content="发送结束抓取" x:Name="VisionEnd" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=VisionEnd}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="615,140,85,326" Click="Button_Click_2"/> <Button Content="A无定抓取" x:Name="AMRNoPosition" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=AMRNoPosition}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="324,121,376,439" Click="Button_Click_1"/>
<Button Content="调用800小车" x:Name="Get800" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Get800}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="89,277,611,189" Click="Button_Click_3"/> <Button Content="发送结束抓取" x:Name="VisionEnd" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=VisionEnd}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="466,185,234,375" Click="Button_Click_2"/>
<Button Content="入库800小车" x:Name="Out800" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Out800}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="89,209,611,257" Click="Button_Click_4"/> <Button Content="调用800小车" x:Name="Get800" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Get800}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="48,121,652,439" Click="Button_Click_3"/>
<Button Content="调用1000小车" x:Name="Get1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Get1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="89,139,611,327" Click="Button_Click_3"/> <Button Content="入库800小车" x:Name="Out800" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Out800}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="48,51,652,509" Click="Button_Click_4"/>
<Button Content="入库1000小车" x:Name="Out1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Out1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="89,69,611,397" Click="Button_Click_4"/> <Button Content="调用1000小车" x:Name="Get1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Get1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="187,121,513,439" Click="Button_Click_3"/>
<Button Content="复位1000小车" x:Name="Reset1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Reset1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="218,69,482,397" Click="Button_Click_4"/> <Button Content="入库1000小车" x:Name="Out1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Out1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="187,51,513,509" Click="Button_Click_4"/>
<Button Content="手动停止800任务" x:Name="ManualStop800Task" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualStop800Task}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="482,70,205,396" Click="Button_Click_5" RenderTransformOrigin="0.504,0.511"/> <Button Content="复位1000小车" x:Name="Reset1000" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Reset1000}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="187,190,513,370" Click="Button_Click_4"/>
<Button Content="手动清除800报警" x:Name="ManualClear800Error" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualClear800Error}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="482,140,205,326" Click="Button_Click_6"/> <Button Content="手动停止800任务" x:Name="ManualStop800Task" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualStop800Task}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="604,51,83,509" Click="Button_Click_5" RenderTransformOrigin="0.504,0.511"/>
<Button Content="手动停止1000任务" x:Name="ManualStop1000Task" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualStop1000Task}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="482,209,205,257" Click="Button_Click_7"/> <Button Content="手动清除800报警" x:Name="ManualClear800Error" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualClear800Error}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="604,121,83,439" Click="Button_Click_6"/>
<Button Content="开始AGV状态刷新" x:Name="StartAGVStateRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=StartAGVStateRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="89,342,581,124" /> <Button Content="手动停止1000任务" x:Name="ManualStop1000Task" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=ManualStop1000Task}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="604,190,83,370" Click="Button_Click_7"/>
<Button Content="结束AGV状态刷新" x:Name="StopAGVStateRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=StopAGVStateRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="89,405,581,61" /> <Button Content="开始AGV状态刷新" x:Name="StartAGVStateRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=StartAGVStateRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="39,298,631,262" />
<Button Content="开始任务状态刷新" x:Name="StartTaskRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StartTaskRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="251,342,419,124" /> <Button Content="结束AGV状态刷新" x:Name="StopAGVStateRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=StopAGVStateRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="39,361,631,199" />
<Button Content="结束任务状态刷新" x:Name="StopTaskRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StopTaskRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="251,405,419,61" /> <Button Content="开始任务状态刷新" x:Name="StartTaskRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StartTaskRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="201,298,469,262" />
<Button Content="终止所有的航班任务、小车任务、机械臂复位" x:Name="StopAll" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StopAll}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="89,517,419,43" RenderTransformOrigin="0.5,0.5" Click="StopAll_Click" > <Button Content="结束任务状态刷新" x:Name="StopTaskRefresh" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StopTaskRefresh}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="201,361,469,199" />
<Button Content="终止所有的航班任务、小车任务、机械臂复位" x:Name="StopAll" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name, ElementName=StopAll}" Style="{StaticResource BUTTON_AGREE}" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="39,426,469,134" RenderTransformOrigin="0.5,0.5" Click="StopAll_Click" >
<Button.RenderTransform> <Button.RenderTransform>
<TransformGroup> <TransformGroup>
<ScaleTransform/> <ScaleTransform/>
@ -33,7 +34,7 @@
</Button.RenderTransform> </Button.RenderTransform>
</Button> </Button>
<Grid Margin="426,324,10,10" Background="White"> <Grid Margin="397,258,39,76" Background="White">
<Label Content="任务编号" Width="64" VerticalAlignment="Top" Margin="48,31,252,0"/> <Label Content="任务编号" Width="64" VerticalAlignment="Top" Margin="48,31,252,0"/>
<Label Content="为空自动生成" VerticalAlignment="Top" Margin="176,0,106,0"/> <Label Content="为空自动生成" VerticalAlignment="Top" Margin="176,0,106,0"/>
<TextBox Name="taskNo" Width="188" Height="36" Margin="123,26,53,194"/> <TextBox Name="taskNo" Width="188" Height="36" Margin="123,26,53,194"/>
@ -49,6 +50,5 @@
<Button x:Name="NewAirportTask" Content="新建任务" Click="NewAirportTask_Click" Margin="122,190,122,30" /> <Button x:Name="NewAirportTask" Content="新建任务" Click="NewAirportTask_Click" Margin="122,190,122,30" />
</Grid> </Grid>
</Grid> </Grid>
</UserControl> </UserControl>

@ -185,6 +185,11 @@ namespace SlnMesnac.WPF.ViewModel
_visionBusiness.TotalJudge = true; _visionBusiness.TotalJudge = true;
_visionBusiness.RequestVisionStartWork(StackState.NXAGVNeedPositioning, 0, _tcpServer.VID); _visionBusiness.RequestVisionStartWork(StackState.NXAGVNeedPositioning, 0, _tcpServer.VID);
break; break;
case "AMRNeedPosition":
//AMR就绪请求无定向AMR开始工作
_visionBusiness.TotalJudge = true;
_visionBusiness.RequestVisionStartWork(StackState.NXAMRNeedPositioning, 0, _tcpServer.VID);
break;
case "DeilverNoPosition": case "DeilverNoPosition":
//AMR就绪请求无定向AGV开始工作 //AMR就绪请求无定向AGV开始工作
_visionBusiness.TotalJudge = true; _visionBusiness.TotalJudge = true;

Loading…
Cancel
Save