Fix Bug: 当天多个检查项目 打印小票 检查项目不对
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | .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); |
| | |
| | | AppointmentDO getAppointment(Long id); |
| | | |
| | | /** |
| | | * 获得当天的预约 根据PatID |
| | | * 获得当天的预约 根据PatID and CheckType |
| | | * |
| | | * @param patId 编号 |
| | | * @return 预约 |
| | | */ |
| | | AppointmentDO getCurAppointmentByPatId(String patId); |
| | | AppointmentDO getCurAppointmentByPatIdAndCheckType(String patId, Integer checkType); |
| | | |
| | | /** |
| | | * 获得预约 |
| | |
| | | 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; |
| | | } |
| | | |
| | | /** |