|
@@ -24,6 +24,7 @@ import com.hb.proj.model.OtherConsume;
|
|
|
import com.hb.proj.model.Wpg;
|
|
|
import com.hb.proj.model.WpgCorrect;
|
|
|
import com.hb.proj.utils.JsonOutUtils;
|
|
|
+import com.hb.proj.utils.RptMonthUtil;
|
|
|
import com.hb.proj.utils.RptOuter;
|
|
|
import com.hb.xframework.util.SessionThreadLocal;
|
|
|
/**
|
|
@@ -85,14 +86,9 @@ public class EnergyWaterCompareController {
|
|
|
if(StringUtils.isEmpty(year)){
|
|
|
year=String.valueOf(ca.get(Calendar.YEAR));
|
|
|
}
|
|
|
- if(Integer.parseInt(year)==ca.get(Calendar.YEAR)){ //等于当前年份,月份就应该为当前月份,否则为12月份
|
|
|
- //当年且当月>25号,否则用上一个月
|
|
|
- if(ca.get(Calendar.DAY_OF_MONTH)>25){
|
|
|
- month=String.format("%02d", ca.get(Calendar.MONTH)+1);
|
|
|
- }
|
|
|
- else{
|
|
|
- month=String.format("%02d", ca.get(Calendar.MONTH));
|
|
|
- }
|
|
|
+ if(Integer.parseInt(year)==ca.get(Calendar.YEAR)){ //等于当前年份,根据当前日期决定用本月还是上月,否则为12月份
|
|
|
+
|
|
|
+ month=String.format("%02d",RptMonthUtil.getFullMonthNum(ca));
|
|
|
}
|
|
|
|
|
|
String preyear=String.valueOf(Integer.parseInt(year)-1);
|
|
@@ -146,13 +142,7 @@ public class EnergyWaterCompareController {
|
|
|
year=String.valueOf(ca.get(Calendar.YEAR));
|
|
|
}
|
|
|
if(Integer.parseInt(year)==ca.get(Calendar.YEAR)){ //等于当前年份,月份就应该为当前月份,否则为12月份
|
|
|
- //当年且当月>25号,否则用上一个月
|
|
|
- if(ca.get(Calendar.DAY_OF_MONTH)>25){
|
|
|
- month=String.format("%02d", ca.get(Calendar.MONTH)+1);
|
|
|
- }
|
|
|
- else{
|
|
|
- month=String.format("%02d", ca.get(Calendar.MONTH));
|
|
|
- }
|
|
|
+ month=String.format("%02d",RptMonthUtil.getFullMonthNum(ca));
|
|
|
}
|
|
|
|
|
|
String preyear=String.valueOf(Integer.parseInt(year)-1);
|