|
@@ -260,7 +260,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
if (cell == null) {
|
|
|
continue;
|
|
|
}
|
|
|
- fieldValueMap.put(fieldRowMap.get(rowNum), cell.getStringCellValue());
|
|
|
+ fieldValueMap.put(fieldRowMap.get(rowNum), ExcelUtil.getCellValue(cell));
|
|
|
}
|
|
|
Optional.ofNullable(buildEmailFundNavDTO(fieldValueMap)).ifPresent(fundNavDTOList::add);
|
|
|
}
|
|
@@ -290,7 +290,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
if (cell == null) {
|
|
|
continue;
|
|
|
}
|
|
|
- String cellValue = cell.getStringCellValue();
|
|
|
+ String cellValue = ExcelUtil.getCellValue(cell);
|
|
|
if (StrUtil.isNotBlank(cellValue) && cellValue.contains("截至")) {
|
|
|
int index = cellValue.indexOf("截至");
|
|
|
String date = cellValue.substring(index + 2, index + 2 + 10);
|
|
@@ -359,6 +359,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
// 正常净值文件格式
|
|
|
if (StrUtil.isNotBlank(priceDate) && !priceDate.contains("-")) {
|
|
|
// 处理日期yyyyMMdd格式 -> 转成yyyy-MM-dd
|
|
|
+ priceDate = priceDate.replace("年","").replace("月","").replace("日","");
|
|
|
priceDate = DateUtil.format(DateUtil.parse(priceDate, DateConst.YYYYMMDD), DateConst.YYYY_MM_DD);
|
|
|
}
|
|
|
emailFundNavDTO.setPriceDate(priceDate);
|
|
@@ -410,6 +411,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
}
|
|
|
if (StrUtil.isNotBlank(priceDate) && !priceDate.contains("-")) {
|
|
|
// 处理日期yyyyMMdd格式 -> 转成yyyy-MM-dd
|
|
|
+ priceDate = priceDate.replace("年","").replace("月","").replace("日","");
|
|
|
priceDate = DateUtil.format(DateUtil.parse(priceDate, DateConst.YYYYMMDD), DateConst.YYYY_MM_DD);
|
|
|
}
|
|
|
emailFundNavDTO.setPriceDate(priceDate);
|
|
@@ -483,7 +485,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
private Map<String, Pair<Integer, Integer>> getFieldPosition(Sheet sheet, Map<String, List<String>> emailFieldMap) {
|
|
|
Map<String, List<Pair<Integer, Integer>>> tempFieldPositionMap = MapUtil.newHashMap();
|
|
|
int lastRowNum = sheet.getLastRowNum();
|
|
|
- for (int rowNum = 0; rowNum < lastRowNum; rowNum++) {
|
|
|
+ for (int rowNum = 0; rowNum <= lastRowNum; rowNum++) {
|
|
|
Row sheetRow = sheet.getRow(rowNum);
|
|
|
if (sheetRow == null) {
|
|
|
continue;
|