Commit 92bf3a77d868f4df809c80970128a6a22bb68858
1 parent
31f5aec848
Exists in
master
and in
6 other branches
体重管理修改
Showing 3 changed files with 13 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PatientWeight.java
View file @
92bf3a7
... | ... | @@ -11,6 +11,17 @@ |
11 | 11 | */ |
12 | 12 | @Document(collection="lyms_patient_weight") |
13 | 13 | public class PatientWeight extends BaseModel { |
14 | + | |
15 | + private String hospitalName; | |
16 | + | |
17 | + public String getHospitalName() { | |
18 | + return hospitalName; | |
19 | + } | |
20 | + | |
21 | + public void setHospitalName(String hospitalName) { | |
22 | + this.hospitalName = hospitalName; | |
23 | + } | |
24 | + | |
14 | 25 | // 存储 key=年月日 value=时间+医院+体重 |
15 | 26 | private List<Map<String, Object>> dayWeights2 = new ArrayList<>(); |
16 | 27 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java
View file @
92bf3a7
... | ... | @@ -121,6 +121,7 @@ |
121 | 121 | |
122 | 122 | @ResponseBody |
123 | 123 | @RequestMapping(value = "/update", method = RequestMethod.POST) |
124 | + @TokenRequired | |
124 | 125 | public BaseResponse update(String id, String beforeWeight, String beforeHeight) { |
125 | 126 | return patientWeightService.update(id, beforeWeight, beforeHeight); |
126 | 127 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
92bf3a7
... | ... | @@ -270,6 +270,7 @@ |
270 | 270 | @Override |
271 | 271 | public BaseResponse edit(String id) { |
272 | 272 | PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); |
273 | + patientWeight.setHospitalName(couponMapper.getHospitalName(patientWeight.getHospitalId())); | |
273 | 274 | return RespBuilder.buildSuccess(patientWeight); |
274 | 275 | } |
275 | 276 |