| | |
| | | appointment.setBookTime( LocalDateTime.now() ); |
| | | appointment.setBookSrc( 1 ); |
| | | |
| | | appointmentMapper.insert(appointment); |
| | | try { |
| | | appointmentMapper.insert(appointment); |
| | | } catch (DuplicateKeyException e) { |
| | | throw exception(APPOINTMENT_EXIST_TODAY); |
| | | } |
| | | |
| | | // 返回 |
| | | return appointment.getId(); |
| | | } |
| | |
| | | // 先从医院平台查询 |
| | | AppointmentDO appointmentExtermal = getAppointmentExtermal( patId ); |
| | | if (null != appointmentExtermal && null != appointmentExtermal.getBookDate() && appointmentExtermal.getBookDate().isEqual(LocalDate.now()) ) { |
| | | // 查询DB中 是否已经存在 |
| | | // 查到当天的预约后,查询DB中 是否已经存在 |
| | | AppointmentDO appointmentDO = appointmentMapper.getCurrentPatId( patId ); |
| | | if (null == appointmentDO ) { |
| | | appointmentExtermal.setBookSrc(0); |
| | |
| | | |
| | | // QueryRisReportList queryEcgRequest |
| | | RestApiResult<AppointmentExternal> result = remoteDataService.httpApi("queryEcgRequest", "ECG", "ECG", reqBodyVo); |
| | | result.getCode(); |
| | | if (0 == result.getRow().size()) { |
| | | return null; |
| | | } |
| | | |
| | | AppointmentExternal appointmentExternal = result.getRow().get(0); |
| | | AppointmentDO appointmentDO = BeanUtils.toBean( appointmentExternal, AppointmentDO.class ); |