update:修改法规释疑库查询详情
This commit is contained in:
+16
-14
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user