|
|
|
@ -36,17 +36,19 @@
|
|
|
|
|
# LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm
|
|
|
|
|
# GROUP BY a.services_type
|
|
|
|
|
# ORDER BY a.services_type
|
|
|
|
|
SELECT IFNULL(ROUND(SUM(a.revenue) / 100000, 1), '-') as allRevenue,
|
|
|
|
|
'-' AS addValue,
|
|
|
|
|
a.type as servicesType,
|
|
|
|
|
b.qyCount 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
|
|
|
|
|
GROUP BY a.type
|
|
|
|
|
SELECT
|
|
|
|
|
IFNULL( ROUND( SUM( a.revenue ) / 100000, 1 ), '-' ) AS allRevenue,
|
|
|
|
|
'-' AS addValue,
|
|
|
|
|
a.type AS servicesType,
|
|
|
|
|
b.qyCount 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
|
|
|
|
|
GROUP BY
|
|
|
|
|
a.type,
|
|
|
|
|
b.qyCount
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectAllZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
|
|
|
|
|
SELECT 5 AS services_type,
|
|
|
|
|