Browse Source

fix
修复一些bug

18339543638 1 year ago
parent
commit
891d105f0a

+ 2 - 18
nb-service/web-service/src/main/java/com/nb/web/service/bus/hospital/his/HisScriptSession.java

@@ -34,6 +34,7 @@ import com.nb.web.api.entity.BusHospitalLogEntity;
 import com.nb.web.service.bus.utils.WsPublishUtils;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.map.PassiveExpiringMap;
 import org.springframework.util.Assert;
 import org.springframework.web.context.request.async.DeferredResult;
 import org.tio.core.ChannelContext;
@@ -66,7 +67,6 @@ public class HisScriptSession {
     private LocalBusConMixService conMixService;
     private LocalBusConDoctorService conDoctorService;
     private WsPublishUtils wsPublishUtils;
-    private LocalBusInfusionHistoryService infusionHistoryService;
     //缓存发给医院的请求,对相同的请求进行批量处理
     private Cache<String, HisRequest> hisRequestMap = CacheBuilder.newBuilder()
             .expireAfterWrite(30, TimeUnit.SECONDS)
@@ -84,7 +84,6 @@ public class HisScriptSession {
         this.conMixService=SpringUtil.getBean(LocalBusConMixService.class);
         this.conDoctorService=SpringUtil.getBean(LocalBusConDoctorService.class);
         this.wsPublishUtils=SpringUtil.getBean(WsPublishUtils.class);
-        this.infusionHistoryService=SpringUtil.getBean(LocalBusInfusionHistoryService.class);
         init(configStorageManager,hospitalId);
     }
 
@@ -265,21 +264,6 @@ public class HisScriptSession {
         if(CollectionUtil.isEmpty(sources)){
             return null;
         }else {
-
-            BusInfusionHistoryEntity lastInfusion = infusionHistoryService.lastInfusionByPatientCode(hospitalId,patientCode);
-            if(ObjectUtil.isNotNull(lastInfusion)){
-                //最后一次输注信息存在
-                sources=sources.stream()
-                        .filter(clinic->{
-                            Date infusionStartTime = lastInfusion.getStartTime();
-                            Date clinicStartTime = clinic.getStartTime();
-                            if(ObjectUtil.isNull(infusionStartTime)||ObjectUtil.isNull(clinicStartTime)){
-                                return true;
-                            }
-                            return clinicStartTime.before(infusionStartTime);
-                        }).collect(Collectors.toList());
-            }
-
             BusPatientEntity patient = patientService
                     .getOne(new QueryWrapper<BusPatientEntity>().lambda().eq(BusPatientEntity::getCode, patientCode).eq(BusPatientEntity::getTenantId, hospitalId));
             if(patient!=null){
@@ -303,7 +287,7 @@ public class HisScriptSession {
                 }
                 String key=
                         StrUtil.isNullOrUndefined(source.getSurgeryName())?"":source.getSurgeryName()+
-                        DateUtil.formatDateTime(source.getStartTime());
+                                DateUtil.formatDateTime(source.getStartTime());
                 if(!distinct.containsKey(key)){
                     distinct.put(key,source);
                     publish.add(source);