hospital
parent
17d555ad6d
commit
7f173b5fd7
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 t_patient_hospital_doctor
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-04
|
||||
*/
|
||||
public class TPatientHospitalDoctor extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 患者ID */
|
||||
@Excel(name = "患者ID")
|
||||
private Long patientId;
|
||||
|
||||
/** 医院ID */
|
||||
@Excel(name = "医院ID")
|
||||
private Long hospitalId;
|
||||
|
||||
/** 医生ID */
|
||||
@Excel(name = "医生ID")
|
||||
private Long doctorId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPatientId(Long patientId)
|
||||
{
|
||||
this.patientId = patientId;
|
||||
}
|
||||
|
||||
public Long getPatientId()
|
||||
{
|
||||
return patientId;
|
||||
}
|
||||
public void setHospitalId(Long hospitalId)
|
||||
{
|
||||
this.hospitalId = hospitalId;
|
||||
}
|
||||
|
||||
public Long getHospitalId()
|
||||
{
|
||||
return hospitalId;
|
||||
}
|
||||
public void setDoctorId(Long doctorId)
|
||||
{
|
||||
this.doctorId = doctorId;
|
||||
}
|
||||
|
||||
public Long getDoctorId()
|
||||
{
|
||||
return doctorId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("patientId", getPatientId())
|
||||
.append("hospitalId", getHospitalId())
|
||||
.append("doctorId", getDoctorId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TPatientHospitalDoctor;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-04
|
||||
*/
|
||||
public interface TPatientHospitalDoctorMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public TPatientHospitalDoctor selectTPatientHospitalDoctorById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<TPatientHospitalDoctor> selectTPatientHospitalDoctorList(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTPatientHospitalDoctorById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTPatientHospitalDoctorByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TPatientHospitalDoctor;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-04
|
||||
*/
|
||||
public interface ITPatientHospitalDoctorService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public TPatientHospitalDoctor selectTPatientHospitalDoctorById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<TPatientHospitalDoctor> selectTPatientHospitalDoctorList(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTPatientHospitalDoctorByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTPatientHospitalDoctorById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.TPatientHospitalDoctorMapper;
|
||||
import com.ruoyi.system.domain.TPatientHospitalDoctor;
|
||||
import com.ruoyi.system.service.ITPatientHospitalDoctorService;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-08-04
|
||||
*/
|
||||
@Service
|
||||
public class TPatientHospitalDoctorServiceImpl implements ITPatientHospitalDoctorService
|
||||
{
|
||||
@Autowired
|
||||
private TPatientHospitalDoctorMapper tPatientHospitalDoctorMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public TPatientHospitalDoctor selectTPatientHospitalDoctorById(Long id)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.selectTPatientHospitalDoctorById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<TPatientHospitalDoctor> selectTPatientHospitalDoctorList(TPatientHospitalDoctor tPatientHospitalDoctor)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.insertTPatientHospitalDoctor(tPatientHospitalDoctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param tPatientHospitalDoctor 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTPatientHospitalDoctor(TPatientHospitalDoctor tPatientHospitalDoctor)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.updateTPatientHospitalDoctor(tPatientHospitalDoctor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTPatientHospitalDoctorByIds(Long[] ids)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.deleteTPatientHospitalDoctorByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTPatientHospitalDoctorById(Long id)
|
||||
{
|
||||
return tPatientHospitalDoctorMapper.deleteTPatientHospitalDoctorById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.TPatientHospitalDoctorMapper">
|
||||
|
||||
<resultMap type="TPatientHospitalDoctor" id="TPatientHospitalDoctorResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="hospitalId" column="hospital_id" />
|
||||
<result property="doctorId" column="doctor_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTPatientHospitalDoctorVo">
|
||||
select id, patient_id, hospital_id, doctor_id from t_patient_hospital_doctor
|
||||
</sql>
|
||||
|
||||
<select id="selectTPatientHospitalDoctorList" parameterType="TPatientHospitalDoctor" resultMap="TPatientHospitalDoctorResult">
|
||||
<include refid="selectTPatientHospitalDoctorVo"/>
|
||||
<where>
|
||||
<if test="patientId != null "> and patient_id = #{patientId}</if>
|
||||
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
|
||||
<if test="doctorId != null "> and doctor_id = #{doctorId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTPatientHospitalDoctorById" parameterType="Long" resultMap="TPatientHospitalDoctorResult">
|
||||
<include refid="selectTPatientHospitalDoctorVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTPatientHospitalDoctor" parameterType="TPatientHospitalDoctor" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_patient_hospital_doctor
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">patient_id,</if>
|
||||
<if test="hospitalId != null">hospital_id,</if>
|
||||
<if test="doctorId != null">doctor_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">#{patientId},</if>
|
||||
<if test="hospitalId != null">#{hospitalId},</if>
|
||||
<if test="doctorId != null">#{doctorId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTPatientHospitalDoctor" parameterType="TPatientHospitalDoctor">
|
||||
update t_patient_hospital_doctor
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="patientId != null">patient_id = #{patientId},</if>
|
||||
<if test="hospitalId != null">hospital_id = #{hospitalId},</if>
|
||||
<if test="doctorId != null">doctor_id = #{doctorId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTPatientHospitalDoctorById" parameterType="Long">
|
||||
delete from t_patient_hospital_doctor where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTPatientHospitalDoctorByIds" parameterType="String">
|
||||
delete from t_patient_hospital_doctor where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue