Commit 0f5d369fc886126d43505754e0107f362a32a2fa
1 parent
f6b6b147b0
Exists in
master
and in
6 other branches
儿童听诊模块
Showing 5 changed files with 46 additions and 16 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
- platform-common/src/main/java/com/lyms/platform/common/enums/HdEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearingDiagnoseListResult.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
View file @
0f5d369
platform-common/src/main/java/com/lyms/platform/common/enums/HdEnums.java
View file @
0f5d369
| ... | ... | @@ -35,6 +35,17 @@ |
| 35 | 35 | this.name = name; |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | + public static String getHsTitle(int id) { | |
| 39 | + if (id == 0) { | |
| 40 | + return ""; | |
| 41 | + } | |
| 42 | + for (HandlingSuggestionEnums cfEnums : HandlingSuggestionEnums.values()) { | |
| 43 | + if (id == cfEnums.getId()) { | |
| 44 | + return cfEnums.getName(); | |
| 45 | + } | |
| 46 | + } | |
| 47 | + return ""; | |
| 48 | + } | |
| 38 | 49 | |
| 39 | 50 | public enum IsConfirmEnums { |
| 40 | 51 | BY(1, "已确诊"), |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
0f5d369
| ... | ... | @@ -383,13 +383,15 @@ |
| 383 | 383 | res.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); |
| 384 | 384 | res.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); |
| 385 | 385 | } |
| 386 | - | |
| 387 | - Users user = usersService.getUsers(Integer.parseInt(fu.getFollowDoctorId())); | |
| 388 | - if (user != null) { | |
| 389 | - //设置随访医生名称 | |
| 390 | - res.setDoctorName(user.getName()); | |
| 386 | + if(StringUtils.isNotEmpty(fu.getFollowDoctorId())){ | |
| 387 | + Users user = usersService.getUsers(Integer.parseInt(fu.getFollowDoctorId())); | |
| 388 | + if (user != null) { | |
| 389 | + //设置随访医生名称 | |
| 390 | + res.setDoctorName(user.getName()); | |
| 391 | + } | |
| 391 | 392 | } |
| 392 | 393 | |
| 394 | + | |
| 393 | 395 | fuResult.add(res); |
| 394 | 396 | } |
| 395 | 397 | return FrontEndResult.ini().setData(fuResult).setPageInfo(query.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
| ... | ... | @@ -462,7 +464,10 @@ |
| 462 | 464 | obj.setModifyId(String.valueOf(loginState.getId())); |
| 463 | 465 | obj.setModifyTime(new Date()); |
| 464 | 466 | babyPatientExtendEarFollowUpService.updateBabyPatientExtendEarFollowUp(obj); |
| 465 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("修改成功"); | |
| 467 | + BaseResponse response = new BaseResponse(); | |
| 468 | + response.setObject(obj.getId()); | |
| 469 | + | |
| 470 | + return response.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("修改成功"); | |
| 466 | 471 | } |
| 467 | 472 | |
| 468 | 473 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
0f5d369
| ... | ... | @@ -6,10 +6,7 @@ |
| 6 | 6 | import com.lyms.platform.common.base.LoginContext; |
| 7 | 7 | import com.lyms.platform.common.base.PageInfo; |
| 8 | 8 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 9 | -import com.lyms.platform.common.enums.ConfirmedEnums; | |
| 10 | -import com.lyms.platform.common.enums.HearingDiagnosisEnums; | |
| 11 | -import com.lyms.platform.common.enums.HighRiskEnum; | |
| 12 | -import com.lyms.platform.common.enums.SexEnum; | |
| 9 | +import com.lyms.platform.common.enums.*; | |
| 13 | 10 | import com.lyms.platform.common.result.BaseListResponse; |
| 14 | 11 | import com.lyms.platform.common.result.BaseResponse; |
| 15 | 12 | import com.lyms.platform.common.utils.DateUtil; |
| 16 | 13 | |
| 17 | 14 | |
| ... | ... | @@ -131,20 +128,20 @@ |
| 131 | 128 | behd.setIsconfirmStr(behd.getIsconfirm() == 1 ? "是" : "否"); |
| 132 | 129 | } |
| 133 | 130 | |
| 134 | - if (behd.getConfirmTime() != null) {//计算儿童月龄 | |
| 131 | + if (behd.getDiagnoseTime() != null) {//计算儿童月龄 | |
| 135 | 132 | String babyId = behd.getBabyId(); |
| 136 | 133 | //查询baby档案查询出生日期 |
| 137 | 134 | BabyModel babyModel = babyService.getOneBabyById(babyId); |
| 138 | 135 | if (babyModel != null) { |
| 139 | 136 | //设置确诊时宝宝月龄 |
| 140 | - String monthAget = DateUtil.getBabyMonthAge(babyModel.getBirth(), behd.getConfirmTime()); | |
| 137 | + String monthAget = DateUtil.getBabyMonthAge(babyModel.getBirth(), behd.getDiagnoseTime()); | |
| 141 | 138 | behd.setMonthAge(monthAget); |
| 142 | 139 | } |
| 143 | 140 | //设置确诊时间字符串 |
| 144 | 141 | behd.setConfirmTimeStr(DateUtil.getyyyy_MM_dd(behd.getConfirmTime())); |
| 145 | 142 | } |
| 146 | 143 | |
| 147 | - if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum | |
| 144 | + if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum | |
| 148 | 145 | { |
| 149 | 146 | StringBuffer hfBuff = new StringBuffer(); |
| 150 | 147 | String[] highFactors = behd.getHighFactor().split(","); |
| ... | ... | @@ -196,6 +193,10 @@ |
| 196 | 193 | behd.setDiagnResultStr(hfBuff.toString()); |
| 197 | 194 | } |
| 198 | 195 | |
| 196 | + if(StringUtils.isNotEmpty(behd.getDiagnHandSugge())){ | |
| 197 | + behd.setDiagnHandSugge(HdEnums.getHsTitle(Integer.parseInt(behd.getDiagnHandSugge()))); | |
| 198 | + } | |
| 199 | + | |
| 199 | 200 | BaseResponse result = new BaseResponse(); |
| 200 | 201 | result.setObject(behd); |
| 201 | 202 | result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
| ... | ... | @@ -419,7 +420,7 @@ |
| 419 | 420 | hea.setId(hd.getId()); |
| 420 | 421 | hea.setDiagnoseTime(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); |
| 421 | 422 | String docotorId = hd.getDiagnDoctorId(); |
| 422 | - Users users = usersService.getUsers(Integer.parseInt(docotorId)); | |
| 423 | + Users users = usersService.getUsers(Integer.parseInt(docotorId==null?"0":docotorId)); | |
| 423 | 424 | if (users != null) { |
| 424 | 425 | hea.setDoctorName(users.getName() == null ? "-" : users.getName()); |
| 425 | 426 | } |
| ... | ... | @@ -461,6 +462,7 @@ |
| 461 | 462 | BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); |
| 462 | 463 | if (babyModel != null) { |
| 463 | 464 | hea.setBabyName(babyModel.getName()); |
| 465 | + hea.setBabyId(hd.getBabyId()); | |
| 464 | 466 | hea.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); |
| 465 | 467 | hea.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); |
| 466 | 468 | hea.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); |
| ... | ... | @@ -589,7 +591,9 @@ |
| 589 | 591 | obj.setModifyId(String.valueOf(loginState.getId())); |
| 590 | 592 | obj.setModifyTime(new Date()); |
| 591 | 593 | hearingDiagnoseService.updateBabyPatientExtendEarHearingDiagnose(obj); |
| 592 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("修改成功"); | |
| 594 | + BaseResponse response = new BaseResponse(); | |
| 595 | + response.setObject(obj.getId()); | |
| 596 | + return response.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("修改成功"); | |
| 593 | 597 | } |
| 594 | 598 | |
| 595 | 599 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearingDiagnoseListResult.java
View file @
0f5d369
| ... | ... | @@ -7,6 +7,8 @@ |
| 7 | 7 | public class HearingDiagnoseListResult { |
| 8 | 8 | //主键 |
| 9 | 9 | private String id; |
| 10 | + //儿童id | |
| 11 | + private String babyId; | |
| 10 | 12 | //儿童名称 |
| 11 | 13 | private String babyName; |
| 12 | 14 | //母亲姓名 |
| ... | ... | @@ -33,6 +35,14 @@ |
| 33 | 35 | private String mommnyEncryptPhone; |
| 34 | 36 | //听力高危集合 |
| 35 | 37 | private String highRiskEnums; |
| 38 | + | |
| 39 | + public String getBabyId() { | |
| 40 | + return babyId; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setBabyId(String babyId) { | |
| 44 | + this.babyId = babyId; | |
| 45 | + } | |
| 36 | 46 | |
| 37 | 47 | public String getId() { |
| 38 | 48 | return id; |