7ceeebd1 康伟

kangwei: 吨水电耗的同比时间、环比时间问题

1 个父辈 73d2b11a
......@@ -82,7 +82,7 @@ public class ReportItemvService {
*/
public List<FRportlCommandCenterVO> statisticsByElectricity(String departId, String startTime, String endTime) {
List<FRportlCommandCenterVO> fRportlCommandCenterVOList = new ArrayList<>();
// DateVO dateVO = new DateVO(startTime);
DateVO dateVO = new DateVO(startTime);
// String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ", departId, startTime,endTime);
// String sql = "select ROUND( SUM( IFNULL(aaa.DLHJ,0) ), 2 ) AS DLHJ from " + dataViewName3a24+ "aaa";
......@@ -90,16 +90,16 @@ public class ReportItemvService {
String dlhj_avg_value = getAvgDLHJ(departId,startTime, endTime);
String dlhj_avg_valueHB = getAvgDLHJ(departId, DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime));
String dlhj_avg_valueTB = getAvgDLHJ(departId, DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime));
String dlhj_avg_valueHB = getAvgDLHJ(departId, dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());
String dlhj_avg_valueTB = getAvgDLHJ(departId, dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());
/* String csl_avg_value = getSumCSL(departId,dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
String csl_avg_valueHB = getSumCSL(departId, dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());
String csl_avg_valueTB = getSumCSL(departId, dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());*/
String dsdh_value = ReportViewUtil.getValueByDSDH(departId,startTime, endTime) ;
String dsdh_value_Hb = ReportViewUtil.getValueByDSDH(departId,DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime)) ;
String dsdh_value_Tb = ReportViewUtil.getValueByDSDH(departId,DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime)) ;
String dsdh_value_Hb = ReportViewUtil.getValueByDSDH(departId,dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime()) ;
String dsdh_value_Tb = ReportViewUtil.getValueByDSDH(departId,dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime()) ;
// long nowDifferDay = DateUtils.differenceDay(dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
// long lastMonthDifferDay = DateUtils.differenceDay(dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());
// long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());
......@@ -107,7 +107,7 @@ public class ReportItemvService {
//当月数据/环比、同比
FRportlCommandCenterVO nowMonthVO = new FRportlCommandCenterVO("月总电耗(", JSUtils.divide(dlhjData.getValue(),10000), JSUtils.divide(dlhjData.getValueTb(),10000), JSUtils.divide(dlhjData.getValueHb(),10000));
//日均数据:/环比/同比
FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("日均电耗",dlhj_avg_value ,JSUtils.divide(dlhj_avg_valueTB,10000) ,JSUtils.divide(dlhj_avg_valueHB,10000));
FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("日均电耗",JSUtils.divide(dlhj_avg_value,10000) ,JSUtils.divide(dlhj_avg_valueTB,10000) ,JSUtils.divide(dlhj_avg_valueHB,10000));
//吨水消耗
FRportlCommandCenterVO lastYearVo = new FRportlCommandCenterVO("吨水电耗",dsdh_value ,dsdh_value_Tb,dsdh_value_Hb );
fRportlCommandCenterVOList.add( nowMonthVO) ;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!