待办去重
This commit is contained in:
@@ -5,9 +5,8 @@ import com.cool.store.enums.AuditStatusEnum;
|
||||
import com.cool.store.enums.NodeNoEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@@ -120,7 +119,9 @@ public class PointAuditRecordDO {
|
||||
public static List<PointTodoInfoDO> convertTODO(PointAuditRecordDO nextAuditRecord){
|
||||
List<PointTodoInfoDO> resultList = new ArrayList<>();
|
||||
List<String> handlerUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
|
||||
for (String userId : handlerUserIds) {
|
||||
//去重
|
||||
List<String> finalHandlerUserIds = new ArrayList<>(new HashSet<>(handlerUserIds));
|
||||
for (String userId : finalHandlerUserIds) {
|
||||
PointTodoInfoDO todo = new PointTodoInfoDO();
|
||||
todo.setPointId(nextAuditRecord.getPointId());
|
||||
todo.setNodeNo(nextAuditRecord.getNodeNo());
|
||||
|
||||
@@ -1108,7 +1108,7 @@ public class PointServiceImpl implements PointService {
|
||||
* @return
|
||||
*/
|
||||
private List<String> getUserIdsByPositionIds(Pair<List<String>, List<String>> userIdsAndPositionIds, Map<String, List<String>> userIdsMap) {
|
||||
List<String> userIds = new ArrayList<>();
|
||||
Set<String> userIds = new HashSet<>();
|
||||
if(CollectionUtils.isNotEmpty(userIdsAndPositionIds.getKey())){
|
||||
userIds.addAll(userIdsAndPositionIds.getKey());
|
||||
}
|
||||
@@ -1120,7 +1120,7 @@ public class PointServiceImpl implements PointService {
|
||||
}
|
||||
});
|
||||
}
|
||||
return userIds;
|
||||
return new ArrayList<>(userIds);
|
||||
}
|
||||
|
||||
private PointAuditRecordDO getNextAuditRecord(Integer currentNodeNo, Map<Integer, PointAuditRecordDO> auditRecordMap){
|
||||
|
||||
Reference in New Issue
Block a user