相关人员导入修改
This commit is contained in:
+22
-22
@@ -746,7 +746,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
List<ProjectRelatedPersonnel> list = new ArrayList<>();
|
||||
if (workbook != null) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
deleteBlankRow(sheet);
|
||||
//deleteBlankRow(sheet);
|
||||
if (sheet != null) {
|
||||
if(sheet.getPhysicalNumberOfRows()==0){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
@@ -791,27 +791,27 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i == 1) {//校验填写说明
|
||||
row = sheet.getRow(i);
|
||||
int columNos = row.getLastCellNum();
|
||||
if (StringUtils.isNotBlank(row.getCell(0).getStringCellValue())){
|
||||
for (int k = 1; k < columNos; k++){
|
||||
if(StringUtils.isNotBlank(row.getCell(k).getStringCellValue())){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("第二行填写说明列数不对,请按照模板格式填写内容");
|
||||
} else {
|
||||
throw new JeroBootException("The number of explanatory columns in the second line is incorrect. Please fill in the contents according to the template format.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("填写说明不能为空,请按照模板格式填写内容");
|
||||
} else {
|
||||
throw new JeroBootException("The description cannot be blank. Please fill in the content according to the template format.");
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (i == 1) {//校验填写说明
|
||||
// row = sheet.getRow(i);
|
||||
// int columNos = row.getLastCellNum();
|
||||
// if (StringUtils.isNotBlank(row.getCell(0).getStringCellValue())){
|
||||
// for (int k = 1; k < columNos; k++){
|
||||
// if(StringUtils.isNotBlank(row.getCell(k).getStringCellValue())){
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// throw new JeroBootException("第二行填写说明列数不对,请按照模板格式填写内容");
|
||||
// } else {
|
||||
// throw new JeroBootException("The number of explanatory columns in the second line is incorrect. Please fill in the contents according to the template format.");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// throw new JeroBootException("填写说明不能为空,请按照模板格式填写内容");
|
||||
// } else {
|
||||
// throw new JeroBootException("The description cannot be blank. Please fill in the content according to the template format.");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (i > 1) {//读取数据
|
||||
//获取每一行数据
|
||||
row = sheet.getRow(i);
|
||||
|
||||
Reference in New Issue
Block a user