|
@@ -13,6 +13,7 @@ import com.persagy.apm.energy.report.monthly.detail.business.model.vo.GroupInfo;
|
|
|
import com.persagy.apm.energy.report.monthly.detail.business.model.vo.PowerItemVO;
|
|
|
import com.persagy.apm.energy.report.monthly.detail.business.model.vo.PowerVO;
|
|
|
import com.persagy.apm.energy.report.monthly.outline.model.ReportOutline;
|
|
|
+import com.persagy.apm.energy.report.monthly.outline.service.IBusinessReportPowerInfoService;
|
|
|
import com.persagy.apm.energy.report.monthly.outline.service.IReportOutlineService;
|
|
|
import com.persagy.apm.energy.report.saasweb.model.vo.ReportProjectVO;
|
|
|
import com.persagy.apm.energy.report.saasweb.service.ISaasWebService;
|
|
@@ -31,7 +32,7 @@ import java.util.stream.Collectors;
|
|
|
* @version V1.0 2021/5/30 7:30 下午
|
|
|
**/
|
|
|
@Service
|
|
|
-public class BusinessReportPowerInfoServiceImpl implements com.persagy.apm.energy.report.monthly.outline.service.IBusinessReportPowerInfoService {
|
|
|
+public class BusinessReportPowerInfoServiceImpl implements IBusinessReportPowerInfoService {
|
|
|
@Autowired
|
|
|
private IReportOutlineService reportOutlineService;
|
|
|
@Autowired
|
|
@@ -168,7 +169,7 @@ public class BusinessReportPowerInfoServiceImpl implements com.persagy.apm.energ
|
|
|
lastYearCount = lastYearSumItem.getLastYearCount();
|
|
|
powerItemVO.setLastYearCount(lastYearCount);
|
|
|
if (totalCommercialArea != null && !totalCommercialArea.equals(zero) && lastYearCount != null) {
|
|
|
- powerItemVO.setLastYearPerCount(lastYearCount / totalCommercialArea);
|
|
|
+ powerItemVO.setLastYearPerCount(DataUtils.doubleDivide(lastYearCount, totalCommercialArea));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -189,21 +190,21 @@ public class BusinessReportPowerInfoServiceImpl implements com.persagy.apm.energ
|
|
|
yearCount = yearSumItem.getYearCount();
|
|
|
powerItemVO.setYearCount(yearCount);
|
|
|
if (totalCommercialArea != null && !totalCommercialArea.equals(zero) && yearCount != null) {
|
|
|
- powerItemVO.setYearPerCount(yearCount / totalCommercialArea);
|
|
|
+ powerItemVO.setYearPerCount(DataUtils.doubleDivide(yearCount, totalCommercialArea));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (currentMonth != null && lastMonth != null) {
|
|
|
- Double linkCount = currentMonth - lastMonth;
|
|
|
- Double linkRange = linkCount / lastMonth;
|
|
|
+ Double linkCount = DataUtils.doubleSubtract(currentMonth, lastMonth);
|
|
|
+ Double linkRange = DataUtils.doubleDivide(linkCount, lastMonth);
|
|
|
powerItemVO.setLinkCount(linkCount);
|
|
|
powerItemVO.setLinkRange(linkRange);
|
|
|
}
|
|
|
|
|
|
if (lastYearCount != null && yearCount != null) {
|
|
|
- double sameCount = yearCount - lastYearCount;
|
|
|
+ double sameCount = DataUtils.doubleSubtract(yearCount, lastYearCount);
|
|
|
powerItemVO.setSameCount(sameCount);
|
|
|
- powerItemVO.setSameRange(sameCount / lastYearCount);
|
|
|
+ powerItemVO.setSameRange(DataUtils.doubleDivide(sameCount, lastYearCount));
|
|
|
}
|
|
|
return powerItemVO;
|
|
|
}
|