|
@@ -112,7 +112,7 @@ public class EconomyPointHomePageService {
|
|
|
Map<String,Object> allmap = new HashMap<>();
|
|
|
//获取当前时间
|
|
|
String strdate = DateUtils.toDate1(new Date());
|
|
|
- Date date = DateUtils.parseDate("2022-11-22");
|
|
|
+ Date date = DateUtils.parseDate(strdate);
|
|
|
|
|
|
|
|
|
|
|
@@ -143,7 +143,7 @@ public class EconomyPointHomePageService {
|
|
|
threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(foreignKeyId, staType, dateType, date);
|
|
|
|
|
|
List<ProEconPointCodeDTO> pointCodeDTO = proEconPointCodeService.getEconPointRanking(regionId, companyId, pointCode);
|
|
|
- /** 场站信息 */
|
|
|
+ /** 场站信息 */
|
|
|
List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,staType);
|
|
|
wsdlfx = new HashMap<>();//五损电量分析
|
|
|
zhcydl= new ArrayList<>();//综合场用电率
|
|
@@ -210,8 +210,8 @@ public class EconomyPointHomePageService {
|
|
|
private void currfdinfo() {
|
|
|
ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
if(null != fdinfo){
|
|
|
- fdinfomap.put("fdl",fdinfo.getRfdl());
|
|
|
- fdinfomap.put("qfdl",fdinfo.getRqfdl());
|
|
|
+ fdinfomap.put("fdl",fdinfo.getRfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getRqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
if(compare0(fdinfo.getRllfdl())){
|
|
|
fdinfomap.put("fnlyl", compare100(fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
}else {
|
|
@@ -225,8 +225,8 @@ public class EconomyPointHomePageService {
|
|
|
private void monthfdinfo() {
|
|
|
ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
if(null != fdinfo){
|
|
|
- fdinfomap.put("fdl",fdinfo.getYfdl());
|
|
|
- fdinfomap.put("qfdl",fdinfo.getYqfdl());
|
|
|
+ fdinfomap.put("fdl",fdinfo.getYfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getYqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
fdinfomap.put("fnlyl", compare100(fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
|
|
|
|
|
@@ -235,8 +235,8 @@ public class EconomyPointHomePageService {
|
|
|
private void yearfdinfo() {
|
|
|
ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
if(null != fdinfo){
|
|
|
- fdinfomap.put("fdl",fdinfo.getNfdl());
|
|
|
- fdinfomap.put("qfdl",fdinfo.getNqfdl());
|
|
|
+ fdinfomap.put("fdl",fdinfo.getNfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getNqfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));
|
|
|
fdinfomap.put("fnlyl", compare100(fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
|
|
|
}
|
|
@@ -291,12 +291,12 @@ public class EconomyPointHomePageService {
|
|
|
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
- m.put("fdl", i.getRfdl()); //发电量
|
|
|
- m.put("sldl", i.getRcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
- m.put("jxdl", i.getRjxssdl()); //检修
|
|
|
- m.put("xddl", i.getRxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
- m.put("gzdl", i.getRgzssdl()); //故障
|
|
|
- m.put("xndl", i.getRxnssdl());//性能
|
|
|
+ m.put("fdl", i.getRfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //发电量
|
|
|
+ m.put("sldl", (i.getRcwsldwssdl().add(i.getRcwsltqssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //受累
|
|
|
+ m.put("jxdl", i.getRjxssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //检修
|
|
|
+ m.put("xddl", (i.getRxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
|
|
|
+ m.put("gzdl", i.getRgzssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //故障
|
|
|
+ m.put("xndl", i.getRxnssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
|
|
|
m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
@@ -305,12 +305,12 @@ public class EconomyPointHomePageService {
|
|
|
private void monthDltjfx() {
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
- m.put("fdl", i.getYfdl()); //发电量
|
|
|
- m.put("sldl", i.getYcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
- m.put("jxdl", i.getYjxssdl()); //检修
|
|
|
- m.put("xddl", i.getYxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
- m.put("gzdl", i.getYgzssdl()); //故障
|
|
|
- m.put("xndl", i.getYxnssdl());//性能
|
|
|
+ m.put("fdl", i.getYfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //发电量
|
|
|
+ m.put("sldl", (i.getYcwsldwssdl().add(i.getRcwsltqssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //受累
|
|
|
+ m.put("jxdl", i.getYjxssdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //检修
|
|
|
+ m.put("xddl", (i.getYxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
|
|
|
+ m.put("gzdl", (i.getYgzssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //故障
|
|
|
+ m.put("xndl", (i.getYxnssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
|
|
|
m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
@@ -319,12 +319,12 @@ public class EconomyPointHomePageService {
|
|
|
private void yearDltjfx() {
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
- m.put("fdl", i.getNfdl()); //发电量
|
|
|
- m.put("sldl", i.getNcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
- m.put("jxdl", i.getNjxssdl()); //检修
|
|
|
- m.put("xddl", i.getNxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
- m.put("gzdl", i.getNgzssdl()); //故障
|
|
|
- m.put("xndl", i.getNxnssdl());//性能
|
|
|
+ m.put("fdl", i.getNfdl().divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //发电量
|
|
|
+ m.put("sldl", (i.getNcwsldwssdl().add(i.getRcwsltqssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //受累
|
|
|
+ m.put("jxdl", (i.getNjxssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //检修
|
|
|
+ m.put("xddl", (i.getNxdtjssdl().add(i.getRxdjclssdl())).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//限电
|
|
|
+ m.put("gzdl", (i.getNgzssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP)); //故障
|
|
|
+ m.put("xndl", (i.getNxnssdl()).divide(new BigDecimal(10000), 6, BigDecimal.ROUND_HALF_UP));//性能
|
|
|
m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
@@ -390,7 +390,7 @@ public class EconomyPointHomePageService {
|
|
|
//限电
|
|
|
wsdlfx.put("xddl", compare100((fiveInfo.getRxdtjssdl().add(fiveInfo.getRxdjclssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//故障
|
|
|
- wsdlfx.put("fgzdl", compare100(fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
+ wsdlfx.put("gzdl", compare100(fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//性能
|
|
|
wsdlfx.put("xndl", compare100(fiveInfo.getRxnssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
|
|
@@ -406,7 +406,7 @@ public class EconomyPointHomePageService {
|
|
|
//限电
|
|
|
wsdlfx.put("xddl", compare100((fiveInfo.getYxdtjssdl().add(fiveInfo.getYxdjclssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//故障
|
|
|
- wsdlfx.put("fgzdl", compare100(fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
+ wsdlfx.put("gzdl", compare100(fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//性能
|
|
|
wsdlfx.put("xndl", compare100(fiveInfo.getYxnssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
|
|
@@ -423,7 +423,7 @@ public class EconomyPointHomePageService {
|
|
|
//限电
|
|
|
wsdlfx.put("xddl", compare100((fiveInfo.getNxdtjssdl().add(fiveInfo.getNxdjclssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//故障
|
|
|
- wsdlfx.put("fgzdl", compare100(fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
+ wsdlfx.put("gzdl", compare100(fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
//性能
|
|
|
wsdlfx.put("xndl", compare100(fiveInfo.getNxnssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
|
|
|
}
|
|
@@ -968,7 +968,7 @@ public class EconomyPointHomePageService {
|
|
|
private boolean compare0(BigDecimal a){
|
|
|
BigDecimal b = new BigDecimal (0.00);
|
|
|
BigDecimal c = new BigDecimal (0);
|
|
|
- if(b.compareTo(a) == 0 || b.compareTo(c) == 0){
|
|
|
+ if(b.compareTo(a) == 0 || c.compareTo(a) == 0){
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|