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 7ef04d389b1d8261dd7a25506cbe13e30b1b340c..c2bbb2e8c0d97647b0bb2e1f6647b6650bbcf077 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 3a0771a1dea39c5e9f41129b23e6c1d99d8263be..be6b97ed392d246c13cc84b09938a5b69bb22e33 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 5f398216e5880e69534971e151188723a28759e5..99f5728cd5132affca83d53b007c2f9a795e77f6 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 da4e1ae3180960afba8eba4ca27a8c8e6ab73d90..13b95b467aed3da1bf1e11b3f28a4acecb1800bc 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 b34152c69d8f1320e3d5aa603baccbb91b4734d1..ffa9052c0a411b385f141615f70eee0224f65a6d 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 f64b341d9eb6b36d484188e527158c0aeab4d32d..abfb1110767c3426097897a7861f07fe5293ba0e 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