fix:CSV数据查询

This commit is contained in:
2026-02-27 15:17:36 +08:00
parent fd940a6420
commit 5a7b9addc9
2 changed files with 7 additions and 3 deletions

View File

@@ -25,6 +25,10 @@ public class ListBigFileResp extends BaseResp {
@TableField("approveType")
private Integer approveType;
@Schema(description= "数据类型1-文件夹2-文件")
@TableField("dataType")
private Integer dataType;
//创建时间
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

View File

@@ -198,7 +198,7 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
public SdmResponse getCSVData(List<Long> fileIds) {
try {
// 存储所有文件的X轴和Y轴数据
List<List<Integer>> allXData = new ArrayList<>();
List<List<Float>> allXData = new ArrayList<>();
List<List<Float>> allYData = new ArrayList<>();
// 遍历所有文件ID
@@ -212,7 +212,7 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
BufferedReader reader = new BufferedReader(new InputStreamReader(bis, StandardCharsets.UTF_8));
// 分别存储当前文件的X轴和Y轴数据
List<Integer> xData = new ArrayList<>();
List<Float> xData = new ArrayList<>();
List<Float> yData = new ArrayList<>();
String line;
@@ -220,7 +220,7 @@ public class DataAnalysisServiceImpl implements IDataAnalysisService {
String[] values = line.split(",");
if (values.length >= 2) {
try {
int xValue = Integer.parseInt(values[0].trim());
Float xValue = Float.parseFloat(values[0].trim());
float yValue = Float.parseFloat(values[1].trim());
xData.add(xValue);
yData.add(yValue);