IFNULL(SUM(CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END),0)AS '未通过',
IFNULL(SUM(CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END),0)AS '未通过',
IFNULL(SUM(CASE WHEN ps.process_status = '进行中' AND ps.business_status = '通过' AND next_node_name = '设计上传典型图库' THEN 1 ELSE 0 END),0) AS '已完成(法务审核)',
IFNULL(SUM(CASE WHEN ps.process_status = '典设图纸待上传' THEN 1 ELSE 0 END),0) AS '已完成(法务审核)',
IFNULL(SUM(CASE WHEN ps.process_status = '投融待审核' THEN 1 ELSE 0 END),0) AS '投融待审核',
IFNULL(SUM(CASE WHEN ps.process_status = '法务待审核' THEN 1 ELSE 0 END),0) AS '法务待审核',
IFNULL(SUM(CASE WHEN ps.process_status = '设计待审核' THEN 1 ELSE 0 END),0) AS '设计待审核',
IFNULL(SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END),0) AS completeTotal,
IFNULL(SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END),0) AS completeTotal,
ROUND(COALESCE(SUM( CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END ), 0), 2) AS completeTotalrl,
ROUND(COALESCE(SUM( CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END ), 0), 2) AS completeTotalrl
IFNULL(SUM(CASE WHEN ps.process_status = '进行中' AND (ps.business_status IS NULL OR ps.design_status IS NULL OR ps.technology_status IS NULL or ps.business_status = '' OR ps.design_status = '' OR ps.technology_status = '') THEN 1 ELSE 0 END),0) AS '进行中(审核)'
FROM hygf_power_station ps
FROM hygf_power_station ps
LEFT JOIN hygf_peasant_household ph ON ps.peasant_household_id = ph.sequence_nbr
LEFT JOIN hygf_peasant_household ph ON ps.peasant_household_id = ph.sequence_nbr
LEFT JOIN hygf_work_order_power_station wps ON wps.peasant_household_id = ph.sequence_nbr
LEFT JOIN hygf_work_order_power_station wps ON wps.peasant_household_id = ph.sequence_nbr
...
@@ -149,9 +151,7 @@
...
@@ -149,9 +151,7 @@
WHEN power_station_construction_status = '未通过' THEN '未通过'
WHEN power_station_construction_status = '未通过' THEN '未通过'
WHEN power_station_construction_status = '施工中' or power_station_construction_status = '待施工' THEN '施工资料上传'
WHEN power_station_construction_status = '施工中' or power_station_construction_status = '待施工' THEN '施工资料上传'
WHEN power_station_construction_status = '待登记' THEN '完工登记'
WHEN power_station_construction_status = '待登记' THEN '完工登记'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node is null THEN '完工自审'
WHEN power_station_construction_status = '已完工' THEN '已完成'
WHEN power_station_construction_status = '已完工' THEN '已完成'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node in ('engineering','design','area') THEN '审核中'
ELSE power_station_construction_status END )
ELSE power_station_construction_status END )
AS statusText,
AS statusText,
ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale FROM
ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale FROM
...
@@ -575,7 +575,7 @@
...
@@ -575,7 +575,7 @@
IFNULL( sum( CASE WHEN lc.STATUS = '农户已签署' THEN 1 ELSE 0 END ), 0 ) nhyqs,
IFNULL( sum( CASE WHEN lc.STATUS = '农户已签署' THEN 1 ELSE 0 END ), 0 ) nhyqs,
IFNULL( sum( CASE WHEN lc.STATUS = '未签署' THEN 1 ELSE 0 END ), 0 ) wqs,
IFNULL( sum( CASE WHEN lc.STATUS = '未签署' THEN 1 ELSE 0 END ), 0 ) wqs,
IFNULL( SUM( CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END ), 0 ) AS kcwtg,
IFNULL( SUM( CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END ), 0 ) AS kcwtg,
IFNULL( SUM( CASE WHEN ps.process_status = '进行中' THEN 1 ELSE 0 END ), 0 ) AS kcjxz,
IFNULL( SUM( CASE WHEN ps.process_status != '不通过' and ps.process_status != '完成' THEN 1 ELSE 0 END ), 0 ) AS kcjxz,
IFNULL( SUM( CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END ), 0 ) AS kcywc,
IFNULL( SUM( CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END ), 0 ) AS kcywc,
IFNULL( SUM( CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END ), 0 ) AS kcywcrl
IFNULL( SUM( CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END ), 0 ) AS kcywcrl