|
|
|
@ -3992,21 +3992,27 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
var messageBoxResult = HandyControl.Controls.MessageBox.Show($"已创建{addList.Count}个料箱的任务,是否需要创建出空箱的任务?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
|
|
|
var messageBoxResult = HandyControl.Controls.MessageBox.Show($"已创建{addList.Count}个料箱的任务,是否需要创建出空箱的任务?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
|
|
|
if (messageBoxResult == MessageBoxResult.Yes)
|
|
|
|
if (messageBoxResult == MessageBoxResult.Yes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EmptyCountForm emptyCountForm = new(1, 6 - addList.Count);
|
|
|
|
EmptyCountForm emptyCountForm = new(1, 6 - addList.Count);
|
|
|
|
emptyCountForm.ShowDialog();
|
|
|
|
emptyCountForm.ShowDialog();
|
|
|
|
if (EmptyCountForm.IsSelect)
|
|
|
|
if (EmptyCountForm.IsSelect)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<WmsBaseLocation> emptyLocations = dbContext.ExecuteSqlQuery<WmsBaseLocation>(@$"
|
|
|
|
List<WmsBaseLocation> emptyLocations = (from t1 in dbContext.WmsBaseLocation
|
|
|
|
select t1.location_id locationId,
|
|
|
|
where !dbContext.WmsRawStock.Any(t2 => t2.locationCode == t1.locationCode)
|
|
|
|
t1.container_code containerCode,
|
|
|
|
&& t1.locationStatus == "1"
|
|
|
|
t1.location_code locationCode
|
|
|
|
&& t1.ContainerStatus == "1"
|
|
|
|
from wms_base_location t1
|
|
|
|
&& t1.warehouseId == 512
|
|
|
|
left join wms_raw_stock t2
|
|
|
|
orderby t1.locColumn, t1.locRow
|
|
|
|
on t1.location_code=t2.location_code
|
|
|
|
select new WmsBaseLocation
|
|
|
|
where t2.location_code is null and t1.location_status=1
|
|
|
|
{
|
|
|
|
and t1.container_status=1 and t1.warehouse_id=512
|
|
|
|
locationId = t1.locationId,
|
|
|
|
order by t1.loc_column,t1.loc_row
|
|
|
|
containerCode = t1.containerCode,
|
|
|
|
");
|
|
|
|
locationCode = t1.locationCode
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
if (emptyLocations.Count < EmptyCountForm.EmptyTaskCount)
|
|
|
|
if (emptyLocations.Count < EmptyCountForm.EmptyTaskCount)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
messageBoxResult = HandyControl.Controls.MessageBox.Show("没有足够的空箱库位库位,剩余空库位数量为" + emptyLocations.Count + "!\n是否将现有的空箱全部出库?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
|
|
|
|
messageBoxResult = HandyControl.Controls.MessageBox.Show("没有足够的空箱库位库位,剩余空库位数量为" + emptyLocations.Count + "!\n是否将现有的空箱全部出库?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
|
|
|
|
|