|
|
|
@ -26,7 +26,7 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
{
|
|
|
|
|
internal class InStoreBusiness
|
|
|
|
|
{
|
|
|
|
|
private static readonly log4net.ILog _logger = LogManager.GetLogger(typeof(InStoreBusiness));
|
|
|
|
|
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(InStoreBusiness));
|
|
|
|
|
|
|
|
|
|
private readonly IProductOffLineServices _offlineService;
|
|
|
|
|
|
|
|
|
@ -118,7 +118,7 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
_logger.Error($"Buffer缓冲异常:{e.Message}");
|
|
|
|
|
log.Error($"Buffer缓冲异常:{e.Message}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -154,9 +154,14 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
RefreshProductInfoEvent?.Invoke(asciiStr,prodInfo.ProductModel,prodInfo.ProductOrderNo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetSpaceInfoByMaterialType(spaceArea, prodInfo, out BaseSpaceInfo laseSpaceinfo,
|
|
|
|
|
bool getSpaceResult = GetSpaceInfoByMaterialType(spaceArea, prodInfo, out BaseSpaceInfo laseSpaceinfo,
|
|
|
|
|
out BaseSpaceInfo spaceinfo);
|
|
|
|
|
|
|
|
|
|
if(!getSpaceResult)
|
|
|
|
|
{
|
|
|
|
|
msg = $"未找到货道,请检查该型号是否有货道";
|
|
|
|
|
RefreshMsgEvent?.Invoke(msg);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool result = false;
|
|
|
|
@ -266,8 +271,9 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
/// <param name="spaceinfo"></param>
|
|
|
|
|
/// <param name="isBig"></param>
|
|
|
|
|
/// <exception cref="ArgumentException"></exception>
|
|
|
|
|
private void GetSpaceInfoByMaterialType(string spaceArea, ProductOffline prodInfo, out BaseSpaceInfo laseSpaceinfo, out BaseSpaceInfo spaceinfo, bool isBig = false)
|
|
|
|
|
private bool GetSpaceInfoByMaterialType(string spaceArea, ProductOffline prodInfo, out BaseSpaceInfo laseSpaceinfo, out BaseSpaceInfo spaceinfo, bool isBig = false)
|
|
|
|
|
{
|
|
|
|
|
bool result = false;
|
|
|
|
|
List<BaseSpaceInfo> spaceinfos = null;
|
|
|
|
|
if (isBig)
|
|
|
|
|
{
|
|
|
|
@ -282,7 +288,10 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
|
|
|
|
|
if (spaceinfos == null || spaceinfos.Count==0)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentException($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空");
|
|
|
|
|
log.Info($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空");
|
|
|
|
|
laseSpaceinfo = null;
|
|
|
|
|
spaceinfo = null;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
spaceinfos = spaceinfos.OrderBy(x => x.ObjId).ToList();
|
|
|
|
@ -291,15 +300,22 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
|
|
|
|
|
if (spaceinfos == null || spaceinfos.Count==0)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentException($"通过物料型号获取货道信息异常:通过PLC匹配可用货道信息为空");
|
|
|
|
|
log.Info($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空");
|
|
|
|
|
laseSpaceinfo = null;
|
|
|
|
|
spaceinfo = null;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FiltrateSpaceInfo(spaceinfos, out laseSpaceinfo, out spaceinfo);
|
|
|
|
|
|
|
|
|
|
if (spaceinfo == null || spaceinfos.Count==0)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentException($"通过物料型号获取货道信息异常:未获取到匹配的货道信息");
|
|
|
|
|
log.Info($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空");
|
|
|
|
|
laseSpaceinfo = null;
|
|
|
|
|
spaceinfo = null;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -512,7 +528,7 @@ namespace Aucma.Core.Palletiz.Business
|
|
|
|
|
/// <param name="client"></param>
|
|
|
|
|
private void NoReadHandle(string client)
|
|
|
|
|
{
|
|
|
|
|
_logger.Error($"客户端:{client};读取失败!!!!!!");
|
|
|
|
|
log.Error($"客户端:{client};读取失败!!!!!!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|