From d940590c25d7381ba7bc08b068d223d7aa0b9c77 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 30 四月 2026 20:43:12 +0800
Subject: [PATCH] 南华附一 和 登陆优化
---
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 55 insertions(+), 2 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 3cf792e..9ea5c27 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -16,6 +16,7 @@
import com.smartor.config.PhoneUtils;
import com.smartor.domain.DTO.ServiceSubtaskDetailDTO;
import com.smartor.domain.*;
+import com.smartor.domain.VO.HeLibraryCountVO;
import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.mapper.*;
@@ -31,6 +32,7 @@
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestBody;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -162,6 +164,12 @@
private Integer phoneUpEveryHour;
@Value("${phoneEndHour}")
private Integer phoneEndHour;
+
+ @Autowired
+ private Icd10Mapper icd10Mapper;
+
+ @Value("${spring.profiles.active}")
+ private String active;
/**
* 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
@@ -613,10 +621,19 @@
ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag();
serviceTaskdiag.setTaskId(serviceTask.getTaskid());
serviceTaskdiag.setTaskName(serviceTask.getTaskName());
+ serviceTaskdiag.setServiceType(serviceTaskVO.getServiceType());
serviceTaskdiag.setLongtask(Long.valueOf(serviceTask.getLongTask()));
if (serviceTaskVO.getLongTask() == 1) serviceTaskdiag.setLongtask(1L);
serviceTaskdiag.setIcd10code(serviceTaskVO.getIcd10code());
serviceTaskdiag.setIcd10name(serviceTaskVO.getIcd10name());
+ //鍗楀崕闄勪竴鐨刬cd10code鏄湁閲嶅鐨勶紝鎵�浠ヤ笉鑳界敤鍗楀崕闄勪竴鐨刬cd10code鍘绘煡璇�
+ if (!active.equals("nhfy") && StringUtils.isEmpty(serviceTaskVO.getIcd10name())) {
+ Icd10 icd10 = new Icd10();
+ icd10.setIcdcode(serviceTaskVO.getIcd10code());
+ List<Icd10> icd10s = icd10Mapper.selectIcd10List(icd10);
+ if (CollectionUtils.isNotEmpty(icd10s))
+ serviceTaskdiag.setIcd10name(icd10s.get(0).getIcdname());
+ }
serviceTaskdiag.setGuid(serviceTask.getGuid());
serviceTaskdiag.setOrgid(serviceTask.getOrgid());
serviceTaskdiag.setCreateTime(new Date());
@@ -754,7 +771,8 @@
}
}
- } else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) {
+ }
+ else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) {
//浠诲姟淇敼
if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot()))
serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot()));
@@ -2461,11 +2479,13 @@
ssRate.setStarttime(serviceSubtaskCountReq.getStartTime());
ssRate.setEndtime(serviceSubtaskCountReq.getEndTime());
ssRate.setVisitCount(serviceSubtaskCountReq.getVisitCount());
+ ssRate.setServiceTypeList(serviceSubtaskCountReq.getServiceType());
if (serviceSubtaskCountReq.getEndTime() != null && new Date().before(serviceSubtaskCountReq.getEndTime())) {
ssRate.setEndtime(new Date());
}
ssRate.setGroupKey(groupKey);
ssRate.setGroupKeyList(groupKeyList);
+ ssRate.setRateDay(serviceSubtaskCountReq.getRateDay());
Map<String, Map<String, Object>> jsRates = new HashMap<>();
if (!collect.isEmpty()) {
jsRates = serviceSubtaskMapper.selectTimelyRateBatch(ssRate);
@@ -3587,7 +3607,8 @@
map.put("content", sendMagParam.getContent());
String result = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(map));
redisCache.setCacheObject(subTaskId + "recordAccept-hungup", "1", 10, TimeUnit.MINUTES);
- if (StringUtils.isNotEmpty(serviceSubtask.getRemark())) serviceSubtask.setRemark("鐢佃瘽鍙戦�佹嫆鎺�,鐭俊琛ュ伩鍙戦�佹垚鍔�");
+ if (StringUtils.isNotEmpty(serviceSubtask.getRemark()))
+ serviceSubtask.setRemark("鐢佃瘽鍙戦�佹嫆鎺�,鐭俊琛ュ伩鍙戦�佹垚鍔�");
else serviceSubtask.setRemark("鐭俊琛ュ伩鍙戦�佹垚鍔�");
serviceSubtask.setSendstate(3L);
serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
@@ -4170,6 +4191,38 @@
}
}
+ @Override
+ public Map<String, Object> getHeLibraryCount(@RequestBody HeLibraryCountVO heLibraryCountVO) {
+ if (ObjectUtils.isEmpty(heLibraryCountVO)) {
+ return new HashMap<>();
+ }
+ // 1. 鏌ヨ鍒嗙粍缁熻锛堝彂閫佹�婚噺銆佸彂閫佹垚鍔熼噺銆佸凡璇婚噺锛�
+ List<Map<String, Object>> groupStats = serviceSubtaskMapper.getHeLibraryCount(heLibraryCountVO);
+
+ // 2. 璁$畻鍚勭粍鐨勫彂閫佹垚鍔熺巼鍜屽凡璇荤巼
+ List<Map<String, Object>> result = new ArrayList<>();
+ if (CollectionUtils.isNotEmpty(groupStats)) {
+ for (Map<String, Object> row : groupStats) {
+ long totalCount = row.get("totalCount") != null ? ((Number) row.get("totalCount")).longValue() : 0L;
+ long sendSuccessCount = row.get("sendSuccessCount") != null ? ((Number) row.get("sendSuccessCount")).longValue() : 0L;
+ long readCount = row.get("readCount") != null ? ((Number) row.get("readCount")).longValue() : 0L;
+ // 鍙戦�佹垚鍔熺巼
+ double sendSuccessRate = totalCount > 0 ? (double) sendSuccessCount / totalCount : 0.0;
+ // 宸茶鐜囷紙鍩轰簬鍙戦�佹垚鍔熺殑鏁伴噺璁$畻锛�
+ double readRate = sendSuccessCount > 0 ? (double) readCount / sendSuccessCount : 0.0;
+ row.put("sendSuccessRate", sendSuccessRate);
+ row.put("readRate", readRate);
+ result.add(row);
+ }
+ }
+
+ Map<String, Object> resultMap = new HashMap<>();
+ resultMap.put("list", result);
+ resultMap.put("total", result.size());
+ return resultMap;
+ }
+
+
private Boolean saveServiceSubtaskDetail(ServiceSubtask serviceSubtask) {
Boolean result = true;
//3.4 濡傛灉3.1鎴�3.2涓簍rue鐨勮瘽锛屾牴鎹畉ype鍒ゆ柇浠�涔堢被鍨�
--
Gitblit v1.9.3