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