Commit 0c703355 authored by KeYong's avatar KeYong

修改删除装备大屏不刷新问题

parent 39e4f16f
......@@ -138,6 +138,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
SignalClassifyMapper signalClassifyMapper;
@Autowired
FireFightingSystemMapper fireFightingSystemMapper;
@Value("${systemctl.sync.switch}")
private Boolean syncSwitch;
......@@ -931,7 +934,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (stockDetailService.count(stockDetailQueryWrapper) > 0) {
throw new RuntimeException("设备已入库,无法删除");
}
String code = this.getSystemCodeBySpeId(equipmentSpecific.getSystemId());
int res = this.baseMapper.deleteById(id);
this.integrationPageSysDataRefresh(code);
if (res > 0 && syncSwitch) {
//数据同步
delEquipmentSpecificSyncData(id);
......@@ -985,6 +990,15 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
private String getSystemCodeBySpeId(String sysIds) {
if (StringUtil.isNotEmpty(sysIds)) {
List<FireFightingSystemEntity> sys = fireFightingSystemMapper.getFightingSysByIds(sysIds.split(","));
return sys.stream().map(FireFightingSystemEntity::getCode).collect(Collectors.joining(","));
} else {
return null;
}
}
public void delEquipmentSpecificSyncData(Long id){
//数据同步
......
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