Commit 6eeed5b9 authored by suhuiguang's avatar suhuiguang

1.bug

parent a9018507
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tcm.flc.api.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto;
import java.util.Collection;
......@@ -78,5 +79,5 @@ public interface IRegUnitInfoService {
void setAllDataDictionaryList();
List<DataDictionary> getDictionaryWithTreeFillId(String type);
List<Menu> getDictionaryWithTreeFillId(String type) throws Exception;
}
......@@ -158,7 +158,7 @@ public class RegUnitInfoController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/dataDictionaryIdFillMenu")
@ApiOperation(httpMethod = "GET", value = "根据字典类型查询字典,id为SequenceNbr", notes = "根据字典类型查询字典,id为SequenceNbr")
public ResponseModel<List<DataDictionary>> getDictionaryWithTreeFillId(@RequestParam String type) {
public ResponseModel<List<Menu>> getDictionaryWithTreeFillId(@RequestParam String type) throws Exception {
return ResponseHelper.buildResponse(iRegUnitInfoService.getDictionaryWithTreeFillId(type));
}
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
......@@ -475,9 +476,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
@Override
public List<DataDictionary> getDictionaryWithTreeFillId(String type) {
public List<Menu> getDictionaryWithTreeFillId(String type) throws Exception {
List<DataDictionary> dictionaries = this.initAllDataDictionaryList();
return dictionaries.stream().parallel().filter(d->d.getType().equals(type)).collect(Collectors.toList());
List<DataDictionary> temp = dictionaries.stream().parallel().filter(d->d.getType().equals(type)).collect(Collectors.toList());
return TreeParser.getTree(null, temp, DataDictionary.class.getName(), "getSequenceNbr", 2,
"getName", "getParent", null, "getCode");
}
private List<DataDictionary> initAllDataDictionaryList() {
......
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