Commit 20931a82 authored by maoying's avatar maoying

删除装备数据同步高斯库

parent a786db39
......@@ -931,14 +931,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
int res = this.baseMapper.deleteById(id);
if (res > 0 && syncSwitch) {
//数据同步
syncDataService.syncDeletedEquipmentSpecific(Arrays.asList(id));
List<EquipmentIndexVO> indexBySpecificIdIn = equipmentSpecificIndexSerivce.getEquipIndexBySpecificIdIn(Arrays.asList(String.valueOf(id)));
if (!indexBySpecificIdIn.isEmpty()) {
List<Long> fireEquipmentInfoCollect = indexBySpecificIdIn.stream().filter(vo -> 0 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
List<Long> fireEquipMeasurementCollect = indexBySpecificIdIn.stream().filter(vo -> 1 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
syncDataService.syncDeletedEquipmentSpecificInfo(fireEquipmentInfoCollect);
syncDataService.syncDeletedFireEquipMeasurement(fireEquipMeasurementCollect);
}
delEquipmentSpecificSyncData(id);
}
//判断装备表剩余数量,无剩余删除模板
QueryWrapper<EquipmentSpecific> wrapper = new QueryWrapper<>();
......@@ -989,6 +982,18 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
public void delEquipmentSpecificSyncData(Long id){
//数据同步
syncDataService.syncDeletedEquipmentSpecific(Arrays.asList(id));
List<EquipmentIndexVO> indexBySpecificIdIn = equipmentSpecificIndexSerivce.getEquipIndexBySpecificIdIn(Arrays.asList(String.valueOf(id)));
if (!indexBySpecificIdIn.isEmpty()) {
List<Long> fireEquipmentInfoCollect = indexBySpecificIdIn.stream().filter(vo -> 0 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
List<Long> fireEquipMeasurementCollect = indexBySpecificIdIn.stream().filter(vo -> 1 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
syncDataService.syncDeletedEquipmentSpecificInfo(fireEquipmentInfoCollect);
syncDataService.syncDeletedFireEquipMeasurement(fireEquipMeasurementCollect);
}
}
@Override
public Object getOneCard(Long id, String type) {
if (BitmapEnum.video.getKey().equals(type)) {
......@@ -1519,6 +1524,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
// 已入库
this.baseMapper.deleteEquipDataByStockDetailId(stockDetail.getId(), specificId);
}
if (syncSwitch) {
//数据同步
delEquipmentSpecificSyncData(specificId);
}
return Boolean.TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment