From b2da52507086ed5883673c244668b9d28742ad8d Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 9 Aug 2022 17:21:24 +0800 Subject: [PATCH 01/10] =?UTF-8?q?app=E6=82=A3=E8=80=85=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E8=B0=83=E6=95=B4=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/api/AppController.java | 41 +++- .../system/domain/req/AppPatientReq.java | 180 ++++++++++++-- .../ruoyi/system/domain/req/AppRecordReq.java | 229 ++++++++++++++++++ 3 files changed, 423 insertions(+), 27 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 82ddfc3..4b8696e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.req.AppPatientHospitalDoctor; import com.ruoyi.system.domain.req.AppPatientReq; +import com.ruoyi.system.domain.req.AppRecordReq; import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.service.*; import io.swagger.annotations.Api; @@ -142,25 +143,29 @@ public class AppController extends BaseController */ @ApiOperation("诊断记录上传") @PostMapping("/record/diagnostic/upload") - public AjaxResult diagnosticRecordsUploaded(TRecord tRecord) { + public AjaxResult diagnosticRecordsUploaded(AppRecordReq appRecordReq) { + TRecord tRecord = new TRecord(); + BeanUtils.copyProperties(appRecordReq, tRecord); return AjaxResult.success(tRecordService.updateTRecord(tRecord)); } /** * 添加病人 * - * @param tPatient t病人 + * @param appPatientReq App端添加患者入参实体 * @return {@code AjaxResult} */ @ApiOperation("添加患者") @PostMapping("/patient/add") - public AjaxResult addPatient(AppPatientReq tPatient) + public AjaxResult addPatient(AppPatientReq appPatientReq) { + TPatient tPatient = new TPatient(); + BeanUtils.copyProperties(appPatientReq, tPatient); tPatientService.insertTPatient(tPatient); TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor(); - tPatientHospitalDoctor.setHospitalId(tPatient.getHospitalId()); - tPatientHospitalDoctor.setDoctorId(tPatient.getDoctorId()); - tPatientHospitalDoctor.setPatientId(tPatient.getId()); + tPatientHospitalDoctor.setHospitalId(appPatientReq.getHospitalId()); + tPatientHospitalDoctor.setDoctorId(appPatientReq.getDoctorId()); + tPatientHospitalDoctor.setPatientId(appPatientReq.getId()); List tPatientHospitalDoctors = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor); if (tPatientHospitalDoctors.isEmpty()) { @@ -169,6 +174,20 @@ public class AppController extends BaseController return AjaxResult.success(); } + /** + * 修改患者 + * + * @param appPatientReq App端添加患者入参实体 + * @return {@code AjaxResult} + */ + @ApiOperation("患者信息修改") + @PostMapping("/patient/modify") + public AjaxResult patientsWithModified(AppPatientReq appPatientReq) { + TPatient tPatient = new TPatient(); + BeanUtils.copyProperties(appPatientReq, tPatient); + return AjaxResult.success(tPatientService.updateTPatient(tPatient)); + } + /** * 诊断记录列表 * @@ -191,12 +210,11 @@ public class AppController extends BaseController * @return {@code AjaxResult} */ @ApiOperation("患者诊断记录信息详情") - @GetMapping("/record/info") - public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(Long id) { + @GetMapping("/record/info/{id}") + public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(@PathVariable("id") Long id) { return AjaxResult.success(tRecordService.selectById(id)); } - /** * 患者已诊列表 * @@ -206,11 +224,10 @@ public class AppController extends BaseController @ApiOperation("患者已诊列表") @GetMapping("/record/diagnosedList") public AjaxResult patientsDiagnosedList(TRecordResultReq recordResultReq) { - recordResultReq.setStatus("0"); + recordResultReq.setStatus("1"); return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq)); } - /** * 病人等待名单 * @@ -220,7 +237,7 @@ public class AppController extends BaseController @ApiOperation("患者候诊列表") @GetMapping("/record/waitingList") public AjaxResult patientsWaitingList(TRecordResultReq recordResultReq) { - recordResultReq.setStatus("2"); + recordResultReq.setStatus("0"); return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq)); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java index 4152214..2e08f18 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java @@ -1,11 +1,8 @@ package com.ruoyi.system.domain.req; -import com.ruoyi.system.domain.TPatient; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.validation.constraints.NotNull; - /** * App端添加患者入参实体 * @@ -13,33 +10,186 @@ import javax.validation.constraints.NotNull; * @date 2022/8/9 14:32 */ @ApiModel(value = "AppPatientReq", description = "App端添加患者入参实体") -public class AppPatientReq extends TPatient -{ - @NotNull(message = "doctorId不为空") +public class AppPatientReq { + /** + * 医生id + */ @ApiModelProperty("doctorId") private Long doctorId; - @NotNull(message = "hospitalId不为空") + /** + * 医院Id + */ @ApiModelProperty("hospitalId") private Long hospitalId; - public Long getDoctorId() - { + /** + * ID + */ + @ApiModelProperty("patientId") + private Long id; + + /** + * 腾讯openid + */ + @ApiModelProperty("腾讯openid") + private String openId; + + /** + * 编号 + */ + @ApiModelProperty("编号") + private String identifier; + + /** + * 名称 + */ + @ApiModelProperty("名称") + private String name; + + /** + * 电话 + */ + @ApiModelProperty("电话") + private String phone; + + /** + * 用户性别(0男 1女 2未知) + */ + @ApiModelProperty("用户性别: 0=男,1=女,2=未知") + private String sex; + + /** + * 年龄 + */ + @ApiModelProperty("年龄") + private Integer age; + + /** + * 身高 + */ + @ApiModelProperty("身高") + private Integer height; + + /** + * 体重 + */ + @ApiModelProperty("体重") + private Integer weight; + + /** + * 婚姻状态(0未婚 1已婚 2未知) + */ + @ApiModelProperty("婚姻状态: 0=未婚,1=已婚,2=未知") + private String marriage; + + /** + * 基础疾病 + */ + @ApiModelProperty("基础疾病") + private String disease; + + public Long getDoctorId() { return doctorId; } - public void setDoctorId(Long doctorId) - { + public void setDoctorId(Long doctorId) { this.doctorId = doctorId; } - public Long getHospitalId() - { + public Long getHospitalId() { return hospitalId; } - public void setHospitalId(Long hospitalId) - { + public void setHospitalId(Long hospitalId) { this.hospitalId = hospitalId; } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Integer getAge() { + return age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + + public String getMarriage() { + return marriage; + } + + public void setMarriage(String marriage) { + this.marriage = marriage; + } + + public String getDisease() { + return disease; + } + + public void setDisease(String disease) { + this.disease = disease; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java new file mode 100644 index 0000000..8a4a942 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java @@ -0,0 +1,229 @@ +package com.ruoyi.system.domain.req; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; + +/** + * App端诊断记录上传入参实体 + * + * @author gongzhenkun + * @date 2022/8/9 17:02 + */ +@ApiModel(value = "AppRecordReq", description = "App端诊断记录上传入参实体") +public class AppRecordReq implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private Long id; + + /** + * 患者 + */ + @ApiModelProperty("患者") + private Long patientId; + + /** + * 医生 + */ + @ApiModelProperty("医生") + private Long doctorId; + + /** + * 医院 + */ + @ApiModelProperty("医院") + private Long hospitalId; + + /** + * 状态(0预约 1就诊) + */ + @ApiModelProperty("状态 0=预约,1=就诊") + private String status; + + /** + * ai诊断结果 + */ + @ApiModelProperty("ai诊断结果") + private String aiResult; + + /** + * ai诊断结果,无图片 + */ + @ApiModelProperty("ai诊断结果,无图片") + private String aiResult2; + + /** + * 医生诊断结果 + */ + @ApiModelProperty("医生诊断结果") + private String updateResult; + + /** + * 医生诊断结果,无图片 + */ + @ApiModelProperty("医生诊断结果,无图片") + private String updateResult2; + + /** + * 上传时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("上传时间") + private Date uploadTime; + + /** + * 舌下 + */ + @ApiModelProperty("舌下") + private String imgSx; + + /** + * 舌上 + */ + @ApiModelProperty("舌上") + private String imgSm; + + /** + * 响应时长 + */ + @ApiModelProperty("响应时长") + private Long responseTime; + + /** + * 响应时长 + */ + @ApiModelProperty("ai结果返回时间") + private Date aiResultReturnTime; + + /** + * 响应时长 + */ + @ApiModelProperty("ai结果修改时间") + private Date aiResultModifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPatientId() { + return patientId; + } + + public void setPatientId(Long patientId) { + this.patientId = patientId; + } + + public Long getDoctorId() { + return doctorId; + } + + public void setDoctorId(Long doctorId) { + this.doctorId = doctorId; + } + + public Long getHospitalId() { + return hospitalId; + } + + public void setHospitalId(Long hospitalId) { + this.hospitalId = hospitalId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAiResult() { + return aiResult; + } + + public void setAiResult(String aiResult) { + this.aiResult = aiResult; + } + + public String getAiResult2() { + return aiResult2; + } + + public void setAiResult2(String aiResult2) { + this.aiResult2 = aiResult2; + } + + public String getUpdateResult() { + return updateResult; + } + + public void setUpdateResult(String updateResult) { + this.updateResult = updateResult; + } + + public String getUpdateResult2() { + return updateResult2; + } + + public void setUpdateResult2(String updateResult2) { + this.updateResult2 = updateResult2; + } + + public Date getUploadTime() { + return uploadTime; + } + + public void setUploadTime(Date uploadTime) { + this.uploadTime = uploadTime; + } + + public String getImgSx() { + return imgSx; + } + + public void setImgSx(String imgSx) { + this.imgSx = imgSx; + } + + public String getImgSm() { + return imgSm; + } + + public void setImgSm(String imgSm) { + this.imgSm = imgSm; + } + + public Long getResponseTime() { + return responseTime; + } + + public void setResponseTime(Long responseTime) { + this.responseTime = responseTime; + } + + public Date getAiResultReturnTime() { + return aiResultReturnTime; + } + + public void setAiResultReturnTime(Date aiResultReturnTime) { + this.aiResultReturnTime = aiResultReturnTime; + } + + public Date getAiResultModifyTime() { + return aiResultModifyTime; + } + + public void setAiResultModifyTime(Date aiResultModifyTime) { + this.aiResultModifyTime = aiResultModifyTime; + } +} From d1084fabe5eddfc8a28ec7e305155e65ad799ace Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 9 Aug 2022 17:33:11 +0800 Subject: [PATCH 02/10] =?UTF-8?q?app=E8=AF=8A=E6=96=AD=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9E=E5=80=BC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/api/AppController.java | 3 ++- .../src/main/java/com/ruoyi/system/mapper/TRecordMapper.java | 2 +- .../main/java/com/ruoyi/system/service/ITRecordService.java | 2 +- .../java/com/ruoyi/system/service/impl/TRecordServiceImpl.java | 2 +- .../src/main/resources/mapper/system/TRecordMapper.xml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 4b8696e..e0fdd27 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -8,6 +8,7 @@ import com.ruoyi.system.domain.req.AppPatientHospitalDoctor; import com.ruoyi.system.domain.req.AppPatientReq; import com.ruoyi.system.domain.req.AppRecordReq; import com.ruoyi.system.domain.req.TRecordResultReq; +import com.ruoyi.system.domain.resp.TRecordResp; import com.ruoyi.system.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -199,7 +200,7 @@ public class AppController extends BaseController public AjaxResult diagnosisOfRecordList(AppPatientHospitalDoctor appPatientHospitalDoctor) { TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor(); BeanUtils.copyProperties(appPatientHospitalDoctor, tPatientHospitalDoctor); - List tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor); + List tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor); return AjaxResult.success(tRecords); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java index 20b4152..01f05db 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java @@ -120,5 +120,5 @@ public interface TRecordMapper * @param tPatientHospitalDoctor t病人医院医生 * @return {@code List} */ - public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java index 8512ded..20a2387 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java @@ -85,5 +85,5 @@ public interface ITRecordService * @param tPatientHospitalDoctor t病人医院医生 * @return {@code List} */ - public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java index 658960d..44d5ead 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java @@ -110,7 +110,7 @@ public class TRecordServiceImpl implements ITRecordService } @Override - public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor) + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor) { return tRecordMapper.queryRecordListByPHDids(tPatientHospitalDoctor); } diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index a27682c..220e61d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -257,7 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - and patient_id = #{patientId} From b04b2f78269c7971a0352271f09f72e993c95bc2 Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Tue, 9 Aug 2022 17:43:39 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=82=A3=E8=80=85?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/pc/TRecordController.java | 60 ++++++++++++++++++- .../domain/resp/RecordHistoryDataResp.java | 35 +++++++++++ .../resources/mapper/system/TRecordMapper.xml | 3 +- 3 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java 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 e2b6e98..b7214fc 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,13 +1,19 @@ package com.ruoyi.web.controller.pc; -import java.util.List; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; -import com.ruoyi.system.domain.TPatientHospitalDoctor; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.req.TRecordResultReq; +import com.ruoyi.system.domain.resp.RecordHistoryDataResp; import com.ruoyi.system.domain.resp.TRecordResp; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.collections.CollectionUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -121,6 +127,54 @@ public class TRecordController extends BaseController @GetMapping("getHistoryList") @ApiOperation("查询患者历史数据图表") public AjaxResult getHistoryList(TRecord tRecord){ - return null; + List tRecords = tRecordService.selectTRecordList(tRecord); + tRecords.removeIf(o->"0".equals(o.getStatus())); + if (CollectionUtils.isEmpty(tRecords)){ + return AjaxResult.success(); + } + List records = tRecords.stream().sorted(Comparator.comparing(TRecord::getCreateTime)).collect(Collectors.toList()); + List jsonKeyList = new ArrayList(){{ + add("shemian-sz_avg_red"); + add("st_avg_yellow"); + add("sx_vein_color"); + }}; + RecordHistoryDataResp recordHistoryDataRespMap = getDataList(records,jsonKeyList); + return AjaxResult.success(recordHistoryDataRespMap); + } + + private RecordHistoryDataResp getDataList(List records, List jsonKeyList) + { + + RecordHistoryDataResp recordHistoryDataResp = new RecordHistoryDataResp(); + List dateList = records.stream().map(tRecord -> DateUtils.parseDateToStr("dd/MM/yyyy",tRecord.getCreateTime())).collect(Collectors.toList()); + recordHistoryDataResp.setDateList(dateList); + List result = records.stream().map(tRecord -> { + JSONObject jsonObject; + if(StringUtils.isEmpty(tRecord.getUpdateResult2())){ + jsonObject = JSONObject.parseObject(tRecord.getAiResult2()); + }else { + jsonObject = JSONObject.parseObject(tRecord.getUpdateResult2()); + } + return jsonObject; + }).collect(Collectors.toList()); + Map> dataMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(result)){ + List shezhiList = new LinkedList<>(); + List shetaiList = new LinkedList<>(); + List shexiaList = new LinkedList<>(); + String[] keys0 = jsonKeyList.get(0).split("-"); + String key1 = jsonKeyList.get(1); + String key2 = jsonKeyList.get(2); + result.forEach(jsonObject -> { + shezhiList.add(jsonObject.getJSONObject("data").getJSONObject("shezhi").getJSONObject(keys0[0]).getInteger(keys0[1])); + shetaiList.add(jsonObject.getJSONObject("data").getJSONObject("shetai").getInteger(key1)); + shexiaList.add(jsonObject.getJSONObject("data").getJSONObject("shexia").getInteger(key2)); + }); + dataMap.put("shezhi",shezhiList); + dataMap.put("shetai",shetaiList); + dataMap.put("shexia",shexiaList); + } + recordHistoryDataResp.setDataMap(dataMap); + return recordHistoryDataResp; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java new file mode 100644 index 0000000..0d71885 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java @@ -0,0 +1,35 @@ +package com.ruoyi.system.domain.resp; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +public class RecordHistoryDataResp +{ + private Map> dataMap; + private List dateList; + + public RecordHistoryDataResp() + { + } + + public Map> getDataMap() + { + return dataMap; + } + + public void setDataMap(Map> dataMap) + { + this.dataMap = dataMap; + } + + public List getDateList() + { + return dateList; + } + + public void setDateList(List dateList) + { + this.dateList = dateList; + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index 220e61d..db84bc0 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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 + select id, patient_id, doctor_id, hospital_id, status,ai_result2,update_result2, create_time, update_time, upload_time,response_time from t_record SELECT @@ -155,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and img_sm = #{imgSm} and response_time = #{responseTime} + select COUNT(*) from t_patient_hospital_doctor where hospital_id = #{hospitalId} and doctor_id = #{doctorId} + + \ No newline at end of file From f1382d56aabfbeda9ef1fed6098e3945e6a24185 Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Wed, 10 Aug 2022 09:03:11 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0swagger=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/api/AppController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 8ec6115..5ee236b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -131,6 +131,7 @@ public class AppController extends BaseController @GetMapping(value = "/config/ai/refreshtime") @Log(title = "获取AI结果刷新时间接口") + @ApiOperation("获取AI结果刷新时间接口") public AjaxResult getConfigKey() { String configKey="t.ai.refreshtime"; From 00d6fde0f680442215f981af7385855f7f866bec Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Wed, 10 Aug 2022 09:05:37 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/system/service/ITRecordService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java index 5dbcc13..499e206 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java @@ -88,5 +88,11 @@ public interface ITRecordService */ public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); + /** + * + * 查询患者历史数据图表 + * @param tRecord 患者记录 + * @return {@code AjaxResult} + */ AjaxResult getHistoryList(TRecord tRecord); } From 82a9dd5d748a9de345c29a2931681057ceac6565 Mon Sep 17 00:00:00 2001 From: chenfei <18955928961@163.com> Date: Wed, 10 Aug 2022 09:10:06 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/pc/TRecordController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 adfd3ac..1ee70c4 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 @@ -124,9 +124,9 @@ public class TRecordController extends BaseController return AjaxResult.success(tRecordService.selectById(id)); } - @GetMapping("getHistoryList") + @GetMapping("getHistoryRecordList") @ApiOperation("查询患者历史数据图表") - public AjaxResult getHistoryList(TRecord tRecord){ + public AjaxResult getHistoryRecordList(TRecord tRecord){ return tRecordService.getHistoryList(tRecord); } }