Commit f20ecc5c authored by tianyiming's avatar tianyiming

大屏-气瓶-点击延安区域报错修改

parent 9b3372fb
......@@ -372,6 +372,8 @@ public class AQZSDPStatisticsServiceImpl {
countItemDto.setCzjc("0");
countItemDto.setCzjchege("0");
countItemDto.setJianyanchaoqi("0");
countItemDto.setRyhg("0");
countItemDto.setSjhg("0");
}
public Map<String, Object> mainBodyCount(DPFilterParamDto dpFilterParamDto) {
......
......@@ -467,11 +467,11 @@ public class CylinderDPStatisticsServiceImpl {
private Map<String,Object> getStationRate(String orgCode,Map<String,Object> result){
// 气站总数
Long totalNum = cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode);
Long totalNum = null == orgCode ? null : cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode);
// 已对接总数(存在充装业务数据的企业则认为已对接)
Long count = cylinderStatisticsMapper.countEnterpriseUsed(orgCode);
Long count = null == orgCode ? null : cylinderStatisticsMapper.countEnterpriseUsed(orgCode);
if (totalNum != null && count != null) {
if (totalNum != null && count != null && totalNum > 0 ) {
BigDecimal percent = (new BigDecimal(count.doubleValue() * 100).divide(new BigDecimal(totalNum.doubleValue()), 2, RoundingMode.HALF_UP));
result.put("stationRate", Double.valueOf(percent.toString()));
} else {
......
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