From 39211198ca97a56d373eb1f3b309ebbf6a6ea944 Mon Sep 17 00:00:00 2001 From: changpengfei Date: Wed, 8 Sep 2021 09:27:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lyms/talkonlineweb/controller/PatientController.java | 13 +++++++++++-- .../lyms/talkonlineweb/controller/RegionsController.java | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) 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 3317497..2e78ba2 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -44,6 +44,12 @@ public class PatientController { @Autowired private LymsTcardService lymsTcardService;//问诊卡信息 + @Autowired + private LymsChatroomService lymsChatroomService;//聊天室 + + @Autowired + private LymsLogsService lymsLogsService;//日志记录 + /** * 获取患者列表 @@ -161,10 +167,13 @@ public class PatientController { lymsPatientService.update().update(patient); baseResponse.setErrorcode(0); baseResponse.setObject(map); + LymsLogs logEntity=new LymsLogs(); + logEntity.setFunc("loginPatient"); + logEntity.setLogDate(new Date()); + logEntity.setMessage(String.format("login:%s name:%s",patient.getIdno(),patient.getPname())); + lymsLogsService.save(logEntity); } return baseResponse; } - - } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java index 3273898..df55a14 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java @@ -57,7 +57,7 @@ public class RegionsController { @PostMapping("saveDict") public BaseResponse saveDict(@RequestBody LymsDict dict){ BaseResponse baseResponse=new BaseResponse(); - boolean f=lymsDictService.save(dict); + boolean f=lymsDictService.saveOrUpdate(dict); baseResponse.setErrorcode(f==true?0:1); return baseResponse; } -- 1.8.3.1