|
|
|
@ -27,7 +27,7 @@ public class MonitorService
|
|
|
|
|
public ChargeOrderRepository ChargeOrderRepository { get; set; }
|
|
|
|
|
public PlcTaskMgr PlcTaskMgr { get; set; }
|
|
|
|
|
|
|
|
|
|
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
|
|
|
|
|
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
|
|
|
|
|
{
|
|
|
|
|
var configBinInfo =
|
|
|
|
|
new MapperConfiguration(cfg => cfg.CreateMap<StepModel, SwappingStateInfoResp>().ReverseMap());
|
|
|
|
@ -35,7 +35,7 @@ public class MonitorService
|
|
|
|
|
List<SwappingStateInfoResp> stateInfoList =
|
|
|
|
|
mapperBinInfo.Map<List<SwappingStateInfoResp>>(StationSoftMgr.SwappingStateMachine.StepModel);
|
|
|
|
|
|
|
|
|
|
Task<TboxCarInfoModel> carInfo = TBoxApi.GetCarInfo();
|
|
|
|
|
var tboxCarInfoModel = StationSoftMgr.SwappingStateMachine.BoxCarInfoModel;
|
|
|
|
|
|
|
|
|
|
List<BinInfo> binInfos = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1);
|
|
|
|
|
SwapMonitorScreenResp monitorScreenResp = new()
|
|
|
|
@ -55,8 +55,8 @@ public class MonitorService
|
|
|
|
|
VelMac = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
|
|
|
|
|
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelMac
|
|
|
|
|
: null,
|
|
|
|
|
LockStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.LockStatus : null,
|
|
|
|
|
KeyStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.KeyStatus : null,
|
|
|
|
|
LockStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.LockStatus : null,
|
|
|
|
|
KeyStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.KeyStatus : null,
|
|
|
|
|
VelNo = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
|
|
|
|
|
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelNo
|
|
|
|
|
: null,
|
|
|
|
@ -152,7 +152,7 @@ public class MonitorService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BinInfo? putBin = BinInfoRepository.QueryByClause(i =>
|
|
|
|
|
i.No.Equals(putBinNo) && (i.ChargeStatus == 2 || i.ChargeStatus == 4) && i.Exists == 0 && i.AmtLock == 0 &&
|
|
|
|
|
i.No.Equals(putBinNo) && i.Exists == 0 && i.AmtLock == 0 &&
|
|
|
|
|
i.Status == 1);
|
|
|
|
|
if (putBin == null)
|
|
|
|
|
{
|
|
|
|
|