From 81ebb3e8c1fad455072b4a69212319603d9c9790 Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Thu, 24 Jul 2025 10:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E7=A4=BE=E5=8C=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/domain/bo/TbCommunityBo.java | 4 ++-- .../domain/vo/ServiceWorkOrderAnalysisVo.java | 2 ++ .../impl/CustomerNoticesServiceImpl.java | 20 ++++++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbCommunityBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbCommunityBo.java index 8cb9e33..1b11acd 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbCommunityBo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/TbCommunityBo.java @@ -70,13 +70,13 @@ public class TbCommunityBo extends BaseEntity { /** * 经度 */ - @NotBlank(message = "经度不能为空", groups = {AddGroup.class, EditGroup.class}) + // @NotBlank(message = "经度不能为空", groups = {AddGroup.class, EditGroup.class}) private String lon; /** * 维度 */ - @NotBlank(message = "维度不能为空", groups = {AddGroup.class, EditGroup.class}) + // @NotBlank(message = "维度不能为空", groups = {AddGroup.class, EditGroup.class}) private String lat; /** diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrderAnalysisVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrderAnalysisVo.java index f8b81c4..5941316 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrderAnalysisVo.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/ServiceWorkOrderAnalysisVo.java @@ -18,6 +18,7 @@ public class ServiceWorkOrderAnalysisVo { private String date; private String dayOfWeek; private long count; + private long weekCount; public LineChartVo() {} @@ -25,6 +26,7 @@ public class ServiceWorkOrderAnalysisVo { this.date = date; this.dayOfWeek = dayOfWeek; this.count = count; + this.weekCount = weekCount; } } @Data diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java index 7d0bcd4..9c7918d 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerNoticesServiceImpl.java @@ -3,6 +3,7 @@ package org.dromara.property.service.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjectUtil; +import jodd.util.StringUtil; import org.apache.dubbo.config.annotation.DubboReference; import org.dromara.common.core.domain.R; import org.dromara.common.core.utils.MapstructUtils; @@ -58,7 +59,24 @@ public class CustomerNoticesServiceImpl implements ICustomerNoticesService { */ @Override public CustomerNoticesVo queryById(Long id) { - return baseMapper.selectVoById(id); + List residentPeople = residentPersonMapper.selectList(); + CustomerNoticesVo customerNoticesVo = baseMapper.selectVoById(id); + if (CollUtil.isNotEmpty(residentPeople)) { + ResidentPerson residentPerson = residentPeople.stream() + .filter(vo -> vo.getId() != null && vo.getId().equals(customerNoticesVo.getIssuers())).findFirst().orElse(null); + customerNoticesVo.setIssuersName(residentPerson.getUserName()); + if (ObjectUtil.isNotEmpty(customerNoticesVo.getNoticePersion())) { + List list = Arrays.asList(customerNoticesVo.getNoticePersion().split(",")); + List filteredList = residentPeople.stream() + .filter(person -> list.contains(person.getId().toString())) + .collect(Collectors.toList()); + String usernames = filteredList.stream() + .map(ResidentPerson::getUserName) // 假设ResidentPerson类有一个getUserName方法 + .collect(Collectors.joining(",")); + customerNoticesVo.setIssuersName(StringUtils.isNotBlank(usernames)?usernames:null); + } + } + return customerNoticesVo; } /**