指标库:修复“获取原子指标配置(指标库列表中点击衍生)”
This commit is contained in:
parent
bbcab977bd
commit
db18f06c49
@ -100,8 +100,7 @@ public class TargetController {
|
|||||||
@Operation(summary = "获取原子指标配置(指标库列表中点击衍生)")
|
@Operation(summary = "获取原子指标配置(指标库列表中点击衍生)")
|
||||||
@PostMapping("/getDetailExpandTarget")
|
@PostMapping("/getDetailExpandTarget")
|
||||||
public R<JSONObject> getDetailExpandTarget(@RequestBody JSONObject params) {
|
public R<JSONObject> getDetailExpandTarget(@RequestBody JSONObject params) {
|
||||||
JSONObject result;
|
JSONObject result = targetService.getDetailExpandTarget(params);
|
||||||
result = targetService.getDetailExpandTarget(params);
|
|
||||||
Page<?> list = tableColumnService.getDataByTableName(result.getJSONObject("list"));
|
Page<?> list = tableColumnService.getDataByTableName(result.getJSONObject("list"));
|
||||||
result.put("list", list);
|
result.put("list", list);
|
||||||
result.put("columnList", tableColumnService.getColumnsByTableName(result.getString("tableName")));
|
result.put("columnList", tableColumnService.getColumnsByTableName(result.getString("tableName")));
|
||||||
|
@ -456,9 +456,11 @@ public class TargetServiceImpl extends ServiceImpl<TargetMapper, Target>
|
|||||||
CheckUtils.checkEmpty(id, "指标ID");
|
CheckUtils.checkEmpty(id, "指标ID");
|
||||||
target = targetMapper.selectById(id);
|
target = targetMapper.selectById(id);
|
||||||
List<TargetOption> optionList = new ArrayList<>();
|
List<TargetOption> optionList = new ArrayList<>();
|
||||||
while (id != null) {
|
Target parent = targetMapper.selectById(id);
|
||||||
|
while (!StringUtils.isEmpty(id)) {
|
||||||
optionList.addAll(0, targetOptionMapper.selectList(new QueryWrapper<TargetOption>().eq("target_id", id)));
|
optionList.addAll(0, targetOptionMapper.selectList(new QueryWrapper<TargetOption>().eq("target_id", id)));
|
||||||
id = target.getParent();
|
id = parent.getParent();
|
||||||
|
parent = targetMapper.selectById(id);
|
||||||
}
|
}
|
||||||
return getDetailTarget(optionList, target);
|
return getDetailTarget(optionList, target);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user