Commit bb544a88 authored by 朱晨阳's avatar 朱晨阳

Merge remote-tracking branch 'origin/developer_bw' into developer_bw

parents 398c0542 51134736
......@@ -166,4 +166,7 @@ public class PreparationMoney extends BaseEntity {
private String delFile;
@TableField(exist = false)
private String arrFile;
@TableField(exist = false)
private List<HygfReplenishment> hygfReplenishments; //补货单
}
......@@ -7,11 +7,12 @@
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 completeTotal,
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
LEFT JOIN
hygf_peasant_household ph ON ps.peasant_household_id = ph.sequence_nbr
FROM hygf_power_station ps
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_power_station_engineering_info ei ON ei.work_order_power_station_id = wps.sequence_nbr
WHERE
ps.is_delete = 0
<if test="developerCode != null and developerCode != ''">
......@@ -56,11 +57,14 @@
SELECT
SUM(CASE WHEN status = '未签署' THEN 1 ELSE 0 END) AS '未签署',
SUM(CASE WHEN status = '双方已签署' THEN 1 ELSE 0 END) AS '双方已签署',
ROUND(COALESCE( SUM(CASE WHEN status = '双方已签署' THEN ei.real_scale ELSE 0 END) , 0), 2) AS sfyqsrl,
SUM(CASE WHEN status = '农户已签署' THEN 1 ELSE 0 END) AS '农户已签署',
SUM(CASE WHEN status = '已作废' THEN 1 ELSE 0 END) AS '已作废'
FROM
( SELECT hhc.*, ROW_NUMBER() OVER ( PARTITION BY peasant_household_id ORDER BY sequence_nbr DESC ) AS rn FROM hygf_household_contract hhc ) subq
LEFT JOIN hygf_peasant_household ph ON ph.SEQUENCE_NBR = subq.peasant_household_id
LEFT JOIN hygf_work_order_power_station wps ON wps.peasant_household_id = ph.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = wps.sequence_nbr
WHERE
subq.rn = 1
<if test="developerCode != null and developerCode != ''">
......@@ -113,9 +117,12 @@
SELECT
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 = '备货完成' or preparation_money_state = '已收货' THEN 1 ELSE 0 END ) AS '已收货',
ROUND(COALESCE(SUM( CASE WHEN preparation_money_state = '备货完成' or preparation_money_state = '已收货' THEN ei.real_scale ELSE 0 END ), 0), 2) AS yshrl,
SUM( CASE WHEN preparation_money_state = '待收货' THEN 1 ELSE 0 END ) AS '已发货'
FROM
hygf_peasant_household
LEFT JOIN hygf_work_order_power_station ps ON ps.peasant_household_id = hygf_peasant_household.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id = ps.sequence_nbr
WHERE
preparation_money_state IS NOT NULL
<if test="developerCode != null and developerCode != ''">
......
......@@ -126,12 +126,13 @@ public class StatisticsHomepageServiceImpl {
if (!e.equals("completeTotal")){
list.add( MapBuilder.<String, Object>create().put("statusText",e).put("total",surey.get(e)).build());
}
if (!e.equals("未勘察")){
if (!e.equals("未勘察") && !e.equals("completeTotalrl") ){
sureyNum += new BigDecimal(surey.get(e).toString()).longValue();
}
}
list = this.nullDataBuildResult(list,surveKeys);
resultMap.put("sureyComplete",surey.containsKey("completeTotal")?surey.get("completeTotal"):0);
resultMap.put("completeTotalrl",surey.containsKey("completeTotalrl")?surey.get("completeTotalrl"):0);
}
li.put("surveNum",sureyNum);
......@@ -152,8 +153,9 @@ public class StatisticsHomepageServiceImpl {
li.put("surveNum",surveNum);
list = this.nullDataBuildResult(list,desionKeys);
if (resultMap.containsKey("sureyComplete")){
list.add( MapBuilder.<String, Object>create().put("statusText","审核完成").put("total",resultMap.get("sureyComplete")).build());
list.add( MapBuilder.<String, Object>create().put("statusText","审核完成").put("total",resultMap.get("sureyComplete")).put("realScale",resultMap.get("completeTotalrl")).build());
resultMap.remove("sureyComplete");
resultMap.remove("completeTotalrl");
}else {
list.add( MapBuilder.<String, Object>create().put("statusText","审核完成").put("total",0).build());
}
......@@ -168,8 +170,11 @@ public class StatisticsHomepageServiceImpl {
Map<String, Object> contract = maps.get(0);
contractKeys.removeAll(contract.keySet());
for (String e : contract.keySet()) {
if (!e.equals("sfyqsrl") && !e.equals("双方已签署")){
list.add(MapBuilder.<String, Object>create().put("statusText", e).put("total", contract.get(e)).build());
}
}
list.add(MapBuilder.<String, Object>create().put("statusText","双方已签署" ).put("total", contract.get("双方已签署")).put("realScale",contract.get("sfyqsrl")).build());
list = this.nullDataBuildResult(list,contractKeys);
}
resultMap.put("contract",list);
......@@ -181,9 +186,12 @@ public class StatisticsHomepageServiceImpl {
Map<String, Object> preparationMoney = maps.get(0);
preparationMoneyKeys.removeAll(preparationMoney.keySet());
for (String e : preparationMoney.keySet()) {
if (!e.equals("已收货") &&!e.equals("yshrl")){
list.add(MapBuilder.<String, Object>create().put("statusText", e).put("total", preparationMoney.get(e)).build());
}
preparationNum += new BigDecimal(preparationMoney.get(e).toString()).longValue();
}
list.add(MapBuilder.<String, Object>create().put("statusText", "已收货").put("total", preparationMoney.get("已收货")).put("realScale", preparationMoney.get("yshrl")).build());
list = this.nullDataBuildResult(list,preparationMoneyKeys);
}
resultMap.put("preparationMoney",list);
......
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