|
@@ -20,7 +20,6 @@ import thyyxxk.wxservice_server.entity.inspections.QueryReportDetail;
|
|
|
import thyyxxk.wxservice_server.entity.inspections.detail.*;
|
|
|
import thyyxxk.wxservice_server.utils.*;
|
|
|
|
|
|
-import java.awt.geom.RectangularShape;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -31,14 +30,14 @@ import java.util.*;
|
|
|
@Service
|
|
|
public class InspectionsService {
|
|
|
private final InspectionsDao dao;
|
|
|
- private final SoapInvokeService invokeService;
|
|
|
+ private final SoapInvokeService soapInvokeService;
|
|
|
@Value("${hrgApiUrl}")
|
|
|
private String hrgApiUrl;
|
|
|
|
|
|
@Autowired
|
|
|
- public InspectionsService(InspectionsDao dao, SoapInvokeService invokeService) {
|
|
|
+ public InspectionsService(InspectionsDao dao, SoapInvokeService soapInvokeService) {
|
|
|
this.dao = dao;
|
|
|
- this.invokeService = invokeService;
|
|
|
+ this.soapInvokeService = soapInvokeService;
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<ExamIndexResult>> getExamIndex(CheckExamParam param) {
|
|
@@ -63,9 +62,9 @@ public class InspectionsService {
|
|
|
List<ExamIndexResult> list = new ArrayList<>();
|
|
|
for (String sendHead : sendHeads) {
|
|
|
if (null != sendHead) {
|
|
|
- String sendXml = sendHead + sendEnd;
|
|
|
- String resXml = invokeService.invokeRemoteMethod("GetLabReportIndex", sendXml);
|
|
|
- list.addAll(invokeService.analyzeExamIndex(resXml));
|
|
|
+ String paramXml = sendHead + sendEnd;
|
|
|
+ String resultXml = soapInvokeService.invokeRemoteMethod("GetLabReportIndex", paramXml);
|
|
|
+ list.addAll(soapInvokeService.analyzeExamIndex(resultXml));
|
|
|
}
|
|
|
}
|
|
|
return ResultVoUtil.success(list);
|
|
@@ -109,8 +108,8 @@ public class InspectionsService {
|
|
|
List<ExamIndexResult> results = new ArrayList<>();
|
|
|
for (String mzNo : mzNos) {
|
|
|
String mzHead = "<message><PATIENT_TYPE>0</PATIENT_TYPE><PTNT_NO>" + mzNo + "</PTNT_NO>";
|
|
|
- String xml = invokeService.invokeRemoteMethod("GetLabReportIndex", mzHead+xmlEnd);
|
|
|
- List<ExamIndexResult> list = invokeService.analyzeExamIndex(xml);
|
|
|
+ String xml = soapInvokeService.invokeRemoteMethod("GetLabReportIndex", mzHead+xmlEnd);
|
|
|
+ List<ExamIndexResult> list = soapInvokeService.analyzeExamIndex(xml);
|
|
|
for (ExamIndexResult index : list) {
|
|
|
if (BooleanUtil.isCovidExam(index.getAPLY_CTNT())) {
|
|
|
results.add(index);
|
|
@@ -124,8 +123,8 @@ public class InspectionsService {
|
|
|
List<ExamIndexResult> results = new ArrayList<>();
|
|
|
for (HshjPatient hshj : hshjNos) {
|
|
|
String hshjHead = "<message><PATIENT_TYPE>0</PATIENT_TYPE><PTNT_NO>" + hshj.getParentId() + "</PTNT_NO>";
|
|
|
- String xml = invokeService.invokeRemoteMethod("GetLabReportIndex", hshjHead+xmlEnd);
|
|
|
- List<ExamIndexResult> list = invokeService.analyzeExamIndex(xml);
|
|
|
+ String xml = soapInvokeService.invokeRemoteMethod("GetLabReportIndex", hshjHead+xmlEnd);
|
|
|
+ List<ExamIndexResult> list = soapInvokeService.analyzeExamIndex(xml);
|
|
|
for (ExamIndexResult index : list) {
|
|
|
if (BooleanUtil.isCovidExam(index.getAPLY_CTNT())) {
|
|
|
index.setPTNT_ID(hshj.getPatientId());
|
|
@@ -143,7 +142,7 @@ public class InspectionsService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "报告ID不能为空!");
|
|
|
}
|
|
|
String send = "<message><ORDR_ID>" + param.getOrderId() + "</ORDR_ID></message>";
|
|
|
- String xml = invokeService.invokeRemoteMethod("GetLabReport", send);
|
|
|
+ String xml = soapInvokeService.invokeRemoteMethod("GetLabReport", send);
|
|
|
Element retEle = getResultElement(xml);
|
|
|
if (null == retEle) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "结果集为空!");
|
|
@@ -155,24 +154,24 @@ public class InspectionsService {
|
|
|
}
|
|
|
Element reportListEle = retEle.element("Result").element("ReportList");
|
|
|
ReportHeader header = new ReportHeader();
|
|
|
- detail.setReportHeader((ReportHeader) invokeService.reflect(header, reportListEle.element("ReportHeader")));
|
|
|
+ detail.setReportHeader((ReportHeader) soapInvokeService.reflect(header, reportListEle.element("ReportHeader")));
|
|
|
List<ReportItem> reportItems = new ArrayList<>();
|
|
|
List<Element> reportItemElements = reportListEle.elements("ReportItem");
|
|
|
reportItemElements.forEach(reportItemElement -> {
|
|
|
ReportItem reportItem = new ReportItem();
|
|
|
- invokeService.reflect(reportItem, reportItemElement);
|
|
|
+ soapInvokeService.reflect(reportItem, reportItemElement);
|
|
|
List<Element> bacteriaResultElements = reportItemElement.elements("BacteriaResult");
|
|
|
if (bacteriaResultElements.size() > 0) {
|
|
|
List<BacteriaResult> bacteriaResults = new ArrayList<>();
|
|
|
bacteriaResultElements.forEach(bacterialResultElement -> {
|
|
|
BacteriaResult bacteriaResult = new BacteriaResult();
|
|
|
- invokeService.reflect(bacteriaResult, bacterialResultElement);
|
|
|
+ soapInvokeService.reflect(bacteriaResult, bacterialResultElement);
|
|
|
List<Element> antibioticResultElements = bacterialResultElement.elements("AntibioticResult");
|
|
|
if (antibioticResultElements.size() > 0) {
|
|
|
List<AntibioticResult> antibioticResults = new ArrayList<>();
|
|
|
antibioticResultElements.forEach(antibioticResultElement -> {
|
|
|
AntibioticResult antibioticResult = new AntibioticResult();
|
|
|
- antibioticResults.add((AntibioticResult) invokeService.reflect(antibioticResult, antibioticResultElement));
|
|
|
+ antibioticResults.add((AntibioticResult) soapInvokeService.reflect(antibioticResult, antibioticResultElement));
|
|
|
});
|
|
|
bacteriaResult.setAntibioticResults(antibioticResults);
|
|
|
}
|