1.根据code获取字典树
2.解决数据中心bug 3.优化暂态报表的查询语句将influxdb转为mysql
This commit is contained in:
@@ -48,10 +48,18 @@ public class DicController extends BaseController {
|
||||
@ApiOperation("获取字典树")
|
||||
public HttpResult<List<DicVO>> getDicTree(){
|
||||
String methodDescribe = getMethodDescribe("getDicTree");
|
||||
List<DicVO> list = dicService.getDicTree();
|
||||
List<DicVO> list = dicService.getDicTree(null);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@GetMapping("/codeDicTree")
|
||||
@ApiOperation("根据code获取字典树")
|
||||
public HttpResult<List<DicVO>> getCodeDicTree(String code){
|
||||
String methodDescribe = getMethodDescribe("getCodeDicTree");
|
||||
List<DicVO> list = dicService.getDicTree(code);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
/**
|
||||
* 新增
|
||||
* @param dicParam
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface IDicService {
|
||||
* 获取树
|
||||
* @return
|
||||
*/
|
||||
List<DicVO> getDicTree();
|
||||
List<DicVO> getDicTree(String code);
|
||||
|
||||
/**
|
||||
* 功能描述:新增
|
||||
|
||||
@@ -80,10 +80,10 @@ public class DicServiceImpl extends ServiceImpl<DicMapper, Dic> implements IDicS
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DicVO> getDicTree() {
|
||||
public List<DicVO> getDicTree(String code) {
|
||||
List<DicVO> list = dicMapper.getAllDic();
|
||||
return list.stream()
|
||||
.filter(fun -> Objects.equals(TemplateTreeEnum.FATHER_PID,fun.getPid()))
|
||||
.filter(fun -> Objects.equals(TemplateTreeEnum.FATHER_PID,fun.getPid())&&fun.getCode().equals(code))
|
||||
.peek(funS -> funS.setChildren(getChildList(funS, list)))
|
||||
.sorted(Comparator.comparingInt(DicVO::getSort))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user