模块管理导入功能交互

dev^2
lijinyu 1 year ago
parent a63d094450
commit a51b72b7da
  1. 21
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java

@ -401,13 +401,14 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
Cell cell = row.getCell(k); Cell cell = row.getCell(k);
if(cell==null){ if(cell==null){
propertyNames.add(null); propertyNames.add(null);
}else {
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
DataFormatter formatter = new DataFormatter();
//单元格不设置数字格式
cell.setCellStyle(null);
String name = formatter.formatCellValue(cell,evaluator);
propertyNames.add(name);
} }
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
DataFormatter formatter = new DataFormatter();
//单元格不设置数字格式
cell.setCellStyle(null);
String name = formatter.formatCellValue(cell,evaluator);
propertyNames.add(name);
} }
if(propertyNames.size()!=18 || !propertyNames.get(0).equals("上级模块名称") if(propertyNames.size()!=18 || !propertyNames.get(0).equals("上级模块名称")
|| !propertyNames.get(1).equals("项目名称") || !propertyNames.get(1).equals("项目名称")
@ -442,7 +443,11 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
Cell cell = row.getCell(k); Cell cell = row.getCell(k);
String value=""; String value="";
if(cell!=null){ if(cell!=null){
value = cell.getStringCellValue(); FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
DataFormatter formatter = new DataFormatter();
//单元格不设置数字格式
cell.setCellStyle(null);
value = formatter.formatCellValue(cell,evaluator);
} }
switch (k){ switch (k){
case 0: case 0:
@ -504,7 +509,7 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl
modulexVo.setVerisonStatus(value); modulexVo.setVerisonStatus(value);
break; break;
case 17: case 17:
modulexVo.setVerison(value); modulexVo.setVerison(value);
break; break;
default: default:
message.put("isError", "true"); message.put("isError", "true");

Loading…
Cancel
Save