|
|
|
@ -174,20 +174,35 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(shallowLocation.ContainerCode))
|
|
|
|
|
//if (!string.IsNullOrEmpty(shallowLocation.ContainerCode))
|
|
|
|
|
//{
|
|
|
|
|
// // 判断浅库位是否已经加到出库队列
|
|
|
|
|
// WmsRawPreferredOut? shallowPreferredOut = wmsRawPreferredOutService.Query(x => x.LocationCode == shallowLocation.LocationCode).FirstOrDefault();
|
|
|
|
|
// if(shallowPreferredOut == null)
|
|
|
|
|
// {
|
|
|
|
|
// Msg.MsgShow($"当前库位对应的浅库位{shallowLocation.LocationCode}有库存,请优先出对应的浅库位", 2, 3);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{ // 浅库位,需要判断深库位是否已经加到出库队列
|
|
|
|
|
int? row = targetLocation.LocRow % 2 == 0 ? targetLocation.LocRow - 1 : targetLocation.LocRow + 1;
|
|
|
|
|
WmsBaseLocation? deepLocation = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsBaseLocation>().Where(it => it.WarehouseId==311 && it.LocRow==row && it.LocColumn==targetLocation.LocColumn).First();
|
|
|
|
|
|
|
|
|
|
if (deepLocation != null)
|
|
|
|
|
{
|
|
|
|
|
// 判断浅库位是否已经加到出库队列
|
|
|
|
|
WmsRawPreferredOut? shallowPreferredOut = wmsRawPreferredOutService.Query(x => x.LocationCode == shallowLocation.LocationCode).FirstOrDefault();
|
|
|
|
|
if(shallowPreferredOut == null)
|
|
|
|
|
WmsRawPreferredOut? isDeepHas = wmsRawPreferredOutService.Query(x => x.WarehouseId==311 && x.LocationCode == deepLocation.LocationCode).FirstOrDefault();
|
|
|
|
|
if (isDeepHas != null)
|
|
|
|
|
{
|
|
|
|
|
Msg.MsgShow($"当前库位对应的浅库位{shallowLocation.LocationCode}有库存,请优先出对应的浅库位", 2, 3);
|
|
|
|
|
Msg.MsgShow($"当前库位{targetLocation.LocationCode}对应的深库位{deepLocation.LocationCode}已经存在出库队列,禁止出浅库位,请等待出完或手动删除", 2, 3);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
WmsRawPreferredOut? isHas = wmsRawPreferredOutService.Query(x => x.LocationCode == targetLocation.LocationCode).FirstOrDefault();
|
|
|
|
|
if (isHas != null)
|
|
|
|
|