Commit b3f119cf441fa1866261375cca9e6450ef3cf919
1 parent
4a1cbbf9aa
Exists in
master
and in
6 other branches
听力诊断模块
Showing 2 changed files with 19 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
b3f119c
... | ... | @@ -60,6 +60,7 @@ |
60 | 60 | @Autowired |
61 | 61 | private BabyEarFacade babyEarFacade; |
62 | 62 | |
63 | + | |
63 | 64 | /** |
64 | 65 | * 检测儿童是否能够随访 |
65 | 66 | * |
... | ... | @@ -69,7 +70,12 @@ |
69 | 70 | @RequestMapping(method = RequestMethod.GET, value = "/checkBabyFollowUp") |
70 | 71 | @ResponseBody |
71 | 72 | @TokenRequired |
72 | - public BaseResponse checkBabyFollowUp(String babyId) { | |
73 | + public BaseResponse checkBabyFollowUp(String babyId, HttpServletRequest request){ | |
74 | + | |
75 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
76 | + if (loginState == null) { | |
77 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
78 | + } | |
73 | 79 | InitFollowUp initHearingDiagnose = new InitFollowUp(); |
74 | 80 | if (StringUtils.isEmpty(babyId)) {//传入儿童档案id |
75 | 81 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); |
... | ... | @@ -78,7 +84,11 @@ |
78 | 84 | |
79 | 85 | //查询随访记录 |
80 | 86 | BabyPatientExtendEarFollowUpQuery query = new BabyPatientExtendEarFollowUpQuery(); |
81 | - query.setBabyId(babyId); | |
87 | + //当前登录人医院Id | |
88 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
89 | + //获取机构内同一儿童babyIds | |
90 | + List<String> babyIds = babyEarFacade.getBabyIdsByItemOrg(babyId,hospitalId); | |
91 | + query.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()])); | |
82 | 92 | List<BabyPatientExtendEarFollowUp> followUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUp(query); |
83 | 93 | //是否结案 |
84 | 94 | boolean Ifclose = false; |
... | ... | @@ -99,7 +109,7 @@ |
99 | 109 | //该儿童档案有听诊记录,条件2:听诊记录有一条记录已经确诊。 |
100 | 110 | //查询听诊记录 |
101 | 111 | BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); |
102 | - hdQuery.setBabyId(babyId); | |
112 | + hdQuery.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()])); | |
103 | 113 | List<BabyPatientExtendEarHearingDiagnose> hdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hdQuery); |
104 | 114 | |
105 | 115 | if (hdList == null && hdList.size() == 0) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
b3f119c
... | ... | @@ -1477,11 +1477,14 @@ |
1477 | 1477 | */ |
1478 | 1478 | public BaseResponse findBabyEarSrc(String babyId, Integer userId) { |
1479 | 1479 | BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery(); |
1480 | - query.setBabyId(babyId); | |
1481 | - query.setStatus(0); | |
1482 | - query.setSort("create_date"); | |
1483 | 1480 | //当前登录人医院Id |
1484 | 1481 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
1482 | + //获取机构内同一儿童babyIds | |
1483 | + List<String> babyIds = getBabyIdsByItemOrg(babyId,hospitalId); | |
1484 | + query.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()])); | |
1485 | + query.setStatus(0); | |
1486 | + query.setSort("create_date"); | |
1487 | + | |
1485 | 1488 | List hospitalIds = getOrgHospitalIds(hospitalId); |
1486 | 1489 | String[] checkHospitalIds = (String[]) hospitalIds.toArray(new String[hospitalIds.size()]); |
1487 | 1490 | query.setCheckHospitalIds(checkHospitalIds); |