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