2d0f6e74 康伟

kangwei:节能环保大屏数据展示

1 个父辈 f470c6e2
......@@ -345,6 +345,27 @@ public class JSUtils {
return result;
}
/***
* 分割字符串,然后拼接
* @param str 带分隔字符串
* @param splitStr 分割符号
* @return
*/
public static String quoteEach(String str,String splitStr) {
if( str != null && str.length() > 0 ){
String[] items = str.split(splitStr);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < items.length; i++) {
if (i > 0) {
sb.append(", ");
}
sb.append('\'').append(items[i]).append('\'');
}
return sb.toString();
}
return str;
}
/* ScriptEngine se = new ScriptEngineManager().getEngineByName("JavaScript");
Object eval = null;
try {
......
......@@ -361,7 +361,6 @@ public class SysCommandCentreController {
@GetMapping("/getCLSLXQ")
public Result<List<WaterTreatmentVO>> getCLSLXQ(@RequestParam(name = "time", required = true)String time){
Result<List<WaterTreatmentVO>> result = new Result<>();
//String departIds = "1818215093192753152,1818214519948836864,1818214145808531456";
List<WaterTreatmentVO> waterTrendVOList = commandCentreService.statisticsCLSLXQ(time, BaseContextHandler.getDeparts());
result.setResult(waterTrendVOList );
return result;
......
......@@ -175,7 +175,6 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
long differenceDay = DateUtils.differenceDay(dateVO.getNowMonthStartDate(), dateVO.getNowMonthEndDate());
String departIdssss = BaseUtil.quoteEach(departIds , ",");
System.out.println("departIds = "+departIds);
//String factorySql = "select fi.depart_id ,d.depart_name, fi.pro_scale*10000 'pro_scale' from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
String factorySql = "select group_concat(fi.depart_id) from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
//水厂部门编号集合
......
......@@ -45,12 +45,12 @@ public class ReportItemVO {
*/
public String getValueTbBl() {
valueTbBl = JSUtils.executeExpression("("+this.getValue() + " - " + this.getValueTb() + ") / " +this.getValueTb(),"0.00") ;
valueTbBl = JSUtils.executeExpression("("+this.getValue() + " - " + this.getValueTb() + ") *100/ " +this.getValueTb(),"0.00") ;
return valueTbBl;
}
public String getValueHbBl() {
valueHbBl = JSUtils.executeExpression("("+this.getValue() + " - " + this.getValueHb() + ") / " +this.getValueHb(),"0.00") ;
valueHbBl = JSUtils.executeExpression("("+this.getValue() + " - " + this.getValueHb() + ")*100/ " +this.getValueHb(),"0.00") ;
return valueHbBl;
}
}
......
......@@ -111,5 +111,5 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
* 节能环保 大屏展示
* @return
*/
JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO);
JnhbLargeScreenVO jnhbLargeScreenShow(String departIds,String time);
}
......
......@@ -3,6 +3,8 @@ package com.skua.modules.custom.service.impl;
import com.skua.common.constant.ReportConstant;
import com.skua.common.report.ReportViewUtil;
import com.skua.core.context.SpringContextUtils;
import com.skua.core.util.ConvertUtils;
import com.skua.modules.common.vo.DateVO;
import com.skua.modules.custom.entity.FCustomReportDataset;
import com.skua.modules.custom.mapper.FCustomReportDatasetMapper;
import com.skua.modules.custom.service.IFCustomReportDatasetService;
......@@ -16,7 +18,10 @@ import java.util.*;
import com.skua.modules.report.vo.*;
import com.skua.modules.report.vo.largeScreen.*;
import com.skua.tool.util.DateUtils;
import com.skua.tool.util.JSUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -210,7 +215,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
}
return map;
}
//节能环保报表数据
@Override
public List<JnhbReportData> jnhbReportShow(String departId, String month) {
String start = month.substring(0,4)+"-01-31";
......@@ -241,32 +246,29 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
return map;
}
//节能环保报表数据-部门+月数据
private List<JnhbReportData> jnhbReportShowDepaetMonthDate(String departIds, String startTime, String endTime){
int dayCount = (int)DateUtils.differenceDay(startTime,endTime);
String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, startTime, endTime);
String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, startTime, endTime);
List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, startTime, endTime, departIds, dayCount);
return list;
}
//节能环保 大屏展示
public JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO){
public JnhbLargeScreenVO jnhbLargeScreenShow(String departIds,String time){
DateVO dateVO = new DateVO(time);
long startTime = System.nanoTime();
JnhbLargeScreenVO largeScreenVO = new JnhbLargeScreenVO();
int dayCount = (int)DateUtils.differenceDay(dataVO.getNowStartTime(),dataVO.getNowEndTime());
//当月数据
String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime());
String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime());
List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(),
dataVO.getNowEndTime(),null, dayCount);
List<JnhbReportData> jnhbReportDataList = jnhbReportShowDepaetMonthDate(departIds,dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
//System.out.println("1111---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
// 上月数据 同比
dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime());
dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime());
List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(),
dataVO.getLastMonthEndTime(), null, dayCount);
// 上月数据 环比
List<JnhbReportData> lastMonthMapDataList = jnhbReportShowDepaetMonthDate(departIds,dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
Map<String,JnhbReportData> lastMonthMapDataMap = convertJnhbReportDataMap(lastMonthMapDataList);
//System.out.println("2222---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
Map<String,JnhbReportData> lastMonthMapData= convertJnhbReportDataMap(lastMonthReportDataList);
// 去年数据 环比
dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime());
dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime());
List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(),
dataVO.getLastYearEndTime(), null, dayCount);
Map<String,JnhbReportData> lastYearMapData= convertJnhbReportDataMap(lastYearReportDataList);
// 去年数据 同比
List<JnhbReportData> lastYearReportDataList = jnhbReportShowDepaetMonthDate(departIds,dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
Map<String,JnhbReportData> lastYearMonthMapDataMap = convertJnhbReportDataMap(lastMonthMapDataList);
//System.out.println("333333---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
LoadRateVO loadRateVO = null;
......@@ -283,13 +285,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
ResultChartsVO energyConsumeChart = null;
JnhbLargeScreenExpressionVO largeScreenExpressionVO = new JnhbLargeScreenExpressionVO();//表达式
for(JnhbReportData reportData : jnhbReportDataList){
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
//largeScreenVO.setHeadStatisticsValue( reportData);
//largeScreenExpressionVO.setHeadStatisticsValue(reportData);
largeScreenExpressionVO.setHeadStatisticsValue(reportData );
lastMonthReportDataTemp = lastMonthMapData.get(reportData.getDepartId());// 上月环比
lastYearReportDataTemp = lastYearMapData.get(reportData.getDepartId());// 去年 同比
lastMonthReportDataTemp = lastMonthMapDataMap.get(reportData.getDepartId());// 上月环比
lastYearReportDataTemp = lastYearMonthMapDataMap.get(reportData.getDepartId());// 去年 同比
//各站点系统负荷率排名:
loadRateVO = new LoadRateVO(reportData.getDepartId(),reportData.getDepartName(),reportData.getWsclgm(),reportData.getWssjcll(),reportData.getWsfhl());
//各站点能源消耗排名:
......@@ -302,10 +299,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
largeScreenExpressionVO.setReduceStatistics(reportData);
/*************同比环比数据设置****************/
if ( lastMonthReportDataTemp != null ){
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
//largeScreenVO.setHeadStatisticsValueHB( lastMonthReportDataTemp);
largeScreenExpressionVO.setHeadStatisticsValueHB( lastMonthReportDataTemp);
loadRateVO.setValueHb(lastMonthReportDataTemp.getWsfhl() );
powerConsumeVO.setValueHb(lastMonthReportDataTemp.getDsdh() );
c02NumberVO.setValueHb(lastMonthReportDataTemp.getCodxjl() );
......@@ -314,10 +307,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
largeScreenExpressionVO.setReduceStatisticsHB(reportData);
}
if ( lastYearReportDataTemp != null ){
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
//largeScreenVO.setHeadStatisticsValueTB( lastYearReportDataTemp);
largeScreenExpressionVO.setHeadStatisticsValueTB( lastYearReportDataTemp );
loadRateVO.setValueHb(lastYearReportDataTemp.getWsfhl() );
powerConsumeVO.setValueHb(lastYearReportDataTemp.getDsdh() );
c02NumberVO.setValueHb(lastYearReportDataTemp.getCodxjl() );
......@@ -338,12 +327,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
energyConsumeChart.setDataByZhnyxhl(reportData);
largeScreenVO.getEnergyConsumeChartsList().add( energyConsumeChart ) ;
//消减量统计
/*largeScreenVO.setReduceStatistics(1,cod_NumberVO);
largeScreenVO.setReduceStatistics(2,nh3n_NumberVO);
largeScreenVO.setReduceStatistics(3,tp_NumberVO);
largeScreenVO.setReduceStatistics(4,tn_NumberVO);*/
largeScreenExpressionVO.setReduceStatistics(reportData);
//CO2排放排名
co2DataList.add( c02NumberVO );
......@@ -353,20 +336,15 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
}
//设置计算表达式
largeScreenVO.setLargeScreenExpressionVO( largeScreenExpressionVO );
//头文件Head
//largeScreenVO.setHeadStatisticsValueTB();
//头部-数据统计:污水处理量、系统负荷率、电耗、汽油、薪水、综合能耗、C02,吨水
largeScreenVO.setHeadStatisticsValue( );
//largeScreenVO.setHeadStatisticsValue( );
largeScreenVO.setHeadStatisticsList( jnhbLargeScreenShowHead(departIds,time) );
//各站点能源消耗排名
largeScreenVO.setPowerConsumeVOList( powerConsumeVOList );
//负荷率对象
largeScreenVO.setLoadRateVOList( loadRateVOList );
//消减量统计
largeScreenVO.setReduceStatistics();
//CO2排放排名
largeScreenVO.setCo2DataList( co2DataList ) ;
......@@ -387,13 +365,83 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
/**转换为Map<部门编号,JnhbReportData> */
private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData>
Map<String,JnhbReportData> dataMap = new HashMap<>();
for(JnhbReportData reportData : dataList){
dataMap.put( reportData.getDepartId(),reportData );
}
return dataMap;
}
private JnhbReportData getJnhbReportSumData(String departIds, String startTime ,String endTime){
//头部统计数据
String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, startTime, endTime);
String dataViewName3 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, startTime, endTime);
System.out.println("dataViewName3 = "+dataViewName3);
if(StringUtils.isNotEmpty(departIds)){
departIds = JSUtils.quoteEach(departIds,",");
}
String sql = " select sum(ddd.wssjcll) wssjcll,avg(ddd.wsfhl) wsfhl,sum(ddd.dh) dh,sum(ddd.qy) qy,sum(ddd.xssyl) xssyl,sum(ddd.zhnyxhl) zhnyxhl,sum(ddd.eyhtpfl) eyhtpfl,sum(ddd.dsdh) dsdh from ( ";
sql += " select d.depart_name , aaa.CSL ,f.pro_scale ,ROUND( aaa.CSL / 10000, 2 ) AS wssjcll,ROUND( 100 * ( aaa.CSL / ( f.pro_scale * 31 ) ), 2 ) AS wsfhl,";
sql += " ROUND( v3.DLHJ / 10000, 2 ) AS dh,v3.qy,v3.ysl AS xssyl,ROUND(0.123*v3.DLHJ/10000 +1.4286*v3.qy,4) AS zhnyxhl ,ROUND(3*v3.qy+0.703*10*v3.DLHJ/1000,4) AS eyhtpfl,ROUND( v3.DLHJ / aaa.CSL, 2 ) AS dsdh";
sql += " FROM sys_depart d ";
sql += " LEFT JOIN sys_factory_info f ON f.depart_id = d.id ";
sql += " left join (" +dataViewName2+ ") aaa on d.id = aaa.depart_id";
sql += " left join ("+dataViewName3+") v3 on v3.depart_id = d.id";
sql += " where d.depart_type = 1 ";
if(StringUtils.isNotEmpty(departIds)){
sql += " and d.id in ("+departIds+")";
}
sql += ") ddd";
System.out.println("sql = "+sql);
List<JnhbReportData> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<JnhbReportData>(JnhbReportData.class));
if( dataList != null && !dataList.isEmpty()){
return dataList.get(0);
}
return new JnhbReportData();
}
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////污水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
public List<ResultNumberVO> jnhbLargeScreenShowHead(String departIds, String time) {
long startTime = System.currentTimeMillis();
DateVO dataVO = new DateVO(time);
//头部统计数据
JnhbReportData nowMonthData = getJnhbReportSumData(departIds,dataVO.getNowMonthStartDate(),dataVO.getNowMonthEndDate());
JnhbReportData lastMonthData = getJnhbReportSumData(departIds,dataVO.getLastMonthStartTime(),dataVO.getLastMonthEndTime());
JnhbReportData lastYearMonthData = getJnhbReportSumData(departIds,dataVO.getLastYearMonthStartTime(),dataVO.getLastYearMonthEndTime());
List<ResultNumberVO> headStatisticsList = new ArrayList<>();
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////污水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
headStatisticsList.add( getResultNumberVO( "污水处理量","wssjcll","万吨", nowMonthData.getWssjcll() , lastMonthData.getWssjcll() , lastYearMonthData.getWssjcll() ));//污水处理量
headStatisticsList.add( getResultNumberVO( "系统负荷率","wsfhl", "%",nowMonthData.getWsfhl() , lastMonthData.getWsfhl() , lastYearMonthData.getWsfhl()) );//系统负荷率
headStatisticsList.add( getResultNumberVO( "电耗","dh","万千瓦时",nowMonthData.getDh() , lastMonthData.getDh() , lastYearMonthData.getDh()) );//电耗
headStatisticsList.add( getResultNumberVO( "汽油","qy","吨",nowMonthData.getQy() , lastMonthData.getQy() , lastYearMonthData.getQy()) );//汽油
headStatisticsList.add( getResultNumberVO( "新水使用量","xssyl", "吨" ,nowMonthData.getXssyl() , lastMonthData.getXssyl() , lastYearMonthData.getXssyl()) );//薪水
headStatisticsList.add( getResultNumberVO( "综合能耗消费量","zhnyxhl","吨标准煤",nowMonthData.getZhnyxhl() , lastMonthData.getZhnyxhl() , lastYearMonthData.getZhnyxhl()) );//综合能耗
headStatisticsList.add( getResultNumberVO( "二氧化碳排放量","eyhtpfl","吨CO2当量",nowMonthData.getEyhtpfl() , lastMonthData.getEyhtpfl() , lastYearMonthData.getEyhtpfl()) );//C02
headStatisticsList.add( getResultNumberVO( "吨水电耗","dsdh","千瓦时/吨",nowMonthData.getDsdh() , lastMonthData.getDsdh() , lastYearMonthData.getDsdh()) );//吨水电耗
// 执行计算方法
long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime;
System.out.println("方法执行时间:" + elapsedTime + "毫秒");
return headStatisticsList;
}
private ResultNumberVO getResultNumberVO(String name ,String code ,String unit ,String value ,String valueHb,String valueTb){
ResultNumberVO head_wssjcll = new ResultNumberVO();//污水处理量
head_wssjcll.setName( name);
head_wssjcll.setUnit( unit );
head_wssjcll.setValue( ConvertUtils.getString(value,"0") );
head_wssjcll.setValueHb( ConvertUtils.getString(valueHb,"0"));
head_wssjcll.setValueTb(ConvertUtils.getString(valueTb,"0") );
return head_wssjcll;
}
private JdbcTemplate getJdbcTemplate(){
//主库数据源
JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master");
return masterDB;
}
@Override
public Map<String, Object> reportWeekShow(String dataTime, String week) {
Map<String, Object> map = new HashMap<>();
......
......@@ -5,6 +5,7 @@ import com.google.common.collect.Maps;
import com.skua.common.report.ReportViewUtil;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.util.ConvertUtils;
import com.skua.core.util.DateUtils;
import com.skua.modules.custom.service.IFCustomReportDatasetService;
......@@ -194,8 +195,8 @@ public class ReportDataController {
@GetMapping(value = "/jnhbLargeScreenShow")
public Result<JnhbLargeScreenVO> jnhbLargeScreenShow( @RequestParam(name="time") String time) { //time
Result<JnhbLargeScreenVO> result = new Result<>();
DataVO dataVO = new DataVO(time);
JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShow(dataVO);
String departIds = BaseContextHandler.getDeparts();
JnhbLargeScreenVO jnhbLargeScreenVO = fCustomReportDatasetService.jnhbLargeScreenShow(departIds,time);
result.setResult(jnhbLargeScreenVO);
return result;
}
......
......@@ -41,45 +41,6 @@ public class JnhbLargeScreenExpressionVO {
private String head_eyhtpfl_expression_tb ="0";//C02
private String head_dsdh_expression_tb = "0";//吨水电耗
public void setHeadStatisticsValue(JnhbReportData reportData){
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
if(StringUtils.isNotEmpty( reportData.getWssjcll() )) head_wssjcll_expression = ConvertUtils.getString(reportData.getWssjcll() ,"0") +" + " + head_wssjcll_expression;//污水处理量 ;
if(StringUtils.isNotEmpty( reportData.getWsfhl() )) head_wsfhl_expression = ConvertUtils.getString(reportData.getWsfhl() ,"0") +" + " + head_wssjcll_expression;//系统负荷率 ;
if(StringUtils.isNotEmpty( reportData.getDh() )) head_dh_expression = ConvertUtils.getString(reportData.getDh() ,"0") +" + " + head_wssjcll_expression;//电耗 ;
if(StringUtils.isNotEmpty( reportData.getQy() )) head_qy_expression = ConvertUtils.getString(reportData.getQy() ,"0") +" + " + head_wssjcll_expression;//汽油 ;
if(StringUtils.isNotEmpty( reportData.getXssyl() )) head_xssyl_expression = ConvertUtils.getString(reportData.getXssyl() ,"0") +" + " + head_wssjcll_expression;//新水使用量 ;
if(StringUtils.isNotEmpty( reportData.getZhnyxhl() )) head_zhnyxhl_expression = ConvertUtils.getString(reportData.getZhnyxhl() ,"0") +" + " + head_wssjcll_expression;//综合能源消费量 ;
if(StringUtils.isNotEmpty( reportData.getEyhtpfl() )) head_eyhtpfl_expression = ConvertUtils.getString(reportData.getEyhtpfl() ,"0") +" + " + head_wssjcll_expression;//二氧化碳排放量CO2 ;
if(StringUtils.isNotEmpty( reportData.getDsdh() )) head_dsdh_expression = ConvertUtils.getString(reportData.getDsdh() ,"0") +" + " + head_wssjcll_expression;//吨水电耗 ;
}
public void setHeadStatisticsValueTB(JnhbReportData reportData){
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
if(StringUtils.isNotEmpty( reportData.getWssjcll() )) head_wssjcll_expression_tb = ConvertUtils.getString(reportData.getWssjcll() ,"0") +" + " + head_wssjcll_expression_tb;//污水处理量 ;
if(StringUtils.isNotEmpty( reportData.getWsfhl() )) head_wsfhl_expression_tb = ConvertUtils.getString(reportData.getWsfhl() ,"0") +" + " + head_wssjcll_expression_tb;//系统负荷率 ;
if(StringUtils.isNotEmpty( reportData.getDh() )) head_dh_expression_tb = ConvertUtils.getString(reportData.getDh() ,"0") +" + " + head_wssjcll_expression_tb;//电耗 ;
if(StringUtils.isNotEmpty( reportData.getQy() )) head_qy_expression_tb = ConvertUtils.getString(reportData.getQy() ,"0") +" + " + head_wssjcll_expression_tb;//汽油 ;
if(StringUtils.isNotEmpty( reportData.getXssyl() )) head_xssyl_expression_tb = ConvertUtils.getString(reportData.getXssyl() ,"0") +" + " + head_wssjcll_expression_tb;//新水使用量 ;
if(StringUtils.isNotEmpty( reportData.getZhnyxhl() )) head_zhnyxhl_expression_tb = ConvertUtils.getString(reportData.getZhnyxhl() ,"0") +" + " + head_wssjcll_expression_tb;//综合能源消费量 ;
if(StringUtils.isNotEmpty( reportData.getEyhtpfl() )) head_eyhtpfl_expression_tb = ConvertUtils.getString(reportData.getEyhtpfl() ,"0") +" + " + head_wssjcll_expression_tb;//二氧化碳排放量CO2 ;
if(StringUtils.isNotEmpty( reportData.getDsdh() )) head_dsdh_expression_tb = ConvertUtils.getString(reportData.getDsdh() ,"0") +" + " + head_wssjcll_expression_tb;//吨水电耗 ;
}
public void setHeadStatisticsValueHB(JnhbReportData reportData){
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
if(StringUtils.isNotEmpty( reportData.getWssjcll() )) head_wssjcll_expression_hb = ConvertUtils.getString(reportData.getWssjcll() ,"0") +" + " + head_wssjcll_expression_hb;//污水处理量 ;
if(StringUtils.isNotEmpty( reportData.getWsfhl() )) head_wsfhl_expression_hb = ConvertUtils.getString(reportData.getWsfhl() ,"0") +" + " + head_wssjcll_expression_hb;//系统负荷率 ;
if(StringUtils.isNotEmpty( reportData.getDh() )) head_dh_expression_hb = ConvertUtils.getString(reportData.getDh() ,"0") +" + " + head_wssjcll_expression_hb;//电耗 ;
if(StringUtils.isNotEmpty( reportData.getQy() )) head_qy_expression_hb = ConvertUtils.getString(reportData.getQy() ,"0") +" + " + head_wssjcll_expression_hb;//汽油 ;
if(StringUtils.isNotEmpty( reportData.getXssyl() )) head_xssyl_expression_hb = ConvertUtils.getString(reportData.getXssyl() ,"0") +" + " + head_wssjcll_expression_hb;//新水使用量 ;
if(StringUtils.isNotEmpty( reportData.getZhnyxhl() )) head_zhnyxhl_expression_hb = ConvertUtils.getString(reportData.getZhnyxhl() ,"0") +" + " + head_wssjcll_expression_hb;//综合能源消费量 ;
if(StringUtils.isNotEmpty( reportData.getEyhtpfl() )) head_eyhtpfl_expression_hb = ConvertUtils.getString(reportData.getEyhtpfl() ,"0") +" + " + head_wssjcll_expression_hb;//二氧化碳排放量CO2 ;
if(StringUtils.isNotEmpty( reportData.getDsdh() )) head_dsdh_expression_hb = ConvertUtils.getString(reportData.getDsdh() ,"0") +" + " + head_wssjcll_expression_hb;//吨水电耗 ;
}
/***
* 消减量统计
......
......@@ -22,7 +22,6 @@ public class JnhbLargeScreenVO {
@ApiModelProperty(value = "各站点能源消耗排名")
private List<PowerConsumeVO> powerConsumeVOList = new ArrayList();
@ApiModelProperty(value = "负荷率对象")
private List<LoadRateVO> loadRateVOList = new ArrayList<>();
......@@ -47,23 +46,6 @@ public class JnhbLargeScreenVO {
private Integer equipmentL2;
private JnhbLargeScreenExpressionVO largeScreenExpressionVO;
/***
* 设置头文件
*/
public void setHeadStatisticsValue(){
// wssjcll, wsfhl, dh, qy, xinshui, zhnyxhl, eyhtpfl, dsdh
////污水处理量,系统负荷率,电耗,汽油,新水,综合能耗,C02,吨水
this.getHeadStatisticsList().add( getResultNumberVO( "污水处理量","wssjcll","万吨", this.getLargeScreenExpressionVO().getHead_wssjcll_expression() , this.getLargeScreenExpressionVO().getHead_wssjcll_expression_hb() , this.getLargeScreenExpressionVO().getHead_wssjcll_expression_tb()) );//污水处理量
this.getHeadStatisticsList().add( getResultNumberVO( "系统负荷率","wsfhl", "%",this.getLargeScreenExpressionVO().getHead_wsfhl_expression() , this.getLargeScreenExpressionVO().getHead_wsfhl_expression_hb() , this.getLargeScreenExpressionVO().getHead_wsfhl_expression_tb()) );//系统负荷率
this.getHeadStatisticsList().add( getResultNumberVO( "电耗","dh","万千瓦时",this.getLargeScreenExpressionVO().getHead_dh_expression() , this.getLargeScreenExpressionVO().getHead_dh_expression_hb() , this.getLargeScreenExpressionVO().getHead_dh_expression_tb()) );//电耗
this.getHeadStatisticsList().add( getResultNumberVO( "汽油","qy","吨",this.getLargeScreenExpressionVO().getHead_qy_expression() , this.getLargeScreenExpressionVO().getHead_qy_expression_hb() , this.getLargeScreenExpressionVO().getHead_qy_expression_tb()) );//汽油
this.getHeadStatisticsList().add( getResultNumberVO( "新水使用量","xinshui", "吨" ,this.getLargeScreenExpressionVO().getHead_xssyl_expression() , this.getLargeScreenExpressionVO().getHead_xssyl_expression_hb() , this.getLargeScreenExpressionVO().getHead_xssyl_expression_tb()) );//薪水
this.getHeadStatisticsList().add( getResultNumberVO( "综合能耗消费量","zhnyxhl","吨标准煤",this.getLargeScreenExpressionVO().getHead_zhnyxhl_expression() , this.getLargeScreenExpressionVO().getHead_zhnyxhl_expression_hb() , this.getLargeScreenExpressionVO().getHead_zhnyxhl_expression_tb()) );//综合能耗
this.getHeadStatisticsList().add( getResultNumberVO( "二氧化碳排放量","eyhtpfl","吨CO2当量",this.getLargeScreenExpressionVO().getHead_eyhtpfl_expression() , this.getLargeScreenExpressionVO().getHead_eyhtpfl_expression_hb() , this.getLargeScreenExpressionVO().getHead_eyhtpfl_expression_tb()) );//C02
this.getHeadStatisticsList().add( getResultNumberVO( "吨水电耗","dsdh","千瓦时/吨",this.getLargeScreenExpressionVO().getHead_dsdh_expression() , this.getLargeScreenExpressionVO().getHead_dsdh_expression_hb() , this.getLargeScreenExpressionVO().getHead_dsdh_expression_tb()) );//吨水电耗
}
/***
* 设置:消减统计记录
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!