Commit 83e499aa authored by chenzhao's avatar chenzhao

统计首页开发

parent f7c1bf3a
...@@ -204,8 +204,9 @@ ...@@ -204,8 +204,9 @@
<select id="acceptanceStatusTotal" resultType="map"> <select id="acceptanceStatusTotal" resultType="map">
SELECT SELECT
COUNT( * ) total, COUNT(*) AS total,
CASE WHEN acceptance_check_status = '15' THEN '待提交' CASE
WHEN acceptance_check_status = '15' THEN '待提交'
WHEN acceptance_check_status = '2' THEN '审核中' WHEN acceptance_check_status = '2' THEN '审核中'
WHEN acceptance_check_status = '3' THEN '已完成' WHEN acceptance_check_status = '3' THEN '已完成'
WHEN acceptance_check_status = '4' THEN '未通过' WHEN acceptance_check_status = '4' THEN '未通过'
...@@ -215,8 +216,17 @@ ...@@ -215,8 +216,17 @@
WHEN acceptance_check_status = '12' THEN '审核中' WHEN acceptance_check_status = '12' THEN '审核中'
WHEN acceptance_check_status = '13' THEN '审核中' WHEN acceptance_check_status = '13' THEN '审核中'
WHEN acceptance_check_status = '14' THEN '审核中' WHEN acceptance_check_status = '14' THEN '审核中'
ELSE '待整改' END AS statusText, ELSE '待整改'
ROUND( COALESCE ( SUM ( ei.real_scale ), 0 ), 2 ) AS realScale END AS statusText,
ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale
FROM
hygf_acceptance_check
LEFT JOIN
hygf_work_order_power_station ps ON ps.sequence_nbr = hygf_acceptance_check.work_order_power_station_id
LEFT JOIN
hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = ps.sequence_nbr
LEFT JOIN
hygf_peasant_household ON hygf_acceptance_check.peasant_household_id = hygf_peasant_household.sequence_nbr
<if test="developerCode != null and developerCode != ''"> <if test="developerCode != null and developerCode != ''">
AND hygf_peasant_household.developer_code = #{developerCode} AND hygf_peasant_household.developer_code = #{developerCode}
</if> </if>
...@@ -240,7 +250,7 @@ ...@@ -240,7 +250,7 @@
SELECT SELECT
COUNT( * ) AS total, COUNT( * ) AS total,
status AS statusText, status AS statusText,
ROUND( COALESCE ( SUM ( ei.real_scale ), 0 ), 2 ) AS realScale ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale
FROM FROM
hygf_financing_info hygf_financing_info
LEFT JOIN hygf_work_order_power_station ps ON ps.peasant_household_id = hygf_financing_info.peasant_household_id LEFT JOIN hygf_work_order_power_station ps ON ps.peasant_household_id = hygf_financing_info.peasant_household_id
...@@ -268,7 +278,7 @@ ...@@ -268,7 +278,7 @@
<select id="inverterTotal" resultType="map"> <select id="inverterTotal" resultType="map">
SELECT SELECT
COUNT ( * ) total, COUNT(*) total,
'接入逆变器' AS statusText '接入逆变器' AS statusText
FROM FROM
hygf_jp_inverter ji hygf_jp_inverter ji
...@@ -290,15 +300,15 @@ ...@@ -290,15 +300,15 @@
</foreach> </foreach>
</if> </if>
UNION ALL UNION ALL
SELECT FLOOR(SUM SELECT
( ( LENGTH ( construction_inverter_info ) - LENGTH ( REPLACE ( construction_inverter_info, 'id', '' ) ) ) ) / LENGTH ( 'id' )) AS total, FLOOR(SUM((LENGTH(construction_inverter_info)-LENGTH(REPLACE(construction_inverter_info,'id',''))))/LENGTH('id')) AS total,
'户用开发逆变器' AS statusText '户用开发逆变器' AS statusText
FROM FROM
hygf_power_station_construction_data hygf_power_station_construction_data
LEFT JOIN LEFT JOIN
hygf_work_order_power_station on hygf_power_station_construction_data.work_order_power_station_id =hygf_work_order_power_station.sequence_nbr hygf_work_order_power_station on hygf_power_station_construction_data.work_order_power_station_id =hygf_work_order_power_station.sequence_nbr
LEFT JOIN LEFT JOIN
hygf_peasant_household ON hygf_work_order_power_station.peasant_household_id = hygf_peasant_household.sequence_nbr; hygf_peasant_household ON hygf_work_order_power_station.peasant_household_id = hygf_peasant_household.sequence_nbr
<if test="developerCode != null and developerCode != ''"> <if test="developerCode != null and developerCode != ''">
AND hygf_peasant_household.developer_code = #{developerCode} AND hygf_peasant_household.developer_code = #{developerCode}
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment