设置和操作添加设备不在线提示

This commit is contained in:
zzc 2024-11-25 21:29:09 +08:00
parent 13e7150f48
commit 00634e17f2

View File

@ -202,7 +202,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
@Override
public String operate(EqDeviceCmdBo bo) {
String cmd = "";
if (checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
if (!checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
int operateType = bo.getOperateType();
switch (operateType){
case 1: cmd = DeviceCtlCmd.OPT_OPEN_GARAGE; break;//开门
@ -231,7 +231,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
@Override
public String setting(EqDeviceSetBo bo) {
String cmd = "";
if (checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
if (!checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
int operateType = bo.getOperateType();
switch (operateType){
case 1: cmd = DeviceSetCmd.AutomaticDoorClosingSwitch_false; break;//自动关门功能开关