Browse Source

提交流调问卷时返回问卷结果

lighter 3 years ago
parent
commit
8ebaf75b86

+ 8 - 0
src/main/java/thyyxxk/wxservice_server/service/Covid19AssessmentService.java

@@ -51,6 +51,14 @@ public class Covid19AssessmentService {
         Integer dateDiff = dao.selectDateDiff(covidQuestionnaire.getPatientId());
         if (null == dateDiff || dateDiff > 0) {
             dao.insertNewCovid19Assessment(covidQuestionnaire);
+            if (covidQuestionnaire.getTemperature() == 2 ||
+                    covidQuestionnaire.getItem1() != 14 ||
+                    covidQuestionnaire.getItem2() != 24 ||
+                    covidQuestionnaire.getItem3() != 32 ||
+                    covidQuestionnaire.getItem4() != 42 ||
+                    covidQuestionnaire.getItem6() != 61) {
+                return ResultVoUtil.success("您新型冠状病毒感染流行病学史问卷未通过,请挂发热门诊。");
+            }
             return ResultVoUtil.success();
         }
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "您今天已提交过此问卷,请明天再试。");