|
@@ -9,12 +9,14 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.wxservice_server.dao.AppointmentDao;
|
|
|
+import thyyxxk.wxservice_server.pojo.PureCodeName;
|
|
|
import thyyxxk.wxservice_server.pojo.ResultVo;
|
|
|
import thyyxxk.wxservice_server.pojo.appointment.*;
|
|
|
import thyyxxk.wxservice_server.pojo.assessment.CovidPojo;
|
|
|
import thyyxxk.wxservice_server.pojo.hrgresponse.SourcesRes;
|
|
|
import thyyxxk.wxservice_server.pojo.hrgresponse.GhFeeRes;
|
|
|
import thyyxxk.wxservice_server.pojo.hrgresponse.MzClassRes;
|
|
|
+import thyyxxk.wxservice_server.utils.DateUtil;
|
|
|
import thyyxxk.wxservice_server.utils.PropertiesUtil;
|
|
|
import thyyxxk.wxservice_server.utils.ResultVoUtil;
|
|
|
import thyyxxk.wxservice_server.utils.ThmzUrls;
|
|
@@ -125,7 +127,9 @@ public class AppointmentService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
|
}
|
|
|
for (Map<String, Object> map : data.getData()) {
|
|
|
- map.put("introduction", dao.selectIntroduction(map.get("doctorCode").toString()));
|
|
|
+ PureCodeName info = dao.selectPortraitAndIntroduction(map.get("doctorCode").toString());
|
|
|
+ map.put("portrait", info.getCode());
|
|
|
+ map.put("introduction", info.getName());
|
|
|
}
|
|
|
return ResultVoUtil.success(data.getData());
|
|
|
}
|
|
@@ -189,7 +193,15 @@ public class AppointmentService {
|
|
|
return CompletableFuture.completedFuture(ResultVoUtil.success(source));
|
|
|
}
|
|
|
|
|
|
- public ResultVo<String> hasValidCovidAssessment(String patientId) {
|
|
|
+ public ResultVo<String> hasValidCovidAssessment(String patientId, String deptCode) {
|
|
|
+ PureCodeName sexSocial = dao.selectSexAndSocialNo(patientId);
|
|
|
+ String mzClass = dao.selectMzClass(deptCode);
|
|
|
+ if (sexSocial.getCode().equals("1") && mzClass.equals("03")) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "男性无法在妇产科挂号,请选择其他科室。");
|
|
|
+ }
|
|
|
+ if (deptCode.equals("1040000") && DateUtil.getAgeBySocialNo(sexSocial.getName()) >= 18) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "成年人无法在儿科挂号,请选择其他科室。");
|
|
|
+ }
|
|
|
CovidPojo covid = dao.validCovidAssessment(patientId);
|
|
|
if (null == covid) {
|
|
|
return ResultVoUtil.success("no valid assessment");
|