lighter преди 3 години
родител
ревизия
b7c2f9cbca
променени са 2 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 5 0
      src/main/java/thyyxxk/wxservice_server/service/OrderCovidExamService.java
  2. 4 4
      src/main/resources/application.yml

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

@@ -12,6 +12,8 @@ import thyyxxk.wxservice_server.entity.assessment.CovidQuestionnaire;
 import thyyxxk.wxservice_server.entity.hrgresponse.SaveMzFeeResponse;
 import thyyxxk.wxservice_server.utils.ResultVoUtil;
 
+import java.util.Calendar;
+
 /**
  * @author dj
  */
@@ -38,6 +40,9 @@ public class OrderCovidExamService {
     }
 
     public ResultVo<String> savePrescription(String patientId, int type) {
+        if (type == 2 && Calendar.getInstance().get(Calendar.HOUR_OF_DAY) < 8) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "混检仅在 8:00 - 24:00 开放。");
+        }
         String urlTail = type == 1 ? "/nucleicAcidApplication?patientId=" : "/hybridTestApplication?patientId=";
         RestTemplate restTemplate = new RestTemplate();
         String url = hrgApiUrl + urlTail + patientId;

+ 4 - 4
src/main/resources/application.yml

@@ -9,8 +9,8 @@ spring:
     cache: false
   datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb
-#    url: jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb
+#    url: jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb
+    url: jdbc:sqlserver://172.16.32.168:1433;databaseName=thxyhisdb
     hikari:
       username: sa
       password:
@@ -32,8 +32,8 @@ mybatis:
   configuration:
     map-underscore-to-camel-case: true
 
-hrgApiUrl: http://172.16.30.33:8089/thmz/api/v1
-#hrgApiUrl: http://172.16.32.160:81/thmz/api/v1
+#hrgApiUrl: http://172.16.30.33:8089/thmz/api/v1
+hrgApiUrl: http://172.16.32.160:81/thmz/api/v1
 
 inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl
 physicalCheck: http://172.16.32.183:8888/bdp/dataservice/api/