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";
|
}
|
|
}
|