PC诊断记录导出

master
gongzhenkun 2 years ago
parent 72e26b3431
commit 45c435c293

@ -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<TRecord> list = tRecordService.selectTRecordList(tRecord);
ExcelUtil<TRecord> util = new ExcelUtil<TRecord>(TRecord.class);
List<TRecordResp> list = tRecordService.selectTRecordListWithoutResult(tRecord);
ExcelUtil<TRecordResp> util = new ExcelUtil<>(TRecordResp.class);
util.exportExcel(response, list, "诊断记录信息数据");
}

@ -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;

Loading…
Cancel
Save