|
|
@@ -100,17 +100,16 @@ public class AlarmRecordServiceImpl implements IAlarmRecordService {
|
|
|
String electronicTag = alarmRecord.getElectronicTag();
|
|
|
QpBottleStorageRVo storageRVo = storageService.getByElectronicTag(electronicTag);
|
|
|
if (storageRVo != null) {
|
|
|
+ if (hardware!=null){
|
|
|
+ R<Boolean> alarm = remoteNettyService.alarm(hardware);//RFID设备报警
|
|
|
+ log.info("==================>{},{}",alarm.getCode(),alarm.getMsg());
|
|
|
+ }
|
|
|
Long id = storageRVo.getId();
|
|
|
String key = FRID_CODE + electronicTag + id;
|
|
|
String frid = redisService.getCacheObject(key);
|
|
|
if (frid != null) {
|
|
|
return 1;
|
|
|
}
|
|
|
-
|
|
|
- if (hardware!=null){
|
|
|
- R<Boolean> alarm = remoteNettyService.alarm(hardware);//RFID设备报警
|
|
|
- log.info(alarm.getMsg());
|
|
|
- }
|
|
|
sendAlarm(storageRVo);// 发送报警消息
|
|
|
redisService.setCacheObject(key, electronicTag, 300L, TimeUnit.SECONDS);
|
|
|
alarmRecord.setAlarmTime(Calendar.getInstance().getTime())
|