eight
2024-11-25 4feb978ac9908a46e7285ab0c9a897b89fd99ff2
Fix Bug:  当天多个检查项目  打印小票 检查项目不对
已修改4个文件
18 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -95,8 +95,9 @@
    @Operation(summary = "根据患者编号.查询当天预约")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    @PreAuthorize("@ss.hasPermission('ecg:appointment:query')")
    public CommonResult<AppointmentRespVO> getCurAppointmentByPatId(@RequestParam("patId") String patId) {
        AppointmentDO appointment = appointmentService.getCurAppointmentByPatId( patId );
    public CommonResult<AppointmentRespVO> getCurAppointmentByPatId(@RequestParam("patId") String patId,
                                                                    @RequestParam("checkType") Integer checkType) {
        AppointmentDO appointment = appointmentService.getCurAppointmentByPatIdAndCheckType( patId, checkType );
        return success(BeanUtils.toBean(appointment, AppointmentRespVO.class));
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
@@ -45,8 +45,10 @@
                .orderByDesc(AppointmentDO::getId));
    }
/*
    @Select("select * from lihu.appointment where pat_id = #{patId} and to_days(book_date) = to_days(Now())")
    List<AppointmentDO> getCurrentPatId(@Param("patId") String patId);
*/
    @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(Now()) limit 1")
    AppointmentDO getCurrentByPatAndCheckType(@Param("patId") String patId, @Param("checkType") Integer checkType);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java
@@ -45,12 +45,12 @@
    AppointmentDO getAppointment(Long id);
    /**
     * 获得当天的预约 根据PatID
     * 获得当天的预约 根据PatID and CheckType
     *
     * @param patId 编号
     * @return 预约
     */
    AppointmentDO getCurAppointmentByPatId(String patId);
    AppointmentDO getCurAppointmentByPatIdAndCheckType(String patId, Integer checkType);
    /**
     * 获得预约
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -112,11 +112,10 @@
        return appointmentMapper.selectById(id);
    }
    // TODO 尚不支持, 一位患者当天两种检查项目的情况
    @Override
    public AppointmentDO getCurAppointmentByPatId(String patId) {
        List<AppointmentDO> appointmentDOList = appointmentMapper.getCurrentPatId( patId );
        return 0 == appointmentDOList.size() ? null : appointmentDOList.get(0);
    public AppointmentDO getCurAppointmentByPatIdAndCheckType(String patId, Integer checkType) {
        AppointmentDO appointmentDO = appointmentMapper.getByPatAndCheckTypeAndBookDate( patId, checkType, LocalDate.now() );
        return appointmentDO;
    }
    /**