diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java index 7abb4fcc..29bb0147 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java @@ -261,13 +261,37 @@ public class DesVolumeCatalogController extends BaseController { Row row = sheet.getRow(rowIndex); if (hasValidData(row)) { String designSubitem = getCellValue(row.getCell(0)); + if (designSubitem == null || designSubitem.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:子项名称不能为空"); + } String specialty = getCellValue(row.getCell(1)); + if (specialty == null || specialty.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:专业不能为空"); + } String specialtyId = getCellValue(row.getCell(2)); + if (specialtyId == null || specialtyId.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:专业"+specialty+"不存在,推荐使用系统下载模板进行数据填充"); + } String principal = getCellValue(row.getCell(3)); + if (principal == null || principal.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:人员不能为空"); + } String principalId = getCellValue(row.getCell(4)); + if (principalId == null || principalId.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:人员"+principal+"不存在,推荐使用系统下载模板进行数据填充"); + } String volumeNumber = getCellValue(row.getCell(5)); + if (volumeNumber == null || volumeNumber.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:卷册编号不能为空"); + } String documentName = getCellValue(row.getCell(6)); + if (documentName == null || documentName.isEmpty()){ + throw new RuntimeException("第"+(rowIndex+1)+"行:资料名称不能为空"); + } LocalDate plannedCompletion = getLocalDateValue(row.getCell(7)); + if (plannedCompletion == null){ + throw new RuntimeException("第"+(rowIndex+1)+"行:计划出图时间不能为空"); + } ExcelData excelData = new ExcelData( designSubitem, specialtyId, principalId, volumeNumber, documentName, diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/BusBillofquantitiesBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/BusBillofquantitiesBo.java index afb3b205..f1259463 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/BusBillofquantitiesBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/BusBillofquantitiesBo.java @@ -37,7 +37,7 @@ public class BusBillofquantitiesBo extends BaseEntity { /** * 表名 */ - @NotBlank(message = "表名不能为空", groups = { AddGroup.class, EditGroup.class }) +// @NotBlank(message = "表名不能为空", groups = { AddGroup.class, EditGroup.class }) private String sheet; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java index 4f66d4ef..6f560819 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java @@ -529,8 +529,8 @@ public class DesVolumeCatalogServiceImpl extends ServiceImpl