|
|
@@ -160,6 +160,15 @@ public class WECostBasePlugIn extends AbstractBasePlugIn implements Plugin {
|
|
|
// 获取人员宿舍 - 水电费信息(总)
|
|
|
HashMap<Long, HashMap<String, Double>> calculationMap = WECostUtil.dormitoryCalculation(dormitoryIds, startTime, endTime);
|
|
|
|
|
|
+ //获取水电总量
|
|
|
+ HashMap<String, Map<Long, Double>> hydroelectricAll = WECostUtil.getHydroelectricAll(dormitoryIds, startTime, endTime);
|
|
|
+ Map<Long, Double> waterAll = hydroelectricAll.get("water");
|
|
|
+ Map<Long, Double> eleAll = hydroelectricAll.get("ele");
|
|
|
+
|
|
|
+ //获取水电费单位信息
|
|
|
+ HashMap<Long, HashMap<String, Double>> dormitoryMap = WECostUtil.dormitoryHydroelectric(dormitoryIds);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
for (DynamicObject personCheck : personCheckLoad) {
|
|
|
int row = this.getModel().createNewEntryRow("uzi9_water_ele_char");
|
|
|
@@ -186,7 +195,20 @@ public class WECostBasePlugIn extends AbstractBasePlugIn implements Plugin {
|
|
|
this.getModel().setValue("uzi9_stay_days_all", checkDaysAll, row);
|
|
|
|
|
|
if (calculationMapAll != null) {
|
|
|
-
|
|
|
+ HashMap<String, Double> unitMap = dormitoryMap.get(dormitory.getLong("id"));
|
|
|
+
|
|
|
+ //宿舍用水
|
|
|
+ Double waterReAll = waterAll.get(dormitory.getLong("id"));
|
|
|
+ this.getModel().setValue("uzi9_water_read_all", waterReAll, row);
|
|
|
+ //宿舍用电
|
|
|
+ Double eleReAll = eleAll.get(dormitory.getLong("id"));
|
|
|
+ this.getModel().setValue("uzi9_ele_read_all", eleReAll, row);
|
|
|
+ //水单位
|
|
|
+ Double waterUnit = unitMap.get("water");
|
|
|
+ this.getModel().setValue("uzi9_water_bill", waterUnit, row);
|
|
|
+ //电单位
|
|
|
+ Double eleUnit = unitMap.get("ele");
|
|
|
+ this.getModel().setValue("uzi9_electricity_bill", eleUnit, row);
|
|
|
//宿舍用水总费用
|
|
|
Double costWaterAll = calculationMapAll.get("water");
|
|
|
this.getModel().setValue("uzi9_waterall_cost", costWaterAll, row);
|
|
|
@@ -202,6 +224,26 @@ public class WECostBasePlugIn extends AbstractBasePlugIn implements Plugin {
|
|
|
//当月电费
|
|
|
double costEle = Math.round((costEleAll / checkDaysAll * checkDays) * 100.0) / 100.0;
|
|
|
this.getModel().setValue("uzi9_ele_cost", costEle, row);
|
|
|
+ }else {
|
|
|
+ HashMap<String, Double> unitMap = dormitoryMap.get(dormitory.getLong("id"));
|
|
|
+ //宿舍用水
|
|
|
+ this.getModel().setValue("uzi9_water_read_all", 0, row);
|
|
|
+ //宿舍用电
|
|
|
+ this.getModel().setValue("uzi9_ele_read_all", 0, row);
|
|
|
+ //水单位
|
|
|
+ Double waterUnit = unitMap.get("water");
|
|
|
+ this.getModel().setValue("uzi9_water_bill", waterUnit, row);
|
|
|
+ //电单位
|
|
|
+ Double eleUnit = unitMap.get("ele");
|
|
|
+ this.getModel().setValue("uzi9_electricity_bill", eleUnit, row);
|
|
|
+ //宿舍用水总费用
|
|
|
+ this.getModel().setValue("uzi9_waterall_cost", 0, row);
|
|
|
+ //宿舍用电总费用
|
|
|
+ this.getModel().setValue("uzi9_eleall_cost", 0, row);
|
|
|
+ //当月水费
|
|
|
+ this.getModel().setValue("uzi9_water_cost", 0, row);
|
|
|
+ //当月电费
|
|
|
+ this.getModel().setValue("uzi9_ele_cost", 0, row);
|
|
|
}
|
|
|
}
|
|
|
|