|
|
@ -152,7 +152,7 @@ public class NSensorServiceImpl implements NSensorService {
|
|
|
|
public NSensor detail(Integer id) throws Exception {
|
|
|
|
public NSensor detail(Integer id) throws Exception {
|
|
|
|
Optional<NSensor> optional = repository.findById(id);
|
|
|
|
Optional<NSensor> optional = repository.findById(id);
|
|
|
|
if (!optional.isPresent()) {
|
|
|
|
if (!optional.isPresent()) {
|
|
|
|
throw new BusinessException("未找到该装置id=" + id);
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NSensor sensor = optional.get();
|
|
|
|
NSensor sensor = optional.get();
|
|
|
|
this.fillOtherName(sensor);
|
|
|
|
this.fillOtherName(sensor);
|
|
|
|