生产单板材造型新增大板等字段,ES板材造型数据压缩保存,标签Bug修改

This commit is contained in:
liuzhaotian
2024-12-06 16:05:57 +08:00
parent 3252fc9c84
commit e2cc2b6fef
25 changed files with 394 additions and 215 deletions
@@ -168,18 +168,16 @@ public class ESDocumentServiceImpl implements ESDocumentService {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Date date = new Date();
documents.forEach(esDocument -> {
// 假设esDocument有一个ID集。如果没有,则应该抛出异常或进行相应的处理。
if (CharSequenceUtil.isBlank(esDocument.getId())) {
throw new IllegalArgumentException("更新操作的文档ID不能为空");
}
esDocument.setCreator(loginUser.getNickname());
esDocument.setUpdater(loginUser.getNickname());
esDocument.setOrganId(loginUser.getOrganId());
esDocument.setUpdateTime(simpleDateFormat.format(date));
br.operations(op -> op.update(u -> u
br.operations(op -> op.index(idx -> idx
.index(idxName)
.id(esDocument.getId())
.action(a -> a
.doc(esDocument))));
.document(esDocument)));
});
return elasticsearchClient.bulk(br.build());
}