diff --git a/ant-design-vue-jeecg/src/views/requirementtype/RequirementTypeList.vue b/ant-design-vue-jeecg/src/views/requirementtype/RequirementTypeList.vue
index 2577ae6..a4b316c 100644
--- a/ant-design-vue-jeecg/src/views/requirementtype/RequirementTypeList.vue
+++ b/ant-design-vue-jeecg/src/views/requirementtype/RequirementTypeList.vue
@@ -30,10 +30,10 @@
-
+
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementtype/controller/RequirementTypeController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementtype/controller/RequirementTypeController.java
index e4b755f..e4e65594 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementtype/controller/RequirementTypeController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementtype/controller/RequirementTypeController.java
@@ -109,9 +109,17 @@ public class RequirementTypeController extends JeecgController delete(@RequestParam(name="id",required=true) String id) {
- requirementTypeService.removeById(id);
- return Result.OK("删除成功!");
+ public Result> delete(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
+ RequirementType requirementType = new RequirementType();
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(requirementType, req.getParameterMap());
+ queryWrapper.eq("upper_id",id);
+ List list = requirementTypeService.list(queryWrapper);
+ if(list.size()>0){
+ return Result.error("包含有下级需求类型,无法删除");
+ }else{
+ requirementTypeService.removeById(id);
+ return Result.OK("删除成功!");
+ }
}
/**