|
@@ -112,8 +112,10 @@ public class FileService {
|
|
|
String nickname = ""; // 微信手机账单文件 添加一列 微信昵称 需要单独处理
|
|
|
for (CSVRecord record : csvParser) {
|
|
|
List<String> strings = record.toList();
|
|
|
+ List<String> strings2 = new ArrayList<>(strings);
|
|
|
/************* 此处内容一下均为处理微信账单表头 ****************/
|
|
|
- if (strings.size() == 1 && strings.get(0).equals("微信支付账单明细")) {
|
|
|
+ String join = String.join("", strings);
|
|
|
+ if (join.equals("微信支付账单明细")) {
|
|
|
wxFile = true;
|
|
|
}
|
|
|
if (wxFile && curRowWxFile < 16) {
|
|
@@ -126,19 +128,20 @@ public class FileService {
|
|
|
curRowWxFile++;
|
|
|
continue;
|
|
|
}
|
|
|
- if (wxFile && curRowWxFile == 16) {
|
|
|
- strings.add(0, "微信昵称");
|
|
|
+ if (wxFile && curRowWxFile > 16) {
|
|
|
+ strings2.add(0, nickname);
|
|
|
curRowWxFile++;
|
|
|
}
|
|
|
- if (wxFile && curRowWxFile > 16) {
|
|
|
- strings.add(0, nickname);
|
|
|
+ if (wxFile && curRowWxFile == 16) {
|
|
|
+ strings2.add(0, "微信昵称");
|
|
|
curRowWxFile++;
|
|
|
}
|
|
|
+
|
|
|
/************* 此处内容以上均为处理微信账单表头 ****************/
|
|
|
mongoExcelService.getRows(
|
|
|
0,
|
|
|
curRow,
|
|
|
- strings.stream()
|
|
|
+ strings2.stream()
|
|
|
.map(PublicStatic::removeAllSpecial)
|
|
|
.collect(Collectors.toList()));
|
|
|
curRow++;
|