|
@@ -1,5 +1,6 @@
|
|
package com.charging.chargingparking.scheduled;
|
|
package com.charging.chargingparking.scheduled;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import com.charging.chargingparking.entity.ParkingChannel;
|
|
import com.charging.chargingparking.entity.ParkingChannel;
|
|
import com.charging.chargingparking.service.ParkingChannelService;
|
|
import com.charging.chargingparking.service.ParkingChannelService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -36,11 +37,13 @@ public class ChannelStatusTask {
|
|
Object channelTime = valueOperations.get(parkingChannel.getChannelCode());
|
|
Object channelTime = valueOperations.get(parkingChannel.getChannelCode());
|
|
if (channelTime == null){
|
|
if (channelTime == null){
|
|
if ("1".equals(parkingChannel.getChannelStatus())){
|
|
if ("1".equals(parkingChannel.getChannelStatus())){
|
|
|
|
+ log.error(StrUtil.format("道闸掉线:{}",parkingChannel.getChannelName()));
|
|
parkingChannel.setChannelStatus("2");
|
|
parkingChannel.setChannelStatus("2");
|
|
parkingChannelService.updateById(parkingChannel);
|
|
parkingChannelService.updateById(parkingChannel);
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
if ("2".equals(parkingChannel.getChannelStatus())){
|
|
if ("2".equals(parkingChannel.getChannelStatus())){
|
|
|
|
+ log.warn(StrUtil.format("道闸上线:{}",parkingChannel.getChannelName()));
|
|
parkingChannel.setChannelStatus("1");
|
|
parkingChannel.setChannelStatus("1");
|
|
parkingChannelService.updateById(parkingChannel);
|
|
parkingChannelService.updateById(parkingChannel);
|
|
}
|
|
}
|