foamRearStore
liuwf 4 months ago
parent 663f2dd988
commit 4358100f6e

Binary file not shown.

@ -605,6 +605,8 @@ namespace Aucma.Scada.Business
{
List<BaseSpaceInfo> info = _spaceInfoService.GetBaseSpaceInfosByMaterialType(storeCode, materialType, 1);
// 过滤禁入货道
info = info.Where(x => x.typeCodeB != materialType).ToList();
if (info != null)
{
if (info.Count > 0)

@ -146,12 +146,14 @@ namespace Aucma.Scada.Business
ReadSpaceInfoByPlc(spaceInfo);
if (spaceInfo.onRouteAmount == 0)
{
//自动完成该货道的所有入库任务
InStoreFinsihBySpaceCodeEvent?.Invoke(spaceInfo.spaceCode);
var newSpace = _spaceInfoService.GetSpaceInfoBySpaceCode(spaceInfo.storeCode, spaceInfo.spaceCode);
//该货道没有入库任务了,重置货道出库标识,可以再次出库
spaceInfo.outStoreFlag = 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
newSpace.outStoreFlag = 1;
_spaceInfoService.UpdateSpaceInfo(newSpace);
RefreshFoamStockEvent?.Invoke();
// 删除多余入库任务
@ -159,21 +161,22 @@ namespace Aucma.Scada.Business
}
if (spaceInfo.spaceStock == 0 && spaceInfo.onRouteAmount == 0)
{
var newSpace = _spaceInfoService.GetSpaceInfoBySpaceCode(spaceInfo.storeCode, spaceInfo.spaceCode);
// 清空型号供新型号使用
spaceInfo.materialType = null;
spaceInfo.typeNameA = null;
newSpace.materialType = null;
newSpace.typeNameA = null;
//重置货道,可以再次入库
spaceInfo.inStoreFlag = 1;
spaceInfo.outStoreFlag = 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
newSpace.inStoreFlag = 1;
newSpace.outStoreFlag = 1;
_spaceInfoService.UpdateSpaceInfo(newSpace);
RefreshFoamStockEvent?.Invoke();
}
// 更新库存
if (Stock != spaceInfo.spaceStock || OnAmount != spaceInfo.onRouteAmount)
{
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
var newSpace = _spaceInfoService.GetSpaceInfoBySpaceCode(spaceInfo.storeCode, spaceInfo.spaceCode);
_spaceInfoService.UpdateSpaceInfo(newSpace);
RefreshFoamStockEvent?.Invoke();
}

@ -126,7 +126,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<!--<RowDefinition Height="2*"/>-->
<RowDefinition Height="2*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
@ -168,8 +168,8 @@
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<!--<RowDefinition/>
<RowDefinition/>-->
<RowDefinition/>
<!--<RowDefinition/>-->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
@ -195,8 +195,16 @@
<Border Grid.Column="1" Grid.Row="1" BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding typeNameA}" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
</Grid>
<Border Grid.Column="0" Grid.Row="2" BorderBrush="White" BorderThickness="1" >
<TextBlock Text="禁入型号" FontSize="18" Foreground="Yellow" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" Grid.Row="2" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.SubmitCommand2, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding Text, ElementName=spaceCodeText}" Background="Transparent">
<TextBlock Text="{Binding typeNameB}" FontSize="16" Foreground="Yellow" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
</Grid>
</Border>
<Border Grid.Row="2">

@ -42,8 +42,8 @@
<!--计划列表-->
<Border Grid.Row="1" Grid.Column="0" BorderBrush="#1254AB" Background="Transparent" BorderThickness="0" CornerRadius="5" Margin="1,1,5,5" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
FontSize="18" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
FontSize="18" ColumnHeaderHeight="45"
RowHeight="40" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}" SelectionChanged="DataGrid_SelectionChanged">

Binary file not shown.

