增加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 java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.system.domain.TPatientHospitalDoctor;
import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.domain.req.TRecordResultReq;
import com.ruoyi.system.domain.resp.TRecordResp; 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.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,6 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2022-08-03 * @date 2022-08-03
*/ */
@Api("pc-就诊记录")
@RestController @RestController
@RequestMapping("/system/record") @RequestMapping("/system/record")
public class TRecordController extends BaseController public class TRecordController extends BaseController
@ -40,7 +44,7 @@ public class TRecordController extends BaseController
/** /**
* *
*/ */
@PreAuthorize("@ss.hasPermi('system:record:list')") @ApiOperation("查询就诊记录列表")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TRecordResultReq tRecord) public TableDataInfo list(TRecordResultReq tRecord)
{ {
@ -106,10 +110,17 @@ public class TRecordController extends BaseController
} }
@GetMapping("getInfo/{id}") @GetMapping("getInfo/{id}")
@ApiOperation("查询患者诊断记录信息")
public AjaxResult getInfoById(@PathVariable("id") Long id){ public AjaxResult getInfoById(@PathVariable("id") Long id){
if(id == null){ if(id == null){
return AjaxResult.error("未获取到id"); return AjaxResult.error("未获取到id");
} }
return AjaxResult.success(tRecordService.selectById(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.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date; import java.util.Date;
@ApiModel(value = "TRecordResultReq", description = "就诊分页查询入参实体")
public class TRecordResultReq public class TRecordResultReq
{ {
@ApiModelProperty("患者姓名")
private String name; private String name;
@ApiModelProperty("患者性别")
private String sex; private String sex;
@ApiModelProperty("患者年龄")
private Integer age; private Integer age;
@ApiModelProperty("医生id")
private Long doctorId; private Long doctorId;
@ApiModelProperty("医院id")
private Long hospitalId; private Long hospitalId;
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("注册日期排序asc 正序desc 倒序")
//预约时间排序 //预约时间排序
private String doctorOder; private String doctorOder;
//首诊时间排序 //首诊时间排序
@ApiModelProperty("首诊时间排序asc 正序desc 倒序")
private String firstVisitOder; private String firstVisitOder;
@ApiModelProperty("状态")
private String status; private String status;
@ApiModelProperty("初诊日期开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime; private Date startTime;
@ApiModelProperty("初诊日期结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime; private Date endTime;

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

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

Loading…
Cancel
Save