移仓日志

master
rszn 5 months ago
parent dae4641c59
commit 47d2522c2b

@ -17,7 +17,7 @@ public class PlcTaskMgr
public bool QueryPlcTask(int taskNo, int ingStatus, int exceptionStatus)
{
Log.Info($"PlcTaskMgr.QueryPlcTask taskNo={taskNo}");
Log.Info($"PlcTaskMgr.QueryPlcTask taskNo={taskNo} execute start -------------------");
bool isSuccess = false;
InvokeStatus invokeStatus = Invoker.Invoke("QueryPlcTask", 1000, 5,
@ -57,7 +57,7 @@ public class PlcTaskMgr
{
return false;
}
Log.Info($"PlcTaskMgr.QueryPlcTask taskNo={taskNo} execute end success-------------------");
return true;
}

@ -6,6 +6,7 @@ using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using log4net;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using Repository.Station;
using Service.Cloud.Client;
@ -218,7 +219,11 @@ public class MonitorService
result = PlcMgr.HoldOn();
if (!result)
{ PlcMgr.PlcClient?.ExChangeTaskNo(0);
{
moveBinRecord.Status = 3;
MoveBinRecordRepository.Update(moveBinRecord);
PlcMgr.PlcClient?.ExChangeTaskNo(0);
Log.Error("BatteryRelocation PlcMgr.HoldOn() =false");
return Result<bool>.Fail();
}
@ -230,6 +235,7 @@ public class MonitorService
if (!queryPlcTask)
{
PlcMgr.PlcClient?.ExChangeTaskNo(0);
Log.Info($"move battery fail update moveBin={JsonConvert.SerializeObject(moveBinRecord)}");
moveBinRecord.Status = 3;
MoveBinRecordRepository.Update(moveBinRecord);
return Result<bool>.Fail();
@ -261,6 +267,7 @@ public class MonitorService
removeBin.BatteryEnterSeq = 0;
BinInfoRepository.Update(removeBin);
moveBinRecord.Status = 2;
Log.Info($"move battery success update moveBin={JsonConvert.SerializeObject(moveBinRecord)}");
MoveBinRecordRepository.Update(moveBinRecord);
PlcMgr.PlcClient?.ExChangeTaskNo(0);
return Result<bool>.Success();

Loading…
Cancel
Save