|
@@ -11,7 +11,6 @@ import com.nokia.vo.flow.UserTreeReq;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.*;
|
|
|
import java.util.Map.Entry;
|
|
@@ -162,33 +161,17 @@ public class FlowService {
|
|
|
// 把归类后的用户放入第三层
|
|
|
for (Entry<Area, Object> entry : userMap.entrySet()) {
|
|
|
if (entry.getKey().getTypeCode() < 3) {
|
|
|
- if (entry.getKey().getAreaId() == null
|
|
|
- || top.get(entry.getKey().getAreaId()) == null
|
|
|
- || result.get(top.get(entry.getKey().getAreaId())) == null) {
|
|
|
- continue;
|
|
|
- }
|
|
|
// 第一层的child
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) result
|
|
|
.get(top.get(entry.getKey().getAreaId())).get("child");
|
|
|
- if (CollectionUtils.isEmpty(list)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
// 省级和地市级用户
|
|
|
list.get(0).put("child", entry.getValue());
|
|
|
} else {
|
|
|
// 第一层的child
|
|
|
// System.out.println(entry);
|
|
|
// System.out.println(result);
|
|
|
- if (entry.getKey().getParentId() == null
|
|
|
- || top.get(entry.getKey().getParentId()) == null
|
|
|
- || result.get(top.get(entry.getKey().getParentId())) == null) {
|
|
|
- continue;
|
|
|
- }
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) result
|
|
|
.get(top.get(entry.getKey().getParentId())).get("child");
|
|
|
- if (CollectionUtils.isEmpty(list) || second.get(entry.getKey().getAreaId()) == null) {
|
|
|
- continue;
|
|
|
- }
|
|
|
// 区县级用户
|
|
|
list.get(second.get(entry.getKey().getAreaId())).put("child", entry.getValue());
|
|
|
}
|