@ -12,9 +12,9 @@ DEBUG;TRACE
E:\c#\AUCMA\最新代码整合\登录版\泡后库\foam\Aucma.Scada.UI\App.xaml
201095146790
1-1257182505
49-2077820446
48295368729
148-1086948104
Page\AssemblyPlan\AssemblyPlanControl.xaml;Page\AssemblyPlan\PlanInfoEditWindow.xaml;Page\AssemblyPlan\QuantityIssuedWindow.xaml;Page\AssemblyPlan\SearchCriteriaWindow.xaml;Page\InStoreInfo\InStoreInfoControl.xaml;LogInfoControl.xaml;MainWindow.xaml;Page\InventoryInfo\BomFoamRearInventory.xaml;Page\InventoryInfo\InventoryInfoControl.xaml;Page\InventoryInfo\SelectType.xaml;Page\InventoryInfo\LinerInventory.xaml;Page\InventoryInfo\MaterialStatisticsWindow.xaml;Page\InventoryInfo\ShellInventory.xaml;Page\InventoryInfo\SpaceDetailWindow.xaml;Page\InventoryInfo\SpaceInfoControl.xaml;Page\OutStoreInfo\OutStoreInfoControl.xaml;Page\TaskInfo\TaskInfoControl.xaml;LoginPageView.xaml;RecordControl.xaml;templates\style\resourceStyle.xaml;
True
False

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InventoryInfo\BomFoamRearInventory.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "499D17A36FA3974B82EDA748E47589FBA03A90DC50E1D4961F25DC669C0324B0"
#pragma checksum "..\..\..\..\Page\InventoryInfo\BomFoamRearInventory.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "73255ED1A27E6FBCDA392E3E2F34743E0904AF30758571CDF57F1CFA21695660"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InventoryInfo\BomFoamRearInventory.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "499D17A36FA3974B82EDA748E47589FBA03A90DC50E1D4961F25DC669C0324B0"
#pragma checksum "..\..\..\..\Page\InventoryInfo\BomFoamRearInventory.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "73255ED1A27E6FBCDA392E3E2F34743E0904AF30758571CDF57F1CFA21695660"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InventoryInfo\SelectType.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "29806FD6F0358C6BE2BE294B297ED745F04A4F4E68973B3EEFC6268C197059E9"
#pragma checksum "..\..\..\..\Page\InventoryInfo\SelectType.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D5A0CC82CFD252412D68FFDE822548C30E64DB7B9C1274057608DA59C428CBBD"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\InventoryInfo\SelectType.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "29806FD6F0358C6BE2BE294B297ED745F04A4F4E68973B3EEFC6268C197059E9"
#pragma checksum "..\..\..\..\Page\InventoryInfo\SelectType.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D5A0CC82CFD252412D68FFDE822548C30E64DB7B9C1274057608DA59C428CBBD"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -11,6 +11,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Media;
namespace Aucma.Scada.UI.viewModel.InStoreInfo
@ -237,43 +238,46 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
/// </summary>
public void Query()
{
lock (string.Empty)
Task.Run(() =>
{
try
lock (string.Empty)
{
#region 通过数据库获取数据进行刷新
var info = inStoreBusiness.GetInStoreTask();
if (info != null)
try
{
taskItems = new ObservableCollection<RealTaskInfo>();
try
#region 通过数据库获取数据进行刷新
var info = inStoreBusiness.GetInStoreTask();
if (info != null)
{
info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList();
App.Current.Dispatcher.BeginInvoke((Action)(() =>
taskItems = new ObservableCollection<RealTaskInfo>();
try
{
foreach (var item in info)
info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList();
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
item.materialType = inStoreBusiness.GetMaterialName(item.materialType);
taskItems.Add(item);
}
InstoreTask = taskItems;
}));
}
catch (Exception ex)
{
logHelper.Error("入库任务列表刷新异常", ex);
foreach (var item in info)
{
item.materialType = inStoreBusiness.GetMaterialName(item.materialType);
taskItems.Add(item);
}
InstoreTask = taskItems;
}));
}
catch (Exception ex)
{
logHelper.Error("入库任务列表刷新异常", ex);
}
}
#endregion
}
catch (Exception ex)
{
logHelper.Error("入库任务加载异常", ex);
}
#endregion
}
catch (Exception ex)
{
logHelper.Error("入库任务加载异常", ex);
}
}
}
});
}
/// <summary>

@ -209,7 +209,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
}
}
#endregion
private async void deleteModel()
private void deleteModel()
{
if (!IsSelectedOptionA && !IsSelectedOptionB && !IsSelectedOptionC)
{
@ -246,7 +246,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
/// <summary>
/// 设置型号
/// </summary>
private async void updateDirection()
private void updateDirection()
{
if (!IsSelectedOptionA && !IsSelectedOptionB && !IsSelectedOptionC)
@ -286,7 +286,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
///<summary>
///条件查询型号
/// </summary>
private async void searchData()
private void searchData()
{
if (!string.IsNullOrEmpty(searchText))
{

Loading…
Cancel
Save