|
|
|
|
@ -114,6 +114,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
this._host = host;
|
|
|
|
|
InventoryMaterialWindow.RefreshInventoryListEvent += GetInvertoryData;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 页面加载事件
|
|
|
|
|
@ -296,7 +297,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
HandyControl.Controls.MessageBox.Error(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 库位状态可视化
|
|
|
|
|
@ -1550,7 +1551,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
|
|
|
|
|
// GetTask();
|
|
|
|
|
//}
|
|
|
|
|
if (selectedTabItem != null && selectedTabItem.Name == "CallPersonManager")
|
|
|
|
|
if (selectedTabItem != null && selectedTabItem.Name == "CallPersonManager")
|
|
|
|
|
{ //人工叫料界面
|
|
|
|
|
CallSelectedItem.Clear();
|
|
|
|
|
await GetPersonCallMaterialData();
|
|
|
|
|
@ -2904,11 +2905,15 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
if (!hasTask)
|
|
|
|
|
{
|
|
|
|
|
List<string>? locationCodeList = null;
|
|
|
|
|
if (InventoryCheck.MaterialId != null)
|
|
|
|
|
{
|
|
|
|
|
// 盘点某个型号的物料库存的库位
|
|
|
|
|
locationCodeList = dbContext.WmsRawStock.Where(t => t.warehouseId == 512 && t.materialId == InventoryCheck.MaterialId ).Select(x=>x.locationCode).ToList();
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(InventoryCheck.MaterialId))
|
|
|
|
|
{
|
|
|
|
|
List<long> materialIds = InventoryCheck.MaterialId.Split(';').Select(id => long.Parse(id)).ToList();
|
|
|
|
|
if(materialIds!=null && materialIds.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
// 盘点指定型号的物料库存的库位
|
|
|
|
|
locationCodeList = dbContext.WmsRawStock.Where(t => t.warehouseId == 512 && materialIds.Contains((long)t.materialId)).Select(x => x.locationCode).Distinct().ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//所有满足条件的需要盘库的库位
|
|
|
|
|
var wmsBaseLocations = dbContext.WmsBaseLocation
|
|
|
|
|
@ -2917,9 +2922,9 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
.OrderBy(t => t.locRow)
|
|
|
|
|
.ThenBy(t => t.locColumn)
|
|
|
|
|
.ToList();
|
|
|
|
|
if(locationCodeList != null && locationCodeList.Count > 0)
|
|
|
|
|
if (locationCodeList != null && locationCodeList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
wmsBaseLocations = wmsBaseLocations.Where(x=>locationCodeList.Contains(x.locationCode)).ToList();
|
|
|
|
|
wmsBaseLocations = wmsBaseLocations.Where(x => locationCodeList.Contains(x.locationCode)).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var wmsInventoryCheckDetails = dbContext.WmsInventoryCheckDetail
|
|
|
|
|
@ -2932,8 +2937,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
List<string> locations = wmsBaseLocations.Select(t => t.locationCode).ToList();
|
|
|
|
|
|
|
|
|
|
List<WmsRawStock> wmsRawStocks = dbContext.WmsRawStock.Where(t => t.warehouseId == 512)
|
|
|
|
|
.Where(t => locations.Contains(t.locationCode))
|
|
|
|
|
.WhereIf(InventoryCheck.MaterialId!=null,t => t.materialId == InventoryCheck.MaterialId).ToList();
|
|
|
|
|
.Where(t => locations.Contains(t.locationCode)).ToList();
|
|
|
|
|
|
|
|
|
|
// 过滤后需要满足条件的有库存的库位
|
|
|
|
|
List<string> codes = wmsRawStocks.Select(t => t.locationCode).Distinct().ToList();
|
|
|
|
|
@ -2949,7 +2953,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
WmsBaseLocation startBaseLocation = item.a;
|
|
|
|
|
startBaseLocation.locationStatus = "6";
|
|
|
|
|
//startBaseLocation.ContainerStatus = "2";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addList.Add(new WcsTaskManual()
|
|
|
|
|
{
|
|
|
|
|
objid = Global.SnowId.NextId(),
|
|
|
|
|
@ -4295,7 +4299,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
InventoryMaterialWindow window = new InventoryMaterialWindow(_host);
|
|
|
|
|
window.ShowDialog();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GetInvertoryData()
|
|
|
|
|
|