添加移库

master
1 year ago
commit 418ce09a68

@ -300,6 +300,7 @@ namespace Khd.Core.Wcs.Wcs
{ {
if (StaticData.BigContainerCodes.Contains(RFID001Value)) if (StaticData.BigContainerCodes.Contains(RFID001Value))
{ {
continue;
var newTask = new WcsTask() var newTask = new WcsTask()
{ {
objid = StaticData.SnowId.NextId(), objid = StaticData.SnowId.NextId(),
@ -494,9 +495,10 @@ namespace Khd.Core.Wcs.Wcs
{ {
using var scope = _host.Services.CreateScope(); using var scope = _host.Services.CreateScope();
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>(); using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
using var transaction = dbContext.Database.BeginTransaction();
while (true) while (true)
{ {
using var transaction = dbContext.Database.BeginTransaction();
try try
{ {
var mesCloseValue = StaticData.PlcDic[0].Read(this.mesClose.plcpointAddress); //MES关闭状态 读 var mesCloseValue = StaticData.PlcDic[0].Read(this.mesClose.plcpointAddress); //MES关闭状态 读

@ -72,7 +72,7 @@ namespace Khd.Core.Wcs.Wcs
{ {
StaticData.PlcDic[2].WriteToPoint(GetTrayOverPoint.plcpointAddress, false, GetTrayOverPoint.plcpointLength.ToString()); StaticData.PlcDic[2].WriteToPoint(GetTrayOverPoint.plcpointAddress, false, GetTrayOverPoint.plcpointLength.ToString());
IsTrayGet = false; IsTrayGet = false;
_logger.Info("三楼AGV 托盘已取走"); _logger.Info("三楼AGV 托盘已取走信号复位");
} }
} }
catch catch
@ -743,6 +743,7 @@ namespace Khd.Core.Wcs.Wcs
BasePlcpoint basePlcpoint = StaticData.BasePlcpointList.First(t => t.plcpointNo == "GetTrayOver"); BasePlcpoint basePlcpoint = StaticData.BasePlcpointList.First(t => t.plcpointNo == "GetTrayOver");
StaticData.PlcDic[2].WriteToPoint(basePlcpoint.plcpointAddress, true, basePlcpoint.plcpointLength.ToString()); StaticData.PlcDic[2].WriteToPoint(basePlcpoint.plcpointAddress, true, basePlcpoint.plcpointLength.ToString());
IsTrayGet = true; IsTrayGet = true;
_logger.Info("通知PLC已经取走信号:true");
MesBaseBarcodeInfo? mesBaseBarcodeInfo = dbContext.MesBaseBarcodeInfo.Where(t => t.palletInfoCode == item.containerNo).FirstOrDefault(); MesBaseBarcodeInfo? mesBaseBarcodeInfo = dbContext.MesBaseBarcodeInfo.Where(t => t.palletInfoCode == item.containerNo).FirstOrDefault();
if (mesBaseBarcodeInfo != null) if (mesBaseBarcodeInfo != null)
{ {

Loading…
Cancel
Save