From 92bf3a77d868f4df809c80970128a6a22bb68858 Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Wed, 18 Oct 2017 15:12:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E9=87=8D=E7=AE=A1=E7=90=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/lyms/platform/pojo/PatientWeight.java | 11 +++++++++++ .../operate/web/controller/PatientWeightController.java | 1 + .../operate/web/service/impl/PatientWeightServiceImpl.java | 1 + 3 files changed, 13 insertions(+) diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java b/platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java index ddcd7f8..1dc8daf 100644 --- a/platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java @@ -11,6 +11,17 @@ import java.util.*; */ @Document(collection="lyms_patient_weight") public class PatientWeight extends BaseModel { + + private String hospitalName; + + public String getHospitalName() { + return hospitalName; + } + + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } + // 存储 key=年月日 value=时间+医院+体重 private List> dayWeights2 = new ArrayList<>(); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java index 3e57378..97220c5 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java @@ -121,6 +121,7 @@ public class PatientWeightController extends BaseController { @ResponseBody @RequestMapping(value = "/update", method = RequestMethod.POST) + @TokenRequired public BaseResponse update(String id, String beforeWeight, String beforeHeight) { return patientWeightService.update(id, beforeWeight, beforeHeight); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 470383b..89a716b 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -270,6 +270,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient @Override public BaseResponse edit(String id) { PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); + patientWeight.setHospitalName(couponMapper.getHospitalName(patientWeight.getHospitalId())); return RespBuilder.buildSuccess(patientWeight); } -- 1.8.3.1