eight
2024-10-30 12c97309b50530c8c7f9c6d48641c79d07a44b2b
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -56,7 +56,12 @@
        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();
    }
@@ -94,7 +99,7 @@
        // 先从医院平台查询
        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);
@@ -120,7 +125,9 @@
        // 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 );