增加了医生统计导出

This commit is contained in:
2025-07-03 17:41:31 +08:00
parent aaf5dfe921
commit e13129a171
5 changed files with 140 additions and 1 deletions
@@ -186,6 +186,65 @@
</if>
</select>
<select id="excelList" resultType="net.lab1024.sa.admin.module.business.statistics.domain.StatisticsExpertVO">
SELECT
t_caseplatform_expert.*,
(select name from t_area where id=t_caseplatform_expert.prov_id) provName,
(select name from t_area where id=t_caseplatform_expert.city_id) cityName,
(select count(*) from t_caseplatform_case where t_caseplatform_case.expert_id=t_caseplatform_expert.id) total,
(select count(*) from t_caseplatform_case where t_caseplatform_case.expert_id=t_caseplatform_expert.id and status = 1) passNum,
(select count(*) from t_caseplatform_case where t_caseplatform_case.expert_id=t_caseplatform_expert.id and status = 0) waitNum,
(select count(*) from t_caseplatform_case where t_caseplatform_case.expert_id=t_caseplatform_expert.id and status = 2) refuseNum,
(select count(*) from t_caseplatform_case where t_caseplatform_case.expert_id=t_caseplatform_expert.id and settlement_flag = 1) settlementNum
FROM t_caseplatform_expert
<where>
<!--name-->
<if test="queryForm.name != null and queryForm.name != ''">
AND ( INSTR(t_caseplatform_expert.name,#{queryForm.name})
OR INSTR(t_caseplatform_expert.hospital_name,#{queryForm.name})
)
</if>
<choose>
<when test="queryForm.provId != null and queryForm.provId != ''">
AND t_caseplatform_expert.prov_id =#{queryForm.provId}
</when>
<when test="provList != null and provList.size > 0">
and
t_caseplatform_expert.prov_id
in
<foreach collection="provList" open="(" close=")" separator="," item="item">
#{item.id}
</foreach>
</when>
<otherwise>
and 1=2
</otherwise>
</choose>
<if test="queryForm.cityId != null and queryForm.cityId != ''">
AND t_caseplatform_expert.city_id =#{queryForm.cityId}
</if>
<if test="queryForm.hospitalUuid != null and queryForm.hospitalUuid != ''">
AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid}
</if>
</where>
<if test="queryForm.sort ==0 ">
order by total desc
</if>
<if test="queryForm.sort ==1 ">
order by settlementNum desc
</if>
<if test="queryForm.sort ==2 ">
order by passNum desc
</if>
<if test="queryForm.sort ==3 ">
order by waitNum desc
</if>
<if test="queryForm.sort ==4 ">
order by refuseNum desc
</if>
</select>
<select id="getSystemActualEcharsData" resultType="net.lab1024.sa.admin.module.business.statistics.domain.SystemActualEcharsData">
SELECT statistics_day statisticsDate, count(*) num
FROM t_caseplatform_case