master
1 year ago
parent aef238a133
commit 71631e6349

@ -2394,12 +2394,12 @@ FontSize="25" Width="160" Height="80" VerticalAlignment="Top" HorizontalAlignmen
</ListBox>
</StackPanel>
</Border>
<Border BorderBrush="White" BorderThickness="0" Grid.ColumnSpan="1" Grid.Column="6" Grid.RowSpan="2" Margin="20 0 0 0">
<Border BorderBrush="White" BorderThickness="0" Grid.ColumnSpan="1" Grid.Column="6" Grid.RowSpan="3" Margin="20 0 0 0">
<StackPanel Orientation="Vertical" >
<Button x:Name="SelectOutButton" Content="选择出库" Background="#346DFF" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="SelectOutBtn_Click"/>
<Button Content="继续出库" Background="#346DFF" Foreground="White" FontSize="50" Margin="20,50,0,0" Height="100" Width="250" Click="ContineOutBtn_Click"/>
<Button Content="继续出库" Background="#346DFF" Foreground="White" FontSize="50" Margin="20,50,0,0" Height="119" Width="250" Click="ContineOutBtn_Click"/>
</StackPanel>
</Border>
@ -2549,14 +2549,14 @@ FontSize="25" Width="160" Height="80" VerticalAlignment="Top" HorizontalAlignmen
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" IsReadOnly="True" x:Name="outMaterialNameTxt" FontSize="50" LostFocus="txtOutBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="80" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/>
</Grid>
<Button Content="确认出库" Grid.Column="4" Grid.Row="3" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="OutRawBaseLocaltion_Click"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="6">
<TextBlock Text="物料规格:" Width="280" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50"/>
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" IsReadOnly="True" x:Name="outMaterialSpecTxt" FontSize="50" LostFocus="txtOutBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="80" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
</Grid>
<Button Content="背负式小车捡料完成" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="btnBearConfirmBox_Click"/>
<Button Content="确认出库" Grid.Column="4" Grid.Row="3" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="OutRawBaseLocaltion_Click"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="4" Grid.ColumnSpan="6">
<TextBlock Text="库存:" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50"/>
@ -2568,7 +2568,8 @@ FontSize="25" Width="160" Height="80" VerticalAlignment="Top" HorizontalAlignmen
<Grid>
<hc:TextBox x:Name="txtOutScan" Margin="0,0,0,0" FontSize="50" Width="300" HorizontalAlignment="Left" VerticalAlignment="Center" Height="80" Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="3" KeyDown="OutEnter" />
</Grid>
<Button Content="创建背负小车任务" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="createBearConfirmBox_Click"/>
<Button Content="背负式小车捡料完成" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="btnBearConfirmBox_Click"/>
</StackPanel>
@ -2577,6 +2578,8 @@ FontSize="25" Width="160" Height="80" VerticalAlignment="Top" HorizontalAlignmen
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" IsReadOnly="True" x:Name="remarks" FontSize="50" LostFocus="txtOutBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="80" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
</Grid>
<Button Content="创建背负小车任务" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="createBearConfirmBox_Click"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="6" Grid.ColumnSpan="6">
<TextBlock Text="提示信息:" Width="280" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50"/>
@ -3061,7 +3064,7 @@ IsReadOnly="True">
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding RobotCode}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3069,7 +3072,7 @@ IsReadOnly="True">
Header="小车"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding Online}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3077,7 +3080,7 @@ IsReadOnly="True">
Header="状态"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding Battery}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3085,7 +3088,7 @@ IsReadOnly="True">
Header="电量"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding Speed}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3093,7 +3096,7 @@ IsReadOnly="True">
Header="速度"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding Stop}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3101,7 +3104,7 @@ IsReadOnly="True">
Header="是否暂停"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Width="100*"
Binding="{Binding MapCode}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
@ -3109,13 +3112,22 @@ IsReadOnly="True">
Header="楼层"
IsReadOnly="True" />
<DataGridTextColumn
Width="180*"
Binding="{Binding DateNow}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
FontSize="20"
Header="同步时间"
IsReadOnly="True" />
Width="180*"
Binding="{Binding DateNow}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
FontSize="20"
Header="同步时间"
IsReadOnly="True" />
<DataGridTextColumn
Width="250*"
Binding="{Binding Status}"
CanUserSort="False"
ElementStyle="{StaticResource dgCell}"
FontSize="20"
Header="报警信息"
IsReadOnly="True" />
</DataGrid.Columns>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">

