|
@@ -15,7 +15,6 @@ import com.xy.entity.DeviceConfig;
|
|
|
import com.xy.entity.DeviceStatus;
|
|
|
import com.xy.mapper.DeviceStatusMapper;
|
|
|
import com.xy.mapper.entity.DeviceStatusCount;
|
|
|
-import com.xy.order.EnumActivityEventCode;
|
|
|
import com.xy.utils.*;
|
|
|
import com.xy.utils.enums.DeviceErrorRecordTypesEnum;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -99,12 +98,12 @@ public class DeviceStatusServiceImpl extends ServiceImpl<DeviceStatusMapper, Dev
|
|
|
DeviceEventMsgDto.Save deviceEventMsg = new DeviceEventMsgDto.Save()
|
|
|
.setDeviceId(deviceStatus.getDeviceId());
|
|
|
deviceEventMsg.setCode(DeviceErrorRecordTypesEnum.T.getCode());
|
|
|
- String msg = "%s-温度阈值%d,当前温度%d";
|
|
|
+ String msg = "温度异常-温度阈值%d,当前温度%d";
|
|
|
if (deviceStatus.getTempValue() >= tempMax) {
|
|
|
- deviceEventMsg.setMsg(String.format(msg, DeviceErrorRecordTypesEnum.T.getMsg(), tempMax, deviceStatus.getTempValue()));
|
|
|
+ deviceEventMsg.setMsg(String.format(msg, tempMax, deviceStatus.getTempValue()));
|
|
|
}
|
|
|
if (deviceStatus.getTempValue() <= tempMin) {
|
|
|
- deviceEventMsg.setMsg(String.format(msg, DeviceErrorRecordTypesEnum.T.getMsg(), tempMin, deviceStatus.getTempValue()));
|
|
|
+ deviceEventMsg.setMsg(String.format(msg, tempMin, deviceStatus.getTempValue()));
|
|
|
}
|
|
|
deviceEventMsgService.save(deviceEventMsg);
|
|
|
}
|