using Admin.NET.Application;
|
using iWareSql.WmsDBModel;
|
using System;
|
using System.Collections.Generic;
|
|
namespace iWareSql
|
{
|
public class TCSCommon
|
{
|
/// <summary>
|
/// 根据物料长和宽获取机器人入库的库位类型
|
/// </summary>
|
/// <param name="PhysicalWidth">物理宽度</param>
|
/// <param name="PhysicalLength">物理长度</param>
|
/// <returns>库位类型</returns>
|
public static int GetPlaceTypeByWidthLength(mes_batchOrderUPI_new UpiInfo, double PhysicalLength, double PhysicalWidth, ref List<int> usePlaceTypeList)
|
{
|
//不需要转换长宽,跟李耀武确认了 【Editby shaocx,2024-11-20】
|
// GetPhysicalWidthLength(UpiInfo, ref PhysicalLength, ref PhysicalWidth);
|
|
|
var PlaceType = 0;
|
if (PhysicalLength < 700)
|
{
|
PlaceType = (int)PlaceTypeEnum.小货位;
|
usePlaceTypeList.Add(PlaceType);
|
usePlaceTypeList.Add((int)PlaceTypeEnum.中货位);
|
usePlaceTypeList.Add((int)PlaceTypeEnum.大货位);
|
}
|
else if (PhysicalLength >= 700 && PhysicalLength <= 1000)
|
{
|
PlaceType = (int)PlaceTypeEnum.中货位;
|
usePlaceTypeList.Add(PlaceType);
|
usePlaceTypeList.Add((int)PlaceTypeEnum.大货位);
|
}
|
else if (PhysicalLength > 1000)
|
{
|
PlaceType = (int)PlaceTypeEnum.大货位;
|
usePlaceTypeList.Add(PlaceType);
|
}
|
|
if (PlaceType == 0)
|
{
|
throw new Exception("按照UPI:" + UpiInfo.UPI + "的物理长度" + PhysicalLength + ",物料宽度:" + PhysicalWidth + "没有匹配到库位类型!");
|
}
|
|
return PlaceType;
|
}
|
|
|
}
|
}
|