Commit 3c987c3559f95b202067347e2444d10e27e0bba7

Authored by litao@lymsh.com
1 parent 00e9e207b8

1233

Showing 2 changed files with 4 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java View file @ 3c987c3
... ... @@ -70,9 +70,8 @@
70 70 public BaseResponse list(String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age, Integer page, Integer limit, Integer userId) {
71 71 List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId);
72 72 Criteria criteria = Criteria.where("yn").is(1).and("hospitalId").in(hospitalIds);
73   - List<String> patientIds = mongoUtil.getPatientIdsByCondition2(hospitalIds, key, vcCardNo, weekStart, weekEnd, age);
74   - System.out.println(patientIds);
75   - criteria.and("parentId").in(patientIds);
  73 + List<String> pids = mongoUtil.getPidsByCondition2(hospitalIds, key, vcCardNo, weekStart, weekEnd, age);
  74 + criteria.and("pid").in(pids);
76 75 PageResult pageResult = findMongoPage(BloodSugar.class, Query.query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit);
77 76 List<BloodSugar> bloodSugars = (List<BloodSugar>) pageResult.getGrid();
78 77 List<Map<String, Object>> restList = new ArrayList<>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java View file @ 3c987c3
... ... @@ -636,12 +636,12 @@
636 636 return ids;
637 637 }
638 638  
639   - public List<String> getPatientIdsByCondition2(List<String> hospitalIds, String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age) {
  639 + public List<String> getPidsByCondition2(List<String> hospitalIds, String key, String vcCardNo, Integer weekStart, Integer weekEnd, Integer age) {
640 640 List<Patients> patients = getPatientByCondition2(hospitalIds, key, vcCardNo, weekStart, weekEnd, age);
641 641 List<String> ids = new ArrayList<>();
642 642 if(CollectionUtils.isNotEmpty(patients)) {
643 643 for (Patients patient : patients) {
644   - ids.add(patient.getId());
  644 + ids.add(patient.getPid());
645 645 }
646 646 }
647 647 return ids;