返回值为MAP的,用双引号使用别名
This commit is contained in:
+18
-18
@@ -222,15 +222,15 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
"FROM\n" +
|
||||
" (\n" +
|
||||
" SELECT\n" +
|
||||
" conr.resource_name hospitalName,\n" +
|
||||
" count(doct.resource_id) docCount \n" +
|
||||
" conr.resource_name \"hospitalName\",\n" +
|
||||
" count(doct.resource_id) \"docCount\" \n" +
|
||||
" FROM\n" +
|
||||
" qh_con_resource conr\n" +
|
||||
" LEFT JOIN qh_con_doctor doct ON conr.id = doct.resource_id \n" +
|
||||
" WHERE conr.del_flag = 0 and doct.del_flag = 0 and doct.doctor_status = '1' \n" +
|
||||
" GROUP BY conr.id) a\n" +
|
||||
" GROUP BY conr.resource_name) a\n" +
|
||||
"ORDER BY\n" +
|
||||
" docCount DESC")
|
||||
" \"docCount\" DESC")
|
||||
List<Map<String, Object>> getDocCountStatList();
|
||||
|
||||
@Select("SELECT\n" +
|
||||
@@ -238,9 +238,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
"FROM\n" +
|
||||
" (\n" +
|
||||
" SELECT\n" +
|
||||
" LEFT(org_code, 6) orgCode,\n" +
|
||||
" SUM(CASE WHEN c.session_type = '2' THEN 1 ELSE 0 END) AS consultHelperCount,\n" +
|
||||
" SUM(CASE WHEN c.session_type = '1' THEN 1 ELSE 0 END) AS consultDocCount\n" +
|
||||
" LEFT(org_code, 6) \"orgCode\",\n" +
|
||||
" SUM(CASE WHEN c.session_type = '2' THEN 1 ELSE 0 END) AS \"consultHelperCount\",\n" +
|
||||
" SUM(CASE WHEN c.session_type = '1' THEN 1 ELSE 0 END) AS \"consultDocCount\"\n" +
|
||||
" FROM\n" +
|
||||
" qh_con_session c \n" +
|
||||
" WHERE\n" +
|
||||
@@ -252,7 +252,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
" GROUP BY\n" +
|
||||
" LEFT(org_code, 6)) a \n" +
|
||||
"ORDER BY\n" +
|
||||
" consultHelperCount DESC")
|
||||
" \"consultHelperCount\" DESC")
|
||||
List<Map<String, Object>> getDeptCountStatList();
|
||||
|
||||
@Select("SELECT\n" +
|
||||
@@ -260,9 +260,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
"FROM\n" +
|
||||
" (\n" +
|
||||
" SELECT\n" +
|
||||
" cre.department_name departmentName,\n" +
|
||||
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" +
|
||||
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" +
|
||||
" cre.department_name \"departmentName\",\n" +
|
||||
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS \"consultImCount\",\n" +
|
||||
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS \"consultVedioCount\"\n" +
|
||||
" FROM\n" +
|
||||
" qh_con_session c\n" +
|
||||
" LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
|
||||
@@ -274,9 +274,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
" AND c.session_type = '1' \n" +
|
||||
" AND cre.id IS NOT NULL \n" +
|
||||
" GROUP BY\n" +
|
||||
" cre.id) a \n" +
|
||||
" cre.department_name) a \n" +
|
||||
"ORDER BY\n" +
|
||||
" consultImCount DESC")
|
||||
" \"consultImCount\" DESC")
|
||||
List<Map<String, Object>> getDepartmentCountStatList();
|
||||
|
||||
@Select("SELECT\n" +
|
||||
@@ -284,9 +284,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
"FROM\n" +
|
||||
" (\n" +
|
||||
" SELECT\n" +
|
||||
" cre.resource_name hospitalName,\n" +
|
||||
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" +
|
||||
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" +
|
||||
" cre.resource_name \"hospitalName\",\n" +
|
||||
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS \"consultImCount\",\n" +
|
||||
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS \"consultVedioCount\"\n" +
|
||||
" FROM\n" +
|
||||
" qh_con_session c\n" +
|
||||
" LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
|
||||
@@ -298,8 +298,8 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
|
||||
" AND c.session_type = '1' \n" +
|
||||
" AND cre.id IS NOT NULL \n" +
|
||||
" GROUP BY\n" +
|
||||
" cre.id) a \n" +
|
||||
" cre.resource_name) a \n" +
|
||||
"ORDER BY\n" +
|
||||
" consultImCount DESC")
|
||||
" \"consultImCount\" DESC")
|
||||
List<Map<String, Object>> getHospitalCountStatList();
|
||||
}
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@
|
||||
</select>
|
||||
|
||||
<select id="groupByMonthList" resultType="java.util.HashMap">
|
||||
SELECT COUNT(cs.content_type) cou, cs.content_type
|
||||
SELECT COUNT(cs.content_type) "cou", cs.content_type "contentType"
|
||||
FROM qh_con_session cs
|
||||
where cs.content_type is not null
|
||||
and cs.content_type <> '4'
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
|
||||
<select id="groupByTypehList" resultType="java.util.HashMap">
|
||||
SELECT COUNT(cs.content_type) cou, cs.content_type, cs.session_status
|
||||
SELECT COUNT(cs.content_type) "cou", cs.content_type "contentType", cs.session_status "sessionStatus"
|
||||
FROM qh_con_session cs
|
||||
where cs.content_type is not null
|
||||
and cs.content_type <> '4'
|
||||
|
||||
Reference in New Issue
Block a user