Commit f6e3c35d authored by chenzhao's avatar chenzhao

统计bug修改 增加导出及统计条 勘察完成 备货完成 双方已签署 容量

parent aea1e58c
...@@ -390,9 +390,9 @@ ...@@ -390,9 +390,9 @@
SUM(CASE WHEN ps.process_status = '进行中' THEN 1 ELSE 0 END) AS kcjxz, SUM(CASE WHEN ps.process_status = '进行中' THEN 1 ELSE 0 END) AS kcjxz,
'' AS kcjxzrl, '' AS kcjxzrl,
SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END) AS kcywc, SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END) AS kcywc,
'' AS kcywcrl, SUM(CASE WHEN ps.process_status = '完成' THEN ROUND(COALESCE(ei.real_scale/1000, 0), 2) ELSE 0 END) AS kcywcrl,
SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN 1 ELSE 0 END) AS bhywc, SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN 1 ELSE 0 END) AS bhywc,
'' AS bhywcrl, SUM(CASE WHEN ph.preparation_money_state = '备货完成' THEN ROUND(COALESCE(ei.real_scale/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, 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, '' AS bhjxzrl,
SUM(CASE WHEN ph.preparation_money_state = '待收货' THEN 1 ELSE 0 END) AS bhjxz, SUM(CASE WHEN ph.preparation_money_state = '待收货' THEN 1 ELSE 0 END) AS bhjxz,
...@@ -564,11 +564,13 @@ ...@@ -564,11 +564,13 @@
SELECT SELECT
IFNULL( sum( CASE WHEN lc.STATUS = '已作废' THEN 1 ELSE 0 END ), 0 ) yzf, IFNULL( sum( CASE WHEN lc.STATUS = '已作废' THEN 1 ELSE 0 END ), 0 ) yzf,
IFNULL( sum( CASE WHEN lc.STATUS = '双方已签署' THEN 1 ELSE 0 END ), 0 ) sfyqs, IFNULL( sum( CASE WHEN lc.STATUS = '双方已签署' THEN 1 ELSE 0 END ), 0 ) sfyqs,
IFNULL( sum( CASE WHEN lc.STATUS = '双方已签署' THEN ei.real_scale ELSE 0 END ), 0 ) sfyqsrl,
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 = '进行中' 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 kcywc
FROM FROM
hygf_power_station ps hygf_power_station ps
LEFT JOIN ( LEFT JOIN (
...@@ -584,6 +586,8 @@ ...@@ -584,6 +586,8 @@
subq.rn = 1 subq.rn = 1
) lc ON lc.peasant_household_id = ps.peasant_household_id ) lc ON lc.peasant_household_id = ps.peasant_household_id
LEFT JOIN hygf_peasant_household ph ON ph.sequence_nbr = ps.peasant_household_id LEFT JOIN hygf_peasant_household ph ON ph.sequence_nbr = ps.peasant_household_id
LEFT JOIN hygf_work_order_power_station wops ON wops.peasant_household_id = ph.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = wops.sequence_nbr
WHERE WHERE
ps.is_delete = 0 ps.is_delete = 0
<if test="developerCode != null and developerCode != ''"> <if test="developerCode != null and developerCode != ''">
......
...@@ -386,7 +386,7 @@ public class StatisticsHomepageServiceImpl { ...@@ -386,7 +386,7 @@ public class StatisticsHomepageServiceImpl {
//合并表格及设置样式 //合并表格及设置样式
CellRangeAddress cellRangeAddress2 = new CellRangeAddress(startNum, endNum, 1, 1); CellRangeAddress cellRangeAddress2 = new CellRangeAddress(startNum, endNum, 1, 1);
CellRangeAddress cellRangeAddress = new CellRangeAddress(startNum, endNum, 2, 2); CellRangeAddress cellRangeAddress = new CellRangeAddress(startNum, endNum, 2, 2);
CellRangeAddress cellRangeAddress1 = new CellRangeAddress(startNum, endNum, 35, 35); CellRangeAddress cellRangeAddress1 = new CellRangeAddress(startNum, endNum, 36, 36);
CellRangeAddress cellRangeAddress3 = new CellRangeAddress(startNum, endNum, 41, 41); CellRangeAddress cellRangeAddress3 = new CellRangeAddress(startNum, endNum, 41, 41);
CellRangeAddress cellRangeAddress4 = new CellRangeAddress(startNum, endNum, 42, 42); CellRangeAddress cellRangeAddress4 = new CellRangeAddress(startNum, endNum, 42, 42);
CellRangeAddress cellRangeAddress5 = new CellRangeAddress(startNum, endNum, 43, 43); CellRangeAddress cellRangeAddress5 = new CellRangeAddress(startNum, endNum, 43, 43);
...@@ -559,8 +559,13 @@ public class StatisticsHomepageServiceImpl { ...@@ -559,8 +559,13 @@ public class StatisticsHomepageServiceImpl {
case "survey": case "survey":
Map<String, Object> surveyMaps = statisticsHomepageMapper.statisticsPowerStation(developerCode, regionalCompaniesCode, province, city, district); Map<String, Object> surveyMaps = statisticsHomepageMapper.statisticsPowerStation(developerCode, regionalCompaniesCode, province, city, district);
for (String key : surveyMaps.keySet()) { for (String key : surveyMaps.keySet()) {
if (!key.contains("rl")){
resultMap.put(key,Arrays.asList(surveyMaps.get(key),"0")); resultMap.put(key,Arrays.asList(surveyMaps.get(key),"0"));
}
} }
resultMap.put("kcywc",Arrays.asList(surveyMaps.get("kcywc"),new BigDecimal((double)surveyMaps.get("kcywcrl")).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()));
resultMap.put("sfyqs",Arrays.asList(surveyMaps.get("sfyqs"),new BigDecimal((double)surveyMaps.get("sfyqsrl")).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()));
break; break;
case "preparationMoney": case "preparationMoney":
Map<String, Object> preparationMoney = statisticsHomepageMapper.statisticsPreparationMoney(developerCode, regionalCompaniesCode, province, city, district); Map<String, Object> preparationMoney = statisticsHomepageMapper.statisticsPreparationMoney(developerCode, regionalCompaniesCode, province, city, district);
......
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