|
|
|
@ -246,9 +246,9 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
if (spaceList != null)
|
|
|
|
|
{
|
|
|
|
|
spaceList = spaceList.Where(x => x.unusualFlag == 2).ToList();
|
|
|
|
|
var unusualspaceList = spaceList.Where(x => x.unusualFlag == 2).ToList();
|
|
|
|
|
|
|
|
|
|
BaseSpaceInfo spaceInfo = GetSpaceInfosByPlc(spaceList, false);
|
|
|
|
|
BaseSpaceInfo spaceInfo = GetSpaceInfosByPlc(unusualspaceList, true); //判断货道库存,不存在合适的获取空白货道
|
|
|
|
|
|
|
|
|
|
if (spaceInfo != null)
|
|
|
|
|
{
|
|
|
|
@ -258,8 +258,28 @@ namespace Aucma.Scada.Business
|
|
|
|
|
{
|
|
|
|
|
string str = storeCode == appConfig.shellStoreCode ? "箱壳异常入库" : "内胆异常入库";
|
|
|
|
|
PrintLogInfoMessage(str + "; 未获取到可用的异常货道");
|
|
|
|
|
CreateInStoreTask(spaceList.First(), null);
|
|
|
|
|
PrintLogInfoMessage(str + "; 创建异常任务暂存等待异常道进入");
|
|
|
|
|
List<BaseSpaceInfo> emptySpaceInfo =_spaceInfoService.GetEmptySpaceInfo(storeCode);
|
|
|
|
|
if(emptySpaceInfo != null && emptySpaceInfo.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
BaseSpaceInfo empty_space = GetSpaceInfosByPlc(emptySpaceInfo, true);
|
|
|
|
|
if (empty_space != null)
|
|
|
|
|
{
|
|
|
|
|
CreateInStoreTask(empty_space, null);
|
|
|
|
|
empty_space.unusualFlag = 2;
|
|
|
|
|
_spaceInfoService.UpdateSpaceInfo(empty_space);
|
|
|
|
|
PrintLogInfoMessage($"{str}; 占用货道{empty_space.spaceName};为异常道");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
BaseSpaceInfo zhanYong_space = GetSpaceInfosByPlc(spaceList, true);
|
|
|
|
|
if (zhanYong_space != null)
|
|
|
|
|
{
|
|
|
|
|
CreateInStoreTask(zhanYong_space, null);
|
|
|
|
|
PrintLogInfoMessage($"{str}; 没有异常道可分配,占用{zhanYong_space.spaceName};存放异常物料");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -544,6 +564,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
{
|
|
|
|
|
if (info.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
info = info.Where(x => x.unusualFlag != 2).ToList();
|
|
|
|
|
result = GetSpaceInfosByPlc(info);
|
|
|
|
|
|
|
|
|
|
if (result == null)
|
|
|
|
|