|
|
|
|
@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springblade.common.cache.DictBizCache; |
|
|
|
|
import org.springblade.modules.business.entity.Appeal; |
|
|
|
|
import org.springblade.modules.business.entity.AppealVisitor; |
|
|
|
|
import org.springblade.modules.business.entity.DataEntity; |
|
|
|
|
import org.springblade.modules.business.service.IAppealService; |
|
|
|
|
import org.springblade.modules.business.service.IAppealVisitorService; |
|
|
|
|
import org.springblade.modules.business.service.ILargeScreenService; |
|
|
|
|
@ -315,6 +316,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { |
|
|
|
|
wrapper.select(Appeal::getId, Appeal::getFirstRegTime, Appeal::getDisputeName); |
|
|
|
|
wrapper.eq(Appeal::getStreetId, streetId); |
|
|
|
|
wrapper.eq(Appeal::getSkipGrant, 1); |
|
|
|
|
wrapper.orderByDesc(Appeal::getCreateTime); |
|
|
|
|
IPage<Appeal> iPage = appealService.page(page, wrapper); |
|
|
|
|
|
|
|
|
|
// 给每条数据赋值来访人姓名
|
|
|
|
|
@ -333,8 +335,8 @@ public class LargeScreenServiceImpl implements ILargeScreenService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Map<String, Map<String, Object>> getAppealHot() { |
|
|
|
|
Map<String, Map<String, Object>> map = new HashMap(); |
|
|
|
|
public Map<String, List<DataEntity>> getAppealHot() { |
|
|
|
|
Map<String, List<DataEntity>> map = new HashMap(); |
|
|
|
|
// 化解成功状态数组
|
|
|
|
|
List<Integer> state = new ArrayList<>(); |
|
|
|
|
state.add(2); |
|
|
|
|
@ -352,23 +354,33 @@ public class LargeScreenServiceImpl implements ILargeScreenService { |
|
|
|
|
Map<String, List<Appeal>> street = appeals.stream().collect(Collectors.groupingBy(Appeal::getStreet)); |
|
|
|
|
Set<String> names = street.keySet(); |
|
|
|
|
|
|
|
|
|
// 街道对应的数量
|
|
|
|
|
Map<String, Object> streetMap = new HashMap<>(); |
|
|
|
|
// 封装到数据对象
|
|
|
|
|
List<DataEntity> strees = new ArrayList<>(); |
|
|
|
|
for (String name : names) { |
|
|
|
|
streetMap.put(name, street.get(name).size()); |
|
|
|
|
DataEntity entity = new DataEntity(); |
|
|
|
|
entity.setName(name); |
|
|
|
|
entity.setNum(street.get(name).size()); |
|
|
|
|
strees.add(entity); |
|
|
|
|
} |
|
|
|
|
map.put("street", streetMap); |
|
|
|
|
// 倒序
|
|
|
|
|
List<DataEntity> streeList = strees.stream().sorted(Comparator.comparing(DataEntity::getNum).reversed()).collect(Collectors.toList()); |
|
|
|
|
map.put("street", streeList); |
|
|
|
|
|
|
|
|
|
// 根据部门分组
|
|
|
|
|
Map<String, List<Appeal>> town = appeals.stream().collect(Collectors.groupingBy(Appeal::getName)); |
|
|
|
|
Set<String> depts = town.keySet(); |
|
|
|
|
|
|
|
|
|
// 部门对应的数量
|
|
|
|
|
Map<String, Object> townMap = new HashMap<>(); |
|
|
|
|
// 封装到数据对象
|
|
|
|
|
List<DataEntity> towns = new ArrayList<>(); |
|
|
|
|
for (String name : depts) { |
|
|
|
|
townMap.put(name, town.get(name).size()); |
|
|
|
|
DataEntity entity = new DataEntity(); |
|
|
|
|
entity.setName(name); |
|
|
|
|
entity.setNum(town.get(name).size()); |
|
|
|
|
towns.add(entity); |
|
|
|
|
} |
|
|
|
|
map.put("town", townMap); |
|
|
|
|
// 倒序
|
|
|
|
|
List<DataEntity> townList = towns.stream().sorted(Comparator.comparing(DataEntity::getNum).reversed()).collect(Collectors.toList()); |
|
|
|
|
map.put("town", townList); |
|
|
|
|
|
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|