|
|
|
@ -281,6 +281,7 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
//对tff文件进行操作 |
|
|
|
private static List<EquipmentDataDetail> saveTxt(List<String> fileName, EquipmentFolderLocation excel, Integer batchNo) { |
|
|
|
List<EquipmentDataDetail> equipmentDataDetails = new ArrayList<>(); |
|
|
|
int index = 1; |
|
|
|
for (String s : fileName) { |
|
|
|
int startLine = 15; // 第一次读取开始的行数 |
|
|
|
int firstReadLines = 41; |
|
|
|
@ -321,7 +322,6 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
} |
|
|
|
} |
|
|
|
//对数据进行切割封装 |
|
|
|
int index = 1; |
|
|
|
for (String info : list) { |
|
|
|
String[] data = info.split("\t"); |
|
|
|
EquipmentDataDetail equipmentDataDetail = new EquipmentDataDetail(); |
|
|
|
@ -358,6 +358,7 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
private static List<EquipmentDataDetail> saveExcel(List<String> fileName, EquipmentFolderLocation excel, Integer batchNo) { |
|
|
|
List<EquipmentDataDetail> equipmentDataDetails = new ArrayList<>(); |
|
|
|
//获取每个excel下的所有关于Test的两个值并保存 |
|
|
|
int index=1; |
|
|
|
for (String s : fileName) { |
|
|
|
File excelFile = new File(s); |
|
|
|
List<Map<Integer, String>> list = new ArrayList<>(); |
|
|
|
@ -375,7 +376,6 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
log.info("读取的文件为空,或不是excel格式的"); |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
int index=1; |
|
|
|
//获取TEST后面的两个值 |
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
if (list.get(i).get(0) == null) { |
|
|
|
@ -403,6 +403,7 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
|
|
|
|
//对txt文件进行操作 |
|
|
|
private static List<EquipmentDataDetail> saveTxtFile(List<String> fileName, EquipmentFolderLocation excel, Integer batchNo) { |
|
|
|
int index=1; |
|
|
|
List<EquipmentDataDetail> detailList = new ArrayList<>(); |
|
|
|
for (String name : fileName) { |
|
|
|
try { |
|
|
|
@ -419,7 +420,6 @@ public class GetInformationForExcelServiceImpl extends ServiceImpl<GetInformatio |
|
|
|
list.add(line); |
|
|
|
} |
|
|
|
} |
|
|
|
int index=1; |
|
|
|
for (String s : list) { |
|
|
|
EquipmentDataDetail equipmentDataDetail = new EquipmentDataDetail(); |
|
|
|
String[] data = s.split("\t"); |
|
|
|
|