|
@@ -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;
|