From 665cb08f5e74996d417f26ab2bad6d7fe210ea2b Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 22 九月 2026 14:05:16 +0800
Subject: [PATCH] 1.修改省立同德满意度统计接口
---
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index 7afbcc6..53f6da1 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -6181,17 +6181,29 @@
*/
public List<ServiceSubtaskDetailRatioExport> getDetailRatio(SltdMydTotalVO sltdMydTotalVO, List<ServiceSubtaskRes> serviceSubtaskRes) {
List<ServiceSubtaskDetailRatioExport> serviceSubtaskDetailRatioExports = null;
- if (CollectionUtils.isNotEmpty(sltdMydTotalVO.getServiceTypeList()) && sltdMydTotalVO.getServiceTypeList().contains("2") && (sltdMydTotalVO.getServiceTypeList().contains("6") || sltdMydTotalVO.getServiceTypeList().contains("14"))) {
- //serviceType锛屽嵆鏈夐殢璁垮張鏈夋弧鎰忓害锛屾殏鏃舵病娉曠粺璁�
+ List<String> serviceTypeList = sltdMydTotalVO.getServiceTypeList();
+ if (CollectionUtils.isEmpty(serviceTypeList)) {
+ log.warn("getDetailRatio 鏈紶 serviceTypeList锛屾棤娉曠粺璁¢棶棰樺崰姣�");
return serviceSubtaskDetailRatioExports;
- } else if (CollectionUtils.isNotEmpty(sltdMydTotalVO.getServiceTypeList()) && sltdMydTotalVO.getServiceTypeList().contains("2")) {
+ }
+ // 鍒ゆ柇鍙e緞锛�2=闅忚锛堟寜 taskid 缁熻锛夛紝6/14=婊℃剰搴︼紙鎸� subtask id 缁熻锛�
+ boolean hasFollowUp = serviceTypeList.contains("2");
+ boolean hasSatisfaction = serviceTypeList.contains("6") || serviceTypeList.contains("14");
+ if (hasFollowUp && hasSatisfaction) {
+ //serviceType锛屽嵆鏈夐殢璁垮張鏈夋弧鎰忓害锛屾殏鏃舵病娉曠粺璁�
+ log.warn("getDetailRatio 鏆備笉鏀寔鍚屾椂缁熻闅忚(2)涓庢弧鎰忓害(6/14)锛宻erviceTypeList={}", serviceTypeList);
+ return serviceSubtaskDetailRatioExports;
+ }
+ if (hasFollowUp) {
//鑾峰彇serviceSubtaskList涓殑鎵�鏈塼askid
List<Long> taskIds = serviceSubtaskRes.stream().map(ServiceSubtaskRes::getTaskid).filter(ObjectUtils::isNotEmpty).distinct().collect(Collectors.toList());
serviceSubtaskDetailRatioExports = statQuestionOption(taskIds, sltdMydTotalVO.getStartFinishTime(), sltdMydTotalVO.getEndFinishTime(), sltdMydTotalVO.getStartOutHospTime(), sltdMydTotalVO.getEndOutHospTime(), sltdMydTotalVO.getQuestionContent(), sltdMydTotalVO.getStartScore(), sltdMydTotalVO.getEndScore(), sltdMydTotalVO.getValueType());
- } else if (CollectionUtils.isNotEmpty(sltdMydTotalVO.getServiceTypeList()) && sltdMydTotalVO.getServiceTypeList().contains("6") || sltdMydTotalVO.getServiceTypeList().contains("14")) {
+ } else if (hasSatisfaction) {
//婊℃剰搴︾粺璁� 锛堥�氳繃 subtask 鐨� id 鍘荤粺璁★級
List<Long> subtaskIds = serviceSubtaskRes.stream().map(ServiceSubtaskRes::getId).collect(Collectors.toList());
serviceSubtaskDetailRatioExports = statQuestionOptionBySubtaskIds(subtaskIds, sltdMydTotalVO.getStartOutHospTime(), sltdMydTotalVO.getEndOutHospTime(), sltdMydTotalVO.getStartFinishTime(), sltdMydTotalVO.getEndFinishTime(), sltdMydTotalVO.getQuestionContent(), sltdMydTotalVO.getStartScore(), sltdMydTotalVO.getEndScore(), sltdMydTotalVO.getValueType());
+ } else {
+ log.warn("getDetailRatio 鏆備笉鏀寔鐨� serviceTypeList={}锛堜粎鏀寔 2 鎴� 6/14锛�", serviceTypeList);
}
return serviceSubtaskDetailRatioExports;
}
--
Gitblit v1.9.3