1.手动入库

master
zhangxy 4 months ago
parent 8deef51008
commit b601236464

@ -49,5 +49,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Click="ConfirmButton_Click" />
<TextBlock HorizontalAlignment="Left" Margin="59,10,0,0" Grid.Row="2" Foreground="Red" TextWrapping="Wrap" Text="注意:&#x0D;1.该功能为将库位信息直接写入数据库,并解锁该库位,非必要不要轻易使用!&#x0D; &#x0D; 2.使用手动入库前请务必结合平板确认现场库位信息,并保证小车不处于运行状态!" FontSize="17" VerticalAlignment="Top" Height="218" Width="194"/>
<CheckBox x:Name="ForceWrite_CheckBox" Content="强制写入" Foreground="Red" HorizontalAlignment="Left" Margin="527,0,0,0" Grid.Row="2" VerticalAlignment="Center"/>
</Grid>
</Window>

@ -69,11 +69,17 @@ namespace SlnMesnac.WPF.Page
MessageBox.Show("请输入入库库位");
return;
}
if (startCode == BoxCode)
if(BoxCode !="" && BoxCode != null)
{
if (startCode == BoxCode || BoxCode.Substring(0,10) != "SHS0000000" || BoxCode.Length !=12)
{
MessageBox.Show("请检查格式!");
return;
}
}
if (startCode == "异常库位3066")
{
@ -81,10 +87,10 @@ namespace SlnMesnac.WPF.Page
}
WmsBaseLocation? startLocation = SqlSugarClient.Queryable<WmsBaseLocation>().Where(it => it.LocationCode == startCode).First();
WmsPalletInfo? wmsPalletInfo = SqlSugarClient.Queryable<WmsPalletInfo>().InnerJoin<WmsBaseLocation>((x,y) => x.Amount == 0 && y.LocationCode == startCode).First();
WmsPalletInfo? wmsPalletInfo = SqlSugarClient.Queryable<WmsPalletInfo>().InnerJoin<WmsBaseLocation>((x,y) => x.Amount >= 0 && y.LocationCode == startCode && y.ContainerCode.Length>1 ).First();
if (wmsPalletInfo == null) {
MessageBox.Show("起点库位托盘未清空,无法入库!请检查");
if (wmsPalletInfo != null && ForceWrite_CheckBox.IsChecked == false) {
MessageBox.Show("目标库位托盘未清空,无法入库!请检查!若需强制入库,请勾选右侧强制入库选项");
return;
}

@ -58,6 +58,10 @@ namespace SlnMesnac.WPF.ViewModel
{
isProcessing = true;
await LoadRfidDataAsync();
}
catch (Exception ex)
{
}
finally
{

Loading…
Cancel
Save