增加swagger注解

master
chenfei 2 years ago
parent 592bac7a38
commit 45d3d8389f

@ -3,8 +3,11 @@ package com.ruoyi.web.controller.pc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.system.domain.TPatientHospitalDoctor;
import com.ruoyi.system.domain.req.TRecordResultReq;
import com.ruoyi.system.domain.resp.TRecordResp;
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;
@ -30,6 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi
* @date 2022-08-03
*/
@Api("pc-就诊记录")
@RestController
@RequestMapping("/system/record")
public class TRecordController extends BaseController
@ -40,7 +44,7 @@ public class TRecordController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:record:list')")
@ApiOperation("查询就诊记录列表")
@GetMapping("/list")
public TableDataInfo list(TRecordResultReq tRecord)
{
@ -106,10 +110,17 @@ public class TRecordController extends BaseController
}
@GetMapping("getInfo/{id}")
@ApiOperation("查询患者诊断记录信息")
public AjaxResult getInfoById(@PathVariable("id") Long id){
if(id == null){
return AjaxResult.error("未获取到id");
}
return AjaxResult.success(tRecordService.selectById(id));
}
@GetMapping("getHistoryList")
@ApiOperation("查询患者历史数据图表")
public AjaxResult getHistoryList(TRecord tRecord){
return null;
}
}

@ -2,28 +2,44 @@ package com.ruoyi.system.domain.req;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel(value = "TRecordResultReq", description = "就诊分页查询入参实体")
public class TRecordResultReq
{
@ApiModelProperty("患者姓名")
private String name;
@ApiModelProperty("患者性别")
private String sex;
@ApiModelProperty("患者年龄")
private Integer age;
@ApiModelProperty("医生id")
private Long doctorId;
@ApiModelProperty("医院id")
private Long hospitalId;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
@ApiModelProperty("注册日期排序asc 正序desc 倒序")
//预约时间排序
private String doctorOder;
//首诊时间排序
@ApiModelProperty("首诊时间排序asc 正序desc 倒序")
private String firstVisitOder;
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("初诊日期开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@ApiModelProperty("初诊日期结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;

@ -2,93 +2,119 @@ package com.ruoyi.system.domain.resp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel(value = "TRecordResp", description = "就诊记录分页查询反参实体")
public class TRecordResp
{
/** ID */
@ApiModelProperty("患者就诊记录id")
private Long id;
/** 患者 */
@Excel(name = "患者")
@ApiModelProperty("患者id")
private Long patientId;
/** 医生 */
@Excel(name = "医生")
@ApiModelProperty("医生id")
private Long doctorId;
/** 医院 */
@ApiModelProperty("医院id")
@Excel(name = "医院")
private Long hospitalId;
/** 状态0预约 1就诊 */
@Excel(name = "状态", readConverterExp = "0=预约,1=就诊")
@ApiModelProperty("状态0预约 1就诊")
private String status;
/** ai诊断结果 */
@Excel(name = "ai诊断结果")
@ApiModelProperty("ai诊断结果")
private String aiResult;
/** ai诊断结果无图片 */
@Excel(name = "ai诊断结果无图片")
@ApiModelProperty("ai诊断结果无图片")
private String aiResult2;
/** 医生诊断结果 */
@Excel(name = "医生诊断结果")
@ApiModelProperty("医生诊断结果")
private String updateResult;
/** 医生诊断结果,无图片 */
@Excel(name = "医生诊断结果,无图片")
@ApiModelProperty("医生诊断结果,无图片")
private String updateResult2;
/** 上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("上传时间")
private Date uploadTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("待诊时间")
private Date waitingTime;
/** 舌下 */
@Excel(name = "舌下")
@ApiModelProperty("舌下")
private String imgSx;
/** 舌上 */
@Excel(name = "舌上")
@ApiModelProperty("舌上")
private String imgSm;
/** 响应时长 */
@Excel(name = "响应时长")
@ApiModelProperty("响应时长")
private Long responseTime;
@Excel(name = "编号")
@ApiModelProperty("编号")
private String identifier;
/** 名称 */
@Excel(name = "名称")
@ApiModelProperty("患者名称")
private String patientName;
@ApiModelProperty("医生名称")
private String doctorName;
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
@ApiModelProperty("用户性别")
private String sex;
/** 年龄 */
@Excel(name = "年龄")
@ApiModelProperty("患者年龄")
private Integer age;
/** 基础疾病 */
@Excel(name = "基础疾病")
@ApiModelProperty("基础疾病")
private String disease;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("初诊时间")
private Date firstTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("ai结果返回时间")
private Date aiResultReturnTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("ai结果修改时间")
private Date aiResultModifyTime;
public Long getId()

@ -63,8 +63,20 @@ public interface ITRecordService
*/
public int deleteTRecordById(Long id);
/**
*
*
* @param tRecord
* @return
*/
List<TRecordResp> selectTRecordListWithoutResult(TRecordResultReq tRecord);
/**
* id
*
* @param id
* @return
*/
TRecordResp selectById(Long id);
/**

Loading…
Cancel
Save