mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
代码优化 单设备登录 增加开合文本状态和运行状态文本
This commit is contained in:
parent
17d9b7e041
commit
129f764499
@ -118,5 +118,64 @@ public class EqEquipmentVo implements Serializable {
|
||||
@ExcelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 设备状态(开合度)
|
||||
* 0.已关闭
|
||||
* 10.打开10%
|
||||
* 20.打开20%
|
||||
* 30.打开30%
|
||||
* 40.打开40%
|
||||
* 50.打开50%
|
||||
* 60.打开60%
|
||||
* 70.打开70%
|
||||
* 80.打开80%
|
||||
* 90.打开90%
|
||||
* 100.打开100%
|
||||
*/
|
||||
@ExcelProperty(value = "设备状态 设备的打开状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "eq_status_type")
|
||||
private Integer openStatus;
|
||||
|
||||
/**
|
||||
* 设备状态(开合度)
|
||||
* 0.已关闭
|
||||
* 10.打开10%
|
||||
* 20.打开20%
|
||||
* 30.打开30%
|
||||
* 40.打开40%
|
||||
* 50.打开50%
|
||||
* 60.打开60%
|
||||
* 70.打开70%
|
||||
* 80.打开80%
|
||||
* 90.打开90%
|
||||
* 100.打开100%
|
||||
* 故障状态
|
||||
*/
|
||||
private String openStatusText;
|
||||
|
||||
/**
|
||||
* 设备运行状态
|
||||
* 0.停止中 stop
|
||||
* 1.关闭中 closing
|
||||
* 2.开启中 opening
|
||||
* 11.红外故障 irException
|
||||
* 12.电机运转故障 motorRunException
|
||||
* 13.电机维护故障 motorMaintainException
|
||||
* 14.设备故障 deviceException
|
||||
*/
|
||||
@ExcelProperty(value = "设备状态 设备的打开状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "eq_run_status_type")
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 设备运行状态文本
|
||||
* 0.停止中 stop
|
||||
* 1.关闭中 closing
|
||||
* 2.开启中 openning
|
||||
* 11.红外故障 irException
|
||||
* 12.电机运转故障 motorRunException
|
||||
* 13.电机维护故障 motorMaintainException
|
||||
* 14.设备故障 deviceException
|
||||
*/
|
||||
private String runStatusText;
|
||||
}
|
||||
|
||||
@ -92,6 +92,17 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
|
||||
}
|
||||
record.setStatus(telemetryMsg.getOpenPercentage());
|
||||
record.setFaultStatus(telemetryMsg.getGarageException());
|
||||
|
||||
//开合状态
|
||||
record.setOpenStatus(telemetryMsg.getOpenPercentage());
|
||||
record.setOpenStatusText(
|
||||
telemetryMsg.getOpenPercentage()==0
|
||||
?MessageUtils.message("openStatus.name0")
|
||||
:MessageUtils.message("openStatus.name1")+ telemetryMsg.getOpenPercentage()+"%");
|
||||
|
||||
//运行状态
|
||||
record.setRunStatus(telemetryMsg.getGarageException()==10?telemetryMsg.getWorkState():telemetryMsg.getGarageException());
|
||||
record.setRunStatusText(MessageUtils.message("runStatus.name"+record.getRunStatus()));
|
||||
}else{
|
||||
// 离线不需要调用接口 也不更新状态 在线离线状态要在事件触发的时候更新 否则性能很差
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
is-concurrent: false
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# jwt秘钥
|
||||
|
||||
Loading…
Reference in New Issue
Block a user