diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java index fd0c2fa..d8ae8c1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java @@ -1,42 +1,30 @@ package com.ruoyi.web.controller.pc; -import java.util.*; -import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; - -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.domain.TImage; +import com.ruoyi.system.domain.TRecord; import com.ruoyi.system.domain.req.AppRecordReq; import com.ruoyi.system.domain.req.TRecordResultReq; -import com.ruoyi.system.domain.resp.RecordHistoryDataResp; import com.ruoyi.system.domain.resp.TRecordResp; import com.ruoyi.system.service.ITImageService; +import com.ruoyi.system.service.ITRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.BeanUtils; -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; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * 诊断记录信息Controller @@ -70,13 +58,12 @@ public class TRecordController extends BaseController /** * 导出诊断记录信息列表 */ - @PreAuthorize("@ss.hasPermi('system:record:export')") - @Log(title = "诊断记录信息", businessType = BusinessType.EXPORT) + @Log(title = "诊断记录信息导出", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, TRecord tRecord) + public void export(HttpServletResponse response, TRecordResultReq tRecord) { - List list = tRecordService.selectTRecordList(tRecord); - ExcelUtil util = new ExcelUtil(TRecord.class); + List list = tRecordService.selectTRecordListWithoutResult(tRecord); + ExcelUtil util = new ExcelUtil<>(TRecordResp.class); util.exportExcel(response, list, "诊断记录信息数据"); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java index 2423229..74976f1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/TRecordResp.java @@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty; import java.util.Date; - @ApiModel(value = "TRecordResp", description = "就诊记录分页查询反参实体") public class TRecordResp { @@ -15,19 +14,47 @@ public class TRecordResp @ApiModelProperty("患者就诊记录id") private Long id; + @Excel(name = "编号") + @ApiModelProperty("编号") + private String identifier; + + /** 名称 */ + @Excel(name = "患者名称") + @ApiModelProperty("患者名称") + private String patientName; + /** 患者 */ - @Excel(name = "患者") @ApiModelProperty("患者id") private Long patientId; + @Excel(name = "医生名称") + @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 HH:mm:ss") + @ApiModelProperty("初诊时间") + private Date firstTime; + /** 医生 */ - @Excel(name = "医生") @ApiModelProperty("医生id") private Long doctorId; /** 医院 */ @ApiModelProperty("医院id") - @Excel(name = "医院") private Long hospitalId; /** 状态(0预约 1就诊) */ @@ -80,35 +107,6 @@ public class TRecordResp @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 HH:mm:ss") - @ApiModelProperty("初诊时间") - private Date firstTime; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty("ai结果返回时间") private Date aiResultReturnTime;