|
@@ -999,6 +999,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
int lastCellNum = row.getLastCellNum();
|
|
int lastCellNum = row.getLastCellNum();
|
|
|
//循环当前行 cellNum = (firstCellNum+1) 则是除开第一例
|
|
//循环当前行 cellNum = (firstCellNum+1) 则是除开第一例
|
|
|
Demand in=new Demand();
|
|
Demand in=new Demand();
|
|
|
|
|
+ List<String> list2 =new ArrayList<>();
|
|
|
for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
|
|
for(int cellNum = (firstCellNum); cellNum < lastCellNum;cellNum++){
|
|
|
Cell cell = row.getCell(cellNum);
|
|
Cell cell = row.getCell(cellNum);
|
|
|
try {
|
|
try {
|
|
@@ -1014,6 +1015,9 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
break;
|
|
break;
|
|
|
case 3:
|
|
case 3:
|
|
|
in.setProblemDes(FileUtils.getCellValue(cell));
|
|
in.setProblemDes(FileUtils.getCellValue(cell));
|
|
|
|
|
+ if (in.getProblemDes().length()>512) {
|
|
|
|
|
+ list2.add(in.getName());
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case 4:
|
|
case 4:
|
|
|
in.setKeyword(FileUtils.getCellValue(cell));
|
|
in.setKeyword(FileUtils.getCellValue(cell));
|
|
@@ -1035,6 +1039,15 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
|
|
throw new BusinessException(new Error("表格第"+(rowNum+1)+"行输入内容不正确。"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!list2.isEmpty()) {
|
|
|
|
|
+ StringBuffer str=new StringBuffer("[");
|
|
|
|
|
+ for (String string : list2) {
|
|
|
|
|
+ str.append(string+",");
|
|
|
|
|
+ }
|
|
|
|
|
+ str.deleteCharAt(str.length()-1);
|
|
|
|
|
+ str.append("]");
|
|
|
|
|
+ throw new BusinessException(new Error("名称"+str+"内容过长,请控制在512个字符内"));
|
|
|
|
|
+ }
|
|
|
in.setDeletedSign(DeleteStatus.UNDELETE.getCode());
|
|
in.setDeletedSign(DeleteStatus.UNDELETE.getCode());
|
|
|
in.setEmployerId(TokenManager.getAdminId());
|
|
in.setEmployerId(TokenManager.getAdminId());
|
|
|
in.setCreateTime(date);
|
|
in.setCreateTime(date);
|