|
|
|
@ -2,6 +2,7 @@ package com.xydl.cac.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.xydl.cac.entity.IedDlConfig;
|
|
|
|
|
import com.xydl.cac.entity.IedDlRecord;
|
|
|
|
|
import com.xydl.cac.exception.BusinessException;
|
|
|
|
|
import com.xydl.cac.repository.IedDlRecordRepository;
|
|
|
|
|
import com.xydl.cac.service.IedDlConfigService;
|
|
|
|
|
import com.xydl.cac.service.IedDlRecordService;
|
|
|
|
@ -17,6 +18,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.persistence.criteria.Predicate;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
@ -83,4 +85,15 @@ public class IedDlRecordServiceImpl implements IedDlRecordService {
|
|
|
|
|
repository.save(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void rebuildData(Integer id) throws BusinessException {
|
|
|
|
|
Optional<IedDlRecord> optional = repository.findById(id);
|
|
|
|
|
if (!optional.isPresent()) {
|
|
|
|
|
throw new BusinessException("未找到该记录");
|
|
|
|
|
}
|
|
|
|
|
IedDlRecord record = optional.get();
|
|
|
|
|
spectrogramHandler.processFile(record);
|
|
|
|
|
repository.save(record);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|