diff --git a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java index e8042a838..76d10d652 100644 --- a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java +++ b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java @@ -394,4 +394,14 @@ public class ApplyformController { return success(true); } + + @GetMapping("/getreglisrcount") + public CommonResult GetReglistCount() + { + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + ApplyformCountVO applyformCountVO= applyformService.GetRegisCount(user.getOrgId()); + return success(applyformCountVO); + + } } \ No newline at end of file diff --git a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/dal/mysql/applyform/ApplyformMapper.java b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/dal/mysql/applyform/ApplyformMapper.java index e8a873bff..557659ecc 100644 --- a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/dal/mysql/applyform/ApplyformMapper.java +++ b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/dal/mysql/applyform/ApplyformMapper.java @@ -9,6 +9,8 @@ import cn.iocoder.yudao.module.applyregistration.dal.dataobject.applyform.Applyf import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import org.apache.ibatis.annotations.Mapper; import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.vo.*; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; /** * 申请登记记录 Mapper @@ -45,5 +47,14 @@ public interface ApplyformMapper extends BaseMapperX { .eqIfPresent(ApplyformDO::getDeviceDepartmentCode,reqVO.getDeviceDepartmentCode()) .orderByDesc(ApplyformDO::getId)); } +//统计登记单相关信息 + @Select(" SELECT " + + " COUNT(*) AS totalcount, " + + " COUNT(CASE WHEN examStatus = '未分检' THEN 1 END) AS wfj, " + + " COUNT(CASE WHEN examStatus = '未检查' THEN 1 END) AS wjc, " + + " COUNT(CASE WHEN examStatus = '已检查' THEN 1 END) AS yjc, " + + " COUNT(CASE WHEN examStatus = '已放弃' THEN 1 END) AS yfq " + + " FROM tb_reglist WHERE orgId =#{orgId}") + ApplyformCountVO GetRegisCount(@Param("orgId") String orgId); } \ No newline at end of file diff --git a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformService.java b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformService.java index 0c499f35e..683c32ae4 100644 --- a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformService.java +++ b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformService.java @@ -69,4 +69,7 @@ public interface ApplyformService extends IService { PageResult getApplyformPage(ApplyformPageReqVO pageReqVO); boolean insertbatch(List doList); + + // 统计登记单相关信息 + ApplyformCountVO GetRegisCount(String orgId); } \ No newline at end of file diff --git a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformServiceImpl.java b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformServiceImpl.java index 39aa245e4..3a9e20610 100644 --- a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformServiceImpl.java +++ b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/service/applyform/ApplyformServiceImpl.java @@ -141,4 +141,9 @@ public class ApplyformServiceImpl extends ServiceImpl GetWholeDiagFlagCount() + { + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + PatientexamlistCountVO patientexamlistCountVO= patientexamlistService.GetWholeDiagFlagCount(user.getOrgId()); + return success(patientexamlistCountVO); + } + + @GetMapping("/GetDateYYZDYXCount") + @Operation(summary = "首页折线图统计") + public CommonResult> GetDateYYZDYXCount() + { + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + List patientexamlistCountVO= patientexamlistService.GetDateWholeDiagFlagCount(user.getOrgId()); + return success(patientexamlistCountVO); + + } } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java index 8c899378c..2ee6978d6 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java @@ -77,4 +77,25 @@ public interface PatientexamlistMapper extends BaseMapperX { // 查询需要刷新的数据 @Select("select * from tb_patientexamlist where reportstatus='已分检' and examDate is null and orgId=#{orgId}") List GetSortingDataList(@Param("orgId") String orgId); +// 查询已检查数据的阴性阳性重大阳性统计 + @Select(" SELECT COUNT(*) AS totalcount, SUM(CASE WHEN diagFlag = '0' THEN 1 ELSE 0 END) AS yx, SUM(CASE WHEN diagFlag = '1' THEN 1 ELSE 0 END) AS y, SUM(CASE WHEN diagFlag = '2' THEN 1 ELSE 0 END) AS zdyx " + + " ,SUM( CASE WHEN gender = '男' THEN 1 ELSE 0 END ) AS F,SUM( CASE WHEN gender = '女' THEN 1 ELSE 0 END ) AS M FROM tb_patientexamlist WHERE examDate IS NOT NULL and orgId=#{orgId}") + PatientexamlistCountVO GetWholeDiagFlagCount(@Param("orgId") String orgId); + +// 统计一周内的数据已检查数据的阴性阳性重大阳性 +@Select("SELECT " + + "DATE_FORMAT(examDate, '%Y-%m-%d') AS date, " + + "COUNT(*) AS totalcount, " + + "SUM(CASE WHEN diagFlag = '0' THEN 1 ELSE 0 END) AS yx, " + + "SUM(CASE WHEN diagFlag = '1' THEN 1 ELSE 0 END) AS y, " + + "SUM(CASE WHEN diagFlag = '2' THEN 1 ELSE 0 END) AS zdyx " + + "FROM tb_patientexamlist " + + "WHERE examDate IS NOT NULL " + + "AND examDate >= CURDATE() - INTERVAL 7 DAY " + + "AND orgId = #{orgId} " + + "GROUP BY date " + + " ORDER BY date") + List GetDateYYZDCount(@Param("orgId") String orgId); + + } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java index 76669545d..6c8940cd5 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java @@ -92,4 +92,9 @@ public interface PatientexamlistService extends IService { boolean dicomDataRefresh(String orgId); boolean insertbatch(List doList); +// 获取已检查的阴性阳性重大阳性统计 + PatientexamlistCountVO GetWholeDiagFlagCount(String orgId); + + // 获取一周已检查的阴性阳性重大阳性统计 + List GetDateWholeDiagFlagCount(String orgId); } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java index eab08f3d3..98138ffdf 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java @@ -237,4 +237,16 @@ public class PatientexamlistServiceImpl extends ServiceImpl GetDateWholeDiagFlagCount(String orgId) { + return patientexamlistMapper.GetDateYYZDCount(orgId); + + } + } \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index d4ae2bda9..ef35e1828 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -202,5 +202,5 @@ justauth: cache: type: REDIS prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 + timeout: 5m # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index e77f046c3..795425d50 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -249,4 +249,4 @@ justauth: cache: type: REDIS prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: - timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 + timeout: 5m # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