|
@@ -1662,8 +1662,8 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- a.doctor_id AS doctorId,
|
|
|
- a.doctor_name AS doctorName,
|
|
|
+ CASE WHEN a.doctor_id is NULL OR a.doctor_id ='' THEN '未知' ELSE a.doctor_id END AS doctorId,
|
|
|
+ CASE WHEN a.doctor_name is NULL OR a.doctor_name ='' THEN '未知' ELSE a.doctor_name END AS doctorName,
|
|
|
count( DISTINCT a.behospital_code ) AS mrNum,
|
|
|
ROUND( sum( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
|
|
|
ROUND( sum( CAST( c.score_res AS DECIMAL ( 18, 2 )) )/ count(*), 2 ) AS averageValue,
|
|
@@ -1706,7 +1706,12 @@
|
|
|
and c.level = #{level}
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
- and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ <if test="name == '未知'">
|
|
|
+ and (a.doctor_name is null or a.doctor_name='')
|
|
|
+ </if>
|
|
|
+ <if test="name != '未知'">
|
|
|
+ and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="userId!=null and userId !=''">
|
|
|
AND f.user_id = #{userId}
|
|
@@ -1720,8 +1725,8 @@
|
|
|
) t1,
|
|
|
(
|
|
|
SELECT
|
|
|
- a.doctor_id AS doctorId,
|
|
|
- a.doctor_name AS doctorName,
|
|
|
+ CASE WHEN a.doctor_id is NULL OR a.doctor_id ='' THEN '未知' ELSE a.doctor_id END AS doctorId,
|
|
|
+ CASE WHEN a.doctor_name is NULL OR a.doctor_name ='' THEN '未知' ELSE a.doctor_name END AS doctorName,
|
|
|
count( * ) AS entryNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
@@ -1759,7 +1764,12 @@
|
|
|
and c.level = #{level}
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
- and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ <if test="name == '未知'">
|
|
|
+ and (a.doctor_name is null or a.doctor_name='')
|
|
|
+ </if>
|
|
|
+ <if test="name != '未知'">
|
|
|
+ and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="userId!=null and userId !=''">
|
|
|
AND f.user_id = #{userId}
|
|
@@ -1786,8 +1796,8 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- a.doctor_id AS doctorId,
|
|
|
- a.doctor_name AS doctorName,
|
|
|
+ CASE WHEN a.doctor_id is NULL OR a.doctor_id ='' THEN '未知' ELSE a.doctor_id END AS doctorId,
|
|
|
+ CASE WHEN a.doctor_name is NULL OR a.doctor_name ='' THEN '未知' ELSE a.doctor_name END AS doctorName,
|
|
|
sum( d.rule_type = 1 ) AS emptyNum,
|
|
|
round( sum( d.rule_type = 2 )/ 2, 0 ) AS errorNum,
|
|
|
count( DISTINCT a.behospital_code ) AS mrNum
|
|
@@ -1826,7 +1836,12 @@
|
|
|
and b.level = #{level}
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
- and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ <if test="name == '未知'">
|
|
|
+ and (a.doctor_name is null or a.doctor_name='')
|
|
|
+ </if>
|
|
|
+ <if test="name != '未知'">
|
|
|
+ and a.doctor_name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="userId!=null and userId !=''">
|
|
|
AND e.user_id = #{userId}
|