zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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;
        }
 
    }
}