From 7c5bd333cc1e79f05a6a11d7ea3a9d73511b78a8 Mon Sep 17 00:00:00 2001 From: zzc Date: Tue, 22 Apr 2025 15:22:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9A=8F=E8=AE=BF?= =?UTF-8?q?=E5=88=86=E5=B8=83=E6=B2=A1=E6=9C=89=E5=85=AC=E5=85=B1=E9=98=9F?= =?UTF-8?q?=E5=88=97=E5=90=8D=E7=A7=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StatisticsServiceImpl.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/StatisticsServiceImpl.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/StatisticsServiceImpl.java index 14db889a..2aaed127 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/StatisticsServiceImpl.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/StatisticsServiceImpl.java @@ -3,9 +3,12 @@ package com.acupuncture.system.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; import com.acupuncture.common.constant.DiseaseMapping; +import com.acupuncture.common.core.redis.RedisCache; import com.acupuncture.common.utils.SecurityUtils; import com.acupuncture.system.domain.dto.StatisticsDto; +import com.acupuncture.system.domain.vo.FmsFollowupVo; import com.acupuncture.system.domain.vo.StatisticsVo; import com.acupuncture.system.persist.dao.StatisticsDao; import com.acupuncture.system.service.StatisticsService; @@ -13,6 +16,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -25,6 +29,9 @@ import java.util.stream.Collectors; public class StatisticsServiceImpl implements StatisticsService { @Resource private StatisticsDao statisticsDao; + @Resource + private RedisCache redisCache; + public static String COMMON_FOLLOWUP_QUEUE = "common_followup_queue"; @Override public StatisticsVo.PatientVo queryPatientStatistics(StatisticsDto.Query dto) { @@ -137,8 +144,24 @@ public class StatisticsServiceImpl implements StatisticsService { @Override public List querySfStatistics(StatisticsDto.Query dto) { - StatisticsVo.SffbVo sffbVo = new StatisticsVo.SffbVo(); - return statisticsDao.querySfStatistics(dto, SecurityUtils.getTenantId()); + List cacheList = redisCache.getCacheList(COMMON_FOLLOWUP_QUEUE); + Map map = new HashMap<>(); + if (CollUtil.isNotEmpty(cacheList)) { + List followupQueueVOS = BeanUtil.copyToList(cacheList, FmsFollowupVo.FollowupQueueVO.class); + map = followupQueueVOS.stream().collect(Collectors.toMap(FmsFollowupVo.FollowupQueueVO::getId, Function.identity())); + } + List dlVos = statisticsDao.querySfStatistics(dto, SecurityUtils.getTenantId()); + if (CollUtil.isNotEmpty(dlVos)) { + for (StatisticsVo.SffbVo.DlVo dlVo : dlVos) { + if (StrUtil.isEmpty(dlVo.getQueueName())) { + FmsFollowupVo.FollowupQueueVO followupQueueVO = map.get(dlVo.getQueueId()); + if (followupQueueVO != null) { + dlVo.setQueueName(followupQueueVO.getName()); + } + } + } + } + return dlVos; // if (CollUtil.isNotEmpty(dlVos)) { // for (StatisticsVo.SffbVo.DlVo dlVo : dlVos) { // if (dlVo.getQueueId() == 10L) { From ff8df5b07b34e5a9fb437f3cd330246929f1a82f Mon Sep 17 00:00:00 2001 From: zzc Date: Wed, 23 Apr 2025 12:15:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=BA=E4=BD=93=E6=88=90=E5=88=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3-=E8=8E=B7=E5=8F=96=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3message=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=9B=BA=E5=AE=9A=E4=B8=BAbcaUser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/acupuncture/system/domain/vo/ExternalVo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java index 2eb43efb..b0b38011 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/ExternalVo.java @@ -13,15 +13,15 @@ public class ExternalVo { @Data public static class Result{ - private String message; + private String message = "bcaUser"; private String gid; private String memberid; - private String testId; +// private String testId; - private String testDate; +// private String testDate; private String name; @@ -31,7 +31,7 @@ public class ExternalVo { private String birthYear; - private String weight; +// private String weight; private String phone; public String getSex() {