From c77c1064dc93bc7d4f0a402dd0285082bb354450 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 10 九月 2025 18:25:02 +0800
Subject: [PATCH] HTTP接口修改
---
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
index 954d2b6..80a5a2f 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
@@ -11,6 +11,7 @@
import com.smartor.mapper.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
@@ -82,6 +83,7 @@
@Override
public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) {
List<PatMedInhosp> patMedInhospList = chMapper.selectPatMedInhospList(patMedInhosp);
+ log.info("鍙悓姝ョ梾浜烘暟閲�"+patMedInhospList.size());
for (PatMedInhosp pm : patMedInhospList) {
PatArchive patArchive = new PatArchive();
patArchive.setPatientno(pm.getPatno());
@@ -126,7 +128,10 @@
@Override
public Boolean hnDataGather(HnDataGatherVO hnDataGatherVO) {
-
+ if(ObjectUtils.isEmpty(hnDataGatherVO.getStartTime()) )
+ hnDataGatherVO.setStartTime(new Date());
+ if(ObjectUtils.isEmpty(hnDataGatherVO.getEndTime()) )
+ hnDataGatherVO.setEndTime(new Date());
LocalDate startDate = hnDataGatherVO.getStartTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate endDate = hnDataGatherVO.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
@@ -192,8 +197,24 @@
public Integer selectIcd10List(Icd10 icd10) {
List<Icd10> icd10s = chMapper.selectIcd10List(icd10);
log.info("selectIcd10List鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", icd10s.size());
- int i = icd10Mapper.batchIcd10(icd10s);
- return i;
+ int size = 0;
+ if (icd10s.size() > 500) {
+ int i = icd10s.size() / 500;
+ for (int a = 0; a < i + 1; a++) {
+ if (a >= 0 && a < i) {
+ List<Icd10> icd10Temp = icd10s.subList(a * 500, (a + 1) * 500);
+ size += icd10Mapper.batchIcd10(icd10Temp);
+ } else {
+ List<Icd10> icd10Temp = icd10s.subList(i * 500, icd10s.size());
+ if (icd10Temp != null && icd10Temp.size() != 0) {
+ size += icd10Mapper.batchIcd10(icd10Temp);
+ }
+ }
+ }
+ } else {
+ size += icd10Mapper.batchIcd10(icd10s);
+ }
+ return size;
}
@Override
--
Gitblit v1.9.3