using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using HH.WMS.Entitys.Algorithm;
|
using HH.WMS.Common;
|
using HH.WMS.Common.Algorithm;
|
using HH.WMS.DAL.Algorithm;
|
using HH.WMS.DAL.Basic;
|
using HH.WMS.DAL.InStock;
|
using HH.WMS.Entitys.Basic;
|
using HH.WMS.Entitys.Common;
|
|
namespace HH.WMS.BLL.Algorithm
|
{
|
public class AlgorCommonBLL : BaseBLL
|
{
|
public List<AutoBomLocationAbbreEntity> AutoBomLocationTrue(LogicTrue model)
|
{
|
List<string> locationCodes = new List<string>();
|
List<AutoBomLocationAbbreEntity> lstLocation = new List<AutoBomLocationAbbreEntity>();
|
switch (model.type)
|
{
|
case 1://返回仓库对应的货位列表
|
lstLocation = CreateDAL<TN_WMS_LOCATIONDAL>().GetLocationByStockCode(model.stockCode);
|
break;
|
case 2://返回库区对应的货位列表
|
lstLocation = CreateDAL<TN_WMS_LOCATIONDAL>().GetLocationByAreaCode(model.areaCode);
|
break;
|
case 3://直接返回货位编号
|
lstLocation = CreateDAL<TN_WMS_LOCATIONDAL>().GetLocationByLocationCode(model.lstLocationCode);
|
break;
|
}
|
return lstLocation;
|
}
|
public List<TN_WM_LOCATIONCODE_EXT_Entity> GetTrueLocationCodes(string stockCode, string areaCode, List<string> locationCodes, int type,string areaType )
|
{
|
|
List<TN_WM_LOCATIONCODE_EXT_Entity> lstTrueLocations = new List<TN_WM_LOCATIONCODE_EXT_Entity>();
|
switch (type)
|
{
|
case 1://仓库 只根据仓库编号获得可用货位
|
lstTrueLocations = CreateDAL<TN_WM_LOCATION_EXTDAL>().GetLocationCodeListBy(stockCode, areaCode, null, areaType);
|
break;
|
case 2://库区 根据货位编码集合 in 查询关系型数据库中的扩展货位表数据
|
lstTrueLocations = CreateDAL<TN_WM_LOCATION_EXTDAL>().GetLocationCodeListBy(stockCode, areaCode, null, areaType);
|
break;
|
case 3://货位 根据单个货位编码 = 查询关系型数据库中的扩展货位表数据
|
lstTrueLocations = CreateDAL<TN_WM_LOCATION_EXTDAL>().GetLocationCodeListBy(stockCode, areaCode, locationCodes, areaType);
|
break;
|
}
|
return lstTrueLocations;
|
}
|
|
}
|
}
|