SUM( CASE WHEN preparation_money_state = '待发货' or preparation_money_state = '暂存发货'or preparation_money_state = '待补货' THEN 1 ELSE 0 END ) AS '待发货',
SUM( CASE WHEN preparation_money_state = '备货完成' THEN 1 ELSE 0 END ) AS '已收货',
SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货' THEN 1 ELSE 0 END ) AS '已收货',
SUM( CASE WHEN preparation_money_state = '待收货' THEN 1 ELSE 0 END ) AS '已发货'
FROM
hygf_peasant_household
...
...
@@ -138,13 +138,13 @@
<selectid="workOrderTotal"resultType="map">
SELECT
count(*) AS total,
(CASE WHEN power_station_construction_status = '待施工' THEN '派工发料'
(CASE
WHEN power_station_construction_status = '未通过' THEN '未通过'
WHEN power_station_construction_status = '施工中' or power_station_construction_status = '待登记' THEN '施工资料已上传'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node IS NULL THEN '完工登记'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node ='area' THEN '完工自审'
WHEN power_station_construction_status = '施工中' or 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 = '待审核' and work_order_power_station_node in ('engineering','design') THEN '审核中'
WHEN power_station_construction_status = '待审核' and work_order_power_station_node in ('engineering','design','area') THEN '审核中'
ELSE power_station_construction_status END )
AS statusText,
ROUND(COALESCE(SUM(ei.real_scale), 0), 2) AS realScale FROM
...
...
@@ -270,7 +270,7 @@
'待放款'
WHEN info.`status` = '待融资审核' THEN
'待审核'
WHEN info.`status` = '审核不通过' THEN
WHEN info.`status` = '审核不通过' or info.`status` = '重新验收' THEN
'未通过'
WHEN info.`status` = '放款完成' THEN
'放款完成' ELSE '待推送'
...
...
@@ -391,8 +391,8 @@
'' AS kcjxzrl,
SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END) AS kcywc,
ROUND(COALESCE(SUM(CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS kcywcrl,
SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN 1 ELSE 0 END) AS bhywc,
ROUND(COALESCE(SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS bhywcrl,
SUM(CASE WHEN ph.preparation_money_state = '备货完成' or ph.preparation_money_state = '已收货'THEN 1 ELSE 0 END) AS bhywc,
ROUND(COALESCE(SUM(CASE WHEN ph.preparation_money_state = '备货完成'or ph.preparation_money_state = '已收货' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS bhywcrl,
SUM(CASE WHEN ph.preparation_money_state = '待发货' or ph.preparation_money_state = '暂存发货'or ph.preparation_money_state = '待补货' THEN 1 ELSE 0 END ) AS bhwtg,
'' AS bhjxzrl,
SUM(CASE WHEN ph.preparation_money_state = '待收货' THEN 1 ELSE 0 END) AS bhjxz,
IFNULL(SUM( CASE WHEN preparation_money_state = '待发货' or preparation_money_state = '暂存发货' or preparation_money_state = '待补货' THEN 1 ELSE 0 END ), 0 ) AS dfh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' THEN 1 ELSE 0 END ), 0 ) AS ysh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' THEN ei.real_scale ELSE 0 END ), 0 ) AS yshrl,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货'THEN 1 ELSE 0 END ), 0 ) AS ysh,
IFNULL(SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货'THEN ei.real_scale ELSE 0 END ), 0 ) AS yshrl,
IFNULL(SUM( CASE WHEN preparation_money_state = '待收货' THEN 1 ELSE 0 END ), 0 ) AS yfh