@ -215,7 +215,8 @@ namespace Khd.Core.Wpf.Form
IsBackground = true
};
ReturnOrderThread.Start();
Thread taskThread = new Thread(TaskOrderTimer);
taskThread.Start();
//Thread ddjThread = new Thread(ddjTimer);
//ddjThread.Start();
//LogManager.Info($"--------------------------当前时间 :{DateTime.Now} >>> 客户端启动;");
@ -340,6 +341,22 @@ namespace Khd.Core.Wpf.Form
}
private void TaskOrderTimer(object? obj)
{
while (true)
{
try
{
GetTask();
}
catch
{
}
Thread.Sleep(1000 * 20);
}
}
/// <summary>
/// 检查版本
/// </summary>
@ -604,7 +621,9 @@ namespace Khd.Core.Wpf.Form
{
materialId = g.Key.materialId,
saleOrderId = g.Key.saleOrderId,
//totalOutstockAmount = g.Sum(t => t.outstockAmount),
totalOutstockAmount = g.Sum(t => t.outstockAmount),
//totalRealOutstockAmount = g.Sum(t => t.realOutstockAmount)
totalRealOutstockAmount = g.Sum(t => t.realOutstockAmount)
}).ToList();
@ -639,9 +658,9 @@ namespace Khd.Core.Wpf.Form
RealOutstockAmount = order.totalRealOutstockAmount,
// 托盘携带可用信息,用分号分隔
PalletDetails = string.Join("\n", palletMaterialSummary
.Where(pallet => pallet.MaterialId == order.materialId)
.Select(pallet => $"托盘{pallet.PalletInfoCode}数量{string.Format("{0:0.00}", pallet.canUseAmount)}")
),
.Where(pallet => pallet.MaterialId == order.materialId)
.Select(pallet => $"托盘{pallet.PalletInfoCode}数量{string.Format("{0:0.00}", pallet.canUseAmount)}")
),
EndStationCodes = string.Join(",", endStations.Where(t => t.materialId == order.materialId && t.orderId == order.saleOrderId).Select(t => t.endStationCode).ToList())
}).ToList();
@ -722,7 +741,6 @@ namespace Khd.Core.Wpf.Form
this.OutTaskNumber.Items.Refresh();
});
}
GetTask();
}
catch
{
@ -744,6 +762,7 @@ namespace Khd.Core.Wpf.Form
{
using var scope = _host.Services.CreateScope();
var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
var alarmInfo = dbContext.DmsBaseAlarmRule.Where(t => t.DeviceId ==- 1).ToList();
while (true)
{
try
@ -755,7 +774,7 @@ namespace Khd.Core.Wpf.Form
{
Battery = t.Battery,
Speed = t.Speed,
Status = t.Status,
Status = alarmInfo.FirstOrDefault(d => d.Status?.ToString() == t.Status)?.StatusWord,
Stop = t.Stop == "1" ? "停止" : "运行",
DateNow = t.DateNow?.ToString("yyyy-MM-dd HH:mm:ss"),
ExclType = t.ExclType,
@ -839,7 +858,6 @@ namespace Khd.Core.Wpf.Form
}
).OrderBy(t => t.equipNo);
this.EmptyEquip.Items.Refresh();
GetTask();
});
}
}
@ -2285,7 +2303,7 @@ namespace Khd.Core.Wpf.Form
var material = dbContext.MesBaseBarcodeInfo.FirstOrDefault(t => t.barcodeInfo == txtReturnBarCode.Text);
if (material == null)
{
txtReturnbox.Text=("未查询到该条码内容!");
txtReturnbox.Text = ("未查询到该条码内容!");
txtReturnBarCode.Text = string.Empty;
txtReturnBarCode.Focus();
return;
@ -2824,7 +2842,7 @@ namespace Khd.Core.Wpf.Form
outstockTime = DateTime.Now,
outstockWay = "2",
materialProductionDate = mesBaseBarcodeInfo.productionDate,
Tips=this.remarks.Text
Tips = this.remarks.Text
};
dbContext.Add(wmsProductOutstockDetail);
dbContext.Update(item);
@ -5540,7 +5558,7 @@ namespace Khd.Core.Wpf.Form
Margin = new Thickness(2),
Background = baseEquips[k].emptyCount > 0 ? new SolidColorBrush((Color)ColorConverter.ConvertFromString("#75F76D")) : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#4789AE")),
};
Grid.SetColumn(button2, k % 4 *2 +17);
Grid.SetColumn(button2, k % 4 * 2 + 17);
Grid.SetRow(button2, -((k / 4) - 1));
Grid.SetColumnSpan(button2, 2);
grid.Children.Add(button2);

Loading…
Cancel
Save