wlzboy
7 小时以前 5f2ee03958a1a16dc27195c76ea7cffb422c95d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SQLHospDataMapper">
    <!-- 查询常用转出医院ID列表 -->
    <select id="selectFrequentOutHospitalIds" resultType="java.lang.Integer">
        select ServiceOrdPtOutHospID from (
        select    ServiceOrdPtOutHospID,count(1) as InCount  from ServiceOrder
        where ServiceOrdClass=#{serviceOrdClass} and ServiceOrdPtOutHospID>0
        group by ServiceOrdPtOutHospID
        ) as t
        order by InCount desc
    </select>
    <!-- 查询常用转入医院ID列表 -->
    <select id="selectFrequentInHospitalIds" resultType="java.lang.Integer">
        select ServiceOrdPtInHospID from (
        select    ServiceOrdPtInHospID,count(1) as InCount  from ServiceOrder
        where ServiceOrdClass=#{serviceOrdClass} and ServiceOrdPtInHospID>0
        group by ServiceOrdPtInHospID
        ) as t
        order by InCount desc
    </select>
 
</mapper>