From e8f0b3422d307c686b3a81269f9e9e4fb34a846e Mon Sep 17 00:00:00 2001 From: wjli <591616088@qq.com> Date: 星期五, 12 四月 2024 10:49:46 +0800 Subject: [PATCH] 指纹登陆返回客户端加密信息 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java index ad1ec24..83a7f6e 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java @@ -33,6 +33,7 @@ import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.util.*; +import java.util.stream.Collectors; /** * @author whj @@ -199,14 +200,20 @@ Map<String, Object> map = new HashMap<String, Object>(); map.put("count", list.size()); map.put("sum", sum); - map.put("name", ""); - if (list.size() > 0) { - OrderTask orderTask = list.get(0); - String areaSectionId = orderTask.getAreaSectionId(); - AreaSection a = iAreaSectionService.getById(areaSectionId); - Area area2 = iAreaService.getById(orderTask.getAreaId()); - map.put("name", area2.getName() + a.getName()); - list.clear(); + String name = area.getName(); + Map<String, List<OrderTask>> collect = list.stream().collect(Collectors.groupingBy(OrderTask::getAreaSectionId)); + for (Map.Entry<String, List<OrderTask>> stringListEntry : collect.entrySet()) { + String key = stringListEntry.getKey(); + List<OrderTask> value = stringListEntry.getValue(); + if(value.size()>0){ + AreaSection a = iAreaSectionService.getById(key); + name+=a.getName(); + } + } + if(name.equals(area.getName())){ + map.put("name", ""); + }else { + map.put("name", name); } return new ResultUtil<Object>().setData(map); } @@ -613,7 +620,7 @@ String imgO = orderTask.getImg(); orderTask.setImg(imgO+","+img); }else{ - orderTask.setImg(","+img); + orderTask.setImg(img); } } -- Gitblit v1.9.1