Browse Source

自助核酸检测开放混检

lighter 3 years ago
parent
commit
b9c73087d0

+ 2 - 2
src/main/java/thyyxxk/wxservice_server/controller/OrderCovidController.java

@@ -24,8 +24,8 @@ public class OrderCovidController {
     }
 
     @GetMapping("/savePrescription")
-    public ResultVo<String> savePrescription(@RequestParam("patientId") String patientId) {
-        return service.savePrescription(patientId);
+    public ResultVo<String> savePrescription(@RequestParam("patientId") String patientId, @RequestParam("type") int type) {
+        return service.savePrescription(patientId, type);
     }
 
     @GetMapping("/updateIdCard")

+ 5 - 3
src/main/java/thyyxxk/wxservice_server/service/OrderCovidExamService.java

@@ -37,11 +37,13 @@ public class OrderCovidExamService {
         }
     }
 
-    public ResultVo<String> savePrescription(String patientId) {
+    public ResultVo<String> savePrescription(String patientId, int type) {
+        String urlTail = type == 1 ? "/nucleicAcidApplication?patientId=" : "/hybridTestApplication?patientId=";
         RestTemplate restTemplate = new RestTemplate();
-        String url = hrgApiUrl + "/nucleicAcidApplication?patientId=" + patientId;
+        String url = hrgApiUrl + urlTail + patientId;
         SaveMzFeeResponse hrgResponse = restTemplate.getForObject(url, SaveMzFeeResponse.class);
-        log.info("快速下单核酸检测:患者:{},结果:{}", patientId, hrgResponse);
+        String typeName = type == 1 ? "单人单管" : "混检";
+        log.info("【{}】快速下单核酸检测:患者:{},结果:{}", typeName, patientId, hrgResponse);
         if (null == hrgResponse) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }