Commit 425453d34f9f2c6401e3717f5ae9905ced2df63b
1 parent
afb43e1031
Exists in
master
and in
6 other branches
孕妇学校
Showing 1 changed file with 56 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
View file @
425453d
| ... | ... | @@ -349,8 +349,7 @@ |
| 349 | 349 | { |
| 350 | 350 | |
| 351 | 351 | //状态 1预约,2签到 |
| 352 | - patientCourseQuery.setStatus(null); | |
| 353 | - patientCourseQuery.setStatuses(Arrays.asList(1,2)); | |
| 352 | + patientCourseQuery.setStatus(1); | |
| 354 | 353 | List<PatientCourseModel> patientCourseModels = patientCourseService.queryPatientCourseList(patientCourseQuery); |
| 355 | 354 | if (CollectionUtils.isNotEmpty(patientCourseModels)) |
| 356 | 355 | { |
| ... | ... | @@ -380,10 +379,61 @@ |
| 380 | 379 | } |
| 381 | 380 | else |
| 382 | 381 | { |
| 383 | - BaseResponse objectResponse = new BaseResponse(); | |
| 384 | - objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 385 | - objectResponse.setErrormsg("数据不存在"); | |
| 386 | - return objectResponse; | |
| 382 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 383 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 384 | + patientsQuery.setPvc(queryNo); | |
| 385 | + patientsQuery.setHospitalId(hospitalId); | |
| 386 | + patientsQuery.setDesc("true"); | |
| 387 | + patientsQuery.setSort("created"); | |
| 388 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
| 389 | + if (CollectionUtils.isNotEmpty(patientses)) { | |
| 390 | + Patients patients = patientses.get(0); | |
| 391 | + orderCourse(courseId, patients.getId(),hospitalId,1); | |
| 392 | + } | |
| 393 | + | |
| 394 | + PatientCourseQuery patientCourseQuery1 = new PatientCourseQuery(); | |
| 395 | + patientCourseQuery1.setCourseId(courseId); | |
| 396 | + patientCourseQuery1.setYn(YnEnums.YES.getId()); | |
| 397 | + | |
| 398 | + patientCourseQuery1.setHospitalId(hospitalId); | |
| 399 | + patientCourseQuery1.setQueryNo(queryNo); | |
| 400 | + | |
| 401 | + patientCourseQuery1.setStatus(1); | |
| 402 | + List<PatientCourseModel> patientCourseModels1 = patientCourseService.queryPatientCourseList(patientCourseQuery); | |
| 403 | + | |
| 404 | + | |
| 405 | + if (CollectionUtils.isNotEmpty(patientCourseModels1)) | |
| 406 | + { | |
| 407 | + PatientsQuery patientsQuery1 = new PatientsQuery(); | |
| 408 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 409 | + patientsQuery1.setId(patientCourseModels.get(0).getPatientId()); | |
| 410 | + List<Patients> patientses1 = patientsService.queryPatient(patientsQuery1); | |
| 411 | + if (CollectionUtils.isNotEmpty(patientses1)) | |
| 412 | + { | |
| 413 | + Patients patients = patientses1.get(0); | |
| 414 | + PatientCourseResult result = new PatientCourseResult(); | |
| 415 | + if (patients != null) { | |
| 416 | + result.setAge(DateUtil.getAge(patients.getBirth(), new Date())); | |
| 417 | + result.setCardNo(patients.getCardNo()); | |
| 418 | + result.setUserName(patients.getUsername()); | |
| 419 | + result.setPhone(patients.getPhone()); | |
| 420 | + result.setVcCardNo(patients.getVcCardNo()); | |
| 421 | + result.setPatientId(patients.getId()); | |
| 422 | + result.setPatientCourseId(patientCourseModels.get(0).getId()); | |
| 423 | + } | |
| 424 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 425 | + objectResponse.setData(result); | |
| 426 | + objectResponse.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
| 427 | + objectResponse.setErrormsg("确认是否签到?"); | |
| 428 | + return objectResponse; | |
| 429 | + } | |
| 430 | + } | |
| 431 | + | |
| 432 | + | |
| 433 | +// BaseResponse objectResponse = new BaseResponse(); | |
| 434 | +// objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 435 | +// objectResponse.setErrormsg("数据不存在"); | |
| 436 | +// return objectResponse; | |
| 387 | 437 | } |
| 388 | 438 | } |
| 389 | 439 |