Commit 5fe2353c authored by 胡秀武's avatar 胡秀武

胡秀武:模型列表bug解决

parent 25c925a5
......@@ -94,7 +94,7 @@ public class ModelBaseController {
*/
@ApiOperation("模型-查询列表")
@GetMapping("/get/model/getModeBaselList")
public ResponseVO getModeBaselList(@ApiParam(value = "所属级别") @RequestParam(value = "belongLevel", required = false) String belongLevel,
public ResponseVO getModeBaselList(@ApiParam(value = "所属级别") @RequestParam(value = "belongLevel",defaultValue = "0") String belongLevel,
@ApiParam(value = "模型编码") @RequestParam(value = "modelCode", required = false) String modelCode,
@ApiParam(value = "当前页") @RequestParam(value = "currentPage") Integer currentPage,
@ApiParam(value = "每页数量") @RequestParam(value = "pageSize") Integer pageSize,
......
......@@ -119,13 +119,18 @@ public class ModelSubscribeServiceImpl implements ModelSubscribeService {
return ResponseVO.ok(result);
}
/**
* 合并list设置子类
* @param modelGroupList
* @param organList
* @param function
* @return
*/
private List<TreeNode> setChildren(List<TreeNode> modelGroupList, List<TreeNode> organList, BiFunction<TreeNode,TreeNode,Boolean> function) {
organList.forEach(org
->{
modelGroupList.forEach(group->{
//org.getCompanyCode().equals(group.getCompanyCode()
if (function.apply(org,group)){
if(org.getChildren() == null){
organList.forEach(org -> {
modelGroupList.forEach(group -> {
if (function.apply(org, group)) {
if (org.getChildren() == null) {
org.setChildren(new LinkedList<>());
}
org.getChildren().add(group);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment