mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 18:30:02 +08:00
update 地锁逻辑修改
This commit is contained in:
@@ -154,11 +154,20 @@ public class GroundLockDataUploadHandler extends AbstractHandler{
|
|||||||
*/
|
*/
|
||||||
private void raiseTheGroundLock(String pileSn, String connectorCode) {
|
private void raiseTheGroundLock(String pileSn, String connectorCode) {
|
||||||
// 两种情况 1是没有停车,地锁自动升起;2是停车完成地锁升起
|
// 两种情况 1是没有停车,地锁自动升起;2是停车完成地锁升起
|
||||||
boolean stopFlag = true;
|
boolean stopCarFlag = true;
|
||||||
|
|
||||||
|
// 获取现在缓存中的状态
|
||||||
|
String redisKey = CacheConstants.GROUND_LOCK_DATA + pileSn + connectorCode;
|
||||||
|
GroundLockData data = redisCache.getCacheObject(redisKey);
|
||||||
|
if (data != null) {
|
||||||
|
String parkingStatus = data.getParkingStatus();
|
||||||
|
if (StringUtils.equals(parkingStatus, "00")) {
|
||||||
|
// 无车辆
|
||||||
|
stopCarFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stopCarFlag) {
|
||||||
if (stopFlag) {
|
|
||||||
// 停止占桩订单计时
|
// 停止占桩订单计时
|
||||||
orderPileOccupyService.stopOccupyPileOrder(pileSn, connectorCode);
|
orderPileOccupyService.stopOccupyPileOrder(pileSn, connectorCode);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user