diff --git a/Service/Station/BinInfoService.cs b/Service/Station/BinInfoService.cs index cc69c2b..d11c9ec 100644 --- a/Service/Station/BinInfoService.cs +++ b/Service/Station/BinInfoService.cs @@ -80,6 +80,11 @@ namespace Service.Station { return Result.Fail("停止充电失败"); } + + if (ExistCar()) + { + return Result.Fail("通道内存在车辆"); + } } var result = PlcMgr.DistributeTask(0, ushort.Parse(entrySelection), 5); @@ -107,7 +112,11 @@ namespace Service.Station return PlcTaskMgr.QueryPlcTask(5, 1100, 1101) ? Result.Success() : Result.Fail(); } - + /// + /// 消防移仓调用停止充电 + /// + /// + /// private bool StopCharge(string binNo) { @@ -135,5 +144,17 @@ namespace Service.Station return true; } + + /// + /// 是否存在车辆判断 + /// 判断入口和出口雷达 + /// + /// + private bool ExistCar() + { + bool EntranceRadar = PlcApi.EntranceRadar(); + bool ExitRadar = PlcApi.ExitRadar(); + return EntranceRadar & ExitRadar; + } } } \ No newline at end of file