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; + } +}