From 603ae45c13568f98516e6fc9a932360dfee59803 Mon Sep 17 00:00:00 2001 From: shiyang <316555390@qq.com> Date: Fri, 25 Feb 2022 08:40:43 +0800 Subject: [PATCH] =?UTF-8?q?HIS=E4=B8=8A=E4=BC=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talkonlineweb/controller/LymsHisInfoController.java | 10 ++-------- .../service/impl/LymsHisInfoServiceImpl.java | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java index 4463f4a..327fce7 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java @@ -66,18 +66,12 @@ public class LymsHisInfoController { @PostMapping("upHisInfo") public BaseResponse upHisInfo( @RequestBody @Validated LymsHisInfo lymsHisInfo){ BaseResponse baseResponse=new BaseResponse(); + baseResponse.setErrorcode(0); + baseResponse.setErrormsg("患者上传成功"); String result = lymsHisInfoService.upHisInfo(lymsHisInfo); if(StringUtil.isNotEmpty(result)){ baseResponse.setErrorcode(1); baseResponse.setErrormsg(result); - }else { - lymsHisInfo.setUpType(1); - lymsHisInfo.setUpTime(new Date()); - final boolean b = lymsHisInfoService.updateById(lymsHisInfo); - if(b){ - baseResponse.setErrorcode(0); - baseResponse.setErrormsg("患者上传成功"); - } } return baseResponse; } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java index 2cfffb2..8f89f79 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java @@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.*; @@ -45,11 +46,23 @@ public class LymsHisInfoServiceImpl extends ServiceImpl