mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 01:48:47 +08:00
设置和操作添加设备不在线提示
This commit is contained in:
parent
2e71759c63
commit
13e7150f48
@ -202,6 +202,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
|||||||
@Override
|
@Override
|
||||||
public String operate(EqDeviceCmdBo bo) {
|
public String operate(EqDeviceCmdBo bo) {
|
||||||
String cmd = "";
|
String cmd = "";
|
||||||
|
if (checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
|
||||||
int operateType = bo.getOperateType();
|
int operateType = bo.getOperateType();
|
||||||
switch (operateType){
|
switch (operateType){
|
||||||
case 1: cmd = DeviceCtlCmd.OPT_OPEN_GARAGE; break;//开门
|
case 1: cmd = DeviceCtlCmd.OPT_OPEN_GARAGE; break;//开门
|
||||||
@ -230,6 +231,7 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
|||||||
@Override
|
@Override
|
||||||
public String setting(EqDeviceSetBo bo) {
|
public String setting(EqDeviceSetBo bo) {
|
||||||
String cmd = "";
|
String cmd = "";
|
||||||
|
if (checkOnline(bo.getEquipmentCode())) throw new RuntimeException("设备不在线");
|
||||||
int operateType = bo.getOperateType();
|
int operateType = bo.getOperateType();
|
||||||
switch (operateType){
|
switch (operateType){
|
||||||
case 1: cmd = DeviceSetCmd.AutomaticDoorClosingSwitch_false; break;//自动关门功能开关 关
|
case 1: cmd = DeviceSetCmd.AutomaticDoorClosingSwitch_false; break;//自动关门功能开关 关
|
||||||
@ -257,6 +259,11 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
|||||||
return iotService.httpCtlPostSend(bo.getEquipmentCode(),cmd);
|
return iotService.httpCtlPostSend(bo.getEquipmentCode(),cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean checkOnline(String equipmentCode){
|
||||||
|
DeviceServerMsgDto serverMsg = iotService.httpServerGetSend(equipmentCode);
|
||||||
|
return serverMsg.getLineStatus();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EqEquipmentDetailVo getDeviceMsg(EqAppHomeBo bo) {
|
public EqEquipmentDetailVo getDeviceMsg(EqAppHomeBo bo) {
|
||||||
log.info("OpenStatusText开合状态:{},{}",MessageUtils.message("openStatus.name0"),MessageUtils.message("openStatus.name1"));
|
log.info("OpenStatusText开合状态:{},{}",MessageUtils.message("openStatus.name0"),MessageUtils.message("openStatus.name1"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user