Commit f9692cf7 authored by 赵啸非's avatar 赵啸非

修改评价统计更新与组合查询

parent 93211e08
...@@ -80,18 +80,23 @@ public class PhQueueStatController extends BaseCRUDJsonBodyMappingController<PhQ ...@@ -80,18 +80,23 @@ public class PhQueueStatController extends BaseCRUDJsonBodyMappingController<PhQ
Map<String, String> windowFromnumMap = cacheService.hgetAll(RedisKey.KEY_SITE_QUEUE_WINDOW_CHCHE + siteId); Map<String, String> windowFromnumMap = cacheService.hgetAll(RedisKey.KEY_SITE_QUEUE_WINDOW_CHCHE + siteId);
Map<String, String> bussinessMap = cacheService.hgetAll(RedisKey.KEY_SITE_QUEUE_BUSNIESS_CHCHE + siteId); Map<String, String> bussinessMap = cacheService.hgetAll(RedisKey.KEY_SITE_QUEUE_BUSNIESS_CHCHE + siteId);
List<Map<String, Integer>> m1 = sectionNameMap.entrySet().stream() List<Map<String, String>> m1 = sectionNameMap.entrySet().stream()
.sorted((e1, e2) -> Integer.compare(Integer.parseInt(e2.getValue()), Integer.parseInt(e1.getValue()))) .sorted((e1, e2) -> Integer.compare(Integer.parseInt(e2.getValue()), Integer.parseInt(e1.getValue())))
.map(item->{ .map(item->new HashMap<String,String>(){{ put(item.getKey(), item.getValue());}}).collect(Collectors.toList());
Map<String, Integer> map = new HashMap<>(); List<Map<String, String>> m2 = hallNameMap.entrySet().stream()
map.put(item.getKey(), Integer.parseInt(item.getValue())); .sorted((e1, e2) -> Integer.compare(Integer.parseInt(e2.getValue()), Integer.parseInt(e1.getValue())))
return map; .map(item->new HashMap<String,String>(){{ put(item.getKey(), item.getValue());}}).collect(Collectors.toList());
}).collect(Collectors.toList()); List<Map<String, String>> m3 = windowFromnumMap.entrySet().stream()
.sorted((e1, e2) -> Integer.compare(Integer.parseInt(e2.getValue()), Integer.parseInt(e1.getValue())))
.map(item->new HashMap<String,String>(){{ put(item.getKey(), item.getValue());}}).collect(Collectors.toList());
List<Map<String, String>> m4 = bussinessMap.entrySet().stream()
.sorted((e1, e2) -> Integer.compare(Integer.parseInt(e2.getValue()), Integer.parseInt(e1.getValue())))
.map(item->new HashMap<String,String>(){{ put(item.getKey(), item.getValue());}}).collect(Collectors.toList());
this.addDict(model, "sectionNameList", m1); this.addDict(model, "sectionNameList", m1);
this.addDict(model, "hallNameList", hallNameMap); this.addDict(model, "hallNameList", m2);
this.addDict(model, "windowFromnumList", windowFromnumMap); this.addDict(model, "windowFromnumList", m3);
this.addDict(model, "businessList", bussinessMap); this.addDict(model, "businessList", m4);
this.addDict(model, "groupList", GroupListEnum.getEnumMap()); this.addDict(model, "groupList", GroupListEnum.getEnumMap());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment