Commit 4bf3f2e9a0e99bfd27a02b07ba0971deec07358b
1 parent
f2f8c62f83
Exists in
master
and in
6 other branches
新增体重就诊卡/手机号查询界面增加体重和身高的返回
Showing 2 changed files with 36 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
4bf3f2e
| ... | ... | @@ -29,6 +29,10 @@ |
| 29 | 29 | import org.slf4j.LoggerFactory; |
| 30 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
| 31 | 31 | import org.springframework.beans.factory.annotation.Qualifier; |
| 32 | +import org.springframework.data.domain.Sort; | |
| 33 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 34 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 35 | +import org.springframework.data.mongodb.core.query.Query; | |
| 32 | 36 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| 33 | 37 | import org.springframework.stereotype.Component; |
| 34 | 38 | import org.springframework.util.StopWatch; |
| 35 | 39 | |
| ... | ... | @@ -89,7 +93,10 @@ |
| 89 | 93 | @Qualifier("commonThreadPool") |
| 90 | 94 | private ThreadPoolTaskExecutor commonThreadPool; |
| 91 | 95 | |
| 96 | + @Autowired | |
| 97 | + private MongoTemplate mongoTemplate; | |
| 92 | 98 | |
| 99 | + | |
| 93 | 100 | /** |
| 94 | 101 | * 修改产妇的社区 |
| 95 | 102 | * |
| ... | ... | @@ -1083,6 +1090,14 @@ |
| 1083 | 1090 | patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); |
| 1084 | 1091 | patientBaseResult.setRiskScore(highScoreResult.getScoreStr()); |
| 1085 | 1092 | } catch (Exception e) { |
| 1093 | + } | |
| 1094 | + Patients p = mongoTemplate.findById(patientBaseResult.getId(), Patients.class); | |
| 1095 | + if(p != null) { | |
| 1096 | + AntExChuModel chuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid()).and("yn").ne("0")).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); | |
| 1097 | + if(chuModel != null) { | |
| 1098 | + patientBaseResult.setHeight(StringUtils.isNotEmpty(chuModel.getHeight()) ? chuModel.getHeight() : ""); | |
| 1099 | + patientBaseResult.setWeight(StringUtils.isNotEmpty(chuModel.getWeight()) ? chuModel.getWeight() : ""); | |
| 1100 | + } | |
| 1086 | 1101 | } |
| 1087 | 1102 | return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 1088 | 1103 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
4bf3f2e
| ... | ... | @@ -33,6 +33,27 @@ |
| 33 | 33 | //1 孕妇 0 产妇 |
| 34 | 34 | private String isGravida; |
| 35 | 35 | |
| 36 | + // 身高 | |
| 37 | + private String height; | |
| 38 | + //体重 | |
| 39 | + private String weight ; | |
| 40 | + | |
| 41 | + public String getHeight() { | |
| 42 | + return height; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setHeight(String height) { | |
| 46 | + this.height = height; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public String getWeight() { | |
| 50 | + return weight; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setWeight(String weight) { | |
| 54 | + this.weight = weight; | |
| 55 | + } | |
| 56 | + | |
| 36 | 57 | public String getIsGravida() { |
| 37 | 58 | return isGravida; |
| 38 | 59 | } |