|
@@ -23,7 +23,7 @@
|
|
|
SELECT d.id,d.type_name as typeName,d.type_img as typeImg,IF(facility_type IS NULL,0,COUNT(*)) AS
|
|
|
typeFacilityNum
|
|
|
FROM base_facility_type d
|
|
|
- LEFT JOIN base_ggp_facility e ON e.facility_type = d.id
|
|
|
+ LEFT JOIN base_ggp_facility e ON e.facility_type = d.type_code
|
|
|
<where>
|
|
|
<if test="tenantId != null and tenantId != ''">
|
|
|
and e.tenant_id = #{tenantId}
|
|
@@ -35,7 +35,7 @@
|
|
|
SELECT d.id,IF(facility_type IS NULL,0,COUNT(*)) AS
|
|
|
normalFacilityNum
|
|
|
FROM base_facility_type d
|
|
|
- LEFT JOIN base_ggp_facility e ON e.facility_type = d.id
|
|
|
+ LEFT JOIN base_ggp_facility e ON e.facility_type = d.type_code
|
|
|
<where>
|
|
|
<if test="tenantId != null and tenantId != ''">
|
|
|
and e.tenant_id = #{tenantId}
|
|
@@ -48,7 +48,7 @@
|
|
|
SELECT d.id,IF(facility_type IS NULL,0,COUNT(*)) AS
|
|
|
upkeepFacilityNum
|
|
|
FROM base_facility_type d
|
|
|
- LEFT JOIN base_ggp_facility e ON e.facility_type = d.id
|
|
|
+ LEFT JOIN base_ggp_facility e ON e.facility_type = d.type_code
|
|
|
<where>
|
|
|
<if test="tenantId != null and tenantId != ''">
|
|
|
and e.tenant_id = #{tenantId}
|
|
@@ -61,7 +61,7 @@
|
|
|
SELECT d.id,IF(facility_type IS NULL,0,COUNT(*)) AS
|
|
|
closeFacilityNum
|
|
|
FROM base_facility_type d
|
|
|
- LEFT JOIN base_ggp_facility e ON e.facility_type = d.id
|
|
|
+ LEFT JOIN base_ggp_facility e ON e.facility_type = d.type_code
|
|
|
<where>
|
|
|
<if test="tenantId != null and tenantId != ''">
|
|
|
and e.tenant_id = #{tenantId}
|