<fix>[important]修复找不到库位问题,修复无法初始化扫码实例的问题
This commit is contained in:
parent
8db348817b
commit
cf6adc6027
|
|
@ -9,6 +9,7 @@ using WcsMain.StaticData;
|
|||
using System.Linq.Expressions;
|
||||
using WcsMain.DataBase.MixDao;
|
||||
using WcsMain.Enum.Stacker;
|
||||
using WcsMain.Enum.TaskEnum;
|
||||
|
||||
namespace WcsMain.Business.CirculationTask.TaskData;
|
||||
|
||||
|
|
@ -110,7 +111,9 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
|
|||
PlcId = plcId,
|
||||
TaskId = wmsTask.TaskId,
|
||||
TaskType = (int)WcsTaskTypeEnum.inTask,
|
||||
TaskSort = 1,
|
||||
TaskStatus = (int)WcsTaskStatusEnum.create,
|
||||
TaskCategory = (int)TaskCategoryEnum.stacker,
|
||||
Origin = wcsOrigin!.WcsLocation,
|
||||
|
||||
Destination = wcsDestination.WcsLocation,
|
||||
|
|
@ -151,7 +154,9 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
|
|||
PlcId = plcId,
|
||||
TaskId = wmsTask.TaskId,
|
||||
TaskType = (int)WcsTaskTypeEnum.outTask,
|
||||
TaskSort = 1,
|
||||
TaskStatus = (int)WcsTaskStatusEnum.create,
|
||||
TaskCategory = (int)TaskCategoryEnum.stacker,
|
||||
Origin = wcsOrigin.WcsLocation,
|
||||
Destination = wcsDestination.WcsLocation,
|
||||
VehicleNo = wmsTask.VehicleNo,
|
||||
|
|
@ -191,7 +196,9 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
|
|||
PlcId = plcId,
|
||||
TaskId = wmsTask.TaskId,
|
||||
TaskType = (int)WcsTaskTypeEnum.pick,
|
||||
TaskSort = 1,
|
||||
TaskStatus = (int)WcsTaskStatusEnum.create,
|
||||
TaskCategory = (int)TaskCategoryEnum.stacker,
|
||||
Origin = wcsOrigin.WcsLocation,
|
||||
Destination = wcsDestination.WcsLocation,
|
||||
VehicleNo = wmsTask.VehicleNo,
|
||||
|
|
@ -233,6 +240,7 @@ public class ResolveWmsTask(AppWmsTaskDao wmsTaskDao, SendWmsTaskStatus sendWmsT
|
|||
TaskType = (int)WcsTaskTypeEnum.moveTask,
|
||||
TaskSort = 1,
|
||||
TaskStatus = (int)WcsTaskStatusEnum.create,
|
||||
TaskCategory = (int)TaskCategoryEnum.stacker,
|
||||
Origin = wcsOrigin.WcsLocation,
|
||||
Destination = wcsDestination.WcsLocation,
|
||||
VehicleNo = wmsTask.VehicleNo,
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ public class HistoryConveyDataHander(AppRouterMethodDao routerMethodDao, ICompon
|
|||
var interfaces = assType.GetInterfaces();
|
||||
foreach (var inteface in interfaces)
|
||||
{
|
||||
var type = inteface.GetType();
|
||||
if (type != typeof(IBaseGetData)) continue;
|
||||
var instance = CreateInstance(type);
|
||||
//var type = inteface.GetType();
|
||||
if (inteface != typeof(IBaseGetData)) continue;
|
||||
var instance = CreateInstance(assType);
|
||||
if (instance == default) continue;
|
||||
classInstances.Add(assType.Name, (IBaseGetData)instance);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,10 +86,8 @@ public class AppLocationDao
|
|||
try
|
||||
{
|
||||
var sqlFuc = CommonTool.DbServe.Queryable<AppLocation>()
|
||||
.WhereIF(!string.IsNullOrEmpty(appLocation.WcsLocation),
|
||||
w => w.WcsLocation == appLocation.WcsLocation)
|
||||
.WhereIF(!string.IsNullOrEmpty(appLocation.WmsLocation),
|
||||
w => w.WmsLocation == appLocation.WmsLocation)
|
||||
.WhereIF(appLocation.WcsLocation != default, w => w.WcsLocation == appLocation.WcsLocation)
|
||||
.WhereIF(appLocation.WmsLocation != default, w => w.WmsLocation == appLocation.WmsLocation)
|
||||
.WhereIF(appLocation.LocationType != null, w => w.LocationType == appLocation.LocationType)
|
||||
.WhereIF(appLocation.TunnelNo != null, w => w.TunnelNo == appLocation.TunnelNo)
|
||||
.WhereIF(appLocation.EquipmentId != null, w => w.EquipmentId == appLocation.EquipmentId)
|
||||
|
|
@ -99,8 +97,8 @@ public class AppLocationDao
|
|||
.WhereIF(appLocation.Layer != null, w => w.Layer == appLocation.Layer)
|
||||
.WhereIF(appLocation.Depth != null, w => w.Depth == appLocation.Depth)
|
||||
.WhereIF(appLocation.InterveneLocation != default, w => w.InterveneLocation == appLocation.InterveneLocation)
|
||||
.WhereIF(appLocation.VehicleType == default, w => w.VehicleType == appLocation.VehicleType)
|
||||
.WhereIF(!string.IsNullOrEmpty(appLocation.VehicleNo), w => w.VehicleNo == appLocation.VehicleNo)
|
||||
.WhereIF(appLocation.VehicleType != default, w => w.VehicleType == appLocation.VehicleType)
|
||||
.WhereIF(appLocation.VehicleNo != default, w => w.VehicleNo == appLocation.VehicleNo)
|
||||
.OrderBy(o => new { o.Queue, o.Line, o.Layer, o.Depth })
|
||||
.ToList();
|
||||
return sqlFuc;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ public class ConveyOperation
|
|||
{
|
||||
var readData = readResult.Value;
|
||||
short status = Convert.ToInt16(CommonTool.Siemens.Trans<short>(readData, 0)); // PLC 返回任务状态
|
||||
string code = Regex.Replace(Encoding.ASCII.GetString(readData, 2, 20), "\\W", "");
|
||||
var str = Encoding.ASCII.GetString(readData, 2, 20);
|
||||
string code = Regex.Replace(str, "\\W", "");
|
||||
return (string.Empty, status, code);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"DBMssqlLocal": "Data Source=192.168.142.131;Initial Catalog=wcs_stacker;User Id=sa;Password=Sa123;",
|
||||
|
||||
"ApplicationConfig": {
|
||||
"ApiOnly": true,
|
||||
"ApiOnly": false,
|
||||
"Language": "zh-CN"
|
||||
},
|
||||
"UseUrls": [ "http://*:890" ]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user