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 91e7b2b..bd44425 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 @@ -657,4 +657,17 @@ public class AppController extends BaseController } return AjaxResult.success("预约成功。"); } + + /** + * 查询医生数量诊断 + * + * @param doctorId 医生id + * @return {@code AjaxResult} + */ + @ApiOperation("查询医生数量诊断") + @Log(title = "APP查询医生数量诊断", businessType = BusinessType.OTHER) + @GetMapping("/doctor/recordCount/{id}") + public AjaxResult numberOfDiagnosis(@PathVariable("id") long doctorId){ + return AjaxResult.success(tRecordService.queryDoctorNumberOfDiagnosis(doctorId)); + } } 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 fedcf65..54ea4e6 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 @@ -152,4 +152,12 @@ public interface TRecordMapper * @return {@code List} */ public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); + + /** + * 查询医生诊断次数 + * + * @param doctorId 医生id + * @return int + */ + int queryDoctorNumberOfDiagnosis(Long doctorId); } 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 151519d..6fca7b8 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 @@ -97,4 +97,12 @@ public interface ITRecordService * @return {@code AjaxResult} */ AjaxResult getHistoryList(TRecord tRecord); + + /** + * 查询医生诊断次数 + * + * @param doctorId 医生id + * @return int + */ + int queryDoctorNumberOfDiagnosis(Long doctorId); } 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 cb98e5d..25dbc39 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 @@ -180,6 +180,17 @@ public class TRecordServiceImpl implements ITRecordService return AjaxResult.success(recordHistoryDataRespMap); } + /** + * 查询医生诊断次数 + * + * @param doctorId 医生id + * @return int + */ + @Override + public int queryDoctorNumberOfDiagnosis(Long doctorId) { + return tRecordMapper.queryDoctorNumberOfDiagnosis(doctorId); + } + private RecordHistoryDataResp getDataList(List records, List jsonKeyList) { diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index 6dfbdcb..7f1c3af 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -403,4 +403,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tr.hospital_id = #{hospitalId} + +