Commit 1ad48f56ca039d3a19bc4687c035d68823469f21

Authored by zhangchao
1 parent cab9fbf894
Exists in dev

#fix:优化建档产检医生查询

Showing 3 changed files with 8 additions and 4 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java View file @ 1ad48f5
... ... @@ -108,6 +108,7 @@
108 108 if (!StringUtils.isEmpty(patientsQuery.getSort())) {
109 109 return iPatientDao.queryPatient(query.addOrder(Sort.Direction.ASC, patientsQuery.getSort()));
110 110 }
  111 + System.out.println(query.convertToMongoQuery().toString());
111 112 return iPatientDao.queryPatient(query.addOrder(Sort.Direction.DESC, "id"));
112 113 }
113 114  
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 1ad48f5
... ... @@ -1227,7 +1227,10 @@
1227 1227  
1228 1228 if (StringUtils.isNotEmpty(lastCheckEmployeeId)) {
1229 1229 if("0123456789".equals(lastCheckEmployeeId)){
1230   - condition = condition.and("lastCheckEmployeeId", false, MongoOper.EXISTS);
  1230 + MongoCondition condition2 = new MongoCondition("lastCheckEmployeeId", false, MongoOper.EXISTS);
  1231 + MongoCondition condition3 = new MongoCondition("lastCheckEmployeeId", "", MongoOper.IS);
  1232 + MongoCondition condition4 = new MongoCondition("lastCheckEmployeeId", null, MongoOper.IS);
  1233 + condition=condition.orCondition(new MongoCondition[]{condition2, condition3,condition4});
1231 1234 }else {
1232 1235 condition = condition.and("lastCheckEmployeeId", lastCheckEmployeeId, MongoOper.IS);
1233 1236 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 1ad48f5
... ... @@ -3325,12 +3325,12 @@
3325 3325 patientsQuery.setHighRiskFileCode(patientManagerRequest.getHighRiskFileCode());
3326 3326 // System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString());
3327 3327 if (StringUtils.isNotEmpty(patientManagerRequest.getLastCheckEmployeeId())){
3328   - Integer userCheckId = usersService.getUserId(hospitalId,patientManagerRequest.getLastCheckEmployeeId());
  3328 + /* Integer userCheckId = usersService.getUserId(hospitalId,patientManagerRequest.getLastCheckEmployeeId());
3329 3329 if (userCheckId!=null){
3330 3330 patientsQuery.setLastCheckEmployeeId(String.valueOf(userCheckId));
3331   - }else {
  3331 + }else {*/
3332 3332 patientsQuery.setLastCheckEmployeeId(patientManagerRequest.getLastCheckEmployeeId());
3333   - }
  3333 + //}
3334 3334 }
3335 3335  
3336 3336