diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index 81ec8f520..45cc2afaf 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -30,7 +30,6 @@ import io.swagger.v3.oas.annotations.Operation; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.net.SocketException; -import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; @@ -57,7 +56,6 @@ import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.Patientexam import cn.iocoder.yudao.module.tblist.service.patientexamlist.PatientexamlistService; import javax.annotation.Resource; -import javax.annotation.security.PermitAll; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; @@ -374,6 +372,8 @@ public class PatientexamlistController { //获取当前登陆用户 AdminUserDO user = userService.getUser(getLoginUserId()); PatientexamlistCountVO patientexamlistCountVO = patientexamlistService.GetEcgAnalysisData(user.getOrgId()); + int positiveCount= positiveness(user.getOrgId()); + patientexamlistCountVO.setDictyx(String.valueOf(positiveCount)); return success(patientexamlistCountVO); } @@ -590,6 +590,17 @@ public class PatientexamlistController { // 获取阳性数量 int positiveCount = 0; + positiveCount= positiveness(orgId); + + statistics.setPositiveCount(positiveCount); + + return success(statistics); + } + + ///计算阳性患者的数量 只要是阳性就算 不重复的患者 + private int positiveness(String orgId) + { + int positiveCount=0; List> positivestatisticsDict = positivestatisticsMapper.selectList_usable(orgId); if (positivestatisticsDict != null && !positivestatisticsDict.isEmpty()) { List allKeywords = new ArrayList<>(); @@ -599,19 +610,17 @@ public class PatientexamlistController { allKeywords.addAll(Arrays.asList(keywords)); } } - + if (!allKeywords.isEmpty()) { positiveCount = ecganalysisparasMapper.selectList_positive( - orgId, - null, - null, - allKeywords.toArray(new String[0]) + orgId, + null, + null, + allKeywords.toArray(new String[0]) ).size(); } } - statistics.setPositiveCount(positiveCount); - - return success(statistics); + return positiveCount; } +} -} \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java index 79fca97cf..a90f08758 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java @@ -32,4 +32,7 @@ public class PatientexamlistCountVO { @Schema(description = "申请") private String sq; + @Schema(description = " 阳性患者(阳性字典)") + private String dictyx; + }