|
@@ -109,7 +109,6 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "修改数据组失败");
|
|
|
}
|
|
|
if (dataSourceId != itemGroup1.getDataSourceId()) {
|
|
|
- alarmConfigDao.delAlarmConfigByItemGroupId(id);
|
|
|
// 删除点位报警定时任务
|
|
|
dbItemList.stream().forEach(item -> {
|
|
|
AlarmConfig alarmConfig = new AlarmConfig();
|
|
@@ -117,6 +116,7 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
alarmConfig.setItemId(item.getItemId());
|
|
|
alarmTaskRegister.removeItemTask(alarmConfig);
|
|
|
});
|
|
|
+ alarmConfigDao.delAlarmConfigByItemGroupId(id);
|
|
|
itemGroupDao.delItemByGroupId(id);
|
|
|
}
|
|
|
return Result.ok("修改数据组成功");
|
|
@@ -218,7 +218,6 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
return Result.no(ResultEnum.OPERATION_ERROR.getRespCode(), message);
|
|
|
}
|
|
|
|
|
|
- alarmConfigDao.delAlarmConfigByItemGroupId(id);
|
|
|
List<Item> dbItemList = itemGroupDao.getItemListByGroupId(id, null);
|
|
|
// 删除点位报警定时任务
|
|
|
dbItemList.stream().forEach(item -> {
|
|
@@ -227,6 +226,7 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
alarmConfig.setItemId(item.getItemId());
|
|
|
alarmTaskRegister.removeItemTask(alarmConfig);
|
|
|
});
|
|
|
+ alarmConfigDao.delAlarmConfigByItemGroupId(id);
|
|
|
itemGroupDao.delItemByGroupId(id);
|
|
|
itemGroupDao.delItemGroupById(id);
|
|
|
return Result.ok("删除成功");
|
|
@@ -316,10 +316,10 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
return Result.ok(deviceNameAndItemReadNameList,"deviceLedger");
|
|
|
}
|
|
|
|
|
|
+ List<Item> dbItemList = itemGroupDao.getItemValueByIds(idList);
|
|
|
if(alarmConfigDao.delAlarmConfigByIdList(idList)<=0){
|
|
|
return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), ResultEnum.SERVER_ERROR.getRespMsg());
|
|
|
}
|
|
|
- List<Item> dbItemList = itemGroupDao.getItemValueByIds(idList);
|
|
|
// 删除点位报警定时任务
|
|
|
dbItemList.stream().forEach(item -> {
|
|
|
AlarmConfig alarmConfig = new AlarmConfig();
|
|
@@ -453,7 +453,6 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
itemGroupDao.updateItemBasicList(updateList);
|
|
|
}
|
|
|
if(delList.size() > 0){
|
|
|
- alarmConfigDao.delAlarmConfigByIdList(delList);
|
|
|
List<Item> dbItemList2 = itemGroupDao.getItemValueByIds(delList);
|
|
|
// 删除点位报警定时任务
|
|
|
dbItemList2.stream().forEach(item -> {
|
|
@@ -462,6 +461,7 @@ public class ItemGroupServiceImpl implements ItemGroupService {
|
|
|
alarmConfig.setItemId(item.getItemId());
|
|
|
alarmTaskRegister.removeItemTask(alarmConfig);
|
|
|
});
|
|
|
+ alarmConfigDao.delAlarmConfigByIdList(delList);
|
|
|
itemGroupDao.deleteItemByIdList(delList);
|
|
|
}
|
|
|
return Result.ok("添加数据组成功");
|