配置错误返回修改
This commit is contained in:
parent
0a70a9a7d8
commit
7051ec9f39
@ -19,7 +19,7 @@ public interface FaultRecorderService {
|
||||
|
||||
void download(String path, HttpServletResponse httpServletResponse) throws IOException;
|
||||
|
||||
Map<String, List<Object>> getDataCurve(String url, String deviceCode) throws IOException;
|
||||
Map<String, List<Object>> getDataCurve(String url, String deviceCode);
|
||||
|
||||
void updateFdrConfig(SysEquipment sysEquipment);
|
||||
|
||||
|
@ -168,9 +168,8 @@ public class FaultRecorderServiceImpl implements FaultRecorderService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<Object>> getDataCurve(String url, String deviceCode) throws IOException {
|
||||
public Map<String, List<Object>> getDataCurve(String url, String deviceCode) {
|
||||
Map<String, List<Object>> resultMap = null;
|
||||
try (InputStream fileStream = minioViewsServcie.getFileStream(url)) {
|
||||
//根据device Code查询故障录波格式
|
||||
QueryWrapper<SysEquipment> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("CODE", deviceCode);
|
||||
@ -187,11 +186,13 @@ public class FaultRecorderServiceImpl implements FaultRecorderService {
|
||||
if (fdrFormatVo == null){
|
||||
throw new ServiceException("请添加故障录波配置");
|
||||
}
|
||||
try (InputStream fileStream = minioViewsServcie.getFileStream(url)) {
|
||||
// 解析文件内容
|
||||
resultMap = parseFile(fileStream, fdrFormatVo.getTimeFormat(), fdrFormatVo.getDelimiter(), fdrFormatVo.getValidStartLine());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("配置解析异常");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public interface PlcLogService {
|
||||
|
||||
List<FileNode> getDirOrFileList(String fileType, String name, String startTime, String endTime);
|
||||
|
||||
Map<String, List<Object>> getDataCurve(String url, String deviceCode) throws IOException;
|
||||
Map<String, List<Object>> getDataCurve(String url, String deviceCode);
|
||||
|
||||
void updatePlcConfig(SysEquipment sysEquipment);
|
||||
|
||||
|
@ -63,9 +63,8 @@ public class PlcLogsServiceImpl implements PlcLogService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<Object>> getDataCurve(String url, String deviceCode) throws IOException {
|
||||
public Map<String, List<Object>> getDataCurve(String url, String deviceCode){
|
||||
Map<String, List<Object>> resultMap = null;
|
||||
try (InputStream fileStream = minioViewsServcie.getFileStream(url)) {
|
||||
//根据device Code查询故障录波格式
|
||||
QueryWrapper<SysEquipment> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("CODE", deviceCode);
|
||||
@ -82,11 +81,13 @@ public class PlcLogsServiceImpl implements PlcLogService {
|
||||
if (fdrFormatVo == null){
|
||||
throw new ServiceException("请添加plclog配置");
|
||||
}
|
||||
try (InputStream fileStream = minioViewsServcie.getFileStream(url)) {
|
||||
// 解析文件内容
|
||||
resultMap = parseFile(fileStream, fdrFormatVo.getTimeFormat(), fdrFormatVo.getDelimiter(), fdrFormatVo.getValidStartLine());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("配置解析异常");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user