|
|
@ -66,6 +66,7 @@ public class MonitorService
|
|
|
|
|
|
|
|
|
|
|
|
return "新增id:" + moveBinRecord.Id;
|
|
|
|
return "新增id:" + moveBinRecord.Id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task<bool> Update(UpdateMoveBinRecordReq Req)
|
|
|
|
public virtual async Task<bool> Update(UpdateMoveBinRecordReq Req)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await MoveBinRecordRepository.UpdateAsync(Req);
|
|
|
|
return await MoveBinRecordRepository.UpdateAsync(Req);
|
|
|
@ -79,6 +80,7 @@ public class MonitorService
|
|
|
|
throw new ArgumentException($"不存在");
|
|
|
|
throw new ArgumentException($"不存在");
|
|
|
|
return await MoveBinRecordRepository.DeleteAsync(user);
|
|
|
|
return await MoveBinRecordRepository.DeleteAsync(user);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
|
|
|
|
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var configBinInfo =
|
|
|
|
var configBinInfo =
|
|
|
@ -274,7 +276,7 @@ public class MonitorService
|
|
|
|
Type = type,
|
|
|
|
Type = type,
|
|
|
|
CreatedTime = DateTime.Now
|
|
|
|
CreatedTime = DateTime.Now
|
|
|
|
};
|
|
|
|
};
|
|
|
|
moveBinRecord= MoveBinRecordRepository.Insert(moveBinRecord);
|
|
|
|
moveBinRecord = MoveBinRecordRepository.Insert(moveBinRecord);
|
|
|
|
|
|
|
|
|
|
|
|
result = PlcMgr.HoldOn();
|
|
|
|
result = PlcMgr.HoldOn();
|
|
|
|
if (!result)
|
|
|
|
if (!result)
|
|
|
@ -299,6 +301,7 @@ public class MonitorService
|
|
|
|
MoveBinRecordRepository.Update(moveBinRecord);
|
|
|
|
MoveBinRecordRepository.Update(moveBinRecord);
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Log.Info($"move battery success update moveBin={JsonConvert.SerializeObject(moveBinRecord)}");
|
|
|
|
Log.Info($"move battery success update moveBin={JsonConvert.SerializeObject(moveBinRecord)}");
|
|
|
|
|
|
|
|
|
|
|
|
//如果是缓存仓 更新缓存仓的数据
|
|
|
|
//如果是缓存仓 更新缓存仓的数据
|
|
|
@ -315,14 +318,12 @@ public class MonitorService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (removeBin.CacheBinFlag == 1)
|
|
|
|
removeBin.Exists = 0;
|
|
|
|
{
|
|
|
|
removeBin.BatteryNo = "-1";
|
|
|
|
removeBin.Exists = 0;
|
|
|
|
removeBin.Soc = -1;
|
|
|
|
removeBin.BatteryNo = "-1";
|
|
|
|
removeBin.Soe = -1;
|
|
|
|
removeBin.Soc = -1;
|
|
|
|
removeBin.Soh = -1;
|
|
|
|
removeBin.Soe = -1;
|
|
|
|
|
|
|
|
removeBin.Soh = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
removeBin.BatteryEnterSeq = 0;
|
|
|
|
removeBin.BatteryEnterSeq = 0;
|
|
|
|
BinInfoRepository.Update(removeBin);
|
|
|
|
BinInfoRepository.Update(removeBin);
|
|
|
@ -336,10 +337,10 @@ public class MonitorService
|
|
|
|
Log.Error($"move battery fail e={e.Message}");
|
|
|
|
Log.Error($"move battery fail e={e.Message}");
|
|
|
|
if (moveBinRecord != null)
|
|
|
|
if (moveBinRecord != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
moveBinRecord.Status = 3;
|
|
|
|
moveBinRecord.Status = 3;
|
|
|
|
MoveBinRecordRepository.Update(moveBinRecord);
|
|
|
|
MoveBinRecordRepository.Update(moveBinRecord);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PlcMgr.PlcClient?.ResetTaskNo();
|
|
|
|
PlcMgr.PlcClient?.ResetTaskNo();
|
|
|
|
|
|
|
|
|
|
|
|
return Result<bool>.Fail();
|
|
|
|
return Result<bool>.Fail();
|
|
|
|