From a6c33b90704c638f99fac66fa3034770569e691b Mon Sep 17 00:00:00 2001 From: shiyang <316555390@qq.com> Date: Sat, 26 Feb 2022 17:00:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=82=A3=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PatientController.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index da3138a..c8fbde9 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -767,6 +767,7 @@ public class PatientController { return baseResponse; } + /** * 选科室后查询出科室下有哪些疾病 * @param 科室id @@ -794,6 +795,7 @@ public class PatientController { } return baseResponse; } + /** * 修改患者密码/重置密码 * @param doctor @@ -810,4 +812,28 @@ public class PatientController { baseResponse.setErrormsg(f==true?"成功":"失败"); return baseResponse; } + + /** + * 小程序注册患者 + * + * @param patient + * @return + */ + @PostMapping("signInPatient") + public BaseResponse signInPatient(@RequestBody LymsPatient patient) { + BaseResponse baseResponse = new BaseResponse(); + baseResponse.setErrorcode(1); + baseResponse.setErrormsg("身份证已注册。如有疑问请联系管理员!"); + patient.setIdno(patient.getIdno().toLowerCase()); + LymsPatient tmpP=new LymsPatient(); + tmpP.setIdno(patient.getIdno().toLowerCase()); + LymsPatient patient2 = lymsPatientService.getOne(Wrappers.query(tmpP).eq("idno", patient.getIdno())); + if (patient2 == null) { + patient.setCreatedtime(new Date()); + boolean f = lymsPatientService.save(patient); + baseResponse.setErrorcode(0); + baseResponse.setErrormsg("注册成功!"); + } + return baseResponse; + } } -- 1.8.3.1