Commit ab39df8c595b9665cdfa25371dd10e72f2e4c0d3

Authored by litao@lymsh.com
1 parent 1e16df0507

12333

Showing 1 changed file with 14 additions and 8 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java View file @ ab39df8
... ... @@ -56,7 +56,13 @@
56 56 patientCriteria.orOperator(Criteria.where("phone").regex(key), Criteria.where("username").regex(key), Criteria.where("cardNo").is(key));
57 57 residentCriteria.orOperator(Criteria.where("phone").regex(key), Criteria.where("username").regex(key), Criteria.where("certificateNum").is(key));
58 58 }
59   - List<Patients> patients = mongoTemplate.find(Query.query(patientCriteria), Patients.class);
  59 + PageResult mongoPage = findMongoPage(Patients.class, Query.query(patientCriteria), page, limit);
  60 + List<Patients> patients = null;
  61 + if(mongoPage.getCount() >= limit) {
  62 + patients = (List<Patients>) mongoPage.getGrid();
  63 + } else {
  64 + patients = mongoTemplate.find(Query.query(patientCriteria), Patients.class);
  65 + }
60 66 List<ResidentsArchiveModel> residentsArchiveModels = mongoTemplate.find(Query.query(residentCriteria), ResidentsArchiveModel.class);
61 67 List<Map<String, Object>> restList = new ArrayList<>();
62 68 for (Patients patient : patients) { // type: 1=孕期 3=产后
63 69  
... ... @@ -94,14 +100,14 @@
94 100 temp.put("resident", 3); // 妇女建档
95 101 temp.put("residentDate", DateUtil.getyyyy_MM_dd(archiveModel.getBuildDay())); // 妇女建档日期
96 102 temp.put("check", 2); // 婚检
97   - temp.put("bookbuild", null); // 孕期建档 1=勾勾 2=叉叉
98   - temp.put("bookbuildDate", null);
  103 + temp.put("bookbuild", 2); // 孕期建档 1=勾勾 2=叉叉
  104 + temp.put("bookbuildDate", "--");
99 105 temp.put("yjcount", 0); // 孕检次数 = 初诊 + 复诊
100   - temp.put("cqsc", 3); // 产前筛查 1=勾勾 2=叉叉
101   - temp.put("fm", 3); // 分娩 1=勾勾 2=叉叉
102   - temp.put("fmType", null); // 分娩方式
103   - temp.put("chfc", 3); // 产后复查 1=勾勾 2=叉叉
104   - temp.put("chfcCount", null); // 复查次数
  106 + temp.put("cqsc", 2); // 产前筛查 1=勾勾 2=叉叉
  107 + temp.put("fm", 2); // 分娩 1=勾勾 2=叉叉
  108 + temp.put("fmType", "--"); // 分娩方式
  109 + temp.put("chfc", 2); // 产后复查 1=勾勾 2=叉叉
  110 + temp.put("chfcCount", 0); // 复查次数
105 111 restList.add(temp);
106 112 }
107 113 return RespBuilder.buildSuccess(new PageResult(restList.size(), page, limit, CollectionUtils.getPageIds(restList, page, limit)));