From 5045b6cc9a5ec1899de902e2a7d2ca31a1fb56a9 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 9 Aug 2022 14:56:09 +0800 Subject: [PATCH] =?UTF-8?q?app=E6=82=A3=E8=80=85=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/api/AppController.java | 10 ++- .../domain/req/AppPatientHospitalDoctor.java | 64 +++++++++++++++++++ 2 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientHospitalDoctor.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index e38b24d..c05e542 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -4,11 +4,13 @@ import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.*; +import com.ruoyi.system.domain.req.AppPatientHospitalDoctor; import com.ruoyi.system.domain.req.AppPatientReq; import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -81,16 +83,18 @@ public class AppController extends BaseController } /** - * 病人预约 + * 患者预约 * - * @param tPatientHospitalDoctor tPatientHospitalDoctor + * @param appPatientHospitalDoctor 应用病人医院医生 * @return {@code AjaxResult} */ @ApiOperation("患者预约") @GetMapping("/patientsToMakeAnAppointment") - public AjaxResult patientsToMakeAnAppointment(TPatientHospitalDoctor tPatientHospitalDoctor) + public AjaxResult patientsToMakeAnAppointment(AppPatientHospitalDoctor appPatientHospitalDoctor) { // 患者预约,新增t_record中的一条记录;判断关联表是否存在当前关系 + TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor(); + BeanUtils.copyProperties(appPatientHospitalDoctor, tPatientHospitalDoctor); TRecord tRecord = new TRecord(); tRecord.setHospitalId(tPatientHospitalDoctor.getHospitalId()); tRecord.setPatientId(tPatientHospitalDoctor.getPatientId()); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientHospitalDoctor.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientHospitalDoctor.java new file mode 100644 index 0000000..b966230 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientHospitalDoctor.java @@ -0,0 +1,64 @@ +package com.ruoyi.system.domain.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * App端患者预约入参实体 + * + * @author gongzhenkun + * @date 2022/8/9 14:48 + */ +@ApiModel(value = "AppPatientHospitalDoctor", description = "App端患者预约入参实体") +public class AppPatientHospitalDoctor implements Serializable +{ + private static final long serialVersionUID = 1L; + + /** 患者ID */ + @NotNull(message = "patientId不为空") + @ApiModelProperty("patientId") + private Long patientId; + + /** 医院ID */ + @NotNull(message = "hospitalId不为空") + @ApiModelProperty("hospitalId") + private Long hospitalId; + + /** 医生ID */ + @NotNull(message = "doctorId不为空") + @ApiModelProperty("doctorId") + private Long doctorId; + + public Long getPatientId() + { + return patientId; + } + + public void setPatientId(Long patientId) + { + this.patientId = patientId; + } + + public Long getHospitalId() + { + return hospitalId; + } + + public void setHospitalId(Long hospitalId) + { + this.hospitalId = hospitalId; + } + + public Long getDoctorId() + { + return doctorId; + } + + public void setDoctorId(Long doctorId) + { + this.doctorId = doctorId; + } +}