|
@@ -144,20 +144,23 @@ public class BusinessReportCostInfoServiceImpl implements IBusinessReportCostInf
|
|
|
public CostItemVO getCostItemInfo(
|
|
|
Date reportMonth, ReportProjectVO reportProjectInfo,
|
|
|
Double totalCommercialArea, String functionId) {
|
|
|
+ // 费用展示为万元,定义一万元变量
|
|
|
+ Double tenThousand = 10000d;
|
|
|
String projectId = reportProjectInfo.getProjectId();
|
|
|
CostItemVO costItemVO = new CostItemVO();
|
|
|
String currentMonthStr = functionValueService.getFunctionValue(functionId, reportMonth, projectId);
|
|
|
Double currentMonth = null;
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(currentMonthStr)) {
|
|
|
currentMonth = Double.valueOf(currentMonthStr);
|
|
|
- costItemVO.setCurrentMonth(currentMonth);
|
|
|
+ costItemVO.setCurrentMonth(DataUtils.doubleDivide(currentMonth, tenThousand));
|
|
|
}
|
|
|
String lastMonthStr = functionValueService.getFunctionValue(
|
|
|
functionId, DateUtils.getFirstDayOfLastMonth(reportMonth), projectId);
|
|
|
Double lastMonth = null;
|
|
|
if (StringUtils.isNotBlank(lastMonthStr)) {
|
|
|
lastMonth = Double.valueOf(lastMonthStr);
|
|
|
- costItemVO.setLastMonth(lastMonth);
|
|
|
+ costItemVO.setLastMonth(DataUtils.doubleDivide(lastMonth, tenThousand));
|
|
|
}
|
|
|
|
|
|
// 统计去年同期的费用
|
|
@@ -178,7 +181,9 @@ public class BusinessReportCostInfoServiceImpl implements IBusinessReportCostInf
|
|
|
CostItemVO lastYearSumItem = getCostSum(lastYearItems);
|
|
|
if (lastYearSumItem != null) {
|
|
|
lastYearCount = lastYearSumItem.getLastYearCount();
|
|
|
- costItemVO.setLastYearCount(lastYearCount);
|
|
|
+ if (lastYearCount != null) {
|
|
|
+ costItemVO.setLastYearCount(DataUtils.doubleDivide(lastYearCount, tenThousand));
|
|
|
+ }
|
|
|
if (totalCommercialArea != null && !totalCommercialArea.equals(zero) && lastYearCount != null) {
|
|
|
costItemVO.setLastYearPerCount(DataUtils.doubleDivide(lastYearCount, totalCommercialArea));
|
|
|
}
|
|
@@ -202,7 +207,9 @@ public class BusinessReportCostInfoServiceImpl implements IBusinessReportCostInf
|
|
|
CostItemVO yearSumItem = getCostSum(yearItems);
|
|
|
if (yearSumItem != null) {
|
|
|
yearCount = yearSumItem.getYearCount();
|
|
|
- costItemVO.setYearCount(yearCount);
|
|
|
+ if (yearCount != null) {
|
|
|
+ costItemVO.setYearCount(DataUtils.doubleDivide(yearCount, tenThousand));
|
|
|
+ }
|
|
|
if (totalCommercialArea != null && !totalCommercialArea.equals(zero) && yearCount != null) {
|
|
|
costItemVO.setYearPerCount(DataUtils.doubleDivide(yearCount, totalCommercialArea));
|
|
|
}
|