82584-导入拆分结果,模板表头校验.
This commit is contained in:
+16
@@ -1796,6 +1796,22 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
|
||||
//获得总列数
|
||||
int cellLength = sheet.getRow(0).getPhysicalNumberOfCells();
|
||||
// 验证表头
|
||||
Row rowHeader = sheet.getRow(0);
|
||||
if (null != rowHeader) {
|
||||
Cell itemNum = rowHeader.getCell(0);
|
||||
Cell itemTitle = rowHeader.getCell(1);
|
||||
Cell itemContent = rowHeader.getCell(2);
|
||||
if (!StringUtils.equals(itemNum.getStringCellValue(),"条款号")
|
||||
|| !StringUtils.equals(itemTitle.getStringCellValue(),"条款标题")
|
||||
|| !StringUtils.equals(itemContent.getStringCellValue(),"条款内容")) {
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
}
|
||||
} else {
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
}
|
||||
|
||||
|
||||
// 验证模板表头是否正确
|
||||
Row rowDescription= sheet.getRow(1);
|
||||
if (rowDescription != null) {
|
||||
|
||||
Reference in New Issue
Block a user