xiejun
2023-11-12 a6c06fe6573f7789f98f77212a490db7b6d97be9
execl读取设置为null放出来
已修改1个文件
17 ■■■■■ 文件已修改
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/poi/util/ExcelUtil.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/poi/util/ExcelUtil.java
@@ -943,7 +943,7 @@
                                    Map<Integer, String> rowDataMap = new HashMap();
                                    for(int columnIndex = 0; columnIndex < rowDataSet.getLastCellNum(); ++columnIndex) {
                                    for(int columnIndex = 0; columnIndex < sheetDataSet.getColName().size(); ++columnIndex) {
                                        Cell cell = rowDataSet.getCell(columnIndex);
                                        Object value = getCellValue(cell, evaluator);
                                        String title = colsNameIndexMap.containsKey(columnIndex) ? (String)colsNameIndexMap.get(columnIndex) : "";
@@ -1025,14 +1025,17 @@
                                            } else {
                                                rowDataMap.put(columnIndex, VciBaseUtil.getStringValueFromObject(value));
                                            }
                                        } else if (!isDataSet && thisField != null && excelColumn != null) {
                                            if (!excelColumn.nullable()) {
                                                throw new VciBaseException("cellValueCanNotNull", new String[]{title, rowIndex + 1 + ""});
                                            }
                                        } else {
                                            if (!isDataSet && thisField != null && excelColumn != null) {
                                                if (!excelColumn.nullable()) {
                                                    throw new VciBaseException("cellValueCanNotNull", new String[]{title, rowIndex + 1 + ""});
                                                }
                                            if (StringUtil.isNotBlank(excelColumn.regExg())) {
                                                throw new VciBaseException("cellValueCanNotNullForReg", new String[]{title, rowIndex + 1 + ""});
                                                if (StringUtil.isNotBlank(excelColumn.regExg())) {
                                                    throw new VciBaseException("cellValueCanNotNullForReg", new String[]{title, rowIndex + 1 + ""});
                                                }
                                            }
                                            rowDataMap.put(columnIndex, VciBaseUtil.getStringValueFromObject(value));
                                        }
                                    }