|
|
@ -55,20 +55,33 @@
|
|
|
|
<select id="selectAllServicesCount"
|
|
|
|
<select id="selectAllServicesCount"
|
|
|
|
resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
|
|
|
|
resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
|
|
|
|
SELECT
|
|
|
|
SELECT
|
|
|
|
IFNULL( ROUND( a.revenue / 100000, 1 ), '-' ) AS allRevenue,
|
|
|
|
IFNULL( ROUND( SUM( a.revenue ) / 100000, 1 ), '-' ) AS allRevenue,
|
|
|
|
IFNULL( ROUND( a.add_value, 1 ), '-' ) AS addValue,
|
|
|
|
IFNULL( ROUND( a.add_value, 1 ), '-' ) AS addValue,
|
|
|
|
a.type AS servicesType,
|
|
|
|
a.type AS servicesType,
|
|
|
|
CASE
|
|
|
|
b.qyCount AS qyCount
|
|
|
|
|
|
|
|
|
|
|
|
WHEN a.type = 3 THEN
|
|
|
|
|
|
|
|
( SELECT COUNT(*) FROM bms_enterprise_basic_info WHERE type = 1 ) ELSE b.qyCount
|
|
|
|
|
|
|
|
END AS qyCount
|
|
|
|
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
j_total_revenue a
|
|
|
|
j_total_revenue a
|
|
|
|
LEFT JOIN ( SELECT a.services_type, COUNT(*) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
|
|
|
|
LEFT JOIN ( SELECT a.services_type, count( * ) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
|
|
|
|
WHERE
|
|
|
|
WHERE
|
|
|
|
a.years = YEAR (NOW()) - 1
|
|
|
|
a.years = YEAR (NOW()) - 1
|
|
|
|
ORDER BY FIELD(a.type, 3, 1, 2, 4);
|
|
|
|
GROUP BY
|
|
|
|
|
|
|
|
a.type,
|
|
|
|
|
|
|
|
b.qyCount
|
|
|
|
|
|
|
|
# SELECT
|
|
|
|
|
|
|
|
# IFNULL( ROUND( a.revenue / 100000, 1 ), '-' ) AS allRevenue,
|
|
|
|
|
|
|
|
# IFNULL( ROUND( a.add_value, 1 ), '-' ) AS addValue,
|
|
|
|
|
|
|
|
# a.type AS servicesType,
|
|
|
|
|
|
|
|
# CASE
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# WHEN a.type = 3 THEN
|
|
|
|
|
|
|
|
# ( SELECT COUNT(*) FROM bms_enterprise_basic_info WHERE type = 1 ) ELSE b.qyCount
|
|
|
|
|
|
|
|
# END AS qyCount
|
|
|
|
|
|
|
|
# FROM
|
|
|
|
|
|
|
|
# j_total_revenue a
|
|
|
|
|
|
|
|
# LEFT JOIN ( SELECT a.services_type, COUNT(*) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
|
|
|
|
|
|
|
|
# WHERE
|
|
|
|
|
|
|
|
# a.years = YEAR (NOW()) - 1
|
|
|
|
|
|
|
|
# ORDER BY FIELD(a.type, 3, 1, 2, 4);
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|