From 894db9ad5e870f38435282dcd24e361415abf047 Mon Sep 17 00:00:00 2001 From: gaozhaochen Date: Thu, 1 Jun 2023 17:14:06 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=95=8F=E6=84=9F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E8=A7=A3=E5=AF=86=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=8D=AB=E7=AE=A1=E4=B8=AD=E5=BF=83=E9=A2=84=E7=BA=A6=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysUserBaseServiceImpl.java | 6 +++-- .../theme/common/crypto/EncryptionUtil.java | 24 +++++++++---------- .../mobile/HpGpIntelligentQAController.java | 19 +++++++++++++-- .../web/HpStatisticsController.java | 1 - .../theme/hphy/dao/HpStatisticsMapper.java | 11 ++++++++- .../service/impl/HpStatisticsServiceImpl.java | 17 +++++++++---- .../sict/theme/hphy/vo/StatisticsUsageVO.java | 4 ++++ .../mapper/hphy/HpStatisticsMapper.xml | 12 ++++++++++ 8 files changed, 71 insertions(+), 23 deletions(-) diff --git a/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/java/cn/sh/stc/sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java b/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/java/cn/sh/stc/sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java index 7ef04d3..c2bbb2e 100644 --- a/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/java/cn/sh/stc/sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java +++ b/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/java/cn/sh/stc/sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java @@ -89,7 +89,7 @@ public class SysUserBaseServiceImpl extends ServiceImpl cardList = SsbUtil.getUserCardInfoList(token); } @@ -203,6 +204,7 @@ public class SysUserBaseServiceImpl extends ServiceImpl DPQ_DEPARTMENT = Sets.newHashSet("皮肤性病科", "中医科", "儿保科", "全科医疗科"); + @SysLog @ApiOperation("智能问答") @PostMapping @@ -57,10 +64,18 @@ public class HpGpIntelligentQAController { log.error("孙总接口返回 body = {}", body); IntelligentAnswerVO answerVO = new IntelligentAnswerVO(); Map result = XmlUtil.xmlToMap(body); - if(result.containsKey(CONTENT)){ + if (result.containsKey(CONTENT)) { answerVO.setAnswer(MapUtil.getStr(result, CONTENT)); + if (StrUtil.isNotBlank(current.getHospitalCode()) + && "42502942300".equals(current.getHospitalCode())) { + if (StrUtil.isNotBlank(answerVO.getDeptName()) + && !DPQ_DEPARTMENT.contains(answerVO.getDeptName())) { + String oldDeptName = answerVO.getDeptName(); + answerVO.setAnswer(answerVO.getAnswer().replace(oldDeptName, "全科医疗科")); + answerVO.setDeptName("全科医疗科"); + } + } } - return new R<>(answerVO); } } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpStatisticsController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpStatisticsController.java index 3a0771a..be6b97e 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpStatisticsController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpStatisticsController.java @@ -30,7 +30,6 @@ public class HpStatisticsController { @ApiOperation("统计用户使用情况") @GetMapping("/usage-overview") - @SecurityParameter(inDecode = false) public R statisticsUsage(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { log.error("统计用户使用情况:startTime = {}, token = {}", startTime, endTime); diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/dao/HpStatisticsMapper.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/dao/HpStatisticsMapper.java index 5f39821..99f5728 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/dao/HpStatisticsMapper.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/dao/HpStatisticsMapper.java @@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * @author gao @@ -42,6 +43,14 @@ public interface HpStatisticsMapper { * @return */ Long countLoginUser(@Param("startTime") String startTime, - @Param("endTime") String endTime); + @Param("endTime") String endTime, + @Param("appId") String appId); + + /** + * 统计卫管中心预约人数 + * + * @return + */ + Map countHealthManagementCenter(); } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpStatisticsServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpStatisticsServiceImpl.java index da4e1ae..13b95b4 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpStatisticsServiceImpl.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpStatisticsServiceImpl.java @@ -2,16 +2,14 @@ package cn.sh.stc.sict.theme.hphy.service.impl; import cn.sh.stc.sict.theme.hphy.dao.HpAppointmentMapper; import cn.sh.stc.sict.theme.hphy.dao.HpStatisticsMapper; -import cn.sh.stc.sict.theme.hphy.dao.HphyPatientBaseMapper; -import cn.sh.stc.sict.theme.hphy.model.HphyPatientBase; import cn.sh.stc.sict.theme.hphy.service.HpStatisticsService; import cn.sh.stc.sict.theme.hphy.vo.StatisticsUsageVO; import lombok.AllArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.Resource; import java.util.List; +import java.util.Map; /** * 黄埔医导用户使用情况查询 @@ -39,10 +37,19 @@ public class HpStatisticsServiceImpl implements HpStatisticsService { @Override public StatisticsUsageVO getUsageOverviewStatistics(String startTime, String endTime) { - Long loginUserCount = hpStatisticsMapper.countLoginUser(startTime, endTime); + Long loginUserCount = hpStatisticsMapper.countLoginUser(startTime, endTime, null); Long newUserCount = hpStatisticsMapper.countNewUser(startTime, endTime); List hosUsageStatisticsList = hpStatisticsMapper.queryAppointmentUserGroupByHos(startTime, endTime); - return StatisticsUsageVO.builder().newUserCount(newUserCount).loginUserCount(loginUserCount).hosAppointmentStatistics(hosUsageStatisticsList).build(); + // 统计卫管中心数据 + Map hmcStatistics = hpStatisticsMapper.countHealthManagementCenter(); + Long hmcloginUserCount = hpStatisticsMapper.countLoginUser(startTime, endTime, "wx24c55f38b535cd96"); + hmcStatistics.put("卫管中心登录人数", hmcloginUserCount); + return StatisticsUsageVO.builder() + .newUserCount(newUserCount) + .loginUserCount(loginUserCount) + .hosAppointmentStatistics(hosUsageStatisticsList) + .healthManagementCenterStatistics(hmcStatistics) + .build(); } } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/StatisticsUsageVO.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/StatisticsUsageVO.java index b34152c..ffa9052 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/StatisticsUsageVO.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/StatisticsUsageVO.java @@ -5,6 +5,7 @@ import lombok.*; import java.io.Serializable; import java.util.List; +import java.util.Map; /** * 统计用户使用详情 @@ -29,6 +30,9 @@ public class StatisticsUsageVO implements Serializable { @ApiModelProperty(value = "医院预约人数") private List hosAppointmentStatistics; + @ApiModelProperty(value = "卫管中心入口数据统计") + private Map healthManagementCenterStatistics; + @Data public static class HosUsageStatistics implements Serializable { private static final long serialVersionUID = -1088663393589514198L; diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hphy/HpStatisticsMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hphy/HpStatisticsMapper.xml index f64b341..abfb111 100644 --- a/smart-health-modules/theme-schema/src/main/resources/mapper/hphy/HpStatisticsMapper.xml +++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hphy/HpStatisticsMapper.xml @@ -53,10 +53,22 @@ AND create_time <= #{endTime} + + + AND create_by like concat('%',#{appId},'%') AND `title` LIKE '%用户登录%' AND `exception` = '' + + \ No newline at end of file -- 2.22.0