From e3a243eb89856ffccad5c4d79a1134e04e34e76c Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期四, 24 十月 2024 16:54:58 +0800 Subject: [PATCH] update --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java index cf0654b..c165a8a 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java @@ -1,11 +1,8 @@ package cn.lihu.jh.module.ecg.service.appointment; import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; -import org.springframework.transaction.annotation.Transactional; -import java.util.*; import cn.lihu.jh.module.ecg.controller.admin.appointment.vo.*; import cn.lihu.jh.module.ecg.dal.dataobject.appointment.AppointmentDO; import cn.lihu.jh.framework.common.pojo.PageResult; @@ -13,6 +10,11 @@ import cn.lihu.jh.framework.common.util.object.BeanUtils; import cn.lihu.jh.module.ecg.dal.mysql.appointment.AppointmentMapper; + +import javax.annotation.Resource; + +import java.time.LocalDateTime; +import java.util.Date; import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*; @@ -33,6 +35,10 @@ public Integer createAppointment(AppointmentSaveReqVO createReqVO) { // 鎻掑叆 AppointmentDO appointment = BeanUtils.toBean(createReqVO, AppointmentDO.class); + + appointment.setBookTime( LocalDateTime.now() ); + appointment.setBookSrc( 0 ); + appointmentMapper.insert(appointment); // 杩斿洖 return appointment.getId(); @@ -67,6 +73,11 @@ } @Override + public AppointmentDO getAppointmentByPatId(String patId) { + return appointmentMapper.getByPatId( patId ); + } + + @Override public PageResult<AppointmentDO> getAppointmentPage(AppointmentPageReqVO pageReqVO) { return appointmentMapper.selectPage(pageReqVO); } -- Gitblit v1.9.3