update:修改法规释疑库查询详情

This commit is contained in:
sunzheng
2024-10-09 17:54:57 +08:00
parent 5792b75fe2
commit 19ff0e7493
@@ -167,21 +167,23 @@ public class LawsRegulationsQuestionLibraryServiceImpl extends ServiceImpl<LawsR
String regulationId1 = regulationIdList.get(i);
String number = regulationNumberList.get(i);
LawsDocumentSplit lawsDocumentSplit = documentSplitMapper.selectById(regulationId1);
regulationVo.setId(regulationId1);
regulationVo.setItemNum(lawsDocumentSplit.getItemNum());
regulationVo.setItemTitle(lawsDocumentSplit.getItemTitle());
regulationVo.setTitleTranslation(lawsDocumentSplit.getTitleTranslation());
regulationVo.setItemContent(lawsDocumentSplit.getItemContent());
regulationVo.setTranslation(lawsDocumentSplit.getTranslation());
// 找到最后一个空格的位置
int lastSpaceIndex = number.lastIndexOf(" ");
// 确保空格存在并且位置不在字符串的开始或结束
if (lastSpaceIndex != -1 && lastSpaceIndex < number.length() - 1) {
String key = number.substring(0, lastSpaceIndex);
regulationVo.setStandardNumber(key);
regulationVo.setStandardId(standardNumberMap.get(key));
if (!Objects.isNull(lawsDocumentSplit)) {
regulationVo.setId(regulationId1);
regulationVo.setItemNum(lawsDocumentSplit.getItemNum());
regulationVo.setItemTitle(lawsDocumentSplit.getItemTitle());
regulationVo.setTitleTranslation(lawsDocumentSplit.getTitleTranslation());
regulationVo.setItemContent(lawsDocumentSplit.getItemContent());
regulationVo.setTranslation(lawsDocumentSplit.getTranslation());
// 找到最后一个空格的位置
int lastSpaceIndex = number.lastIndexOf(" ");
// 确保空格存在并且位置不在字符串的开始或结束
if (lastSpaceIndex != -1 && lastSpaceIndex < number.length() - 1) {
String key = number.substring(0, lastSpaceIndex);
regulationVo.setStandardNumber(key);
regulationVo.setStandardId(standardNumberMap.get(key));
}
regulationList.add(regulationVo);
}
regulationList.add(regulationVo);
}
lawsRegulationsQuestionLibrary.setRegulationList(regulationList);
}