update code
parent
ef50617d64
commit
d8ca3850b2
|
@ -40,7 +40,7 @@ public class DevPitmonitSouthsmosDevSpServiceImpl implements IDevPitmonitSouthsm
|
|||
DevPitmonitSouthsmosDevSp where=new DevPitmonitSouthsmosDevSp();
|
||||
where.setSpId(spId);
|
||||
where.setDevId(devId);
|
||||
List<DevPitmonitSouthsmosDevSp> list=new ArrayList<>();
|
||||
List<DevPitmonitSouthsmosDevSp> list=selectDevPitmonitSouthsmosDevSpList(where);
|
||||
return list.size()>0?list.get(0):null;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,10 @@ public class DevPitmonitSouthsmosDeviceServiceImpl implements IDevPitmonitSouths
|
|||
public void addList(List<DevPitmonitSouthsmosDevice> items, SurProjectPitMonitCfg cfg) {
|
||||
items.forEach(it->{
|
||||
it.setCfgId(cfg.getId());
|
||||
insertDevPitmonitSouthsmosDevice(it);
|
||||
DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it.getDevId());
|
||||
if(old==null) {
|
||||
insertDevPitmonitSouthsmosDevice(it);
|
||||
}
|
||||
it.getSpDevices().forEach(item->{
|
||||
item.setCfgId(cfg.getId());
|
||||
devSpService.addDevPitmonitSouthsmosDevSp(item);
|
||||
|
|
Loading…
Reference in New Issue