1.根据code获取字典树

2.解决数据中心bug
3.优化暂态报表的查询语句将influxdb转为mysql
This commit is contained in:
wr
2023-08-28 16:26:16 +08:00
parent 04960a3911
commit 47e6213f73
13 changed files with 203 additions and 362 deletions

View File

@@ -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

View File

@@ -19,7 +19,7 @@ public interface IDicService {
* 获取树
* @return
*/
List<DicVO> getDicTree();
List<DicVO> getDicTree(String code);
/**
* 功能描述:新增

View File

@@ -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());