Commit fb23e1fa820bfbf06201d8afbed9559ac62811cf
1 parent
6e082a309e
Exists in
master
and in
1 other branch
儿童管理和查询
Showing 4 changed files with 23 additions and 7 deletions
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
fb23e1f
| ... | ... | @@ -409,9 +409,6 @@ |
| 409 | 409 | MongoCondition con = MongoCondition.newInstance("areaPostRestId", areaIdOrRestId, MongoOper.IS); |
| 410 | 410 | condition = condition.orCondition(new MongoCondition[]{con1, con}); |
| 411 | 411 | } |
| 412 | - if(null!=buildType){ | |
| 413 | - condition=condition.and("buildType",buildType,MongoOper.NE); | |
| 414 | - } | |
| 415 | 412 | if (visitstatus != -1) { |
| 416 | 413 | condition = condition.and("isVisit", visitstatus, MongoOper.IS); |
| 417 | 414 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java
View file @
fb23e1f
| ... | ... | @@ -159,7 +159,9 @@ |
| 159 | 159 | */ |
| 160 | 160 | @RequestMapping(value = "/queryBabyList", method = RequestMethod.GET) |
| 161 | 161 | @ResponseBody |
| 162 | - public BaseListResponse queryBabyList(@RequestParam(value = "mcardNo", required = false) String mcardNo, | |
| 162 | + @TokenRequired | |
| 163 | + public BaseListResponse queryBabyList(HttpServletRequest httpServletRequest, | |
| 164 | + @RequestParam(value = "mcardNo", required = false) String mcardNo, | |
| 163 | 165 | @RequestParam(value = "bcardNo", required = false) String bcardNo, |
| 164 | 166 | @RequestParam(value = "mphone", required = false) String mphone, |
| 165 | 167 | @RequestParam(value = "startMonthAge", required = false) Integer startMonthAge, |
| ... | ... | @@ -173,7 +175,7 @@ |
| 173 | 175 | @RequestParam(value = "diagnose", required = false) String diagnose, |
| 174 | 176 | @RequestParam("page") Integer page, |
| 175 | 177 | @RequestParam("limit") Integer limit){ |
| 176 | - | |
| 178 | + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); | |
| 177 | 179 | BabyManageRequest request = new BabyManageRequest(); |
| 178 | 180 | request.setBcardNo(bcardNo); |
| 179 | 181 | request.setMcardNo(mcardNo); |
| ... | ... | @@ -190,7 +192,7 @@ |
| 190 | 192 | request.setLimit(limit); |
| 191 | 193 | request.setPage(page); |
| 192 | 194 | |
| 193 | - return babyBookbuildingFacade.queryBabyList(request); | |
| 195 | + return babyBookbuildingFacade.queryBabyList(request,loginState.getId()); | |
| 194 | 196 | } |
| 195 | 197 | |
| 196 | 198 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
fb23e1f
| ... | ... | @@ -1239,8 +1239,22 @@ |
| 1239 | 1239 | * @param request |
| 1240 | 1240 | * @return |
| 1241 | 1241 | */ |
| 1242 | - public BaseListResponse queryBabyList(BabyManageRequest request) { | |
| 1242 | + public BaseListResponse queryBabyList(BabyManageRequest request,Integer userId) { | |
| 1243 | + | |
| 1244 | + String hospitalId = ""; | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + //得到当前登录的医院id | |
| 1248 | + if (userId != null) | |
| 1249 | + { | |
| 1250 | + Users dbuser = usersService.getUsers(userId); | |
| 1251 | + if (dbuser != null) { | |
| 1252 | + hospitalId = String.valueOf(dbuser.getOrgId()); | |
| 1253 | + } | |
| 1254 | + } | |
| 1255 | + | |
| 1243 | 1256 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1257 | + babyQuery.setHospitalId(String.valueOf(hospitalId)); | |
| 1244 | 1258 | List<BabyModel> models = getBabayListByCondition(request, true, babyQuery); |
| 1245 | 1259 | List<BabyManageListResult> list = new ArrayList<>(); |
| 1246 | 1260 | if (CollectionUtils.isNotEmpty(models)) { |
| ... | ... | @@ -1439,6 +1453,7 @@ |
| 1439 | 1453 | } else { |
| 1440 | 1454 | //按条件查询发送指导短信 |
| 1441 | 1455 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1456 | + babyQuery.setHospitalId(String.valueOf(hospitalId)); | |
| 1442 | 1457 | sendModels = getBabayListByCondition(request.getRequest(), false, babyQuery); |
| 1443 | 1458 | } |
| 1444 | 1459 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
fb23e1f
| ... | ... | @@ -77,6 +77,7 @@ |
| 77 | 77 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 78 | 78 | patientsQuery.setType(1); |
| 79 | 79 | patientsQuery.setHospitalId(yunRequest.getHospitalId()); |
| 80 | + patientsQuery.setBuildType(0); | |
| 80 | 81 | |
| 81 | 82 | if (yunRequest.getPregnantCertificateNum() != null) |
| 82 | 83 | { |
| ... | ... | @@ -341,6 +342,7 @@ |
| 341 | 342 | |
| 342 | 343 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 343 | 344 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 345 | + patientsQuery.setBuildType(0); | |
| 344 | 346 | //如果身份证号码不为空就以身份证号码查询 |
| 345 | 347 | if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo())) |
| 346 | 348 | { |