|
|
|
@ -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();
|
|
|
|
|