|
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -109,4 +110,16 @@ public class StructureController extends BaseController {
|
|
|
|
|
|
return fail("未找到");
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据父节点获取子节点")
|
|
|
+ @GetMapping("/getChildByParent")
|
|
|
+ @SafetyProcess
|
|
|
+ public Result getChildByParent(@Param(value = "parentCode") String parentCode, @Param(value = "institutionNo") String institutionNo){
|
|
|
+ try {
|
|
|
+ List<StructureEntity> list = service.getChildByParent(parentCode,institutionNo);
|
|
|
+ return success(list);
|
|
|
+ }catch (Exception e){
|
|
|
+ return fail();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|