Просмотр исходного кода

修复DPCC查询不到检验结果的问题

lighter 6 месяцев назад
Родитель
Сommit
4374d6a3ae

+ 1 - 1
pom.xml

@@ -22,7 +22,7 @@
         <thyy-archive>0.1.1</thyy-archive>
         <thyy-haikang>0.0.5</thyy-haikang>
         <thyy-emr-query>1.5.1</thyy-emr-query>
-        <thyy-thirdpart-api>0.0.1</thyy-thirdpart-api>
+        <thyy-thirdpart-api>0.0.2</thyy-thirdpart-api>
         <thyy-scheduled>0.0.2</thyy-scheduled>
         <thyy-plugins>0.0.1</thyy-plugins>
         <thyy-hospitalized>0.0.1</thyy-hospitalized>

+ 2 - 1
thyy-scheduled/src/main/java/org/thyy/scheduled/service/DpccService.java

@@ -141,7 +141,8 @@ public class DpccService {
                 url, HttpMethod.POST, new HttpEntity<>(json),
                 new ParameterizedTypeReference<ResultVo<List<JyIndexResponse>>>() {}
         ).getBody();
-        if (null == resultVo) {
+        log.info("DPCC获取检验报告列表:\n参数:{}\n结果:{}", json, resultVo);
+        if (null == resultVo || null == resultVo.getData()) {
             return new ArrayList<>();
         }
         return resultVo.getData();

+ 2 - 2
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/inspectionImpl/ThyyInspectionImpl.java

@@ -48,8 +48,8 @@ public class ThyyInspectionImpl implements InspectionInterface {
         JyRequest jyRequest = JyRequest.builder()
                 .patientNumType(request.getPatType())
                 .patientNum(request.getPatNo())
-                .startDate(request.getReqStartTime())
-                .endDate(request.getReqEndTime())
+                .startDate(request.getStart())
+                .endDate(request.getEnd())
                 .build();
         JSONObject response = template.postForObject(apiConfig.getJy() + "/self", jyRequest, JSONObject.class);
         JSONObject data = getJyJsonData(response);

+ 11 - 0
thyy-thirdpart-api/src/main/java/org/thyy/thirdpartapi/inspection/request/ReportIndexInquiry.java

@@ -1,5 +1,6 @@
 package org.thyy.thirdpartapi.inspection.request;
 
+import cn.hutool.core.util.StrUtil;
 import lombok.Data;
 import org.thyy.thirdpartapi.inspection.config.Category;
 import org.thyy.thirdpartapi.inspection.config.PatientNumType;
@@ -10,6 +11,16 @@ public class ReportIndexInquiry {
     private Category reportCategory;
     private String patNo;
     private String socialNo;
+    private String startDate;
+    private String endDate;
     private String reqStartTime;
     private String reqEndTime;
+
+    public String getStart() {
+        return StrUtil.isBlank(reqStartTime) ? startDate : reqStartTime;
+    }
+
+    public String getEnd() {
+        return StrUtil.isBlank(reqEndTime) ? endDate : reqEndTime;
+    }
 }