|
|
@ -109,9 +109,17 @@ public class RequirementTypeController extends JeecgController<RequirementType, |
|
|
|
@AutoLog(value = "需求类型-通过id删除") |
|
|
|
@AutoLog(value = "需求类型-通过id删除") |
|
|
|
@ApiOperation(value="需求类型-通过id删除", notes="需求类型-通过id删除") |
|
|
|
@ApiOperation(value="需求类型-通过id删除", notes="需求类型-通过id删除") |
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id,HttpServletRequest req) { |
|
|
|
requirementTypeService.removeById(id); |
|
|
|
RequirementType requirementType = new RequirementType(); |
|
|
|
return Result.OK("删除成功!"); |
|
|
|
QueryWrapper<RequirementType> queryWrapper = QueryGenerator.initQueryWrapper(requirementType, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrapper.eq("upper_id",id); |
|
|
|
|
|
|
|
List<RequirementType> list = requirementTypeService.list(queryWrapper); |
|
|
|
|
|
|
|
if(list.size()>0){ |
|
|
|
|
|
|
|
return Result.error("包含有下级需求类型,无法删除"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
requirementTypeService.removeById(id); |
|
|
|
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|