123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570 |
- package com.gyee.runeconomy.service.Comprehensive;
- import com.gyee.common.contant.ContantXk;
- import com.gyee.common.model.StringUtils;
- import com.gyee.common.util.DateUtils;
- import com.gyee.common.util.SortUtils;
- import com.gyee.runeconomy.dto.ComprehensiveVo;
- import com.gyee.runeconomy.init.CacheContext;
- import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
- import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
- import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay5;
- import com.gyee.runeconomy.model.auto.StationInfoDay;
- import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
- import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay5Service;
- import com.gyee.runeconomy.service.auto.IStationInfoDayService;
- import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
- import org.springframework.stereotype.Service;
- import javax.annotation.Resource;
- import java.util.*;
- import java.util.stream.Collectors;
- @Service
- public class ComprehensiveelectricityService {
- @Resource
- private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
- @Resource
- private IProBasicPowerstationPointService proBasicPowerstationPointService;
- @Resource
- private IEdosUtil edosUtil;
- @Resource
- private IStationInfoDayService iStationInfoDayService;
- public Map<String, Object> Comprehensive2(String wpId, String year) throws Exception {
- List<ProBasicPowerstation> wpls = CacheContext.wpls.stream().filter(g -> wpId.equals(g.getId())).collect(Collectors.toList());
- List<ComprehensiveVo> vos = new ArrayList<ComprehensiveVo>();
- Map<String, Object> map = new LinkedHashMap<>();
- //当前年份
- Calendar cal = Calendar.getInstance();
- int dqnf = cal.get(Calendar.YEAR);//本年
- //参数所传年份
- int currentyear = Integer.parseInt(year);
- // 设置为本年一月一号0点
- Calendar calendar1 = Calendar.getInstance();
- calendar1.setTime(new Date());
- calendar1.set(Calendar.YEAR, currentyear); // 根据当前年份变化
- calendar1.set(Calendar.MONTH, Calendar.JANUARY); // 0表示一月
- calendar1.set(Calendar.DAY_OF_MONTH, 1);
- calendar1.set(Calendar.HOUR_OF_DAY, 0);
- calendar1.set(Calendar.MINUTE, 0);
- calendar1.set(Calendar.SECOND, 0);
- calendar1.set(Calendar.MILLISECOND, 0);
- Date firstDayZeroHour = calendar1.getTime();
- // 获取firstDayZeroHour的月份
- Calendar calFirstDayZeroHour = Calendar.getInstance();
- calFirstDayZeroHour.setTime(firstDayZeroHour);
- int calFirstMonth = calFirstDayZeroHour.get(Calendar.MONTH) + 1;
- //当前时间月份
- Calendar calendar = Calendar.getInstance();
- int currentMonth = calendar.get(Calendar.MONTH);
- currentMonth = currentMonth + 1;
- // 设置为年初一月一号0点,同比计算取值时间(减去一年,比今年计算少一年)
- Calendar calendar3 = Calendar.getInstance();
- calendar3.setTime(new Date());
- calendar3.set(Calendar.YEAR, currentyear - 1); // 根据当前年份变化
- calendar3.set(Calendar.MONTH, Calendar.JANUARY); // 0表示一月
- calendar3.set(Calendar.DAY_OF_MONTH, 1);
- calendar3.set(Calendar.HOUR_OF_DAY, 0);
- calendar3.set(Calendar.MINUTE, 0);
- calendar3.set(Calendar.SECOND, 0);
- calendar3.set(Calendar.MILLISECOND, 0);
- Date tbjssj = calendar3.getTime();
- // 去年十二月一号0点值,环比计算取值时间(初始设置为去年十二月,每循环一次增加一月)
- Calendar calendar2 = Calendar.getInstance();
- calendar2.setTime(new Date());
- // 设置年份为传递的currentyear的前一年
- calendar2.set(Calendar.YEAR, currentyear - 1);
- // 设置月份为十二月
- calendar2.set(Calendar.MONTH, Calendar.DECEMBER); // 11表示十二月
- // 设置日期为每月的第一天
- calendar2.set(Calendar.DAY_OF_MONTH, 1);
- calendar2.set(Calendar.HOUR_OF_DAY, 0);
- calendar2.set(Calendar.MINUTE, 0);
- calendar2.set(Calendar.SECOND, 0);
- calendar2.set(Calendar.MILLISECOND, 0);
- Date hbjssj = calendar2.getTime();
- double zhcydlsum = 0.0;
- double sjdlsum = 0.0;
- double swdlsum = 0.0;
- double gwdlsum = 0.0;
- double zhcydllsum = 0.0;
- for (int i = 1; i <= 12; i++) {
- //综合场用电量
- double zhcydl = 0.0;
- double zhcydltb = 0.0;
- double zhcydlhb = 0.0;
- //实际电量
- double sjdl = 0.0;
- double sjdltb = 0.0;
- double sjdlhb = 0.0;
- //上网电量
- double swdl = 0.0;
- double swdltb = 0.0;
- double swdlhb = 0.0;
- //购网电量
- double gwdl = 0.0;
- double gwdltb = 0.0;
- double gwdlhb = 0.0;
- //综合场用电率
- double zhcydll = 0.0;
- double zhcydlltb = 0.0;
- double zhcydllhb = 0.0;
- for (ProBasicPowerstation wp : wpls) {
- //当前场站本年循环所有指标取值集合
- double rfdlsj = 0.0;
- List<ProEconPowerstationInfoDay5> zbls = proEconPowerstationInfoDay5Service.getmax(wp.getId(), firstDayZeroHour);
- List<ProEconPowerstationInfoDay5> tbzbls = proEconPowerstationInfoDay5Service.getmax(wp.getId(), tbjssj);
- List<ProEconPowerstationInfoDay5> hbzbls = proEconPowerstationInfoDay5Service.getmax(wp.getId(), hbjssj);
- ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
- rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
- if (!zbls.isEmpty() && zbls != null) {
- //综合场用电量取值
- zhcydl = zbls.get(0).getYzhcydldb().doubleValue() / 10000;
- zhcydlsum += zhcydl;
- //发电量取值
- if (calFirstMonth == currentMonth && currentyear == dqnf) {
- // sjdl = (zbls.get(0).getYfdldb().doubleValue() / 10000) + (rfdlsj / 10000);
- sjdl = (zbls.get(0).getYfdldb().doubleValue() / 10000);
- } else {
- sjdl = zbls.get(0).getYfdldb().doubleValue() / 10000;
- }
- sjdlsum += sjdl;
- //上网电量取值
- swdl = zbls.get(0).getYswdldb().doubleValue() / 10000;
- swdlsum += swdl;
- //购网电量取值
- gwdl = zbls.get(0).getYgwgwdldb().doubleValue() / 10000;
- gwdlsum += gwdl;
- //综合场用电率计算 —— 综合场用电率=(发电量-上网电量+购网电量)/发电量
- if (sjdl != 0) {
- zhcydll = (sjdl - swdl + gwdl) / sjdl;
- } else {
- zhcydll = (sjdl - swdl + gwdl) / 1;
- }
- zhcydllsum += zhcydll;
- }
- if (!tbzbls.isEmpty() && tbzbls != null) {
- zhcydltb = tbzbls.get(0).getYzhcydldb().doubleValue() / 10000;
- sjdltb = tbzbls.get(0).getYfdldb().doubleValue() / 10000;
- swdltb = tbzbls.get(0).getYswdldb().doubleValue() / 10000;
- gwdltb = tbzbls.get(0).getYgwgwdldb().doubleValue() / 10000;
- if (sjdltb != 0) {
- zhcydlltb = (sjdltb - swdltb + gwdltb) / sjdltb;
- } else {
- zhcydlltb = (sjdltb - swdltb + gwdltb) / 1;
- }
- }
- if (!hbzbls.isEmpty() && hbzbls != null) {
- zhcydlhb = hbzbls.get(0).getYzhcydldb().doubleValue() / 10000;
- sjdlhb = hbzbls.get(0).getYfdldb().doubleValue() / 10000;
- swdlhb = hbzbls.get(0).getYswdldb().doubleValue() / 10000;
- gwdlhb = hbzbls.get(0).getYgwgwdldb().doubleValue() / 10000;
- if (sjdlhb != 0) {
- zhcydllhb = (sjdlhb - swdlhb + gwdlhb) / sjdlhb;
- } else {
- zhcydllhb = (sjdlhb - swdlhb + gwdlhb) / 1;
- }
- }
- //添加各指标
- ComprehensiveVo vo = new ComprehensiveVo();
- //添加综合厂用电量数据
- vo.setZhcydl(StringUtils.round(zhcydl, 2));
- if (zhcydltb != 0) {
- // vo.setZhcydltb(StringUtils.round((zhcydl - zhcydltb) / zhcydltb * 100, 0));
- vo.setZhcydltb(StringUtils.round(zhcydltb, 2));
- } else {
- vo.setZhcydltb(0.0);
- }
- if (zhcydlhb != 0) {
- // vo.setZhcydlhb(StringUtils.round((zhcydl - zhcydlhb) / zhcydlhb * 100, 0));
- vo.setZhcydlhb(StringUtils.round(zhcydlhb, 2));
- } else {
- vo.setZhcydlhb(0.0);
- }
- //添加时间戳
- vo.setHours(i);
- //添加实际电量数据
- vo.setSjdl(StringUtils.round(sjdl, 2));
- if (sjdltb != 0) {
- // vo.setSjdltb(StringUtils.round((sjdl - sjdltb) / sjdltb * 100, 0));
- vo.setSjdltb(StringUtils.round(sjdltb, 2));
- } else {
- vo.setSjdltb(0.0);
- }
- if (sjdlhb != 0) {
- // vo.setSjdlhb(StringUtils.round((sjdl - sjdlhb) / sjdlhb * 100, 0));
- vo.setSjdlhb(StringUtils.round(sjdlhb, 2));
- } else {
- vo.setSjdlhb(0.0);
- }
- //添加上网电量数据
- vo.setSwdl(StringUtils.round(swdl, 2));
- if (swdltb != 0) {
- // vo.setSwdltb(StringUtils.round((swdl - swdltb) / swdltb * 100, 0));
- vo.setSwdltb(StringUtils.round(swdltb, 2));
- } else {
- vo.setSwdltb(0.0);
- }
- if (swdlhb != 0) {
- // vo.setSwdlhb(StringUtils.round((swdl - swdlhb) / swdlhb * 100, 0));
- vo.setSwdlhb(StringUtils.round(swdlhb, 2));
- } else {
- vo.setSwdlhb(0.0);
- }
- //添加购网电量数据
- vo.setGwdl(StringUtils.round(gwdl, 2));
- if (gwdltb != 0) {
- // vo.setGwdltb(StringUtils.round((gwdl - gwdltb) / gwdltb * 100, 0));
- vo.setGwdltb(StringUtils.round(gwdltb, 2));
- } else {
- vo.setGwdltb(0.0);
- }
- if (gwdlhb != 0) {
- // vo.setGwdlhb(StringUtils.round((gwdl - gwdlhb) / gwdlhb * 100, 0));
- vo.setGwdlhb(StringUtils.round(gwdlhb, 2));
- } else {
- vo.setGwdlhb(0.0);
- }
- //添加综合厂用电率数据
- vo.setZhcydll(StringUtils.round(zhcydll * 100, 0));
- if (zhcydlltb != 0) {
- // vo.setZhcydlltb(StringUtils.round((zhcydll - zhcydlltb) / zhcydlltb * 100, 0));
- vo.setZhcydlltb(StringUtils.round(zhcydlltb, 2));
- } else {
- vo.setZhcydlltb(0.0);
- }
- if (zhcydllhb != 0) {
- // vo.setZhcydllhb(StringUtils.round((zhcydll - zhcydllhb) / zhcydllhb * 100, 0));
- vo.setZhcydllhb(StringUtils.round(zhcydllhb, 2));
- } else {
- vo.setZhcydllhb(0.0);
- }
- vos.add(vo);
- SortUtils.sort(vos, "hours", SortUtils.ASC);
- map.put("value", vos);
- }
- firstDayZeroHour = DateUtils.addMonths(firstDayZeroHour, 1);
- calFirstDayZeroHour.setTime(firstDayZeroHour);
- calFirstMonth = calFirstDayZeroHour.get(Calendar.MONTH) + 1;
- hbjssj = DateUtils.addMonths(hbjssj, 1);
- tbjssj = DateUtils.addMonths(tbjssj, 1);
- }
- map.put("zhcydlsum", StringUtils.round(zhcydlsum, 2));
- map.put("sjdlsum", StringUtils.round(sjdlsum, 2));
- map.put("swdlsum", StringUtils.round(swdlsum, 2));
- map.put("gwdlsum", StringUtils.round(gwdlsum, 2));
- map.put("zhcydllsum", StringUtils.round(zhcydllsum * 100, 0));
- return map;
- }
- public Map<String, Object> Comprehensive(String wpId, String year) throws Exception {
- List<ProBasicPowerstation> wpls = CacheContext.wpls.stream().filter(g -> wpId.equals(g.getId())).collect(Collectors.toList());
- List<ComprehensiveVo> vos = new ArrayList<ComprehensiveVo>();
- Map<String, Object> map = new LinkedHashMap<>();
- //当前年份
- Calendar cal = Calendar.getInstance();
- int dqnf = cal.get(Calendar.YEAR);//本年
- //参数所传年份
- int currentyear = Integer.parseInt(year);
- // 设置为本年一月一号0点
- Calendar calendar1 = Calendar.getInstance();
- calendar1.setTime(new Date());
- calendar1.set(Calendar.YEAR, currentyear); // 根据当前年份变化
- calendar1.set(Calendar.MONTH, Calendar.JANUARY); // 0表示一月
- calendar1.set(Calendar.DAY_OF_MONTH, 1);
- calendar1.set(Calendar.HOUR_OF_DAY, 0);
- calendar1.set(Calendar.MINUTE, 0);
- calendar1.set(Calendar.SECOND, 0);
- calendar1.set(Calendar.MILLISECOND, 0);
- Date firstDayZeroHour = calendar1.getTime();
- // 获取firstDayZeroHour的月份
- Calendar calFirstDayZeroHour = Calendar.getInstance();
- calFirstDayZeroHour.setTime(firstDayZeroHour);
- int calFirstMonth = calFirstDayZeroHour.get(Calendar.MONTH) + 1;
- //当前时间月份
- Calendar calendar = Calendar.getInstance();
- int currentMonth = calendar.get(Calendar.MONTH);
- currentMonth = currentMonth + 1;
- // 设置为年初一月一号0点,同比计算取值时间(减去一年,比今年计算少一年)
- Calendar calendar3 = Calendar.getInstance();
- calendar3.setTime(new Date());
- calendar3.set(Calendar.YEAR, currentyear - 1); // 根据当前年份变化
- calendar3.set(Calendar.MONTH, Calendar.JANUARY); // 0表示一月
- calendar3.set(Calendar.DAY_OF_MONTH, 1);
- calendar3.set(Calendar.HOUR_OF_DAY, 0);
- calendar3.set(Calendar.MINUTE, 0);
- calendar3.set(Calendar.SECOND, 0);
- calendar3.set(Calendar.MILLISECOND, 0);
- Date tbjssj = calendar3.getTime();
- // 去年十二月一号0点值,环比计算取值时间(初始设置为去年十二月,每循环一次增加一月)
- Calendar calendar2 = Calendar.getInstance();
- calendar2.setTime(new Date());
- // 设置年份为传递的currentyear的前一年
- calendar2.set(Calendar.YEAR, currentyear - 1);
- // 设置月份为十二月
- calendar2.set(Calendar.MONTH, Calendar.DECEMBER); // 11表示十二月
- // 设置日期为每月的第一天
- calendar2.set(Calendar.DAY_OF_MONTH, 1);
- calendar2.set(Calendar.HOUR_OF_DAY, 0);
- calendar2.set(Calendar.MINUTE, 0);
- calendar2.set(Calendar.SECOND, 0);
- calendar2.set(Calendar.MILLISECOND, 0);
- Date hbjssj = calendar2.getTime();
- double zhcydlsum = 0.0;
- double sjdlsum = 0.0;
- double swdlsum = 0.0;
- double gwdlsum = 0.0;
- double zhcydllsum = 0.0;
- for (int i = 1; i <= 12; i++) {
- //综合场用电量
- double zhcydl = 0.0;
- double zhcydltb = 0.0;
- double zhcydlhb = 0.0;
- //实际电量
- double sjdl = 0.0;
- double sjdltb = 0.0;
- double sjdlhb = 0.0;
- //上网电量
- double swdl = 0.0;
- double swdltb = 0.0;
- double swdlhb = 0.0;
- //购网电量
- double gwdl = 0.0;
- double gwdltb = 0.0;
- double gwdlhb = 0.0;
- //综合场用电率
- double zhcydll = 0.0;
- double zhcydlltb = 0.0;
- double zhcydllhb = 0.0;
- for (ProBasicPowerstation wp : wpls) {
- //当前场站本年循环所有指标取值集合
- double rfdlsj = 0.0;
- List<StationInfoDay> zbls = iStationInfoDayService.getmax(wp.getId(), firstDayZeroHour);
- List<StationInfoDay> tbzbls = iStationInfoDayService.getmax(wp.getId(), tbjssj);
- List<StationInfoDay> hbzbls = iStationInfoDayService.getmax(wp.getId(), hbjssj);
- ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
- rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
- if (!zbls.isEmpty() && zbls != null) {
- //综合场用电量取值
- zhcydl = zbls.get(0).getZhcydl().doubleValue();
- zhcydlsum += zhcydl;
- //发电量取值
- if (calFirstMonth == currentMonth && currentyear == dqnf) {
- // sjdl = (zbls.get(0).getYfdldb().doubleValue() / 10000) + (rfdlsj / 10000);
- sjdl = (zbls.get(0).getRfdlFj().doubleValue() );
- } else {
- sjdl = zbls.get(0).getRfdlFj().doubleValue();
- }
- sjdlsum += sjdl;
- //上网电量取值
- swdl = zbls.get(0).getSwdl().doubleValue();
- swdlsum += swdl;
- //购网电量取值
- gwdl = zbls.get(0).getGwdl().doubleValue();
- gwdlsum += gwdl;
- //综合场用电率计算 —— 综合场用电率=(发电量-上网电量+购网电量)/发电量
- if (sjdl != 0) {
- zhcydll = (sjdl - swdl + gwdl) / sjdl;
- } else {
- zhcydll = (sjdl - swdl + gwdl) / 1;
- }
- zhcydllsum += zhcydll;
- }
- if (!tbzbls.isEmpty() && tbzbls != null) {
- zhcydltb = tbzbls.get(0).getZhcydl().doubleValue();
- sjdltb = tbzbls.get(0).getRfdlFj().doubleValue();
- swdltb = tbzbls.get(0).getSwdl().doubleValue();
- gwdltb = tbzbls.get(0).getGwdl().doubleValue();
- if (sjdltb != 0) {
- zhcydlltb = (sjdltb - swdltb + gwdltb) / sjdltb;
- } else {
- zhcydlltb = (sjdltb - swdltb + gwdltb) / 1;
- }
- }
- if (!hbzbls.isEmpty() && hbzbls != null) {
- zhcydlhb = hbzbls.get(0).getZhcydl().doubleValue();
- sjdlhb = hbzbls.get(0).getRfdlFj().doubleValue();
- swdlhb = hbzbls.get(0).getSwdl().doubleValue();
- gwdlhb = hbzbls.get(0).getGwdl().doubleValue();
- if (sjdlhb != 0) {
- zhcydllhb = (sjdlhb - swdlhb + gwdlhb) / sjdlhb;
- } else {
- zhcydllhb = (sjdlhb - swdlhb + gwdlhb) / 1;
- }
- }
- //添加各指标
- ComprehensiveVo vo = new ComprehensiveVo();
- //添加综合厂用电量数据
- vo.setZhcydl(StringUtils.round(zhcydl, 2));
- if (zhcydltb != 0) {
- // vo.setZhcydltb(StringUtils.round((zhcydl - zhcydltb) / zhcydltb * 100, 0));
- vo.setZhcydltb(StringUtils.round(zhcydltb, 2));
- } else {
- vo.setZhcydltb(0.0);
- }
- if (zhcydlhb != 0) {
- // vo.setZhcydlhb(StringUtils.round((zhcydl - zhcydlhb) / zhcydlhb * 100, 0));
- vo.setZhcydlhb(StringUtils.round(zhcydlhb, 2));
- } else {
- vo.setZhcydlhb(0.0);
- }
- //添加时间戳
- vo.setHours(i);
- //添加实际电量数据
- vo.setSjdl(StringUtils.round(sjdl, 2));
- if (sjdltb != 0) {
- // vo.setSjdltb(StringUtils.round((sjdl - sjdltb) / sjdltb * 100, 0));
- vo.setSjdltb(StringUtils.round(sjdltb, 2));
- } else {
- vo.setSjdltb(0.0);
- }
- if (sjdlhb != 0) {
- // vo.setSjdlhb(StringUtils.round((sjdl - sjdlhb) / sjdlhb * 100, 0));
- vo.setSjdlhb(StringUtils.round(sjdlhb, 2));
- } else {
- vo.setSjdlhb(0.0);
- }
- //添加上网电量数据
- vo.setSwdl(StringUtils.round(swdl, 2));
- if (swdltb != 0) {
- // vo.setSwdltb(StringUtils.round((swdl - swdltb) / swdltb * 100, 0));
- vo.setSwdltb(StringUtils.round(swdltb, 2));
- } else {
- vo.setSwdltb(0.0);
- }
- if (swdlhb != 0) {
- // vo.setSwdlhb(StringUtils.round((swdl - swdlhb) / swdlhb * 100, 0));
- vo.setSwdlhb(StringUtils.round(swdlhb, 2));
- } else {
- vo.setSwdlhb(0.0);
- }
- //添加购网电量数据
- vo.setGwdl(StringUtils.round(gwdl, 2));
- if (gwdltb != 0) {
- // vo.setGwdltb(StringUtils.round((gwdl - gwdltb) / gwdltb * 100, 0));
- vo.setGwdltb(StringUtils.round(gwdltb, 2));
- } else {
- vo.setGwdltb(0.0);
- }
- if (gwdlhb != 0) {
- // vo.setGwdlhb(StringUtils.round((gwdl - gwdlhb) / gwdlhb * 100, 0));
- vo.setGwdlhb(StringUtils.round(gwdlhb, 2));
- } else {
- vo.setGwdlhb(0.0);
- }
- //添加综合厂用电率数据
- vo.setZhcydll(StringUtils.round(zhcydll * 100, 0));
- if (zhcydlltb != 0) {
- // vo.setZhcydlltb(StringUtils.round((zhcydll - zhcydlltb) / zhcydlltb * 100, 0));
- vo.setZhcydlltb(StringUtils.round(zhcydlltb, 2));
- } else {
- vo.setZhcydlltb(0.0);
- }
- if (zhcydllhb != 0) {
- // vo.setZhcydllhb(StringUtils.round((zhcydll - zhcydllhb) / zhcydllhb * 100, 0));
- vo.setZhcydllhb(StringUtils.round(zhcydllhb, 2));
- } else {
- vo.setZhcydllhb(0.0);
- }
- vos.add(vo);
- SortUtils.sort(vos, "hours", SortUtils.ASC);
- map.put("value", vos);
- }
- firstDayZeroHour = DateUtils.addMonths(firstDayZeroHour, 1);
- calFirstDayZeroHour.setTime(firstDayZeroHour);
- calFirstMonth = calFirstDayZeroHour.get(Calendar.MONTH) + 1;
- hbjssj = DateUtils.addMonths(hbjssj, 1);
- tbjssj = DateUtils.addMonths(tbjssj, 1);
- }
- map.put("zhcydlsum", StringUtils.round(zhcydlsum, 2));
- map.put("sjdlsum", StringUtils.round(sjdlsum, 2));
- map.put("swdlsum", StringUtils.round(swdlsum, 2));
- map.put("gwdlsum", StringUtils.round(gwdlsum, 2));
- map.put("zhcydllsum", StringUtils.round(zhcydllsum * 100, 0));
- return map;
- }
- }
|