add 标准法规通用拆分id返回
This commit is contained in:
+19
-29
@@ -169,8 +169,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
}
|
||||
// 是否收藏判断标识
|
||||
collectionFlag(infoPage.getRecords());
|
||||
// 标准拆分标识
|
||||
splitFlag(infoPage.getRecords());
|
||||
|
||||
// 待处理
|
||||
return infoPage;
|
||||
@@ -181,40 +179,30 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
* @Date: 2023/10/19 15:36
|
||||
* @Description: 标准拆分标识
|
||||
**/
|
||||
private void splitFlag(List<Map<String, Object>> records) {
|
||||
// 获取全部id集合
|
||||
List<String> ids = records.stream().map(kv ->
|
||||
String.valueOf(kv.get("id"))).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(ids)) return;
|
||||
|
||||
private void splitFlag(Map<String, Object> map) {
|
||||
String id = (String) map.get("id");
|
||||
// 查询标准拆分表
|
||||
LambdaQueryWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(SarFileSplitInfoEO::getStandardId, ids);
|
||||
queryWrapper.eq(SarFileSplitInfoEO::getStandardId, id);
|
||||
queryWrapper.isNotNull(SarFileSplitInfoEO::getPublishBeforeId);
|
||||
queryWrapper.isNotNull(SarFileSplitInfoEO::getFileType);
|
||||
List<SarFileSplitInfoEO> sarFileSplitInfoEOList = sarFileSplitInfoService.list(queryWrapper);
|
||||
|
||||
if (CollectionUtils.isEmpty(sarFileSplitInfoEOList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, String> flagMap = new HashMap<>();
|
||||
sarFileSplitInfoEOList.forEach(e -> flagMap.put(e.getStandardId() + "," + e.getFileType(), e.getId()));
|
||||
records.forEach(map -> {
|
||||
String id = (String) map.get("id");
|
||||
map.put(FieldCommon.FILE_PUBLISH_OF_ORIGINAL + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_PUBLISH_OF_ORIGINAL));
|
||||
map.put(FieldCommon.FILE_MODIFICATION_LIST + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_MODIFICATION_LIST));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_REVIEW + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_DRAFT_FOR_REVIEW));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_APPROVAL + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_DRAFT_FOR_APPROVAL));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_COMMENT + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_DRAFT_FOR_COMMENT));
|
||||
map.put(FieldCommon.FILE_DRAFT + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(id + "," + FieldCommon.FILE_DRAFT));
|
||||
});
|
||||
sarFileSplitInfoEOList.forEach(e -> flagMap.put(e.getFileType(), e.getId()));
|
||||
|
||||
map.put(FieldCommon.FILE_PUBLISH_OF_ORIGINAL + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_PUBLISH_OF_ORIGINAL));
|
||||
map.put(FieldCommon.FILE_MODIFICATION_LIST + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_MODIFICATION_LIST));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_REVIEW + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_DRAFT_FOR_REVIEW));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_APPROVAL + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_DRAFT_FOR_APPROVAL));
|
||||
map.put(FieldCommon.FILE_DRAFT_FOR_COMMENT + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_DRAFT_FOR_COMMENT));
|
||||
map.put(FieldCommon.FILE_DRAFT + FieldCommon._STANDARD_SPLIT,
|
||||
flagMap.get(FieldCommon.FILE_DRAFT));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1041,6 +1029,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
stringObjectMap.put("checkList", list);
|
||||
}
|
||||
|
||||
// 标准拆分标识
|
||||
splitFlag(stringObjectMap);
|
||||
// 对返回的字段做处理
|
||||
return stringObjectMap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user