Initial commit

This commit is contained in:
Docker7530
2026-03-01 01:43:46 +08:00
commit c6125c117b
3840 changed files with 415340 additions and 0 deletions
@@ -0,0 +1,64 @@
# 信安文件报错
## 截图及文件
![](../../../../attachment/images-uuid/89c3f058e33d4608aa43ba91983f8649.png)
![](../../../../attachment/images-uuid/75b44a70f58c44aabb92e70734e5b977.png)
![](../../../../attachment/images-uuid/375aed4a44964c148f2113bde9b532df.png)
## 接口位置
```java
/configManage/updateSecurity
```
## 代码流程
```java
com.cmcc.cdn.platform.common.util.ExcelUtil#analysisExcelFile(java.io.InputStream, java.util.List<java.lang.String>)
//421行
com.cmcc.cdn.platform.common.util.ExcelUtil#checkExcelFormat
//357行
com.cmcc.cdn.platform.common.util.ExcelUtil#getCellValue
//369行
```
## 问题代码
```java
if(cell.getCellType() == CellType.NUMERIC){
cell.setCellType(CellType.STRING);
}
if(CellType.NUMERIC == cell.getCellType()){
cellValue = String.valueOf(cell.getNumericCellValue());
}else if(CellType.STRING == cell.getCellType()){
cellValue = String.valueOf(cell.getStringCellValue());
}else if(CellType.BOOLEAN == cell.getCellType()){
cellValue = String.valueOf(cell.getBooleanCellValue());
}else if(CellType.FORMULA == cell.getCellType()){
cellValue = String.valueOf(cell.getCellFormula());
}else if(CellType.BLANK == cell.getCellType()){
cellValue = "";
}else if(CellType.ERROR == cell.getCellType()){
cellValue = "非法字符";
}else {
cellValue = "未知类型";
}
```
## 处理完效果
![](../../../../attachment/images-uuid/5ee0d2934cb84598afa29b721bc78c0d.png)
![](../../../../attachment/images-uuid/db3bf7d7c5284b1a81affdba8362c771.png)
![](../../../../attachment/images-uuid/847f72f4ca904e57ad9753fcf2483a2f.png)
当天后续问题同上方情况。
![](../../../../attachment/images-uuid/f360eb83b2db4de9ab9c80e3dc8d659e.png)