update修改
This commit is contained in:
parent
977306b00c
commit
6f73d6b74a
@ -290,12 +290,30 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sysEquipmentMapper.insertBatch(addSysEquipmentList);
|
sysEquipmentMapper.insertBatch(addSysEquipmentList);
|
||||||
|
for (SysEquipment item : addSysEquipmentList){
|
||||||
|
if (item.getIotModelId() != null){
|
||||||
|
String modelCode = dataService.iotModelMap.get(item.getIotModelId().toString());
|
||||||
|
dataService.deviceModelMap.put(item.getId().toString(),modelCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(updateSysEquipmentList)) {
|
if (CollectionUtils.isNotEmpty(updateSysEquipmentList)) {
|
||||||
sysEquipmentMapper.updateBatchById(updateSysEquipmentList);
|
sysEquipmentMapper.updateBatchById(updateSysEquipmentList);
|
||||||
|
for (SysEquipment item : updateSysEquipmentList){
|
||||||
|
if (item.getIotModelId() != null){
|
||||||
|
String modelCode = dataService.iotModelMap.get(item.getIotModelId().toString());
|
||||||
|
dataService.deviceModelMap.put(item.getId().toString(),modelCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(delSysEquipmentList)) {
|
if (CollectionUtils.isNotEmpty(delSysEquipmentList)) {
|
||||||
// 删除设备
|
// 删除设备
|
||||||
sysEquipmentMapper.deleteBatchIds(delSysEquipmentList);
|
sysEquipmentMapper.deleteBatchIds(delSysEquipmentList);
|
||||||
|
for (SysEquipment item : updateSysEquipmentList){
|
||||||
|
if (item.getIotModelId() != null){
|
||||||
|
String modelCode = dataService.iotModelMap.get(item.getIotModelId().toString());
|
||||||
|
dataService.deviceModelMap.put(item.getId().toString(),modelCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user