| @@ -2314,14 +2314,13 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| params.put("enddate", DateUtils.date2String(endDate,"yyyy-MM-dd") + " 23:59:59"); | params.put("enddate", DateUtils.date2String(endDate,"yyyy-MM-dd") + " 23:59:59"); | ||||
| Map<String, Object> payinfo = wxBillRentMapper.queryPayInfoTotal(params); | Map<String, Object> payinfo = wxBillRentMapper.queryPayInfoTotal(params); | ||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | |||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | |||||
| Double receivepay = (Double) payinfo.get("receivepay"); | |||||
| Double pay = (Double) payinfo.get("pay"); | |||||
| if (receivepay.doubleValue() > 0) { | if (receivepay.doubleValue() > 0) { | ||||
| BigDecimal divide = pay.divide(receivepay, 8, BigDecimal.ROUND_HALF_UP); | |||||
| double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | |||||
| Double divide = pay/receivepay*100; | |||||
| datamap.put("rentysje", receivepay); | datamap.put("rentysje", receivepay); | ||||
| datamap.put("rentssje", pay); | datamap.put("rentssje", pay); | ||||
| datamap.put("rentzjsjl", (double) Math.round(zjcjl * 100) / 100); | |||||
| datamap.put("rentzjsjl", formatDouble(divide)); | |||||
| } else { | } else { | ||||
| datamap.put("rentysje", 0); | datamap.put("rentysje", 0); | ||||
| datamap.put("rentssje", 0); | datamap.put("rentssje", 0); | ||||
| @@ -2336,14 +2335,13 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| //物业费收缴率 | //物业费收缴率 | ||||
| payinfo = wxBillPropertyMapper.queryPayInfoTotal(params); | payinfo = wxBillPropertyMapper.queryPayInfoTotal(params); | ||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | |||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | |||||
| Double receivepay = (Double) payinfo.get("receivepay"); | |||||
| Double pay = (Double) payinfo.get("pay"); | |||||
| if (receivepay.doubleValue() > 0) { | if (receivepay.doubleValue() > 0) { | ||||
| BigDecimal divide = pay.divide(receivepay, 8, BigDecimal.ROUND_HALF_UP); | |||||
| double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | |||||
| Double divide = pay/receivepay*100; | |||||
| datamap.put("propertyysje", receivepay); | datamap.put("propertyysje", receivepay); | ||||
| datamap.put("propertyssje", pay); | datamap.put("propertyssje", pay); | ||||
| datamap.put("propertyzjsjl", (double) Math.round(zjcjl * 100) / 100); | |||||
| datamap.put("propertyzjsjl", formatDouble(divide)); | |||||
| } else { | } else { | ||||
| datamap.put("propertyysje", 0); | datamap.put("propertyysje", 0); | ||||
| datamap.put("propertyssje", 0); | datamap.put("propertyssje", 0); | ||||
| @@ -2358,14 +2356,13 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| //押金收缴率 | //押金收缴率 | ||||
| payinfo = wxBillDepositMapper.queryPayInfoAllTotal(params); | payinfo = wxBillDepositMapper.queryPayInfoAllTotal(params); | ||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | |||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | |||||
| Double receivepay = (Double) payinfo.get("receivepay"); | |||||
| Double pay = (Double) payinfo.get("pay"); | |||||
| if (receivepay.doubleValue() > 0) { | if (receivepay.doubleValue() > 0) { | ||||
| BigDecimal divide = pay.divide(receivepay, 8, BigDecimal.ROUND_HALF_UP); | |||||
| double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | |||||
| Double divide = pay/receivepay* 100; | |||||
| datamap.put("depositysje", receivepay); | datamap.put("depositysje", receivepay); | ||||
| datamap.put("depositssje", pay); | datamap.put("depositssje", pay); | ||||
| datamap.put("depositzjsjl", (double) Math.round(zjcjl * 100) / 100); | |||||
| datamap.put("depositzjsjl", formatDouble(divide)); | |||||
| } else { | } else { | ||||
| datamap.put("depositysje", 0); | datamap.put("depositysje", 0); | ||||
| datamap.put("depositssje", 0); | datamap.put("depositssje", 0); | ||||
| @@ -2380,14 +2377,13 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| //其他费用收缴率 | //其他费用收缴率 | ||||
| payinfo = wxBillOtherMapper.queryPayInfoTotal(params); | payinfo = wxBillOtherMapper.queryPayInfoTotal(params); | ||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | |||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | |||||
| Double receivepay = (Double) payinfo.get("receivepay"); | |||||
| Double pay = (Double) payinfo.get("pay"); | |||||
| if (receivepay.doubleValue() > 0) { | if (receivepay.doubleValue() > 0) { | ||||
| BigDecimal divide = pay.divide(receivepay, 8, BigDecimal.ROUND_HALF_UP); | |||||
| double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | |||||
| Double divide = pay/receivepay*100; | |||||
| datamap.put("otherysje", receivepay); | datamap.put("otherysje", receivepay); | ||||
| datamap.put("otherssje", pay); | datamap.put("otherssje", pay); | ||||
| datamap.put("otherzjsjl", (double) Math.round(zjcjl * 100) / 100); | |||||
| datamap.put("otherzjsjl",formatDouble(divide)); | |||||
| } else { | } else { | ||||
| datamap.put("otherysje", 0); | datamap.put("otherysje", 0); | ||||
| datamap.put("otherssje", 0); | datamap.put("otherssje", 0); | ||||
| @@ -2462,6 +2458,15 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| return new ResultData(datamap); | return new ResultData(datamap); | ||||
| } | } | ||||
| public static double formatDouble(Double d){ | |||||
| String s = d+""; | |||||
| String lt = s.substring(s.indexOf("."),s.length()); | |||||
| if(lt.length() >3){ | |||||
| s = s.substring(0,s.indexOf(".")+3); | |||||
| } | |||||
| return Double.parseDouble(s); | |||||
| } | |||||
| /** | /** | ||||
| * 营销数据 | * 营销数据 | ||||
| * @param tenantId | * @param tenantId | ||||