fix(测试跟踪): 功能用例自定义字段填写数字导出后未空

--bug=1018206 --user=陈建星 【测试跟踪】用例包含自定义字段,导出后字段内容为空 https://www.tapd.cn/55049933/s/1263227
This commit is contained in:
chenjianxing 2022-10-17 10:35:43 +08:00 committed by jianxing
parent b9aa55dd32
commit ec3fea3458
1 changed files with 6 additions and 6 deletions

View File

@ -1727,12 +1727,7 @@ public class TestCaseService {
if (StringUtils.isNotBlank(field.getValue())) {
Object value = JSON.parseObject(field.getValue());
Map<String, String> optionMap = customSelectValueMap.get(id);
if (value instanceof String) {
if (MapUtils.isNotEmpty(optionMap) && optionMap.containsKey(value)) {
value = optionMap.get(value);
}
map.put(customNameMap.get(id), value.toString());
} else if (value instanceof List) {
if (value instanceof List) {
List<String> results = new ArrayList<>();
List values = (List) value;
values.forEach(item -> {
@ -1741,6 +1736,11 @@ public class TestCaseService {
}
});
map.put(customNameMap.get(id), results.toString());
} else {
if (MapUtils.isNotEmpty(optionMap) && optionMap.containsKey(value)) {
value = optionMap.get(value);
}
map.put(customNameMap.get(id), value.toString());
}
}
}