chengsc
2025-05-06 d06e44eb1c8818c8d19709602631eb7888d4f0e9
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using Admin.NET.Core.Service;
using Elastic.Clients.Elasticsearch;
using Furion.Logging;
using Qiniu.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Application.Entity;
 
namespace WCS.Application;
public static class AGVStorageUtil
{
    private static readonly ISqlSugarClient _db = SqlSugarSetup.ITenant.GetConnectionScope(SqlSugarConst.MainConfigId);
    private static readonly SysCacheService sysCacheService = App.GetRequiredService<SysCacheService>();
    private static readonly SysConfigService _sysConfigService = App.GetRequiredService<SysConfigService>();
    
    static AGVStorageUtil()
    {
    }
 
    public static string GetTaskModle(string straLocate,string endLocate,out string type1,out string type2,out string jiebo)
    {
        type1 = "";
        type2 = "";
        jiebo = "";
        var locate1 = _db.Queryable<WcsStorageLocat>().First(m => m.IsDelete == false && m.LocatNo == straLocate);      
        var locate2 = _db.Queryable<WcsStorageLocat>().First(m => m.IsDelete == false && m.LocatNo == endLocate);
        if (locate1 == null || locate2 == null)
        {
            return "";
        }
        switch (locate1.WareHouseNo)
        {
            case "W02":
                type1 = "SITE";
                break;
            case "W04":
                type1 = "STORAGE";
                break;
            default:
                break;
        }
 
        switch (locate2.WareHouseNo)
        {
            case "W02":
                type2 = "SITE";
                break;
            case "W04":
                type2 = "STORAGE";
                break;
            default:
                break;
        }
        var Area1002 = new List<string>() { "",""};//1002车间区域
        var Area1003 = new List<string>() { "",""};//1003车间区域
        if (Area1002.Contains(locate2.AreaNo))
        {
            jiebo = "1JB";//接驳位
        }
        if (Area1003.Contains(locate2.AreaNo))
        {
            jiebo = "2JB";
        }
        if (type1 == "" || type2 == "")
        {
            return "";
        }
        return "CJ1";
    }
 
}