代码生成

master
zhuqing 2 years ago
parent afab7d7f26
commit 4751ed93e1

@ -0,0 +1,107 @@
package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TDoctor;
import com.ruoyi.system.service.ITDoctorService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-08-03
*/
@Api("pc-医生列表")
@RestController
@RequestMapping("/system/doctor")
public class TDoctorController extends BaseController
{
@Autowired
private ITDoctorService tDoctorService;
/**
*
*/
@GetMapping("/list")
public TableDataInfo list(TDoctor tDoctor)
{
startPage();
List<TDoctor> list = tDoctorService.selectTDoctorList(tDoctor);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:doctor:export')")
@Log(title = "医生信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TDoctor tDoctor)
{
List<TDoctor> list = tDoctorService.selectTDoctorList(tDoctor);
ExcelUtil<TDoctor> util = new ExcelUtil<TDoctor>(TDoctor.class);
util.exportExcel(response, list, "医生信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:doctor:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDoctorService.selectTDoctorById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:doctor:add')")
@Log(title = "医生信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDoctor tDoctor)
{
return toAjax(tDoctorService.insertTDoctor(tDoctor));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:doctor:edit')")
@Log(title = "医生信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDoctor tDoctor)
{
return toAjax(tDoctorService.updateTDoctor(tDoctor));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:doctor:remove')")
@Log(title = "医生信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDoctorService.deleteTDoctorByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.THospital;
import com.ruoyi.system.service.ITHospitalService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-08-03
*/
@RestController
@RequestMapping("/system/hospital")
public class THospitalController extends BaseController
{
@Autowired
private ITHospitalService tHospitalService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:list')")
@GetMapping("/list")
public TableDataInfo list(THospital tHospital)
{
startPage();
List<THospital> list = tHospitalService.selectTHospitalList(tHospital);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:export')")
@Log(title = "医院信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, THospital tHospital)
{
List<THospital> list = tHospitalService.selectTHospitalList(tHospital);
ExcelUtil<THospital> util = new ExcelUtil<THospital>(THospital.class);
util.exportExcel(response, list, "医院信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tHospitalService.selectTHospitalById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:add')")
@Log(title = "医院信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THospital tHospital)
{
return toAjax(tHospitalService.insertTHospital(tHospital));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:edit')")
@Log(title = "医院信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THospital tHospital)
{
return toAjax(tHospitalService.updateTHospital(tHospital));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:hospital:remove')")
@Log(title = "医院信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tHospitalService.deleteTHospitalByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TPatient;
import com.ruoyi.system.service.ITPatientService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-08-03
*/
@RestController
@RequestMapping("/system/patient")
public class TPatientController extends BaseController
{
@Autowired
private ITPatientService tPatientService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:list')")
@GetMapping("/list")
public TableDataInfo list(TPatient tPatient)
{
startPage();
List<TPatient> list = tPatientService.selectTPatientList(tPatient);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:export')")
@Log(title = "患者信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TPatient tPatient)
{
List<TPatient> list = tPatientService.selectTPatientList(tPatient);
ExcelUtil<TPatient> util = new ExcelUtil<TPatient>(TPatient.class);
util.exportExcel(response, list, "患者信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPatientService.selectTPatientById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:add')")
@Log(title = "患者信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPatient tPatient)
{
return toAjax(tPatientService.insertTPatient(tPatient));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:edit')")
@Log(title = "患者信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPatient tPatient)
{
return toAjax(tPatientService.updateTPatient(tPatient));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:patient:remove')")
@Log(title = "患者信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tPatientService.deleteTPatientByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TRecord;
import com.ruoyi.system.service.ITRecordService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-08-03
*/
@RestController
@RequestMapping("/system/record")
public class TRecordController extends BaseController
{
@Autowired
private ITRecordService tRecordService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping("/list")
public TableDataInfo list(TRecord tRecord)
{
startPage();
List<TRecord> list = tRecordService.selectTRecordList(tRecord);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:export')")
@Log(title = "诊断记录信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TRecord tRecord)
{
List<TRecord> list = tRecordService.selectTRecordList(tRecord);
ExcelUtil<TRecord> util = new ExcelUtil<TRecord>(TRecord.class);
util.exportExcel(response, list, "诊断记录信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tRecordService.selectTRecordById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log(title = "诊断记录信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TRecord tRecord)
{
return toAjax(tRecordService.insertTRecord(tRecord));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:edit')")
@Log(title = "诊断记录信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TRecord tRecord)
{
return toAjax(tRecordService.updateTRecord(tRecord));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:remove')")
@Log(title = "诊断记录信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tRecordService.deleteTRecordByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TTitle;
import com.ruoyi.system.service.ITTitleService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-08-03
*/
@RestController
@RequestMapping("/system/title")
public class TTitleController extends BaseController
{
@Autowired
private ITTitleService tTitleService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:list')")
@GetMapping("/list")
public TableDataInfo list(TTitle tTitle)
{
startPage();
List<TTitle> list = tTitleService.selectTTitleList(tTitle);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:export')")
@Log(title = "职称信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TTitle tTitle)
{
List<TTitle> list = tTitleService.selectTTitleList(tTitle);
ExcelUtil<TTitle> util = new ExcelUtil<TTitle>(TTitle.class);
util.exportExcel(response, list, "职称信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tTitleService.selectTTitleById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:add')")
@Log(title = "职称信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTitle tTitle)
{
return toAjax(tTitleService.insertTTitle(tTitle));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:edit')")
@Log(title = "职称信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTitle tTitle)
{
return toAjax(tTitleService.updateTTitle(tTitle));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:title:remove')")
@Log(title = "职称信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tTitleService.deleteTTitleByIds(ids));
}
}

@ -0,0 +1,206 @@
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_doctor
*
* @author ruoyi
* @date 2022-08-03
*/
public class TDoctor extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 腾讯openid */
@Excel(name = "腾讯openid")
private String openId;
/** 编号 */
@Excel(name = "编号")
private String identifier;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 用户性别0男 1女 2未知 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 年龄 */
@Excel(name = "年龄")
private Integer age;
/** 婚姻状态0未婚 1已婚 2未知 */
@Excel(name = "婚姻状态", readConverterExp = "0=未婚,1=已婚,2=未知")
private String marriage;
/** 职称 */
@Excel(name = "职称")
private String title;
/** 专长 */
@Excel(name = "专长")
private String speciality;
/** 简介 */
@Excel(name = "简介")
private String introduction;
/** 医院 */
@Excel(name = "医院")
private Long hospitalId;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setOpenId(String openId)
{
this.openId = openId;
}
public String getOpenId()
{
return openId;
}
public void setIdentifier(String identifier)
{
this.identifier = identifier;
}
public String getIdentifier()
{
return identifier;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setAge(Integer age)
{
this.age = age;
}
public Integer getAge()
{
return age;
}
public void setMarriage(String marriage)
{
this.marriage = marriage;
}
public String getMarriage()
{
return marriage;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setSpeciality(String speciality)
{
this.speciality = speciality;
}
public String getSpeciality()
{
return speciality;
}
public void setIntroduction(String introduction)
{
this.introduction = introduction;
}
public String getIntroduction()
{
return introduction;
}
public void setHospitalId(Long hospitalId)
{
this.hospitalId = hospitalId;
}
public Long getHospitalId()
{
return hospitalId;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("openId", getOpenId())
.append("identifier", getIdentifier())
.append("name", getName())
.append("phone", getPhone())
.append("sex", getSex())
.append("age", getAge())
.append("marriage", getMarriage())
.append("title", getTitle())
.append("speciality", getSpeciality())
.append("introduction", getIntroduction())
.append("hospitalId", getHospitalId())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,65 @@
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_hospital
*
* @author ruoyi
* @date 2022-08-03
*/
public class THospital extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 排序 */
@Excel(name = "排序")
private Long num;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setNum(Long num)
{
this.num = num;
}
public Long getNum()
{
return num;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("num", getNum())
.toString();
}
}

@ -0,0 +1,192 @@
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
*
* @author ruoyi
* @date 2022-08-03
*/
public class TPatient extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 腾讯openid */
@Excel(name = "腾讯openid")
private String openId;
/** 编号 */
@Excel(name = "编号")
private String identifier;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 用户性别0男 1女 2未知 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 年龄 */
@Excel(name = "年龄")
private Integer age;
/** 身高 */
@Excel(name = "身高")
private Integer height;
/** 体重 */
@Excel(name = "体重")
private Integer weight;
/** 婚姻状态0未婚 1已婚 2未知 */
@Excel(name = "婚姻状态", readConverterExp = "0=未婚,1=已婚,2=未知")
private String marriage;
/** 基础疾病 */
@Excel(name = "基础疾病")
private String disease;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setOpenId(String openId)
{
this.openId = openId;
}
public String getOpenId()
{
return openId;
}
public void setIdentifier(String identifier)
{
this.identifier = identifier;
}
public String getIdentifier()
{
return identifier;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setAge(Integer age)
{
this.age = age;
}
public Integer getAge()
{
return age;
}
public void setHeight(Integer height)
{
this.height = height;
}
public Integer getHeight()
{
return height;
}
public void setWeight(Integer weight)
{
this.weight = weight;
}
public Integer getWeight()
{
return weight;
}
public void setMarriage(String marriage)
{
this.marriage = marriage;
}
public String getMarriage()
{
return marriage;
}
public void setDisease(String disease)
{
this.disease = disease;
}
public String getDisease()
{
return disease;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("openId", getOpenId())
.append("identifier", getIdentifier())
.append("name", getName())
.append("phone", getPhone())
.append("sex", getSex())
.append("age", getAge())
.append("height", getHeight())
.append("weight", getWeight())
.append("marriage", getMarriage())
.append("disease", getDisease())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,210 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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_record
*
* @author ruoyi
* @date 2022-08-03
*/
public class TRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 患者 */
@Excel(name = "患者")
private Long patientId;
/** 医生 */
@Excel(name = "医生")
private Long doctorId;
/** 医院 */
@Excel(name = "医院")
private Long hospitalId;
/** 状态0预约 1就诊 */
@Excel(name = "状态", readConverterExp = "0=预约,1=就诊")
private String status;
/** ai诊断结果 */
@Excel(name = "ai诊断结果")
private String aiResult;
/** ai诊断结果无图片 */
@Excel(name = "ai诊断结果无图片")
private String aiResult2;
/** 医生诊断结果 */
@Excel(name = "医生诊断结果")
private String updateResult;
/** 医生诊断结果,无图片 */
@Excel(name = "医生诊断结果,无图片")
private String updateResult2;
/** 上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date uploadTime;
/** 舌下 */
@Excel(name = "舌下")
private String imgSx;
/** 舌上 */
@Excel(name = "舌上")
private String imgSm;
/** 响应时长 */
@Excel(name = "响应时长")
private Long responseTime;
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 setDoctorId(Long doctorId)
{
this.doctorId = doctorId;
}
public Long getDoctorId()
{
return doctorId;
}
public void setHospitalId(Long hospitalId)
{
this.hospitalId = hospitalId;
}
public Long getHospitalId()
{
return hospitalId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setAiResult(String aiResult)
{
this.aiResult = aiResult;
}
public String getAiResult()
{
return aiResult;
}
public void setAiResult2(String aiResult2)
{
this.aiResult2 = aiResult2;
}
public String getAiResult2()
{
return aiResult2;
}
public void setUpdateResult(String updateResult)
{
this.updateResult = updateResult;
}
public String getUpdateResult()
{
return updateResult;
}
public void setUpdateResult2(String updateResult2)
{
this.updateResult2 = updateResult2;
}
public String getUpdateResult2()
{
return updateResult2;
}
public void setUploadTime(Date uploadTime)
{
this.uploadTime = uploadTime;
}
public Date getUploadTime()
{
return uploadTime;
}
public void setImgSx(String imgSx)
{
this.imgSx = imgSx;
}
public String getImgSx()
{
return imgSx;
}
public void setImgSm(String imgSm)
{
this.imgSm = imgSm;
}
public String getImgSm()
{
return imgSm;
}
public void setResponseTime(Long responseTime)
{
this.responseTime = responseTime;
}
public Long getResponseTime()
{
return responseTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("patientId", getPatientId())
.append("doctorId", getDoctorId())
.append("hospitalId", getHospitalId())
.append("status", getStatus())
.append("aiResult", getAiResult())
.append("aiResult2", getAiResult2())
.append("updateResult", getUpdateResult())
.append("updateResult2", getUpdateResult2())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("uploadTime", getUploadTime())
.append("imgSx", getImgSx())
.append("imgSm", getImgSm())
.append("responseTime", getResponseTime())
.toString();
}
}

@ -0,0 +1,65 @@
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_title
*
* @author ruoyi
* @date 2022-08-03
*/
public class TTitle extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 排序 */
@Excel(name = "排序")
private Long num;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setNum(Long num)
{
this.num = num;
}
public Long getNum()
{
return num;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("num", getNum())
.toString();
}
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TDoctor;
/**
* Mapper
*
* @author ruoyi
* @date 2022-08-03
*/
public interface TDoctorMapper
{
/**
*
*
* @param id
* @return
*/
public TDoctor selectTDoctorById(Long id);
/**
*
*
* @param tDoctor
* @return
*/
public List<TDoctor> selectTDoctorList(TDoctor tDoctor);
/**
*
*
* @param tDoctor
* @return
*/
public int insertTDoctor(TDoctor tDoctor);
/**
*
*
* @param tDoctor
* @return
*/
public int updateTDoctor(TDoctor tDoctor);
/**
*
*
* @param id
* @return
*/
public int deleteTDoctorById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTDoctorByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.THospital;
/**
* Mapper
*
* @author ruoyi
* @date 2022-08-03
*/
public interface THospitalMapper
{
/**
*
*
* @param id
* @return
*/
public THospital selectTHospitalById(Long id);
/**
*
*
* @param tHospital
* @return
*/
public List<THospital> selectTHospitalList(THospital tHospital);
/**
*
*
* @param tHospital
* @return
*/
public int insertTHospital(THospital tHospital);
/**
*
*
* @param tHospital
* @return
*/
public int updateTHospital(THospital tHospital);
/**
*
*
* @param id
* @return
*/
public int deleteTHospitalById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTHospitalByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TPatient;
/**
* Mapper
*
* @author ruoyi
* @date 2022-08-03
*/
public interface TPatientMapper
{
/**
*
*
* @param id
* @return
*/
public TPatient selectTPatientById(Long id);
/**
*
*
* @param tPatient
* @return
*/
public List<TPatient> selectTPatientList(TPatient tPatient);
/**
*
*
* @param tPatient
* @return
*/
public int insertTPatient(TPatient tPatient);
/**
*
*
* @param tPatient
* @return
*/
public int updateTPatient(TPatient tPatient);
/**
*
*
* @param id
* @return
*/
public int deleteTPatientById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTPatientByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TRecord;
/**
* Mapper
*
* @author ruoyi
* @date 2022-08-03
*/
public interface TRecordMapper
{
/**
*
*
* @param id
* @return
*/
public TRecord selectTRecordById(Long id);
/**
*
*
* @param tRecord
* @return
*/
public List<TRecord> selectTRecordList(TRecord tRecord);
/**
*
*
* @param tRecord
* @return
*/
public int insertTRecord(TRecord tRecord);
/**
*
*
* @param tRecord
* @return
*/
public int updateTRecord(TRecord tRecord);
/**
*
*
* @param id
* @return
*/
public int deleteTRecordById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTRecordByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TTitle;
/**
* Mapper
*
* @author ruoyi
* @date 2022-08-03
*/
public interface TTitleMapper
{
/**
*
*
* @param id
* @return
*/
public TTitle selectTTitleById(Long id);
/**
*
*
* @param tTitle
* @return
*/
public List<TTitle> selectTTitleList(TTitle tTitle);
/**
*
*
* @param tTitle
* @return
*/
public int insertTTitle(TTitle tTitle);
/**
*
*
* @param tTitle
* @return
*/
public int updateTTitle(TTitle tTitle);
/**
*
*
* @param id
* @return
*/
public int deleteTTitleById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTTitleByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TDoctor;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
public interface ITDoctorService
{
/**
*
*
* @param id
* @return
*/
public TDoctor selectTDoctorById(Long id);
/**
*
*
* @param tDoctor
* @return
*/
public List<TDoctor> selectTDoctorList(TDoctor tDoctor);
/**
*
*
* @param tDoctor
* @return
*/
public int insertTDoctor(TDoctor tDoctor);
/**
*
*
* @param tDoctor
* @return
*/
public int updateTDoctor(TDoctor tDoctor);
/**
*
*
* @param ids
* @return
*/
public int deleteTDoctorByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTDoctorById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.THospital;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
public interface ITHospitalService
{
/**
*
*
* @param id
* @return
*/
public THospital selectTHospitalById(Long id);
/**
*
*
* @param tHospital
* @return
*/
public List<THospital> selectTHospitalList(THospital tHospital);
/**
*
*
* @param tHospital
* @return
*/
public int insertTHospital(THospital tHospital);
/**
*
*
* @param tHospital
* @return
*/
public int updateTHospital(THospital tHospital);
/**
*
*
* @param ids
* @return
*/
public int deleteTHospitalByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTHospitalById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TPatient;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
public interface ITPatientService
{
/**
*
*
* @param id
* @return
*/
public TPatient selectTPatientById(Long id);
/**
*
*
* @param tPatient
* @return
*/
public List<TPatient> selectTPatientList(TPatient tPatient);
/**
*
*
* @param tPatient
* @return
*/
public int insertTPatient(TPatient tPatient);
/**
*
*
* @param tPatient
* @return
*/
public int updateTPatient(TPatient tPatient);
/**
*
*
* @param ids
* @return
*/
public int deleteTPatientByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTPatientById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TRecord;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
public interface ITRecordService
{
/**
*
*
* @param id
* @return
*/
public TRecord selectTRecordById(Long id);
/**
*
*
* @param tRecord
* @return
*/
public List<TRecord> selectTRecordList(TRecord tRecord);
/**
*
*
* @param tRecord
* @return
*/
public int insertTRecord(TRecord tRecord);
/**
*
*
* @param tRecord
* @return
*/
public int updateTRecord(TRecord tRecord);
/**
*
*
* @param ids
* @return
*/
public int deleteTRecordByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTRecordById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TTitle;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
public interface ITTitleService
{
/**
*
*
* @param id
* @return
*/
public TTitle selectTTitleById(Long id);
/**
*
*
* @param tTitle
* @return
*/
public List<TTitle> selectTTitleList(TTitle tTitle);
/**
*
*
* @param tTitle
* @return
*/
public int insertTTitle(TTitle tTitle);
/**
*
*
* @param tTitle
* @return
*/
public int updateTTitle(TTitle tTitle);
/**
*
*
* @param ids
* @return
*/
public int deleteTTitleByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTTitleById(Long id);
}

@ -0,0 +1,96 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TDoctorMapper;
import com.ruoyi.system.domain.TDoctor;
import com.ruoyi.system.service.ITDoctorService;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
@Service
public class TDoctorServiceImpl implements ITDoctorService
{
@Autowired
private TDoctorMapper tDoctorMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TDoctor selectTDoctorById(Long id)
{
return tDoctorMapper.selectTDoctorById(id);
}
/**
*
*
* @param tDoctor
* @return
*/
@Override
public List<TDoctor> selectTDoctorList(TDoctor tDoctor)
{
return tDoctorMapper.selectTDoctorList(tDoctor);
}
/**
*
*
* @param tDoctor
* @return
*/
@Override
public int insertTDoctor(TDoctor tDoctor)
{
tDoctor.setCreateTime(DateUtils.getNowDate());
return tDoctorMapper.insertTDoctor(tDoctor);
}
/**
*
*
* @param tDoctor
* @return
*/
@Override
public int updateTDoctor(TDoctor tDoctor)
{
tDoctor.setUpdateTime(DateUtils.getNowDate());
return tDoctorMapper.updateTDoctor(tDoctor);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTDoctorByIds(Long[] ids)
{
return tDoctorMapper.deleteTDoctorByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTDoctorById(Long id)
{
return tDoctorMapper.deleteTDoctorById(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.THospitalMapper;
import com.ruoyi.system.domain.THospital;
import com.ruoyi.system.service.ITHospitalService;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
@Service
public class THospitalServiceImpl implements ITHospitalService
{
@Autowired
private THospitalMapper tHospitalMapper;
/**
*
*
* @param id
* @return
*/
@Override
public THospital selectTHospitalById(Long id)
{
return tHospitalMapper.selectTHospitalById(id);
}
/**
*
*
* @param tHospital
* @return
*/
@Override
public List<THospital> selectTHospitalList(THospital tHospital)
{
return tHospitalMapper.selectTHospitalList(tHospital);
}
/**
*
*
* @param tHospital
* @return
*/
@Override
public int insertTHospital(THospital tHospital)
{
return tHospitalMapper.insertTHospital(tHospital);
}
/**
*
*
* @param tHospital
* @return
*/
@Override
public int updateTHospital(THospital tHospital)
{
return tHospitalMapper.updateTHospital(tHospital);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTHospitalByIds(Long[] ids)
{
return tHospitalMapper.deleteTHospitalByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTHospitalById(Long id)
{
return tHospitalMapper.deleteTHospitalById(id);
}
}

@ -0,0 +1,96 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPatientMapper;
import com.ruoyi.system.domain.TPatient;
import com.ruoyi.system.service.ITPatientService;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
@Service
public class TPatientServiceImpl implements ITPatientService
{
@Autowired
private TPatientMapper tPatientMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TPatient selectTPatientById(Long id)
{
return tPatientMapper.selectTPatientById(id);
}
/**
*
*
* @param tPatient
* @return
*/
@Override
public List<TPatient> selectTPatientList(TPatient tPatient)
{
return tPatientMapper.selectTPatientList(tPatient);
}
/**
*
*
* @param tPatient
* @return
*/
@Override
public int insertTPatient(TPatient tPatient)
{
tPatient.setCreateTime(DateUtils.getNowDate());
return tPatientMapper.insertTPatient(tPatient);
}
/**
*
*
* @param tPatient
* @return
*/
@Override
public int updateTPatient(TPatient tPatient)
{
tPatient.setUpdateTime(DateUtils.getNowDate());
return tPatientMapper.updateTPatient(tPatient);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTPatientByIds(Long[] ids)
{
return tPatientMapper.deleteTPatientByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTPatientById(Long id)
{
return tPatientMapper.deleteTPatientById(id);
}
}

@ -0,0 +1,96 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TRecordMapper;
import com.ruoyi.system.domain.TRecord;
import com.ruoyi.system.service.ITRecordService;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
@Service
public class TRecordServiceImpl implements ITRecordService
{
@Autowired
private TRecordMapper tRecordMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TRecord selectTRecordById(Long id)
{
return tRecordMapper.selectTRecordById(id);
}
/**
*
*
* @param tRecord
* @return
*/
@Override
public List<TRecord> selectTRecordList(TRecord tRecord)
{
return tRecordMapper.selectTRecordList(tRecord);
}
/**
*
*
* @param tRecord
* @return
*/
@Override
public int insertTRecord(TRecord tRecord)
{
tRecord.setCreateTime(DateUtils.getNowDate());
return tRecordMapper.insertTRecord(tRecord);
}
/**
*
*
* @param tRecord
* @return
*/
@Override
public int updateTRecord(TRecord tRecord)
{
tRecord.setUpdateTime(DateUtils.getNowDate());
return tRecordMapper.updateTRecord(tRecord);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTRecordByIds(Long[] ids)
{
return tRecordMapper.deleteTRecordByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTRecordById(Long id)
{
return tRecordMapper.deleteTRecordById(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.TTitleMapper;
import com.ruoyi.system.domain.TTitle;
import com.ruoyi.system.service.ITTitleService;
/**
* Service
*
* @author ruoyi
* @date 2022-08-03
*/
@Service
public class TTitleServiceImpl implements ITTitleService
{
@Autowired
private TTitleMapper tTitleMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TTitle selectTTitleById(Long id)
{
return tTitleMapper.selectTTitleById(id);
}
/**
*
*
* @param tTitle
* @return
*/
@Override
public List<TTitle> selectTTitleList(TTitle tTitle)
{
return tTitleMapper.selectTTitleList(tTitle);
}
/**
*
*
* @param tTitle
* @return
*/
@Override
public int insertTTitle(TTitle tTitle)
{
return tTitleMapper.insertTTitle(tTitle);
}
/**
*
*
* @param tTitle
* @return
*/
@Override
public int updateTTitle(TTitle tTitle)
{
return tTitleMapper.updateTTitle(tTitle);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTTitleByIds(Long[] ids)
{
return tTitleMapper.deleteTTitleByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTTitleById(Long id)
{
return tTitleMapper.deleteTTitleById(id);
}
}

@ -0,0 +1,118 @@
<?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.TDoctorMapper">
<resultMap type="TDoctor" id="TDoctorResult">
<result property="id" column="id" />
<result property="openId" column="open_id" />
<result property="identifier" column="identifier" />
<result property="name" column="name" />
<result property="phone" column="phone" />
<result property="sex" column="sex" />
<result property="age" column="age" />
<result property="marriage" column="marriage" />
<result property="title" column="title" />
<result property="speciality" column="speciality" />
<result property="introduction" column="introduction" />
<result property="hospitalId" column="hospital_id" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTDoctorVo">
select id, open_id, identifier, name, phone, sex, age, marriage, title, speciality, introduction, hospital_id, del_flag, create_time, update_time from t_doctor
</sql>
<select id="selectTDoctorList" parameterType="TDoctor" resultMap="TDoctorResult">
<include refid="selectTDoctorVo"/>
<where>
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="age != null "> and age = #{age}</if>
<if test="marriage != null and marriage != ''"> and marriage = #{marriage}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if>
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
</where>
</select>
<select id="selectTDoctorById" parameterType="Long" resultMap="TDoctorResult">
<include refid="selectTDoctorVo"/>
where id = #{id}
</select>
<insert id="insertTDoctor" parameterType="TDoctor" useGeneratedKeys="true" keyProperty="id">
insert into t_doctor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="openId != null">open_id,</if>
<if test="identifier != null">identifier,</if>
<if test="name != null and name != ''">name,</if>
<if test="phone != null">phone,</if>
<if test="sex != null">sex,</if>
<if test="age != null">age,</if>
<if test="marriage != null">marriage,</if>
<if test="title != null">title,</if>
<if test="speciality != null">speciality,</if>
<if test="introduction != null">introduction,</if>
<if test="hospitalId != null">hospital_id,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="openId != null">#{openId},</if>
<if test="identifier != null">#{identifier},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="phone != null">#{phone},</if>
<if test="sex != null">#{sex},</if>
<if test="age != null">#{age},</if>
<if test="marriage != null">#{marriage},</if>
<if test="title != null">#{title},</if>
<if test="speciality != null">#{speciality},</if>
<if test="introduction != null">#{introduction},</if>
<if test="hospitalId != null">#{hospitalId},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTDoctor" parameterType="TDoctor">
update t_doctor
<trim prefix="SET" suffixOverrides=",">
<if test="openId != null">open_id = #{openId},</if>
<if test="identifier != null">identifier = #{identifier},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="age != null">age = #{age},</if>
<if test="marriage != null">marriage = #{marriage},</if>
<if test="title != null">title = #{title},</if>
<if test="speciality != null">speciality = #{speciality},</if>
<if test="introduction != null">introduction = #{introduction},</if>
<if test="hospitalId != null">hospital_id = #{hospitalId},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTDoctorById" parameterType="Long">
delete from t_doctor where id = #{id}
</delete>
<delete id="deleteTDoctorByIds" parameterType="String">
delete from t_doctor where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,61 @@
<?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.THospitalMapper">
<resultMap type="THospital" id="THospitalResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="num" column="num" />
</resultMap>
<sql id="selectTHospitalVo">
select id, name, num from t_hospital
</sql>
<select id="selectTHospitalList" parameterType="THospital" resultMap="THospitalResult">
<include refid="selectTHospitalVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="num != null "> and num = #{num}</if>
</where>
</select>
<select id="selectTHospitalById" parameterType="Long" resultMap="THospitalResult">
<include refid="selectTHospitalVo"/>
where id = #{id}
</select>
<insert id="insertTHospital" parameterType="THospital" useGeneratedKeys="true" keyProperty="id">
insert into t_hospital
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="num != null">num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="num != null">#{num},</if>
</trim>
</insert>
<update id="updateTHospital" parameterType="THospital">
update t_hospital
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="num != null">num = #{num},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTHospitalById" parameterType="Long">
delete from t_hospital where id = #{id}
</delete>
<delete id="deleteTHospitalByIds" parameterType="String">
delete from t_hospital where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,113 @@
<?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.TPatientMapper">
<resultMap type="TPatient" id="TPatientResult">
<result property="id" column="id" />
<result property="openId" column="open_id" />
<result property="identifier" column="identifier" />
<result property="name" column="name" />
<result property="phone" column="phone" />
<result property="sex" column="sex" />
<result property="age" column="age" />
<result property="height" column="height" />
<result property="weight" column="weight" />
<result property="marriage" column="marriage" />
<result property="disease" column="disease" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTPatientVo">
select id, open_id, identifier, name, phone, sex, age, height, weight, marriage, disease, del_flag, create_time, update_time from t_patient
</sql>
<select id="selectTPatientList" parameterType="TPatient" resultMap="TPatientResult">
<include refid="selectTPatientVo"/>
<where>
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="age != null "> and age = #{age}</if>
<if test="height != null "> and height = #{height}</if>
<if test="weight != null "> and weight = #{weight}</if>
<if test="marriage != null and marriage != ''"> and marriage = #{marriage}</if>
<if test="disease != null and disease != ''"> and disease = #{disease}</if>
</where>
</select>
<select id="selectTPatientById" parameterType="Long" resultMap="TPatientResult">
<include refid="selectTPatientVo"/>
where id = #{id}
</select>
<insert id="insertTPatient" parameterType="TPatient" useGeneratedKeys="true" keyProperty="id">
insert into t_patient
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="openId != null">open_id,</if>
<if test="identifier != null">identifier,</if>
<if test="name != null and name != ''">name,</if>
<if test="phone != null">phone,</if>
<if test="sex != null">sex,</if>
<if test="age != null">age,</if>
<if test="height != null">height,</if>
<if test="weight != null">weight,</if>
<if test="marriage != null">marriage,</if>
<if test="disease != null">disease,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="openId != null">#{openId},</if>
<if test="identifier != null">#{identifier},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="phone != null">#{phone},</if>
<if test="sex != null">#{sex},</if>
<if test="age != null">#{age},</if>
<if test="height != null">#{height},</if>
<if test="weight != null">#{weight},</if>
<if test="marriage != null">#{marriage},</if>
<if test="disease != null">#{disease},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTPatient" parameterType="TPatient">
update t_patient
<trim prefix="SET" suffixOverrides=",">
<if test="openId != null">open_id = #{openId},</if>
<if test="identifier != null">identifier = #{identifier},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="age != null">age = #{age},</if>
<if test="height != null">height = #{height},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="marriage != null">marriage = #{marriage},</if>
<if test="disease != null">disease = #{disease},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTPatientById" parameterType="Long">
delete from t_patient where id = #{id}
</delete>
<delete id="deleteTPatientByIds" parameterType="String">
delete from t_patient where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,119 @@
<?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.TRecordMapper">
<resultMap type="TRecord" id="TRecordResult">
<result property="id" column="id" />
<result property="patientId" column="patient_id" />
<result property="doctorId" column="doctor_id" />
<result property="hospitalId" column="hospital_id" />
<result property="status" column="status" />
<result property="aiResult" column="ai_result" />
<result property="aiResult2" column="ai_result2" />
<result property="updateResult" column="update_result" />
<result property="updateResult2" column="update_result2" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="uploadTime" column="upload_time" />
<result property="imgSx" column="img_sx" />
<result property="imgSm" column="img_sm" />
<result property="responseTime" column="response_time" />
</resultMap>
<sql id="selectTRecordVo">
select id, patient_id, doctor_id, hospital_id, status, ai_result, ai_result2, update_result, update_result2, create_time, update_time, upload_time, img_sx, img_sm, response_time from t_record
</sql>
<select id="selectTRecordList" parameterType="TRecord" resultMap="TRecordResult">
<include refid="selectTRecordVo"/>
<where>
<if test="patientId != null "> and patient_id = #{patientId}</if>
<if test="doctorId != null "> and doctor_id = #{doctorId}</if>
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="aiResult != null and aiResult != ''"> and ai_result = #{aiResult}</if>
<if test="aiResult2 != null and aiResult2 != ''"> and ai_result2 = #{aiResult2}</if>
<if test="updateResult != null and updateResult != ''"> and update_result = #{updateResult}</if>
<if test="updateResult2 != null and updateResult2 != ''"> and update_result2 = #{updateResult2}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="imgSx != null and imgSx != ''"> and img_sx = #{imgSx}</if>
<if test="imgSm != null and imgSm != ''"> and img_sm = #{imgSm}</if>
<if test="responseTime != null "> and response_time = #{responseTime}</if>
</where>
</select>
<select id="selectTRecordById" parameterType="Long" resultMap="TRecordResult">
<include refid="selectTRecordVo"/>
where id = #{id}
</select>
<insert id="insertTRecord" parameterType="TRecord" useGeneratedKeys="true" keyProperty="id">
insert into t_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId != null">patient_id,</if>
<if test="doctorId != null">doctor_id,</if>
<if test="hospitalId != null">hospital_id,</if>
<if test="status != null">status,</if>
<if test="aiResult != null">ai_result,</if>
<if test="aiResult2 != null">ai_result2,</if>
<if test="updateResult != null">update_result,</if>
<if test="updateResult2 != null">update_result2,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="uploadTime != null">upload_time,</if>
<if test="imgSx != null">img_sx,</if>
<if test="imgSm != null">img_sm,</if>
<if test="responseTime != null">response_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientId != null">#{patientId},</if>
<if test="doctorId != null">#{doctorId},</if>
<if test="hospitalId != null">#{hospitalId},</if>
<if test="status != null">#{status},</if>
<if test="aiResult != null">#{aiResult},</if>
<if test="aiResult2 != null">#{aiResult2},</if>
<if test="updateResult != null">#{updateResult},</if>
<if test="updateResult2 != null">#{updateResult2},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="uploadTime != null">#{uploadTime},</if>
<if test="imgSx != null">#{imgSx},</if>
<if test="imgSm != null">#{imgSm},</if>
<if test="responseTime != null">#{responseTime},</if>
</trim>
</insert>
<update id="updateTRecord" parameterType="TRecord">
update t_record
<trim prefix="SET" suffixOverrides=",">
<if test="patientId != null">patient_id = #{patientId},</if>
<if test="doctorId != null">doctor_id = #{doctorId},</if>
<if test="hospitalId != null">hospital_id = #{hospitalId},</if>
<if test="status != null">status = #{status},</if>
<if test="aiResult != null">ai_result = #{aiResult},</if>
<if test="aiResult2 != null">ai_result2 = #{aiResult2},</if>
<if test="updateResult != null">update_result = #{updateResult},</if>
<if test="updateResult2 != null">update_result2 = #{updateResult2},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="imgSx != null">img_sx = #{imgSx},</if>
<if test="imgSm != null">img_sm = #{imgSm},</if>
<if test="responseTime != null">response_time = #{responseTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTRecordById" parameterType="Long">
delete from t_record where id = #{id}
</delete>
<delete id="deleteTRecordByIds" parameterType="String">
delete from t_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,61 @@
<?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.TTitleMapper">
<resultMap type="TTitle" id="TTitleResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="num" column="num" />
</resultMap>
<sql id="selectTTitleVo">
select id, name, num from t_title
</sql>
<select id="selectTTitleList" parameterType="TTitle" resultMap="TTitleResult">
<include refid="selectTTitleVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="num != null "> and num = #{num}</if>
</where>
</select>
<select id="selectTTitleById" parameterType="Long" resultMap="TTitleResult">
<include refid="selectTTitleVo"/>
where id = #{id}
</select>
<insert id="insertTTitle" parameterType="TTitle" useGeneratedKeys="true" keyProperty="id">
insert into t_title
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="num != null">num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="num != null">#{num},</if>
</trim>
</insert>
<update id="updateTTitle" parameterType="TTitle">
update t_title
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="num != null">num = #{num},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTTitleById" parameterType="Long">
delete from t_title where id = #{id}
</delete>
<delete id="deleteTTitleByIds" parameterType="String">
delete from t_title where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save