|
@@ -19795,9 +19795,9 @@
|
|
CASE WHEN (a.beh_dept_id is null OR a.beh_dept_id = '' OR a.beh_dept_id = '-') THEN '-' ELSE a.beh_dept_id END AS deptId,
|
|
CASE WHEN (a.beh_dept_id is null OR a.beh_dept_id = '' OR a.beh_dept_id = '-') THEN '-' ELSE a.beh_dept_id END AS deptId,
|
|
CASE WHEN (a.beh_dept_name is null OR a.beh_dept_name = '' OR a.beh_dept_name = '-') THEN '-' ELSE a.beh_dept_name END AS deptName,
|
|
CASE WHEN (a.beh_dept_name is null OR a.beh_dept_name = '' OR a.beh_dept_name = '-') THEN '-' ELSE a.beh_dept_name END AS deptName,
|
|
ROUND( avg( CAST(c.score_res as DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
|
|
ROUND( avg( CAST(c.score_res as DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
|
|
- SUM( c.`level` = '甲' ) AS firstLevelNum,
|
|
|
|
- SUM( c.`level` = '乙' ) AS secondLevelNum,
|
|
|
|
- SUM( c.`level` = '丙' ) AS thirdLevelNum
|
|
|
|
|
|
+ SUM( c.`level` = '甲' ) AS firstLevelStrNum,
|
|
|
|
+ SUM( c.`level` = '乙' ) AS secondLevelStrNum,
|
|
|
|
+ SUM( c.`level` = '丙' ) AS thirdLevelStrNum
|
|
FROM
|
|
FROM
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
med_qcresult_info c
|
|
med_qcresult_info c
|
|
@@ -19939,6 +19939,71 @@
|
|
AND t1.doctorName = t2.doctorName
|
|
AND t1.doctorName = t2.doctorName
|
|
AND t1.deptId = t2.deptId
|
|
AND t1.deptId = t2.deptId
|
|
AND t1.deptName = t2.deptName
|
|
AND t1.deptName = t2.deptName
|
|
|
|
+ <if test="doctorAverageStatisticsVO.asc !=null and doctorAverageStatisticsVO.asc.size > 0 and doctorAverageStatisticsVO.desc !=null and doctorAverageStatisticsVO.desc.size > 0">
|
|
|
|
+ order by
|
|
|
|
+ <foreach collection="doctorAverageStatisticsVO.asc" item="item" open=" " close=" " separator=",">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test='item=="doctorName"'>t1.doctorName</when>
|
|
|
|
+ <when test='item=="deptId"'>t1.deptId</when>
|
|
|
|
+ <when test='item=="deptName"'>t1.deptName</when>
|
|
|
|
+ <when test='item=="averageValue"'>t1.averageValue</when>
|
|
|
|
+ <when test='item=="firstLevelStrNum"'>t1.firstLevelStrNum</when>
|
|
|
|
+ <when test='item=="secondLevelStrNum"'>t1.secondLevelStrNum</when>
|
|
|
|
+ <when test='item=="thirdLevelStrNum"'>t1.thirdLevelStrNum</when>
|
|
|
|
+ <when test='item=="entryNum"'>t2.entryNum</when>
|
|
|
|
+ <otherwise>t1.doctorId</otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </foreach>
|
|
|
|
+ asc,
|
|
|
|
+ <foreach collection="doctorAverageStatisticsVO.desc" item="item" open=" " close=" " separator=",">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test='item=="doctorName"'>t1.doctorName</when>
|
|
|
|
+ <when test='item=="deptId"'>t1.deptId</when>
|
|
|
|
+ <when test='item=="deptName"'>t1.deptName</when>
|
|
|
|
+ <when test='item=="averageValue"'>t1.averageValue</when>
|
|
|
|
+ <when test='item=="firstLevelStrNum"'>t1.firstLevelStrNum</when>
|
|
|
|
+ <when test='item=="secondLevelStrNum"'>t1.secondLevelStrNum</when>
|
|
|
|
+ <when test='item=="thirdLevelStrNum"'>t1.thirdLevelStrNum</when>
|
|
|
|
+ <when test='item=="entryNum"'>t2.entryNum</when>
|
|
|
|
+ <otherwise>t1.doctorId</otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </foreach>
|
|
|
|
+ desc
|
|
|
|
+ </if>
|
|
|
|
+ <if test="doctorAverageStatisticsVO.asc !=null and doctorAverageStatisticsVO.asc.size > 0 and (doctorAverageStatisticsVO.desc ==null or doctorAverageStatisticsVO.desc.size == 0)">
|
|
|
|
+ order by
|
|
|
|
+ <foreach collection="doctorAverageStatisticsVO.asc" item="item" open=" " close=" " separator=",">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test='item=="doctorName"'>t1.doctorName</when>
|
|
|
|
+ <when test='item=="deptId"'>t1.deptId</when>
|
|
|
|
+ <when test='item=="deptName"'>t1.deptName</when>
|
|
|
|
+ <when test='item=="averageValue"'>t1.averageValue</when>
|
|
|
|
+ <when test='item=="firstLevelStrNum"'>t1.firstLevelStrNum</when>
|
|
|
|
+ <when test='item=="secondLevelStrNum"'>t1.secondLevelStrNum</when>
|
|
|
|
+ <when test='item=="thirdLevelStrNum"'>t1.thirdLevelStrNum</when>
|
|
|
|
+ <when test='item=="entryNum"'>t2.entryNum</when>
|
|
|
|
+ <otherwise>t1.doctorId</otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </foreach>
|
|
|
|
+ asc
|
|
|
|
+ </if>
|
|
|
|
+ <if test="(doctorAverageStatisticsVO.asc ==null or doctorAverageStatisticsVO.asc.size == 0) and doctorAverageStatisticsVO.desc !=null and doctorAverageStatisticsVO.desc.size > 0">
|
|
|
|
+ order by
|
|
|
|
+ <foreach collection="doctorAverageStatisticsVO.desc" item="item" open=" " close=" " separator=",">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test='item=="doctorName"'>t1.doctorName</when>
|
|
|
|
+ <when test='item=="deptId"'>t1.deptId</when>
|
|
|
|
+ <when test='item=="deptName"'>t1.deptName</when>
|
|
|
|
+ <when test='item=="averageValue"'>t1.averageValue</when>
|
|
|
|
+ <when test='item=="firstLevelStrNum"'>t1.firstLevelStrNum</when>
|
|
|
|
+ <when test='item=="secondLevelStrNum"'>t1.secondLevelStrNum</when>
|
|
|
|
+ <when test='item=="thirdLevelStrNum"'>t1.thirdLevelStrNum</when>
|
|
|
|
+ <when test='item=="entryNum"'>t2.entryNum</when>
|
|
|
|
+ <otherwise>t1.doctorId</otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </foreach>
|
|
|
|
+ desc
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
<!-- 医生质控平均分-患者列表(等级)-->
|
|
<!-- 医生质控平均分-患者列表(等级)-->
|
|
<select id="doctorAverageLevelPage" resultType="com.diagbot.dto.DoctorAverageLevelDTO">
|
|
<select id="doctorAverageLevelPage" resultType="com.diagbot.dto.DoctorAverageLevelDTO">
|