feat: 零部件翻译

This commit is contained in:
2024-01-29 18:04:31 +08:00
parent a74b0c2aed
commit 555bf17664
@@ -157,6 +157,9 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
@Resource
private DocumentSplitMapper documentSplitMapper;
@Resource
private PartNameService partNameService;
/**
* @Author: liao
* @Date: 2023/8/23 16:57
@@ -465,6 +468,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
LawsStandardization lawsStandardization = lawsStandardizationService.getById(value);
resultMap.put(key, value);
resultMap.put(key + FieldCommon._DICT_TEXT, lawsStandardization.getName());
} else if (FieldCommon.PART_NAME.equals(key) && StringUtils.isNotBlank(value)) {
// 如果是零部件
LambdaQueryWrapper<PartName> partNameLambdaQueryWrapper = new LambdaQueryWrapper<>();
partNameLambdaQueryWrapper.in(PartName::getCode, Arrays.asList(value.split(",")));
List<PartName> partNameList = partNameService.list(partNameLambdaQueryWrapper);
resultMap.put(key, value);
resultMap.put(key + FieldCommon._DICT_TEXT, partNameList.stream().map(PartName::getName).collect(Collectors.joining(",")));
}
}