eight
2024-10-30 12c97309b50530c8c7f9c6d48641c79d07a44b2b
update
已修改4个文件
30 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java
@@ -13,8 +13,10 @@
    ErrorCode ECG_CONFIG_ERROR = new ErrorCode(1_010_000_001, "心电检查类型的最大准备人数配置不一致");
    ErrorCode APPOINTMENT_NOT_EXISTS = new ErrorCode(1_010_001_000, "预约不存在");
    ErrorCode APPOINTMENT_NOT_TODAY = new ErrorCode(1_010_001_001, "不是当天预约");
    ErrorCode APPOINTMENT_HAVE_QUEUED = new ErrorCode(1_010_001_002, "您已经在排队中了");
    ErrorCode APPOINTMENT_NOT_TODAY = new ErrorCode(1_010_001_010, "不是当天预约");
    ErrorCode APPOINTMENT_EXIST_TODAY = new ErrorCode(1_010_001_020, "当天预约已存在");
    ErrorCode APPOINTMENT_HAVE_QUEUED = new ErrorCode(1_010_001_030, "您已经在排队中了");
    ErrorCode APPOINTMENT_NOT_BILLING = new ErrorCode(1_010_001_040, "查询不到开单信息");
    ErrorCode ROOM_NOT_EXISTS = new ErrorCode(1_010_002_000, "诊室和诊疗床不存在");
    ErrorCode ROOM_NOT_SIT = new ErrorCode(1_010_002_001, "请重新就座");
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -116,6 +116,17 @@
        return success(BeanUtils.toBean(appointment, AppointmentRespVO.class));
    }
    @GetMapping("/query-his-by-patient")
    @Operation(summary = "从HIS.查询患者预约/开单信息")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    @PreAuthorize("@ss.hasPermission('ecg:appointment:query')")
    public CommonResult<AppointmentRespVO> queryHisByPatient(@RequestParam("patId") String patId) {
        AppointmentDO appointment = appointmentService.getAppointmentExtermal( patId );
        if ( null == appointment)
            return error(APPOINTMENT_NOT_BILLING);
        return success(BeanUtils.toBean(appointment, AppointmentRespVO.class));
    }
    @GetMapping("/page")
    @Operation(summary = "获得预约分页")
    @PreAuthorize("@ss.hasPermission('ecg:appointment:query')")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java
@@ -61,7 +61,7 @@
     */
    PageResult<AppointmentDO> getAppointmentPage(AppointmentPageReqVO pageReqVO);
    AppointmentDO getAppointmentExtermal(String mzzyh);
    AppointmentDO getAppointmentExtermal(String patId);
    String appoitmentConfirm(AppointmentConfirmReqVO appointmentConfirmReqVO);
}
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 );
        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 );