Commit b7045361655baeb66f57209ca3e44455196fd2d6

Authored by liquanyu
1 parent 556552d9f3

孕妇学校

Showing 2 changed files with 24 additions and 4 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java View file @ b704536
... ... @@ -151,8 +151,12 @@
151 151  
152 152 /**
153 153 * 获取小程序的孕妇学校列表
154   - * @param hospitalIds 相关医院id
  154 + * @param hospitalIds 医院id
155 155 * @param patientId 患者id
  156 + * @param keyword 查询关键字
  157 + * @param status 2 最新课程 3 历史课程
  158 + * @param page
  159 + * @param limit
156 160 * @param request
157 161 * @return
158 162 */
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java View file @ b704536
... ... @@ -368,6 +368,10 @@
368 368 query.setKeyword(keyword);
369 369 List<CourseModel> courseModels = courseService.queryCourseList(query);
370 370  
  371 +
  372 + PatientCourseQuery patientCourseQuery = new PatientCourseQuery();
  373 + patientCourseQuery.setYn(YnEnums.YES.getId());
  374 +
371 375 List<Map> results = new ArrayList<>();
372 376 CourseTypeQuery courseTypeQuery = new CourseTypeQuery();
373 377 query.setYn(YnEnums.YES.getId());
374 378  
... ... @@ -413,10 +417,22 @@
413 417  
414 418  
415 419 //课程上限人数
416   - result.put("limitNum",model.getLimitNum() == null ? "0" : String.valueOf(model.getLimitNum()));
  420 + result.put("limitNum", model.getLimitNum() == null ? "0" : String.valueOf(model.getLimitNum()));
417 421  
418   - //孕妇与课程的状态
419   - result.put("status","");
  422 +
  423 + patientCourseQuery.setCourseId(model.getId());
  424 + patientCourseQuery.setPatientId(patientId);
  425 +
  426 +
  427 + Integer patientStatus = 0;
  428 + List<PatientCourseModel> patientCourseModels = patientCourseService.queryPatientCourseList(patientCourseQuery);
  429 + if (CollectionUtils.isNotEmpty(patientCourseModels))
  430 + {
  431 + patientStatus = patientCourseModels.get(0).getStatus();
  432 + }
  433 +
  434 + //孕妇与课程的状态 0未预约 1预约,2签到
  435 + result.put("patientCourseStatus",String.valueOf(patientStatus));
420 436  
421 437 results.add(result);
422 438 }