75279779 康伟

kangwei:节能环保大屏数据展示--头部数据,吨水电耗求平均值,负荷率/10000

1 个父辈 6a973c95
......@@ -373,14 +373,15 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
private JnhbReportData getJnhbReportSumData(String departIds, String startTime ,String endTime){
//头部统计数据
String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", departIds, startTime, endTime);
String dataViewName2 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", 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,";
String sql = " select ROUND(sum(ddd.wssjcll),2) wssjcll,ROUND(avg(ddd.wsfhl),2) wsfhl,ROUND(sum(ddd.dh),2) dh, ROUND(sum(ddd.qy),2) qy,ROUND(sum(ddd.xssyl),2) xssyl,ROUND(sum(ddd.zhnyxhl),2) zhnyxhl,";
sql += " ROUND(sum(ddd.eyhtpfl),2) eyhtpfl,ROUND(avg(ddd.dsdh),2) 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*10000 ) ), 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 ";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!