Commit b1c6884e authored by caotao's avatar caotao

1.对于主变高压侧、主变低压侧增加排序操作。

2.社会贡献汉字进行常量抽取。
parent ba8d57bf
...@@ -158,4 +158,11 @@ public class CommonConstans { ...@@ -158,4 +158,11 @@ public class CommonConstans {
put("前万线", Arrays.asList("313光差保护_总正向有功电度", "313光差保护_总反向有功电度", "313光差保护_总感性无功电度", "313光差保护_总容性无功电度")); put("前万线", Arrays.asList("313光差保护_总正向有功电度", "313光差保护_总反向有功电度", "313光差保护_总感性无功电度", "313光差保护_总容性无功电度"));
} }
}; };
public static final String XIAZAO_ZHUBIANGAOYACE = "1主变高压侧";
public static final String XIAZAO_ZHUBIANDIYACE = "1主变低压侧";
public static final String ER_YANG_HUA_TAN_JIANPAILIANG= "二氧化碳减排量(t)";
public static final String BIAO_ZHUN_MEI_JIANPAILIANG = "节约标准煤(t)";
public static final String TAN_FEN_CHEN_ZHUBIANDIYACE = "碳粉尘减排量(t)";
public static final String ER_YANG_HUA_LIU_ZHUBIANDIYACE = "二氧化硫减排量(t)";
} }
...@@ -364,16 +364,16 @@ public class CommonServiceImpl { ...@@ -364,16 +364,16 @@ public class CommonServiceImpl {
二氧化硫减排量(t)=发电量(万kW·h)*1.51 二氧化硫减排量(t)=发电量(万kW·h)*1.51
氮氧化物减排量(t)=发电量(万kW·h)*1.69 氮氧化物减排量(t)=发电量(万kW·h)*1.69
*/ */
co2.setUnit("二氧化碳减排量(t)"); co2.setUnit(CommonConstans.ER_YANG_HUA_TAN_JIANPAILIANG);
co2.setTitle(String.format("%.2f", totalSocialContribution * CommonConstans.carbonDioxide)); co2.setTitle(String.format("%.2f", totalSocialContribution * CommonConstans.carbonDioxide));
socialContributionDtoList.add(co2); socialContributionDtoList.add(co2);
coal.setUnit("节约标准煤(t)"); coal.setUnit(CommonConstans.BIAO_ZHUN_MEI_JIANPAILIANG);
coal.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.standardCoal))); coal.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.standardCoal)));
socialContributionDtoList.add(coal); socialContributionDtoList.add(coal);
toner.setUnit("碳粉尘减排量(t)"); toner.setUnit(CommonConstans.TAN_FEN_CHEN_ZHUBIANDIYACE);
toner.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.toner ))); toner.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.toner )));
socialContributionDtoList.add(toner); socialContributionDtoList.add(toner);
so2.setUnit("二氧化硫减排量(t)"); so2.setUnit(CommonConstans.ER_YANG_HUA_LIU_ZHUBIANDIYACE);
so2.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.sulfurDioxide ))); so2.setTitle(String.format("%.2f", (totalSocialContribution * CommonConstans.sulfurDioxide )));
socialContributionDtoList.add(so2); socialContributionDtoList.add(so2);
socialContributionDtoPage.setRecords(socialContributionDtoList); socialContributionDtoPage.setRecords(socialContributionDtoList);
......
...@@ -1052,19 +1052,19 @@ public class MonitoringServiceImpl { ...@@ -1052,19 +1052,19 @@ public class MonitoringServiceImpl {
Double totalAnnual = (powerOfAnnualFD + powerOfAnnualGF); Double totalAnnual = (powerOfAnnualFD + powerOfAnnualGF);
HashMap<String, String> stringHashMap13 = new HashMap<>(); HashMap<String, String> stringHashMap13 = new HashMap<>();
stringHashMap13.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.carbonDioxide))); stringHashMap13.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.carbonDioxide)));
stringHashMap13.put("title2", "二氧化碳减排量(t)"); stringHashMap13.put("title2",CommonConstans.ER_YANG_HUA_TAN_JIANPAILIANG);
list3.add(stringHashMap13); list3.add(stringHashMap13);
HashMap<String, String> stringHashMap14 = new HashMap<>(); HashMap<String, String> stringHashMap14 = new HashMap<>();
stringHashMap14.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.standardCoal))); stringHashMap14.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.standardCoal)));
stringHashMap14.put("title2", "节约标准煤(t)"); stringHashMap14.put("title2", CommonConstans.BIAO_ZHUN_MEI_JIANPAILIANG);
list3.add(stringHashMap14); list3.add(stringHashMap14);
HashMap<String, String> stringHashMap15 = new HashMap<>(); HashMap<String, String> stringHashMap15 = new HashMap<>();
stringHashMap15.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.toner))); stringHashMap15.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.toner)));
stringHashMap15.put("title2", "碳粉尘减排量(t)"); stringHashMap15.put("title2", CommonConstans.TAN_FEN_CHEN_ZHUBIANDIYACE);
list3.add(stringHashMap15); list3.add(stringHashMap15);
HashMap<String, String> stringHashMap16 = new HashMap<>(); HashMap<String, String> stringHashMap16 = new HashMap<>();
stringHashMap16.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.sulfurDioxide))); stringHashMap16.put("title1", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.sulfurDioxide)));
stringHashMap16.put("title2", "二氧化硫减排量(t)"); stringHashMap16.put("title2", CommonConstans.ER_YANG_HUA_LIU_ZHUBIANDIYACE);
list3.add(stringHashMap16); list3.add(stringHashMap16);
page3.setRecords(list3); page3.setRecords(list3);
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment