@@ -11,7 +11,8 @@ public enum SectionEnum { | |||
DEPT_IS_NOT_EXIST(1220302, "部门不存在"), | |||
SECTION_ID_IS_NULL(1220303, "路段id为空"), | |||
SECTION_LIST_IS_NULL(1220304, "路段列表为空"), | |||
DEPT_SECTION_IS_NOT_EXIST(1220305, "部门关联的路段为空"); | |||
DEPT_SECTION_IS_NOT_EXIST(1220305, "部门关联的路段为空"), | |||
DEPT_ID_IS_NULL(1220306, "部门及子部门的id为空"); | |||
/** | |||
* 错误码 |
@@ -117,6 +117,9 @@ public class SectionServiceImpl extends BaseServiceImpl<SectionMapper, Section> | |||
return JsonResult.error(SectionEnum.DEPT_IS_NOT_EXIST.getCode(), SectionEnum.DEPT_IS_NOT_EXIST.getMsg()); | |||
} | |||
List<String> deptList = deptMapper.selectAllChildListById(deptId); | |||
if(StringUtils.isEmpty(deptList) && deptList.size()<=0){ | |||
return JsonResult.error(SectionEnum.DEPT_ID_IS_NULL.getCode(),SectionEnum.DEPT_ID_IS_NULL.getMsg()); | |||
} | |||
//根据部门列表查对应的部门路段数据列表 | |||
List<SectionDept> sectionDeptList = sectionDeptMapper.selectList(Wrappers.<SectionDept>lambdaQuery() | |||
.eq(SectionDept::getTenantId, tenantId) |