|
|
@ -224,6 +224,15 @@ public class DuplicateTaskRunner {
|
|
|
|
|
|
|
|
|
|
|
|
private boolean notifyTaskCompletion(String taskNo, Long tenantNo, Long accountNo, double maxSimilarity, List<OcrPictureInfo> pictures, List<TaskCompletionRequest.HisPictureRepeat> historyLists) {
|
|
|
|
private boolean notifyTaskCompletion(String taskNo, Long tenantNo, Long accountNo, double maxSimilarity, List<OcrPictureInfo> pictures, List<TaskCompletionRequest.HisPictureRepeat> historyLists) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
// 去重
|
|
|
|
|
|
|
|
List<TaskCompletionRequest.HisPictureRepeat> hisPictureRepeats = historyLists.stream()
|
|
|
|
|
|
|
|
.collect(Collectors.collectingAndThen(
|
|
|
|
|
|
|
|
Collectors.toMap(
|
|
|
|
|
|
|
|
TaskCompletionRequest.HisPictureRepeat::getHisTaskNo, // 按 hisTaskNo 作为 key
|
|
|
|
|
|
|
|
hisPictureRepeat -> hisPictureRepeat, // 保留整个对象
|
|
|
|
|
|
|
|
(existing, replacement) -> existing), // 保留第一个出现的元素
|
|
|
|
|
|
|
|
map -> new ArrayList<>(map.values())
|
|
|
|
|
|
|
|
));
|
|
|
|
// 构造任务完成数据
|
|
|
|
// 构造任务完成数据
|
|
|
|
TaskCompletionRequest.TaskCompletionData data = new TaskCompletionRequest.TaskCompletionData();
|
|
|
|
TaskCompletionRequest.TaskCompletionData data = new TaskCompletionRequest.TaskCompletionData();
|
|
|
|
data.setTenantNo(tenantNo);
|
|
|
|
data.setTenantNo(tenantNo);
|
|
|
@ -243,7 +252,7 @@ public class DuplicateTaskRunner {
|
|
|
|
repeat.setImgName(p.getImgName());
|
|
|
|
repeat.setImgName(p.getImgName());
|
|
|
|
repeat.setImgUrl(p.getImageUrl());
|
|
|
|
repeat.setImgUrl(p.getImageUrl());
|
|
|
|
repeat.setDynamicFields(new HashMap<>()); // 动态字段待补充
|
|
|
|
repeat.setDynamicFields(new HashMap<>()); // 动态字段待补充
|
|
|
|
repeat.setHisPictureRepeatList(historyLists);
|
|
|
|
repeat.setHisPictureRepeatList(hisPictureRepeats);
|
|
|
|
return repeat;
|
|
|
|
return repeat;
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
.collect(Collectors.toList());
|
|
|
|