Compare commits

..

No commits in common. '230822887e86aba229d964cb6637ba6cb3709990' and '1bdb937ec2ea44137494cc881f7d6f55014655ee' have entirely different histories.

  1. 94
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionXTestServiceImpl.java

@ -9,7 +9,10 @@ import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
@ -111,9 +114,7 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
List<FunctionxTest> listVo = new ArrayList<>();
for (int i=1;i<=lastRowIndex;i++) {
Row row = sheet.getRow(i); // 行
if (row == null ) {
continue;
} else {
if(row!=null){
short lastCellNum = row.getLastCellNum();
List<String> list = new ArrayList<>();
for (int j=0;j<lastCellNum;j++){
@ -121,12 +122,7 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
if (cell == null){
list.add(null);
} else {
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
DataFormatter formatter = new DataFormatter();
//单元格不设置数字格式
cell.setCellStyle(null);
String cellValue = formatter.formatCellValue(cell,evaluator);
String cellValue = cell.getStringCellValue();
list.add(cellValue);
}
}
@ -218,7 +214,7 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("对应模块不能为空");
} else{
if (pModuleId != null && pModuleId.length()>0) {
if (pModuleId != null){
String pid="";
for(Modulex modulex : modulexList){
if (modulex.getModuleName().equals(pModuleId)){
@ -304,30 +300,14 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
return Result.error("功能类型不能为空");
} else{
switch (functionType){
case "列表":
type = 0;
break;
case "增加":
type = 1;
break;
case "删除":
type = 2;
break;
case "修改":
type = 3;
break;
case "查看":
type = 4;
break;
case "导入":
type = 5;
break;
case "导出":
type = 6;
break;
case "其它":
type = 99;
break;
case "列表": type=0; break;
case "新增": type=1; break;
case "删除": type=2; break;
case "修改": type=3; break;
case "查看": type=4; break;
case "导入": type=5; break;
case "导出": type=6; break;
case "其它": type=99; break;
default:
message.put("isError", "true");
message.put("status","第"+(i+2)+"行功能类型错误");
@ -431,24 +411,12 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
} else {
// 值:未发布0、已发布1、开发中2、已完成3、已撤回4、已取消9;默认0
switch (workStatus){
case "未发布":
type = 0;
break;
case "已发布":
type = 1;
break;
case "开发中":
type = 2;
break;
case "已完成":
type = 3;
break;
case "已撤回":
type = 4;
break;
case "已取消":
type = 9;
break;
case "未发布": type=0; break;
case "已发布": type=1; break;
case "开发中": type=2; break;
case "已完成": type=3; break;
case "已撤回": type=4; break;
case "已取消": type=9; break;
default:
message.put("isError", "true");
message.put("status","第"+(i+2)+"行任务状态错误");
@ -550,15 +518,9 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
} else{
// 值:正常1、停用0、废弃9;默认1
switch (status){
case "正常":
type = 1;
break;
case "停用":
type = 0;
break;
case "废弃":
type = 9;
break;
case "正常": type=1; break;
case "停用": type=0; break;
case "废弃": type=9; break;
default:
message.put("isError", "true");
message.put("status","第"+(i+2)+"行任务状态错误");
@ -577,12 +539,8 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F
} else{
// 值:当前1、历史0;默认1
switch (verisonStatus){
case "当前":
type = 1;
break;
case "历史":
type = 0;
break;
case "当前": type=1; break;
case "历史": type=0; break;
default:
message.put("isError", "true");
message.put("status","第"+(i+2)+"行版本状态错误");

Loading…
Cancel
Save