|
@@ -59,12 +59,11 @@ public class OrderCovidExamService {
|
|
|
timeLimit.getLimitValueForDisplay() + " 开放。");
|
|
|
}
|
|
|
}
|
|
|
- String urlTail = type == 1 ? "/nucleicAcidApplication?patientId=" : "/hybridTestApplication?patientId=";
|
|
|
+ String[] oris = getExamUrlAndLabel(type);
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
- String url = hrgApiUrl + urlTail + patientId;
|
|
|
+ String url = hrgApiUrl + oris[0] + patientId;
|
|
|
SaveMzFeeResponse hrgResponse = restTemplate.getForObject(url, SaveMzFeeResponse.class);
|
|
|
- String typeName = type == 1 ? "单人单管" : "混检";
|
|
|
- log.info("【{}】快速下单核酸检测:患者:{},结果:{}", typeName, patientId, hrgResponse);
|
|
|
+ log.info("【{}】快速下单核酸检测:患者:{},结果:{}", oris[1], patientId, hrgResponse);
|
|
|
if (null == hrgResponse) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
@@ -74,6 +73,18 @@ public class OrderCovidExamService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, hrgResponse.getResultMessage());
|
|
|
}
|
|
|
|
|
|
+ private String[] getExamUrlAndLabel(int type) {
|
|
|
+ switch (type) {
|
|
|
+ case 1:
|
|
|
+ return new String[]{"/nucleicAcidApplication?patientId=", "单人单管(绿码)"};
|
|
|
+ case 2:
|
|
|
+ return new String[]{"/hybridTestApplication?patientId=", "混检"};
|
|
|
+ case 3:
|
|
|
+ default:
|
|
|
+ return new String[]{"/nucleicOnlyYellowAcidApplication?patientId=", "单人单管(黄码)"};
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<MultipleExamTimeLimit> getMultipleExamTimeLimit() {
|
|
|
if (StringUtil.isBlank(timeLimit.getLimitValue())) {
|
|
|
timeLimitChanged();
|