|
@ -21,7 +21,6 @@ import org.springframework.stereotype.Service; |
|
|
public class DoorModuleService { |
|
|
public class DoorModuleService { |
|
|
private final DeviceCommandService deviceCommandService; |
|
|
private final DeviceCommandService deviceCommandService; |
|
|
private final DevicePositionService devicePositionService; |
|
|
private final DevicePositionService devicePositionService; |
|
|
private final DeviceStateService deviceStateService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 开门 |
|
|
* 开门 |
|
@ -38,7 +37,6 @@ public class DoorModuleService { |
|
|
//从数据库获取开门距离 |
|
|
//从数据库获取开门距离 |
|
|
Double doorOpenDistance = devicePositionService.getPosition(DevicePositionCode.doorOpen).getDistance(); |
|
|
Double doorOpenDistance = devicePositionService.getPosition(DevicePositionCode.doorOpen).getDistance(); |
|
|
doorMove(commandId, command, doorOpenDistance); |
|
|
doorMove(commandId, command, doorOpenDistance); |
|
|
deviceStateService.getDeviceState().getDoor().setOpen(true); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -53,7 +51,6 @@ public class DoorModuleService { |
|
|
*/ |
|
|
*/ |
|
|
public void doorClose(String commandId, String command) throws Exception { |
|
|
public void doorClose(String commandId, String command) throws Exception { |
|
|
doorMove(commandId, command, 0); |
|
|
doorMove(commandId, command, 0); |
|
|
deviceStateService.getDeviceState().getDoor().setOpen(true); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|