ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
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
using Admin.NET.Application.Common.FindEmptyLocationFactory.Default;
using Furion.DatabaseAccessor;
using iWare.Wms.Core;
using iWare.Wms.Core.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Admin.NET.Application.Common.FindEmptyLocationFactory
{
    internal class FindEmptyLocationServiceFactory
    {
        public static FindEmptyLocationServiceHandle GetHandle(MeterialType meterialType,
            IRepository<v_empty_location, MasterDbContextLocator> v_EmptyLocationRep,
            IRepository<WmsPlace, MasterDbContextLocator> wareLocationRep,
             IRepository<WareTask, MasterDbContextLocator> wareTaskRep,
            IRepository<WareContainerVsMaterial, MasterDbContextLocator> wareContainerVsMaterial,
            IRepository<WmsContainer, MasterDbContextLocator> wareContainer,
            IRepository<WmsContainerType, MasterDbContextLocator> wareContainerType,
            IRepository<v_ware_inventory_by_container, MasterDbContextLocator> v_ware_inventory_by_container,
        string containerCode, string siteCode)
        {
            FindEmptyLocationServiceHandle handle = null;
            switch (meterialType)
            {
                case MeterialType.物料:
                    handle = new MaterialFindEmptyLocationHandle(v_EmptyLocationRep,
            wareLocationRep,
             wareTaskRep,
             wareContainerVsMaterial,
             wareContainer,
             wareContainerType,
             v_ware_inventory_by_container,
            containerCode,
            siteCode);
                    break;
                case MeterialType.托盘:
                    handle = new ContainerFindEmptyLocationHandle(v_EmptyLocationRep,
            wareLocationRep,
             wareTaskRep,
              wareContainerVsMaterial,
             wareContainer,
             wareContainerType,
             v_ware_inventory_by_container,
            containerCode,
            siteCode);
                    break;
            }
            return handle;
        }
    }
}