LIVE_YE 8 mesi fa
parent
commit
75d1d382b8

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelFillUtils.java

@@ -144,8 +144,8 @@ public class ExcelFillUtils {
             Row row = sheet.getRow(i);
             Row row = sheet.getRow(i);
             for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) {
             for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) {
                 Cell cell = row.getCell(j);
                 Cell cell = row.getCell(j);
-                cell.setCellType(CellType.STRING);
                 if (!Objects.isNull(cell)) {
                 if (!Objects.isNull(cell)) {
+                    cell.setCellType(CellType.STRING);
                     Pattern pattern = Pattern.compile(FILL_EXPRESSION_REGEX);
                     Pattern pattern = Pattern.compile(FILL_EXPRESSION_REGEX);
                     Matcher matcher = pattern.matcher(cell.getStringCellValue());
                     Matcher matcher = pattern.matcher(cell.getStringCellValue());
                     Map<String, Object> expressionCellMap = new HashMap<>();
                     Map<String, Object> expressionCellMap = new HashMap<>();

+ 1 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/LoanApplicationServiceImpl.java

@@ -2420,6 +2420,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 fileNameHz = fileName + ".xlsx";
                 fileNameHz = fileName + ".xlsx";
                 templatePath = RuoYiConfig.getProfile() + "/mb/担保业务备案表.xlsx";
                 templatePath = RuoYiConfig.getProfile() + "/mb/担保业务备案表.xlsx";
                 fileDir = RuoYiConfig.getProfile() + "/mb/temporarily/" + loanApplicationNumber + "/" + fileNameHz;
                 fileDir = RuoYiConfig.getProfile() + "/mb/temporarily/" + loanApplicationNumber + "/" + fileNameHz;
+                System.out.println(list.get(0).toString());
                 sheet = ExcelFillUtils.fillOneSheet(templatePath, fileDir, "Sheet1", list);
                 sheet = ExcelFillUtils.fillOneSheet(templatePath, fileDir, "Sheet1", list);
 
 
                 path = path + "/" + fileNameHz;
                 path = path + "/" + fileNameHz;